Skip to content

docs(dip-26): update masternode multi-party payouts#184

Open
PastaPastaPasta wants to merge 8 commits into
dashpay:masterfrom
PastaPastaPasta:codex/masternode-reward-shares
Open

docs(dip-26): update masternode multi-party payouts#184
PastaPastaPasta wants to merge 8 commits into
dashpay:masterfrom
PastaPastaPasta:codex/masternode-reward-shares

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Folds the masternode multi-party payouts draft into existing DIP-0026.
  • Updates DIP-0026 for version 4 ProRegTx/ProUpRegTx payloads with a unified owner payout list.
  • Documents validation, reward splitting, v24 deployment, compatibility, test cases, and security considerations.
  • Preserves DIP-0026 original attribution while adding Pasta as an author.

Testing

  • Ran npx markdownlint-cli2 dip-0026.md README.md --config .markdownlint.json.

This pull request was created by Codex.

Summary by CodeRabbit

  • Documentation
    • Updated DIP #26 specification for "Masternode Multi-Party Payouts" with finalized design details and deployment information for Dash Core v24.
    • Refreshed README to reflect updated DIP #26 title and specification structure.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: da5dcf75-aa57-492f-b191-208c327a96ee

📥 Commits

Reviewing files that changed from the base of the PR and between aac169b and f8850ff.

📒 Files selected for processing (2)
  • README.md
  • dip-0026.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Walkthrough

This PR updates DIP-26 from an earlier draft into the finalized "Masternode Multi-Party Payouts" specification. The document defines a protocol v4 extension enabling masternode owner rewards to be split deterministically across up to 8 on-chain payout scripts via a unified payouts list. README repository index is updated to reflect the new title.

Changes

DIP-26 Multi-Party Payouts Specification

Layer / File(s) Summary
README DIP index update
README.md
DIP-26 title updated to "Masternode Multi-Party Payouts" and Dash BIPs link text refreshed.
DIP preamble: abstract, motivation, and background
dip-0026.md
Document header and table of contents rewritten; abstract and motivation clarified to describe protocol-enforced multi-script owner reward distribution as a trustless alternative to off-chain custodial arrangements.
Technical specification: v4 payload and state representation
dip-0026.md
MultiPayout v4 provider transaction version introduced with unified payouts list (1–8 entries per masternode). Each entry specifies script, size, and reward share in basis points. ProRegTx/ProUpRegTx encoding and deterministic masternode list state representation specified; state diffs replace the full payout list atomically.
Reward computation, validation, and filtering
dip-0026.md
Reward algorithm rewritten to subtract operator reward before splitting owner reward across payout entries using floor rounding with remainder to last entry. Validation rules added for payout counts, share bounds, sum-to-10000, script types, duplicate script/key prevention. Special transaction filters and bloom rules updated to include every script in the v4 payout list.
Deployment, rationale, test cases, and security
dip-0026.md
Deployment gated at Dash Core v24 with version-4 validity constraints and equivalence guidance for legacy masternodes. Rationale sections justify design limits (8 entries, basis-point shares) and operator-reward separation. Comprehensive test cases cover payout count validity, share arithmetic, script-type enforcement, ProUpRegTx replacement, rounding behavior, and legacy equivalence. Security section addresses on-chain authority boundaries and anti-dust constraints. Copyright and license information updated.

Sequence Diagram(s)

No sequence diagram generated: this is a documentation-only specification update without multiple interacting components or operational control flow visualized in the text.


🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: updating documentation for the Masternode Multi-Party Payouts DIP specification in dip-0026.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@PastaPastaPasta PastaPastaPasta changed the title docs: add masternode reward shares DIP docs: add masternode multi-party payouts DIP Jun 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between a4d46dd and aac169b.

📒 Files selected for processing (1)
  • dip-pasta-multi-party-payouts.md

Comment thread dip-pasta-multi-party-payouts.md Outdated
Comment on lines +164 to +180
For external collaterals, the collateral ownership sign string must include the
new payout list representation instead of the previous single payout string. The
payout list string is produced by concatenating each payout entry in serialized
order as:

```text
<reward>:<payoutStr>
```

Entries are joined with commas. `<payoutStr>` is the Dash address corresponding
to the entry's `scriptPayout` when the script is a standard address script, or
the hex representation of the script otherwise. The ProRegTx sign string
therefore becomes:

```text
<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve magicString in the external-collateral sign message contract

Line 179 appears to redefine the signed message as starting with <payoutListStr>, but DIP-0003’s signed message format includes a required <magicString> prefix. Dropping that prefix would change the signature domain and break compatibility with existing signing/verification behavior for external collateral proofs.

Suggested wording update
-<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
+<magicString><payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
-The ProRegTx sign string
-therefore becomes:
+The ProRegTx sign message keeps the existing `magicString` prefix from DIP-0003;
+only `<payoutStr>` is replaced with `<payoutListStr>`. The sign string therefore becomes:
📝 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.

Suggested change
For external collaterals, the collateral ownership sign string must include the
new payout list representation instead of the previous single payout string. The
payout list string is produced by concatenating each payout entry in serialized
order as:
```text
<reward>:<payoutStr>
```
Entries are joined with commas. `<payoutStr>` is the Dash address corresponding
to the entry's `scriptPayout` when the script is a standard address script, or
the hex representation of the script otherwise. The ProRegTx sign string
therefore becomes:
```text
<payoutListStr>|<operatorReward>|<ownerKeyAddress>|<votingKeyAddress>|<payloadHash>
```
For external collaterals, the collateral ownership sign string must include the
new payout list representation instead of the previous single payout string. The
payout list string is produced by concatenating each payout entry in serialized
order as:
🤖 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 `@dip-pasta-multi-party-payouts.md` around lines 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.

@UdjinM6

UdjinM6 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

UdjinM6 and others added 6 commits June 7, 2026 10:06
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
@PastaPastaPasta PastaPastaPasta changed the title docs: add masternode multi-party payouts DIP docs(dip-26): update masternode multi-party payouts Jun 7, 2026

@UdjinM6 UdjinM6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread README.md
DIP stands for Dash Improvement Proposal. Similar to Bitcoin's [BIPs](https://github.com/bitcoin/bips/), a DIP is a design document providing information to the Dash community, or describing a new feature for Dash or its processes or environment. The DIP should provide a concise technical specification of the feature and a rationale for the feature.

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)). 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.
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 BIPs repository](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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: unrelated changes

@thephez

thephez commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Why re-write the existing DIP instead of just introducing a new one to supersede this one and marking the existing one withdrawn? I guess the original was never implemented, but this seems like an atypical approach 🤔
EDIT: actually given that the document never moved beyond draft status, I think this is fine and in alignment with normal process.

Comment thread dip-0026.md

1. `payoutsCount` is less than 1.
2. `payoutsCount` is greater than 8.
3. Any payout entry has `reward` less than 100.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This applies specifically to owner payouts and operator ones remain unaffected?

@thephez thephez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Forgot to mention on the last review, but DIP-3 likely needs at least some edits or it's going to be incorrect.

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.

3 participants