Mina Block Producers

Alperen Tunçkıran
5 min readOct 27, 2024

--

Mina’s node structure differs somewhat from other blockchains. We will dive into the role of Block Producers within the Mina network.

1. Mina Network and Proof of Stake

Mina operates using a Proof of Stake (PoS) consensus mechanism. To become a validator (Block Producer), you need to stake at least 1 MINA token. Users can delegate their MINA tokens to you, increasing your voting power and allowing them to earn a share of the rewards.

1.1 Verifiable Random Function (VRF) and Block Production

Each Block Producer independently runs a Verifiable Random Function (VRF). If the output from the VRF exceeds a threshold determined by the amount of MINA staked, the Block Producer earns the opportunity to produce a specific block.

  • Secrecy of VRF Output: This process is kept secret; only the node running the VRF knows which block it is eligible to produce. This secrecy helps prevent Denial of Service (DoS) attacks, as attackers cannot target specific nodes producing blocks.

Imagine a lottery where each participant’s chance of winning is proportional to their stake, but only the winner knows they’ve won until they announce it. This prevents others from interfering with the winner before they can claim their prize.

1.2 Handling Multiple Block Producers

If multiple Block Producers are eligible to produce the same block, the longest chain rule comes into play, leading to a temporary fork in the network. The chain with the most accumulated stake behind it becomes the canonical chain.

1.3 Preventing Manipulation Through Delayed Stake Tracking

Since the VRF output depends on the amount of stake, there’s potential for manipulation (e.g., quickly increasing stake to win block production rights). To prevent this, the network tracks your stake amount with a delay of two epochs. Changes to your stake only take effect after this delay, making it harder to game the system.

2. The Block Production Process

2.1 Selecting Transactions

Block Producers choose transactions submitted to the network (waiting in the mempool) to include in the block. They verify the validity of these transactions, checking for issues like double-spending.

2.2 Outsourcing SNARK Proofs via the Snarketplace

For each transaction, Block Producers require a SNARK proof. Producing these proofs is computationally intensive, so they outsource this task to specialized nodes called ZK-SNARKers through a marketplace known as the Snarketplace.

It’s akin to a factory outsourcing the production of specific components to specialized suppliers to save time and resources.

2.3 Incorporating SNARK Proofs and Finalizing the Block

Block Producers receive the SNARK proofs from the ZK-SNARKers and add them to the block, along with:

  • A transaction paying the SNARK worker for their service.
  • A transaction for their own block reward, coinbase txn.

2.4 Generating the SNARK Proof of the Block

After creating the block, the Block Producer generates a SNARK proof that links the new block to the previous ones, effectively proving the validity of the entire blockchain history up to that point.

  • The 22kb Phenomenon: This process ensures that the Mina blockchain remains succinct, maintaining a fixed size of about 22kb regardless of the number of transactions. This is possible due to the compact nature of SNARK proofs.

It’s like having a concise summary that encapsulates an entire book series. No matter how many books are added, the summary remains the same size but still provides proof of the complete story.

2.5 Distributing the Block and Achieving Consensus

Finally, the Block Producer distributes the completed block to other Block Producers in the network. These nodes verify the block and participate in the consensus process to add it to the blockchain.

3. Additional Details

3.1 The Role of ZK-SNARKers and the Snarketplace

  • ZK-SNARKers: Specialized nodes that generate SNARK proofs for transactions.
  • Snarketplace: A decentralized marketplace where Block Producers can select ZK-SNARKers based on cost and efficiency.

3.2 Why It’s Beneficial:

  • Efficiency: Outsourcing allows for faster block production as Block Producers aren’t bogged down by the heavy computation of generating proofs.
  • Cost-Effective: Block Producers can choose the most cost-effective ZK-SNARKer, reducing operational expenses.

4. Comparison with Ethereum and Solana Validators

Understanding how Mina’s Block Producers differ from validators in other popular blockchain networks like Ethereum and Solana can provide deeper insight into the unique aspects of Mina’s design.

4.1 Mina Block Producers

  • Sybil Resistance Algorithm: Proof of Stake (PoS) with VRF and SNARKs.
  • Stake Requirement: Minimum of 1 MINA to become a validator.
  • Verifiable Random Function (VRF): Used to randomly select Block Producers based on stake.
  • ZK-SNARKs: Employed to keep the blockchain size constant (~22kb), ensuring scalability and quick synchronization for new nodes.
  • Snarketplace: A marketplace for outsourcing SNARK proof generation to specialized nodes (ZK-SNARKers).

4.2 Ethereum Validators

  • Sybil Resistance Algorithm: Proof of Stake (as of Ethereum 2.0/Beacon Chain).
  • Stake Requirement: 32 ETH to run a validator node.
  • Validator Duties: Validators propose and attest to blocks, participating in block production and consensus.
  • Rewards and Penalties: Validators earn rewards for honest participation and can be penalized (slashed) for malicious activities or going offline.
  • No Outsourcing: Validators handle block proposal and attestation without outsourcing computational tasks.

4.3 Solana Validators

  • Sybil Resistance Algorithm: Proof of Stake with Proof of History (PoH) as a synchronization mechanism.
  • Stake Requirement: No fixed minimum, but effective participation often requires significant stake due to hardware requirements.
  • Proof of History (PoH): A cryptographic clock that provides a timestamp for the network, enabling high throughput and quick confirmation times.
  • High Performance: Designed for scalability with the capability to handle thousands of transactions per second.
  • Validator Responsibilities: Validators process transactions and produce blocks, requiring powerful hardware to keep up with network demands.

5. Conclusion

Mina’s innovative approach to block production combines the security of Proof of Stake with the efficiency of SNARK proofs. By utilizing VRFs, outsourcing computationally intensive tasks to ZK-SNARKers, and maintaining a succinct blockchain size, Mina ensures a scalable and secure network.

Thanks for reading. Follow me on X to catch up next articles.

My X account : @blockofchain

--

--

No responses yet