Skip to content
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

feat!: Block Reward Reallocation (Doubling Treasury) #5588

Merged
merged 9 commits into from
Oct 3, 2023

Conversation

ogabrielides
Copy link
Collaborator

@ogabrielides ogabrielides commented Sep 28, 2023

Issue being fixed or feature implemented

Implementation of accepted proposal: https://www.dashcentral.org/p/TREASURY-REALLOCATION-60-20-20

What was done?

Once Masternode Reward Location Reallocation activates:

  • Treasury is bumped to 20% of block subsidy.
  • Block reward shares are immediately set to 75% for MN and 25% miners. (Previous reallocation periods are dropped)
    MN reward share should be 75% of block reward in order to represent 60% of the block subsidy. (according to the proposal)
  • governancebudget is returned from getgovernanceinfo RPC.

How Has This Been Tested?

block_reward_reallocation_tests

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@ogabrielides ogabrielides added RPC Some notable changes to RPC params/behaviour/descriptions Needs Release Notes This PR includes breaking changes for which release notes have not yet been merged. labels Sep 28, 2023
@ogabrielides ogabrielides added this to the 20 milestone Sep 28, 2023
@ogabrielides ogabrielides marked this pull request as draft September 28, 2023 15:09
@ogabrielides ogabrielides removed the Needs Release Notes This PR includes breaking changes for which release notes have not yet been merged. label Sep 28, 2023
@ogabrielides ogabrielides marked this pull request as ready for review September 29, 2023 12:05
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using float calculations in consensus critical code is never a good idea ;)

src/test/block_reward_reallocation_tests.cpp Outdated Show resolved Hide resolved
src/validation.cpp Outdated Show resolved Hide resolved
src/validation.cpp Outdated Show resolved Hide resolved
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
UdjinM6
UdjinM6 previously approved these changes Sep 30, 2023
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, utACK

doc/release-notes-5588.md Outdated Show resolved Hide resolved
doc/release-notes-5588.md Outdated Show resolved Hide resolved
src/governance/classes.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK for squash merge

Copy link
Collaborator

@thephez thephez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK

@PastaPastaPasta PastaPastaPasta merged commit e72eb40 into dashpay:develop Oct 3, 2023
4 of 11 checks passed
@ogabrielides ogabrielides deleted the doubling_treasury branch October 3, 2023 14:34
PastaPastaPasta pushed a commit that referenced this pull request Oct 9, 2023
## Issue being fixed or feature implemented
Since `mn_rr` is already active on Testnet, because of #5588, syncing
from develop is broken.

## What was done?
Temporary disabled changes of #5588 for Testnet.
This should be dropped when Testnet will be re-organised for Platform.

## How Has This Been Tested?
Syncing Testnet

## Breaking Changes


## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
PastaPastaPasta pushed a commit that referenced this pull request Oct 11, 2023
#5603)

## Issue being fixed or feature implemented
Fixed a problem forgotten in #5588 in feature_asset_locks.py.

## What was done?
Avoid floating operations when calculating `coinbasevalue`

## How Has This Been Tested?

## Breaking Changes

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
PastaPastaPasta pushed a commit that referenced this pull request Oct 23, 2023
## Issue being fixed or feature implemented
Implementation of accepted proposal:
https://www.dashcentral.org/p/expedite-60-20-20-reallocation

## What was done?
Activates changers brought in #5588 on `v20` hard fork instead of
`mn_rr`.

## How Has This Been Tested?
run tests

## Breaking Changes
Again, Testnet sync is broken

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants