Skip to content

Conversation

@davecgh
Copy link
Member

@davecgh davecgh commented Nov 18, 2025

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:

  • 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

@davecgh davecgh added this to the 2.1.0 milestone Nov 18, 2025
@davecgh davecgh added the consensus changes Changes that involve modifying the consensus rules and thus are required to be gated behind a vote. label Nov 18, 2025
@davecgh davecgh force-pushed the multi_dcp0013_treasury_spend_limits branch 2 times, most recently from a69f60d to 2b33b50 Compare November 19, 2025 08:18
@davecgh
Copy link
Member Author

davecgh commented Nov 19, 2025

Updated to improve some comments.

@davecgh davecgh force-pushed the multi_dcp0013_treasury_spend_limits branch from 2b33b50 to 9ffbe19 Compare November 19, 2025 08:47
Copy link
Member

@jholdstock jholdstock left a 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

@davecgh davecgh force-pushed the multi_dcp0013_treasury_spend_limits branch 3 times, most recently from 9bd0cb3 to 342e313 Compare November 19, 2025 16:30
@davecgh davecgh force-pushed the multi_dcp0013_treasury_spend_limits branch from 342e313 to e3938a6 Compare November 24, 2025 18:02
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
@davecgh davecgh force-pushed the multi_dcp0013_treasury_spend_limits branch from e3938a6 to bff0c8e Compare November 24, 2025 18:04
@davecgh davecgh merged commit bff0c8e into decred:master Nov 24, 2025
34 checks passed
@davecgh davecgh deleted the multi_dcp0013_treasury_spend_limits branch November 24, 2025 18:07
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants