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: masternode payment reallocation from coin base to platform #5342

Closed
wants to merge 0 commits into from

Conversation

knst
Copy link
Collaborator

@knst knst commented Apr 21, 2023

Issue being fixed or feature implemented

It resolves this issue: https://github.com/dashpay/dash-issues/issues/38

What was done?

Move some funds from the coinbase, into the Asset Lock Pool. 37.5% of current masternode reward are moved to platform.
beside that, evo MN will receive reward only once - not quad reward (4 time continously) as in v19.

This is to incentivize MNs to upgrade to platform, because only MNs running platform will get these migrated rewards

This PR depends on that should be merged before:

How Has This Been Tested?

There were added couple new tests in feature_asset_lock.py that test functionality of credit_pool.py

To avoid conflicting with other tests, such as evo_deterministicmns_tests that is testing old behavior, activation height is chosen as far in future (3000 blocks) and not achieved by most of tests, include feature_asset_lock.py before all other functionality such as asset-unlocks are tested.

Breaking Changes

There are breaking changes, because it change consensus rules: changed CbTx output accordingly

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
    need to update some DIP accordingly to that changes
  • I have assigned this pull request to a milestone

@knst knst added this to the 20 milestone Apr 24, 2023
@knst knst added the Needs Release Notes This PR includes breaking changes for which release notes have not yet been merged. label Apr 24, 2023
@knst knst marked this pull request as ready for review April 24, 2023 08:54
@knst knst marked this pull request as draft April 24, 2023 20:05
@knst knst force-pushed the reward-reallocation branch 2 times, most recently from 9569bb9 to d6dd942 Compare April 25, 2023 09:01
@github-actions
Copy link

This pull request has conflicts, please rebase.

@github-actions
Copy link

github-actions bot commented May 9, 2023

This pull request has conflicts, please rebase.

@github-actions
Copy link

This pull request has conflicts, please rebase.

@knst knst marked this pull request as ready for review June 19, 2023 15:45
@knst

This comment was marked as resolved.

@knst knst marked this pull request as draft July 5, 2023 15:25
@knst knst force-pushed the reward-reallocation branch 3 times, most recently from 5aba960 to 41859d6 Compare July 12, 2023 21:20
@knst knst marked this pull request as ready for review July 17, 2023 20:07
@knst knst requested a review from ogabrielides July 17, 2023 20:07
}
masternodeReward = 0.375 * GetMasternodePayment(cbTx.nHeight, blockReward, params.BRRHeight);
Copy link
Member

Choose a reason for hiding this comment

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

can we get rid of this instance of the 0.375 as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks for catch, completely missed this one. Please, check new commits

@knst knst force-pushed the reward-reallocation branch 2 times, most recently from 4d957ff to 9700eb9 Compare August 31, 2023 19:25
UdjinM6
UdjinM6 previously approved these changes Sep 1, 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.

re-utACK

ogabrielides
ogabrielides previously approved these changes Sep 1, 2023
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

LGTM

@UdjinM6 UdjinM6 dismissed their stale review September 1, 2023 10:47

not sure about operator reward share

@UdjinM6
Copy link

UdjinM6 commented Sep 1, 2023

It feels like with current implementation MN owners are "stealing" 37.5% from MN operators' share. EDIT: I guess it's inevitable cause otherwise you could trick the system by paying 100% to operator and 0 to platform.

@knst
Copy link
Collaborator Author

knst commented Sep 4, 2023

It feels like with current implementation MN owners are "stealing" 37.5% from MN operators' share. EDIT: I guess it's inevitable cause otherwise you could trick the system by paying 100% to operator and 0 to platform.

yes, platform reward is substracted before operator's reward calculation.
What if I will update calculation of operator reward like that? In this case it would be affected (stolen) operator's share only in extreme cases (such as 66%+ of operator reward) @UdjinM6

@thephez
Copy link
Collaborator

thephez commented Sep 4, 2023

It feels like with current implementation MN owners are "stealing" 37.5% from MN operators' share. EDIT: I guess it's inevitable cause otherwise you could trick the system by paying 100% to operator and 0 to platform.

yes, platform reward is substracted before operator's reward calculation. What if I will update calculation of operator reward like that? In this case it would be affected (stolen) operator's share only in extreme cases (such as 66%+ of operator reward) @UdjinM6

Not sure I'm following the discussion correctly, but my understanding is that operators will be paid on platform side as well (just like owners) - see dashpay/platform#320. So if the concern here is that operators will miss out due to the partial movement of the block subsidy to platform, that shouldn't be an issue. We can confirm with platform team if necessary. Or, if I entirely misread the discussion, just ignore my comment 😄

@UdjinM6
Copy link

UdjinM6 commented Sep 4, 2023

It feels like with current implementation MN owners are "stealing" 37.5% from MN operators' share. EDIT: I guess it's inevitable cause otherwise you could trick the system by paying 100% to operator and 0 to platform.

yes, platform reward is substracted before operator's reward calculation. What if I will update calculation of operator reward like that? In this case it would be affected (stolen) operator's share only in extreme cases (such as 66%+ of operator reward) @UdjinM6

Not sure I'm following the discussion correctly, but my understanding is that operators will be paid on platform side as well (just like owners) - see dashpay/platform#320. So if the concern here is that operators will miss out due to the partial movement of the block subsidy to platform, that shouldn't be an issue. We can confirm with platform team if necessary. Or, if I entirely misread the discussion, just ignore my comment 😄

Oh, wow! I didn't know that. Would be nice if someone from the Platform team could confirm that. @shumkov or maybe @QuantumExplorer?

@shumkov
Copy link
Member

shumkov commented Sep 4, 2023

Yes, operators will be paid on platform side as well

@UdjinM6
Copy link

UdjinM6 commented Sep 4, 2023

Yes, operators will be paid on platform side as well

Cool, thanks!

@knst I guess we can safely drop 286128d then.

UdjinM6
UdjinM6 previously approved these changes Sep 4, 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

ogabrielides
ogabrielides previously approved these changes Sep 4, 2023
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

utACK

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.

LGTM just need release notes

Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

LGTM

@PastaPastaPasta
Copy link
Member

I tried to comment "utACK for merge via merge commit"

@PastaPastaPasta PastaPastaPasta removed the Needs Release Notes This PR includes breaking changes for which release notes have not yet been merged. label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants