Skip to content

rpc: protx listdiff loses operator payout clears and payouts restored after an operator key change #8090

Open

Description

@shumkov

protx listdiff does not always report operator payout changes, so a consumer cannot rebuild a masternode's operator payout from diffs alone:

  1. CDeterministicMNStateDiff::ToJson (src/evo/dmnstate.cpp) omits an empty operatorPayoutAddress. A payout cleared with a ProUpServTx carrying an empty payout script, without an operator key change, looks like no change.
  2. The diff compares the two endpoint states only. When the operator key changes, Core resets the operator payout; if the new operator then sets a payout equal to the old one within the range, the diff prints the key change without a payout, which reads the same as a reset with no payout.

Dash Platform derives operator identity withdrawal keys from these payouts. Today it compensates for case 2 by reading protx info at the diff's target block for each operator key change printed without a payout; case 1 stays undetectable.

Request: make the RPC output lossless for operator payouts without changing the binary diff semantics. For example, print explicit clears, and include the target state's operator payout next to every reported operator key change (enriching from the target list where needed). Recorded-response tests would let Platform consume the corrected output at a later protocol version.

Context: dashpay/platform#5775 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions