-
Notifications
You must be signed in to change notification settings - Fork 725
[zPIV][Cleanup] Zerocoin Cleanup 1: remove Accumulators values #1290
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
[zPIV][Cleanup] Zerocoin Cleanup 1: remove Accumulators values #1290
Conversation
ccc7389 to
8e7ab73
Compare
2e2e75a to
547e5a2
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.
ACK
Edit: needs rebase now
547e5a2 to
c060fce
Compare
|
Rebased. |
Fuzzbawls
left a comment
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 c060fce43531130d3ee1e616f5c9d31190fc9abb
c060fce to
1438309
Compare
furszy
left a comment
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.
Overall looking awesome 💜 .
Just left two comments for future PRs. And Left my node re syncing, once it's done will ACK it.
furszy
left a comment
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 1438309
…values 1438309 [DB] Introduce legacy zerocoinDB: save accumulator checksums for zPOS (random-zebra) 3c9b537 [Cleanup] Remove Accumulators / AccumulatorCheckpoints / AccumulatorMaps (random-zebra) Pull request description: Zerocoin accumulators **values** were updated when validating zerocoin mints and then used to verify (v1 and v2) zerocoin spends proofs. Since mints are disabled, and new *public* zerocoin spends don't rely on accumulators values (and old proofs signatures are no longer checked during IBD), we can remove accumulators databases and maps. We only need to record the accumulators **checksums** (to validate legacy zPOS, getting the right stake modifier). These are stored on chain (accumulator checkpoints in block version < 7), but we introduce a small database (indexing <checksum, denom> pairs with the height of their first occurrence on chain) during IBD for performance. The checksums database is then wiped after the last checkpoint block. Resync from scratch has been tested both on mainnet and testnet. ACKs for top commit: furszy: ACK 1438309 Tree-SHA512: acf57eca04e0bd63844f83685f043b3d6f948a49a1b3e595b68696926d12ea8f946fb3666dd522d3bc90fddc62750b8f0a105a5306b6fd0b555b6e161b81f858
b77c064 [Docs] Document zerocoin-related RPC changes for release notes (random-zebra) 4800729 [Core][Cleanup] Remove modifier as member of StakeInput objects (random-zebra) 238ea5f [Core][Cleanup][zPIV] CZPivStake --> CLegacyZPivStake (random-zebra) f1b21a2 [Core][Cleanup][zPIV] Remove code to produce v2 spends and zPOS stakes (random-zebra) Pull request description: This removes (now unused) code to produce old zerocoin spends and zPOS stakes. `CZPivStake` class is replaced with a `CLegacyZPivStake` (moved in new files `zpiv/zpos.*`) used exclusively to validate the chain. This also refactors `CStakeInput` class, removing the modifier functions (put back in kernel) and cleans up `kernel.*` files, removing old code and reorganizing them. This PR is based on top of: - [x] #1259 - [x] #1290 and it will be rebased after their merge. Only last **3** commits are relevant ACKs for top commit: furszy: Re-acking the PR, release notes added. ACK b77c064 Fuzzbawls: ACK b77c064 Tree-SHA512: cdf937822b435d3d05a8d3000d17340c74f7b7b17da4f1937935cb7bd71fddea9628c35a934c5abeea9ecb40b8daed074a49040479138a28fcd6699f2ca8bb8d
Zerocoin accumulators values were updated when validating zerocoin mints and then used to verify (v1 and v2) zerocoin spends proofs. Since mints are disabled, and new public zerocoin spends don't rely on accumulators values (and old proofs signatures are no longer checked during IBD), we can remove accumulators databases and maps.
We only need to record the accumulators checksums (to validate legacy zPOS, getting the right stake modifier). These are stored on chain (accumulator checkpoints in block version < 7), but we introduce a small database (indexing <checksum, denom> pairs with the height of their first occurrence on chain) during IBD for performance.
The checksums database is then wiped after the last checkpoint block.
Resync from scratch has been tested both on mainnet and testnet.