-
Notifications
You must be signed in to change notification settings - Fork 725
[Core] Remove StakeV1 #1259
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
[Core] Remove StakeV1 #1259
Conversation
57cdbf9 to
c58f3ca
Compare
bcc296d to
71ecd9e
Compare
71ecd9e to
6eb2416
Compare
6eb2416 to
1b021bf
Compare
|
Rebased. Ready for review. |
Set block version to 3 before zerocoin and 7 after (thus not needing accumulator checkpoints check)
1b021bf to
799e3ad
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.
two minor comments, the rest is looking pretty good 👌 .
Will run it and stake over night to double check it.
| { | ||
| //control the amount of times the client will check for mintable coins | ||
| if ((GetTime() - nMintableLastCheck > minutes * 60)) { | ||
| nMintableLastCheck = GetTime(); |
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.
would be good to inline this GetTime() in a single variable.
| } | ||
|
|
||
| // POW - miner main | ||
| IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); |
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.
Can we put this under the else path of the if (fProofOfStake) block that it's above.
First glance is hard to get it, the whole if (fProofOfStake) block that it's above basically start the flow all over independently on what happen.. lot of ugly continue there.
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.
Staking working properly, ACK 799e3ad
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 799e3ad
799e3ad [Tests] Fix block version on RegTest (random-zebra) 00aae54 [Core][Cleanup] PoS: remove extra signature + IncrementExtraNonce (random-zebra) 389094f [Core] Remove StakeV1 in kernel and miner (random-zebra) Pull request description: This removes the old StakeV1 function and does some minor optimizations in the miner code (removing redundant signature and IncrementExtraNonce calls). This is based on top of the following three pull requests and will be rebased after their merge into master. So, they should be reviewed before this one. - [x] #1276 - [x] #1277 - [x] #1278 ACKs for top commit: furszy: Staking working properly, ACK 799e3ad Fuzzbawls: ACK 799e3ad Tree-SHA512: a3cde86fc3a7cdad39d8d322dbcc0da1e34d044c4f320700605a9952e67788c825b53516e5ff452e37cde127aaf902416168dc6384fe62954d336efe7aea23eb
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
This removes the old StakeV1 function and does some minor optimizations in the miner code (removing redundant signature and IncrementExtraNonce calls).
This is based on top of the following three pull requests and will be rebased after their merge into master.
So, they should be reviewed before this one.