Skip to content

Conversation

@codablock
Copy link

@codablock codablock commented Aug 10, 2018

This PR also includes the commits of #2215. I'll rebase and force-push after that one is merged. Only the last commit is actually part of this PR.

This refactoring might look useless without the operator rewards from DIP3, but I'd like at least include the getblocktemplate change ASAP so that miners and pools operators can prepare themself for the upcoming changes.

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.

Looks good 👍 Just one issue with params/variables naming.

Copy link

Choose a reason for hiding this comment

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

std::vector<CTxOut>s have vout prefix in code currently (vout in CTransaction and voutSuperblockRet in mnpayments/governance/blocktemplate), let's keep it consistent maybe i.e. s/txoutsMasternodeRet/voutMasternodeRet/ or (even more descriptive) s/txoutsMasternodeRet/voutMasternodePaymentsRet/ ?

Copy link

Choose a reason for hiding this comment

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

same

src/miner.h Outdated
Copy link

Choose a reason for hiding this comment

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

same

Copy link

Choose a reason for hiding this comment

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

same

Copy link

Choose a reason for hiding this comment

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

same

Copy link

Choose a reason for hiding this comment

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

same

Copy link

Choose a reason for hiding this comment

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

same

Copy link

Choose a reason for hiding this comment

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

same

@UdjinM6 UdjinM6 added this to the 12.4 milestone Aug 10, 2018
@codablock codablock force-pushed the pr_prepareforoperatorreward branch 3 times, most recently from 10cf32d to 64d0572 Compare August 11, 2018 13:51
@codablock
Copy link
Author

Did the renaming, including cherry-picking c6830f0 which you proposed in #2083

I'd however prefer to not rename method names in this PR, as I'll already have enough effort when later rebasing DIP3 🙈

@codablock codablock force-pushed the pr_prepareforoperatorreward branch from 64d0572 to 08e4c3c Compare August 13, 2018 06:57
@codablock
Copy link
Author

Rebased on develop, so #2215 commits are removed from here now.

Copy link

Choose a reason for hiding this comment

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

This looks like a temporary shortcut thb which would make little sense after there are many MNs paid in one block. Should probably write this part correctly i.e. "continue if one of paid masternodes is unknown" and "continue if one of masternodes is not upgraded" below.

Copy link
Author

Choose a reason for hiding this comment

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

Actually, the idea behind voutMasternodePayments is not to pay multiple masternodes but to split the masternode reward into masternode payment and operator reward payment. Even in the case of masternode shares, a block will still only pay a single masternode but split the reward into multiple recipients.

I added a commit on top which loops through all txouts and if none of them is a masternode payment, it continues.

codablock and others added 4 commits August 14, 2018 08:01
…locktemplate

This commit allows to later split MN rewards into multiple recipients, e.g.
the owner reward and operator reward. It also updates the getblocktemplate
output to return an array of MN payments instead of a single entry.

This should allow MN miners and pool operators to prepare themself for the
upcoming changes in regard to operator rewards.
@codablock codablock force-pushed the pr_prepareforoperatorreward branch from 08e4c3c to e9fe5fc Compare August 14, 2018 06:09
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.

utACK

@UdjinM6 UdjinM6 merged commit 50eb98d into dashpay:develop Aug 14, 2018
UdjinM6 pushed a commit that referenced this pull request Aug 27, 2018
@codablock codablock deleted the pr_prepareforoperatorreward branch September 14, 2018 12:51
thephez added a commit to thephez/dash-docs that referenced this pull request Oct 23, 2018
 - Change `masternode` to array of objects
 - Related to dashpay/dash#2216
thephez added a commit to dash-docs/dash-docs that referenced this pull request Nov 19, 2018
 - Change `masternode` to array of objects
 - Related to dashpay/dash#2216
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Apr 25, 2019
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.

2 participants