Open levonpetrosyan93 opened 2 months ago
The changes involve significant modifications to the consensus parameters of a blockchain application, including the removal of the nSubsidyHalvingStopBlock
parameter and the introduction of new parameters for a fourth funding stage. Adjustments to subsidy halving intervals and transaction validation logic were made, enhancing the handling of block rewards and transaction payloads. Additionally, various tests were updated to reflect these consensus changes.
File | Change Summary |
---|---|
src/chainparams.cpp |
Removed nSubsidyHalvingStopBlock ; added parameters for stage 4 funding; modified subsidy halving values. |
src/consensus/consensus.h |
Introduced NEW_MAX_TX_EXTRA_PAYLOAD constant to increase transaction payload size limit. |
src/consensus/params.h |
Removed nSubsidyHalvingStopBlock ; added parameters for stage 4 funding and tail emission subsidy. |
src/lelantus.cpp |
Added validation for Sigma-to-Lelantus conversion based on block height. |
src/miner.cpp |
Updated block creation logic and reward distribution based on new stage parameters. |
src/test/firsthalving_tests.cpp |
Removed nSubsidyHalvingStopBlock from test cases, reflecting changes in subsidy halving logic. |
src/test/main_tests.cpp |
Simplified subsidy testing by removing iterative checks; focused on direct assertions for specific block heights. |
src/validation.cpp |
Enhanced transaction validation and subsidy calculation logic based on new consensus parameters. |
src/wallet/lelantusjoinsplitbuilder.cpp |
Added guard clause to prevent operations if Sigma pool is closed based on block height. |
sequenceDiagram
participant User
participant Blockchain
participant Miner
participant Validator
User->>Blockchain: Initiate Transaction
Blockchain->>Validator: Validate Transaction
Validator-->>Blockchain: Transaction Valid
Blockchain->>Miner: Create Block
Miner->>Blockchain: Add Block
Blockchain->>User: Confirm Transaction
π "Oh, what a change in the blockchain's dance,
With new stages and parameters, we prance!
No more halving stops, just a smooth glide,
In the world of subsidies, we take great pride!
Hooray for the updates, letβs hop and cheer,
For a brighter tomorrow, the future is here!" πΌ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tested on regtest ! We need to put new HF block number before merge.