Repository navigation
docs(dip-26): update masternode multi-party payouts - #184
PastaPastaPasta wants to merge 19 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
🚥 Pre-merge checks | ✅ 5
Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dip-pasta-multi-party-payouts.md`:
- Around line 164-180: The external-collateral sign message was changed to start
with <payoutListStr>, but the required DIP-0003 prefix <magicString> was
omitted; restore the original magicString prefix in the external collateral
signing contract so the full sign string is
"<magicString>|<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>"
(i.e. prepend magicString wherever the ProRegTx/external-collateral sign string
is constructed/serialized) to preserve the original signature domain and
compatibility with existing verification logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2a1b9a01-111a-4ddc-b0d7-eefda89f8d00
📒 Files selected for processing (1)
dip-pasta-multi-party-payouts.md
Move the Masternode Multi-Party Payouts spec into dip-0026.md (assigning DIP number 0026) and remove the dip-pasta-multi-party-payouts.md alias, replacing the older DIP-26 draft. Update the README row (title, author) and renumber the reward-payment steps so the interleaved code fences render as one sequential list. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Replace the duplicated full ProRegTx/ProUpRegTx field tables with the payout delta only (scriptPayout -> payouts), referencing DIP-0003 for all unchanged fields. Drop the unfounded version-3 addressing lineage and the netInfo/platformNetInfo redefinition; keep version 4 and state that the BLS scheme and addressing fields are unchanged from DIP-0003. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Remove the RPC and JSON Interfaces section (protx info/diff/listdiff, masternode winners/payments, getblocktemplate, payoutAddress, SML JSON) and its two RPC-only test cases - reference-client surface, not protocol/consensus; the SML (DIP-0004) carries no payout data. Keep Special Transaction Filtering (P2P/SPV-level). Also drop DIP-0004 from Prior Work since it is no longer referenced anywhere in the spec. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Remove the unreachable hex-fallback for <payoutStr>: validation already restricts payout scripts to P2PKH/P2SH, both of which have a Dash address, so the fallback can never trigger (matching DIP-0003, which has none). Show the <magicString> prefix inline in the sign string and defer to DIP-0003 for its definition, consistent with how DIP-0003 presents it. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Place scriptPayout before reward in MasternodePayoutShare and use <payoutStr>:<reward> in the sign string, matching the payout-then-reward convention of DIP-0003 and the previous DIP-26 draft. Keeps the unambiguous : / , / | delimiter scheme. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
|
thephez
left a comment
There was a problem hiding this comment.
Forgot to mention on the last review, but DIP-3 likely needs at least some edits or it's going to be incorrect.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 5: The generic link text "[here]" violates Markdown linting rule MD059
which requires descriptive link text. Replace the generic "[here]" link text
with descriptive text that explains what the link contains, such as
"Dash-specific BIPs" or "list of Dash-specific BIPs", to make the link more
scannable and meaningful in the sentence context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d7466733-dff8-44f1-85f4-1f0c7c9b402a
📒 Files selected for processing (3)
README.mddip-0003.mddip-0026.md
🚧 Files skipped from review as they are similar to previous changes (1)
- dip-0026.md
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 5: The generic link text "[here]" violates Markdown linting rule MD059
which requires descriptive link text. Replace the generic "[here]" link text
with descriptive text that explains what the link contains, such as
"Dash-specific BIPs" or "list of Dash-specific BIPs", to make the link more
scannable and meaningful in the sentence context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d7466733-dff8-44f1-85f4-1f0c7c9b402a
📒 Files selected for processing (3)
README.mddip-0003.mddip-0026.md
🚧 Files skipped from review as they are similar to previous changes (1)
- dip-0026.md
🛑 Comments failed to post (1)
README.md (1)
5-5:
⚠️ Potential issue | 🟡 Minor | ⚡ Quick winReplace the generic link text.
[here]triggers MD059 and makes the sentence harder to scan. Use descriptive link text instead.Suggested fix
- Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found [here](https://github.com/dashevo/bips)). + Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found in the [Dash-specific BIP list](https://github.com/dashevo/bips)).As per coding guidelines, Markdown linting is enforced on changed
.mdfiles and MD059 requires descriptive link text.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.Because Dash is forked from the Bitcoin codebase, many of the BIPs can be applied to Dash as well (a list of the BIPs updated to include Dash-specific details can be found in the [Dash-specific BIP list](https://github.com/dashevo/bips)). The purpose of the DIPs is not to duplicate those which exist as BIPs, but to introduce protocol upgrades or feature specifications which are unique to Dash.🧰 Tools
🪛 GitHub Actions: .github/workflows/markdownlint.yml / 0_lint.txt
[error] 5-5: markdownlint-cli2 (markdownlint v0.38.0) reported MD059/descriptive-link-text: Link text should be descriptive [Context: "[here]"]
🪛 GitHub Actions: .github/workflows/markdownlint.yml / lint
[error] 5-5: markdownlint-cli2: MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"]
🪛 GitHub Check: lint
[failure] 5-5: Link text should be descriptive
README.md:5:174 MD059/descriptive-link-text Link text should be descriptive [Context: "[here]"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 5, The generic link text "[here]" violates Markdown linting rule MD059 which requires descriptive link text. Replace the generic "[here]" link text with descriptive text that explains what the link contains, such as "Dash-specific BIPs" or "list of Dash-specific BIPs", to make the link more scannable and meaningful in the sentence context.Sources: Coding guidelines, Linters/SAST tools
Unwrap newly added prose paragraphs and revert table-column-width normalization on tables that gained no content. Only the two version tables that add the version 4 row keep widened columns, and they use the existing DIP's no-space pipe-separator style.
thephez
left a comment
There was a problem hiding this comment.
A couple more questions and suggestions
|
Opened a follow-up PR against the source branch for these comments: PastaPastaPasta#4 It covers the v3 reserved row, abstract/scope wording, minimum reward note, legacy migration wording, and regular MN/evonode scope clarification. |
|
Dash Core If #7302 is the intended Core direction, this PR's version tables, payload descriptions, migration text, test cases, and other version 4 references will need a corresponding update. If the dedicated version 4 design is intended, #7302's versioning change should not merge as written. I think that direction should be resolved explicitly before #184 is merged. |
Dash Core folded the unreleased payload version 4 (MultiPayout) into version 3 (ExtAddr, extended addressing) since both are introduced by the v24 deployment. Reframe the DIP accordingly: the unified payouts list ships in the version 3 ProRegTx and ProUpRegTx payloads and no version 4 exists. Also silence the pre-existing cspell complaint about ProUpServTx the same way dip-0003.md does. Co-Authored-By: Claude Fable 5 <[email protected]>
thephez
left a comment
There was a problem hiding this comment.
Some things since last commit
Drop the stale version 4 rows from the DIP-0003 tables, document the evo_shares gate on evonode payout lists, the trailing version 3 ProRegTx fields, state version migration, collateral reuse scope, reject reasons and the deployment parameters. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Synced with Dash Core v24.0.0 in e111530. Changes:
thephez's three open threads have replies. thephez, could you re-review? 🤖 Posted autonomously by Claude on behalf of pasta. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Link the merged DIP-0035 and use its field names and sizes for the trailing version 3 ProRegTx share fields. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Shared registrations require an empty payout list, so the payout-list rules and test case 3 apply only to registrations without shared collateral and their registrar updates. Shared-registration validation is deferred to DIP-0035. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| | scriptPayoutSize | compactSize uint | 1-9 | Size of the Payee Script | | ||
| | scriptPayout | Script | Variable | Payee script (p2pkh/p2sh) | | ||
| | payoutShareReward | uint_16 | 2 | A value from 0 to 10000 | | ||
| | payoutsCount | uint8_t | 1 | Number of payout entries. Must be from 1 to 8. | |
There was a problem hiding this comment.
This says payoutsCount must be 1 to 8, but line 165 says a shared registration carries an empty payout list, and DIP-0035 (payoutsCount row) says 0 for a shared registration.
| | payoutsCount | uint8_t | 1 | Number of payout entries. Must be from 1 to 8. | | |
| | payoutsCount | uint8_t | 1 | Number of payout entries. 0 for a shared registration (see [DIP-0035](dip-0035.md)); otherwise 1 to 8. | |
The Abstract ("between 1 and 8 distinct owner payout entries" and "must equal 10000") would need the same qualification.
There was a problem hiding this comment.
Done in 3e7ae88. The payoutsCount row now reads "0 for a shared registration (see DIP-0035); otherwise 1 to 8", and the Abstract limits the 1-8 range and 10000 sum to masternodes without shared collateral, with a note that a shared masternode has an empty payout list. This matches Core, where CProRegTx::IsTriviallyValid rejects a non-empty payouts on a shared registration (bad-protx-shares-payouts).
🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.
| 4. Subtract `operatorAmount` from `masternodeReward`. The result is the owner | ||
| reward. |
There was a problem hiding this comment.
Steps 5-7 assume there's a last owner payout entry, but a shared masternode has an empty payout list and is paid according to its share entries (line 165). The procedure should say which rules apply in that case.
| 4. Subtract `operatorAmount` from `masternodeReward`. The result is the owner | |
| reward. | |
| 4. Subtract `operatorAmount` from `masternodeReward`. The result is the owner | |
| reward. For a shared masternode, the owner reward is paid as specified in | |
| [DIP-0035](dip-0035.md), and steps 5-7 do not apply. |
There was a problem hiding this comment.
Addressed in 3e7ae88, with slightly different wording from the suggestion. DIP-0035 says shared payouts follow "the DIP-0026 procedure exactly, with the owner payout entries derived from the share table" (sequential floor, remainder to the last entry, weighted by share amount). Core does the same in SplitAmountByShares. So step 4 now says that for a shared masternode, steps 5-7 use payout entries derived from its share table, weighted by collateral amount instead of basis points, as specified in DIP-0035, rather than saying steps 5-7 do not apply.
🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.
| ```text | ||
| operatorAmount = floor(masternodeReward * operatorReward / 10000) | ||
| ``` |
There was a problem hiding this comment.
operatorAmount is only defined when the condition in step 3 holds, but step 4 subtracts it in every case.
| ```text | |
| operatorAmount = floor(masternodeReward * operatorReward / 10000) | |
| ``` | |
| ```text | |
| operatorAmount = floor(masternodeReward * operatorReward / 10000) | |
| ``` | |
| Otherwise, `operatorAmount` is 0. |
There was a problem hiding this comment.
Applied in 3e7ae88: "Otherwise, operatorAmount is 0." This matches payments.cpp, where the operator amount is only set when nOperatorReward != 0 and scriptOperatorPayout is non-empty.
🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.
|
|
||
| | Name | Value | Description | | ||
| | --- | --- | --- | | ||
| | `ExtAddr` | 3 | Extended addressing and unified owner payout list. | |
There was a problem hiding this comment.
The extended addressing format goes by several names: "extended masternode and Platform addressing representation" (line 94), "Extended addressing" (here), "extended addressing representation" (line 114), and "extended network information format" (line 168). It would help to pick one term and link to where the format is defined (DIP-0003 Appendix C / dip-0003/network-info.md?).
Related:
- The new version 3 row in
dip-0003.md(line 142) says "Extended network information serialization and owner payout list as defined in DIP-0026", but DIP-0026 only defines the payout list. - Line 114 says other provider transactions also gain a version 3, but doesn't name them. The DIP-0003 version tables for ProUpServTx and ProUpRevTx still stop at version 2.
- Lines 116 and 279 say "ProUpServTx operator payout field". DIP-0003 calls that field
scriptOperatorPayout.
There was a problem hiding this comment.
Addressed in 3e7ae88:
- DIP-0026 now uses "extended addresses format" everywhere and links it to DIP-0003 Appendix C (
dip-0003/network-info.md). The extended-format section itself is added by docs: document the extended addresses format in Appendix C of DIP-0003, add new {ProTx, SML} version to support it, add deprecation notices #164, so this link points at the right file now and at the definition once docs: document the extended addresses format in Appendix C of DIP-0003, add new {ProTx, SML} version to support it, add deprecation notices #164 lands. - The DIP-0003 ProRegTx v3 row now says
networkInfouses the extended addresses format and that the owner payout list is defined in DIP-0026, so it no longer credits DIP-0026 with the network-info serialization. - DIP-0026 now names ProUpServTx and ProUpRevTx as the other transactions that accept version 3. I added v3 rows to their DIP-0003 tables: extended addresses format for ProUpServTx, and "same payload as version 2" for ProUpRevTx, which matches Core serialization. The ProUpServTx row uses the same wording as docs: document the extended addresses format in Appendix C of DIP-0003, add new {ProTx, SML} version to support it, add deprecation notices #164 to keep any conflict trivial.
- Both mentions of the ProUpServTx field now use
scriptOperatorPayout.
🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.
| payout list applies only to the owner-controlled portion of the masternode | ||
| reward. | ||
|
|
||
| ### Masternode Payout Share |
There was a problem hiding this comment.
Terminology: the Terminology table defines "Payout entry" and "Payout list", but the structure is MasternodePayoutShare here, and the headings say "Masternode Payout Share" and "Updating Masternode Payout Shares".
MasternodePayoutShare matches Dash Core (src/evo/providertx.h), so the type name should stay. Could the Terminology table tie the terms together, e.g. "Payout entry: one MasternodePayoutShare (owner payout script and reward share)"? That way readers can tell these apart from DIP-0035's collateral shares (CCollateralShare).
There was a problem hiding this comment.
Done in 3e7ae88. The Terminology table now defines "Payout entry" as "One MasternodePayoutShare: an owner payout script and its reward share", and notes that it is distinct from the DIP-0035 collateral share (CollateralShare), with a link. The type name stays as is to match Core.
🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.
…rminology Allow an empty payout list for shared registrations in the payoutsCount row and Abstract, define operatorAmount as 0 when no operator payout applies, describe shared-masternode reward payment via DIP-0035, use "extended addresses format" consistently, name the other version 3 provider transactions, and tie payout entries to MasternodePayoutShare. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Testing
npx markdownlint-cli2 dip-0026.md README.md --config .markdownlint.json.This pull request was created by Codex.
Summary by CodeRabbit
#26“Masternode Multi-Party Payouts” specification with a Version 4 payout-list model, including payout-list validation, deterministic reward splitting rules, updated masternode payout construction/verification expectations, and revised Dash Core v24 activation/compatibility guidance.#26title and structure.#3ProRegTx/ProUpRegTx “different versions” and validation guidance to cover Version 4, aligning payout validation with the DIP#26payout-list model.