-
Notifications
You must be signed in to change notification settings - Fork 312
multi: Implement DCP0013 max treasury spend vote. #3549
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
Merged
davecgh
merged 1 commit into
decred:master
from
davecgh:multi_dcp0013_treasury_spend_limits
Nov 24, 2025
Merged
multi: Implement DCP0013 max treasury spend vote. #3549
davecgh
merged 1 commit into
decred:master
from
davecgh:multi_dcp0013_treasury_spend_limits
Nov 24, 2025
+862
−15
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a69f60d to
2b33b50
Compare
Member
Author
|
Updated to improve some comments. |
davecgh
commented
Nov 19, 2025
2b33b50 to
9ffbe19
Compare
jholdstock
reviewed
Nov 19, 2025
Member
jholdstock
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.
Looking great, only spotted some minor nits
9bd0cb3 to
342e313
Compare
jrick
approved these changes
Nov 19, 2025
JoeGruffins
approved these changes
Nov 20, 2025
jholdstock
approved these changes
Nov 20, 2025
342e313 to
e3938a6
Compare
This implements the agenda for voting on the max treasury expenditure
policy update defined in DCP0013 along with consensus tests.
In particular, once the vote has passed and is active, the treasury
expenditure policy will allow a max of 4% of the balance to be spent per
policy window with a minimum floor imposed.
The following is an overview of the changes:
- Generate new version blocks and reject old version blocks after a
super majority has been reached
- New block version on mainnet is version 11
- New block version on testnet is version 12
- Introduce a convenience function for determining if the vote passed
and is now active
- Modify the treasury expenditure policy to enforce the new semantics in
accordance with the state of the vote
- Add tests for determining if the agenda is active for both mainnet and
the regression test network
- Add tests to ensure proper behavior for the modified policy once the
agenda is active as follows:
- Treasury spends that spend more than 4% of treasury balance when it
is more than the minimum floor are rejected
- Treasury spends that spend exactly 4% of treasury balance when it is
more than the minimum floor are accepted
- The maximum expenditure amount for the policy window is the same
regardless of where the treasury spends happen in the policy window
- Repeat all of the above cases when the treasury balance is low
enough that the minimum floor is in effect
e3938a6 to
bff0c8e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
consensus changes
Changes that involve modifying the consensus rules and thus are required to be gated behind a vote.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This requires #3548.
This implements the agenda for voting on the max treasury expenditure policy update defined in DCP0013 along with consensus tests.
In particular, once the vote has passed and is active, the treasury expenditure policy will allow a max of 4% of the balance to be spent per policy window with a minimum floor imposed.
The following is an overview of the changes: