-
Notifications
You must be signed in to change notification settings - Fork 289
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
multi: Prepare for DCP0007. #2679
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.
This looks good to me, I just noticed a couple of minor typos.
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.
All looks right to me.
Should be good after resolving @rstaudt2 review issues. |
Fixed @rstaudt2 review issues. |
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 looks great overall. I've identified a few minor things inline.
Squashed commits, rebased on top of latest master and fixed latest review items. Testnet and mainnet deployments were parametrized to run over the following time span: StartTime: 1631750400, // Sep 16th, 2021
ExpireTime: 1694822400, // Sep 16th, 2023 |
Confirming the timestamps: Linux:
OpenBSD:
|
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.
Updates look good. I did spot that the vote was note added to blockchain/fullblocktests/params.go
as well. I typically add it there too because those parameters are used in the regression tests and if it hits a path where the deployment is expected to exist, but doesn't, it'll fail unexpectedly.
This adds the deployment and agenda parameters for the DCP0007 vote.
This switches the current blockchain go.mod file to use a replace directive for the chaincfg code, which is needed due to the new agenda introduced in a previous commit.
This adds functions to verify the state of voting for the DCP0007 "revert treasury maximum expenditure policy" agenda.
This allows creating tests that require multiple agendas to be activated simultaneously.
This renames the existing maxTreasuryExpenditure function to maxTreasuryExpenditureDCP0006 to identify it as the one implementing the legacy policy. A future commit will add a new policy and selection of the active one will be based on the results of an on-chain voting.
This is purely a code move.
This changes the amount used for the large tspend in the rpc treasury simnet test so that it is compatible to the new expenditure policy and fails as expected.
Added to fullblocktests/params.go. Also added the description to the agenda, which as missing. |
Nice. I noticed the description myself earlier when going over it again, but hadn't commented yet as I was waiting to finish another round of review. |
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.
I've given this another round of review and don't see any other issues.
I also modified wallet locally to pull in the latest chaincfg
dev module and bump the vote version to ensure things are showing up properly there as well:
$ ./ctl getvotechoices
{
"version": 10,
"choices": [
{
"agendaid": "reverttreasurypolicy",
"agendadescription": "Change maximum treasury expenditure policy as defined in DCP0007",
"choiceid": "abstain",
"choicedescription": "abstain voting for change"
}
]
}
Also, simnet results of
|
This PR prepares the codebase for the DCP0007 update by introducing the agenda and performing some refactorings to make the actual implementation of the consensus change clearer.
This PR is NOT intended to produce any consensus-breaking changes. This was split off from the main work towards implementing DCP0007 so that the actual consensus change that will be introduced by a future PR is more easily reviewable by other developers.
Summary of changes: