-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Consensus] Block version 7: remove accumulators checkpoint #1022
[Consensus] Block version 7: remove accumulators checkpoint #1022
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 83a3736
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 83a3736
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept is sound. I just got a few comments.
83a3736
to
dce9b67
Compare
Fixed |
Code wise, it's straightforward and looks good. Just need a rebase. |
dce9b67
to
81e25d9
Compare
Rebased. |
81e25d9
to
7143006
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole zerocoin code will require a big further cleanup in the upcoming months.
Good work on this first step 👍, ACK 7143006
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7143006
could probably clean up the logic in primitives/block.cpp
, but its certainly not a blocking concern.
7143006 [Trivial] Check for pindex != nullptr during loops (random-zebra) cef5a0e [PoS] Don't look for checkpoints after nBlockLastAccumulatorCheckpoint (random-zebra) d55e714 [Core] set nBlockLastAccumulatorCheckpoint in chainparams (random-zebra) 9cf6c69 [Core] define Block version 7 removing the accumulator checkpoints (random-zebra) 750d04f [Core] Set placeholders for nBlockV7StartHeight hardfork (random-zebra) Pull request description: Since the disabling of zerocoin mints, the accumulator values never change anymore. Last updated checkpoint was at mainnet block 1686240. Removing the accumulator checkpoints from block headers saves 256 bits per block (both on chain and on the in-memory indexes). This PR removes the need for CBlockIndex::nAccumulatorCheckpoint (past 1686240) and enforces block version 7 via hard-fork (after `nBlockV7StartHeight` currently set at a placeholder value). Further changes to CBlockIndex (in order to don't store empty uint256) will be addressed in a subsequent PR. ACKs for top commit: furszy: Good work on this first step 👍, ACK 7143006 Fuzzbawls: ACK 7143006 Tree-SHA512: 3d8944b86ffb0c5e968a875977610ee44093f7f22a473450e8ce48358e1e9907b07034d698f833cc13abea2aa9409d6c96a5f4e9e15f677eaf5dafa62418ff6a
* PIVX: bump to 4.0.0 * PIVX: remove AccCheckpoint in block version 7 ref PIVX-Project/PIVX#1022 * PIVX: Test block v7 in pivxparser_test
* PIVX: bump to 4.0.0 * PIVX: remove AccCheckpoint in block version 7 ref PIVX-Project/PIVX#1022 * PIVX: Test block v7 in pivxparser_test
Since the disabling of zerocoin mints, the accumulator values never change anymore.
Last updated checkpoint was at mainnet block 1686240.
Removing the accumulator checkpoints from block headers saves 256 bits per block (both on chain and on the in-memory indexes).
This PR removes the need for CBlockIndex::nAccumulatorCheckpoint (past 1686240) and enforces block version 7 via hard-fork (after
nBlockV7StartHeight
currently set at a placeholder value).Further changes to CBlockIndex (in order to don't store empty uint256) will be addressed in a subsequent PR.