How to become a Midnight block producer on testnet

Avatar of the content author
Developer resources
Sign up now so you never miss an update
contributors
Avatar of the content author
Stevan LohjaDeveloper Relations Engineer
Avatar of the content author
Ian MacRaeCopywriter
Learn how to become a testnet block producer, including setup for Cardano SPOs, dependency services, and node configuration.

Midnight block producers play an essential role in the Midnight ecosystem by generating and validating new blocks to ensure the security, resilience and integrity of the blockchain.

This article outlines and connects you to the essential resources, including key information, documentation, and step-by-step walkthroughs, to help you get started as a block producer on Midnight testnet.

Understanding the infrastructure

To run a Midnight node on testnet, you’ll need to install:

  • A Cardano Stake Pool Operator (SPO) on the preview testnet: Midnight is a partner chain to Cardano, which means Cardano SPOs can become Midnight block producers and Midnight block producers will first need to have an SPO on the Cardano testnet. A Midnight testnet block producer is an SPO that has opted into Midnight block production and also runs a Midnight node
  • Partner chain dependency services: Tools like Cardano-db-sync, Postgres, Kupo, and Ogmios are critical. All these components are included in a Docker Compose project that orchestrates the partner chain dependencies.
  • A Midnight node: A Midnight node is a piece of software that connects with the Midnight blockchain. It maintains a copy of the ledger, validates transactions and runs as the core block producer for the Midnight testnet.

You’ll also need a reliable internet connection with minimal downtime and speeds of at least 50MB/s.

Infrastructure required to run a Midnight node diagram
Infrastructure required to run a Midnight node diagram

Setup process

First, to become a Midnight block producer you need to run an SPO on the Cardano Preview Testnet.

To complete this effectively, it is recommended to have proficiency in setting up, running, and monitoring blockchain nodes consistently, along with a strong grasp of command-line interface (CLI) usage, system administration, and networking.

To begin, you must operate as an SPO on the Cardano Preview Testnet. If you’re an experienced SPO, deploy your SPO to Preview (or learn how to become an SPO). Ensure you have:

  • A UTXO and its associated payment signing key (payment.skey)
  • The SPO cold signing key (cold.skey)
  • Note: Extended BIP-32 signing keys are not supported at this time

If you're new to SPOs, refer to the Cardano community resources for detailed guidance.

Second, set up partner chain dependency services.

With your SPO ready, the next step is to configure dependency services for the Midnight testnet. To simplify this process you can use a Docker Compose file to start the required services on a server.

Running the Midnight node

Once your dependency services are operational, it’s time to run the Midnight node in validator mode. This node follows the partner chain scripts for testnet on the Preview chain. Use the official documentation to configure the Midnight node, ensuring it connects to your Cardano-db-sync/Postgres instance.

Committee rotation

After setup, you can register your SPO as a committee candidate using the open-source partner-chain-cli. This involves generating keys, creating a registration signature, and submitting it. You’ll be part of the committee rotation within two epochs (approximately 48 hours).

Block production

If you’ve made it through these steps, you are now a block producer on Midnight testnet. If you need further guidance and community support, join the Midnight Community Discord server and explore Midnight’s documentation.

To follow along the steps in detail, watch the full walkthrough demo and learn how to become a Midnight block producer on the Midnight testnet.

What’s next

Testnet offers an opportunity to learn how the Midnight network works while actively contributing to its development. Along with participating in the network, block producers can provide critical feedback that helps shape the future direction of the network.

Key milestones on the horizon for the testnet include the introduction of hard fork capabilities, unshielded token support, and SNARK upgradability. Preparing to operate as a Midnight block producer now will ensure you're ready for upcoming releases. As mainnet approaches, features like token bridges and telemetry will further enhance the ecosystem. For a deeper dive into the roadmap, check out the Midnight Nightpaper.

Developer resources

Share