RFC: Microblock Consensus using STX Proof-of-Transfer (PoX)

  Stacks Block (BTC)                 Stacks Microblocks(STX)
+---------------------------+               +----------------------------------+
|                     |       |                                  |
|  Stacks Anchor      |       |              Microblocks         |
|     Block           |       |                                  |
|   (BTC PoX spent)   |       |   +--------+  +--------+  ...    |
|                     |       |   |        |  |        |         |
|                     |       |   | STX    |  | STX    |         |
|                     |       |   | PoX    |  | PoX    |         |
|                     |       |   | spent  |  | spent  |         |
|                     |       |   |        |  |        |         |
|                     |       |   +--------+  +--------+         |
|                     |       |                                  |
|                     |       |                                  |
+---------------------+       +----------------------------------+

Introduction

The Stacks Blockchain, built upon the foundation of Bitcoin, incorporates both big blocks and numerous microblocks between these anchor blocks. However, the consensus mechanism for microblocks currently relies heavily on the consensus of subsequent Bitcoin/Stacks blocks. This weakens the security of the Stacks blockchain and fails to leverage the potential benefits of microblocks. This proposal suggests enhancing the microblock consensus by utilizing the existing Stacks Proof-of-Transfer (PoX) code and implementing a similar approach to validate microblocks. The proposed mechanism involves miners committing STX tokens instead of BTC, increasing security and reducing orphan anchor blocks.

Overview of Proposed Solution

The proposed solution aims to introduce STX PoX for microblock consensus, leveraging the principles of commitment and prorated chance of winning the next block. Miners will commit STX tokens, granting them the opportunity to be elected as microblock producers. To ensure the integrity and finality of the microblock consensus, STX commitments older than the previous Bitcoin block (or older than six Bitcoin blocks) will be considered.

This proposal is related to the forum discussion about “RFC: L1 Speed Improvements” (https://forum.stacks.org/t/rfc-l1-speed-improvements/14552).

Implementation Details

The following steps outline the proposed approach for integrating STX PoX for microblock consensus:

  1. **STX Commitments: **Miners will commit a certain amount of STX tokens to increase their chances of being elected as microblock producers. The commitment mechanism will be similar to the existing Stacks PoX, wherein coin balances are committed for potential block rewards.
  2. **Sortition Process: **Through a randomized sortition process, microblock producers will be selected based on their STX commitments. The selection probability will be proportional to the committed STX amount, ensuring fairness in the election process.
  3. Microblock Production: The elected microblock producer will generate a microblock that adheres to the new microblock consensus. The microblock will be added to the Stacks blockchain and propagated throughout the network.
  4. Microblock Consensus: Microblock consensus will be established by examining the validity and consistency of microblocks using STX PoX. The microblock producer’s commitment history will be verified to ensure they have met the necessary requirements (e.g., commitment age).
  5. **Microblock Rewards Distribution: **the STX spent in this microblock consensus can be awarded to Stacks miners involved, to Stacker used locking STX or both types of actors.
    1. In one proposed implementation, Stacks miners who commit STX tokens for microblock production will be eligible for microblock rewards. The spent STX tokens from miners’ commitments can be allocated as rewards to incentivize their participation in the microblock consensus process. By providing additional rewards, miners are motivated to actively engage in producing and validating microblocks, ensuring the security and efficiency of the Stacks blockchain.
    2. In another proposed implementation, the spent STX tokens from miners’ commitments can be distributed among Stackers who have already locked STX to help secure the blockchain. This approach promotes participation from Stackers and rewards their contribution to the network’s security. The distribution of spent STX tokens among Stackers further aligns their interests with the overall health and stability of the Stacks blockchain.
    3. It is important to carefully consider the most appropriate incentive structure based on the specific requirements and dynamics of the Stacks ecosystem. The rewards can be distributed to one or many categories of actors.

Benefits:

The proposed enhancement offers several advantages:

  1. Improved Security: By incorporating STX PoX for microblock consensus, the security of the Stacks blockchain will be enhanced. Miners’ commitment of STX tokens will strengthen the validation process and mitigate potential attacks on microblocks.
  2. Reduced Orphan Blocks: Strengthened microblock consensus, combined with a more restricted list of microblocks, will significantly reduce the number of orphan anchor blocks. By implementing STX PoX for microblock validation, miners have less freedom to produce arbitrary microblocks, ensuring a more restricted and controlled list. The restricted list of microblocks accelerates the validation process, enabling quicker consensus on the inclusion of microblocks within proposed Stacks anchor blocks. Consequently, the reduced freedom and accelerated validation process contribute to a smaller number of Stacks orphan blocks, enhancing the overall efficiency and integrity of the blockchain.

Conclusion

By introducing STX PoX for microblock consensus, the Stacks blockchain can benefit from enhanced security and reduced orphan blocks. This proposal leverages the existing Stacks PoX codebase and modifies it to accommodate the validation of microblocks. The integration of this mechanism requires miners to commit STX tokens, and their historical commitment records are verified to ensure probabilistic finality and consensus. This proposal lays the groundwork for further discussions and development to strengthen the Stacks blockchain’s microblock consensus.

2 Likes