Repository navigation
Description
Description
RebuildListFromBlock's revive check in the TRANSACTION_PROVIDER_UPDATE_SERVICE branch only verifies that the operator/voting/owner keys are non-null before calling Revive():
if (newState->IsBanned()) {
if (newState->pubKeyOperator != CBLSLazyPublicKey() && !newState->keyIDVoting.IsNull() &&
!newState->keyIDOwner.IsNull()) {
newState->Revive(nHeight);
...(src/evo/specialtxman.cpp; this exact pattern is on develop today, e.g. develop:src/evo/specialtxman.cpp around line 487.)
CheckProUpServTx verifies a ProUpServTx's signature against dmnman.GetListForBlock(pindexPrev)'s current operator key at admission time — not against the evolving in-block state that RebuildListFromBlock builds up as it processes earlier transactions in the same block.
Failure scenario
- A masternode's current operator key is
X. - A
ProUpServTxsigned with keyXis broadcast and sits in the mempool (or is otherwise available), valid at that point. - Before it confirms, the owner (via
ProUpRegTx) rotates the operator key toY.CheckProUpRegTxandCheckProUpServTxare each validated independently againstpindexPrev, so both can pass individually even though they conflict. - If a block includes the
ProUpRegTx(rotating toY, which resets operator fields and PoSe-bans the masternode) before the oldProUpServTx(still signed byX) in transaction order,RebuildListFromBlockprocesses the registrar update first (banning the MN, installing keyY), then processes the service update. The service-update branch does not re-verify the signature against the now-current keyY— it just applies the payload's fields (netInfo,scriptOperatorPayout, etc.) to the evolving state and, sincepubKeyOperator(Y),keyIDVoting, andkeyIDOwnerare all non-null, immediately revives the masternode.
Net effect: an operator that has just been displaced by an owner-initiated key rotation can, via a service-update transaction it already had signed under the old key, restore its own scriptOperatorPayout/service fields and immediately un-ban the masternode in the same block — even though it no longer controls the operator key going forward.
Scope note
This affects ordinary (non-shared) masternodes on develop today. It is not introduced by, or specific to, the Decentralized Masternode Shares DIP (#7437) — that PR's ProUpSharedRegTx path deliberately mirrors this same established ProUpRegTx pattern, and inherits the same characteristic. Found via automated review of #7437; verified against develop by direct comparison of RebuildListFromBlock.
Possible fixes (not evaluated in depth)
- Re-verify a
ProUpServTx's signature against the evolving operator key inRebuildListFromBlock, not just at admission time againstpindexPrev. - Or: reject the combination in-block if the operator key differs between the transaction's signature and the state at the point it's applied.
- Or: keep the current per-transaction validation model, but explicitly document this as an accepted trust boundary (i.e., an operator key rotation is not "immediately hard" against the previous operator's already-signed-but-not-yet-broadcast transactions within the same block) if that's judged acceptable.
Activity
PastaPastaPasta commentedon Aug 12, 2026
Same class of gap also applies to
ProUpRevTx:CheckProUpRevTxverifies its signature againstdmnman.GetListForBlock(pindexPrev)'s operator key (identical pattern toCheckProUpServTx), andRebuildListFromBlock'sUPDATE_REVOKEbranch never re-verifies it either. So a same-blockProUpRegTxoperator rotation followed by an old-key-signedProUpRevTxlets a displaced operator revoke/ban the masternode immediately after being rotated out, mirroring the revive-via-ProUpServTxscenario above. Confirmed identical ondevelop. Surfaced by review on #7437.🤖 Posted autonomously by Claude on behalf of pasta.
fix: drop stale operator service updates around an operator key change
fix: drop stale operator service updates around an operator key change
fix(mining): mine a pending ProUpServTx before a key change of its ma…
fix(mining): mine a pending ProUpServTx before a key change of its ma…
fix(mining): mine a pending ProUpServTx before a key change of its ma…
fix(mining): mine a pending ProUpServTx before a key change of its ma…
fix(mining): mine a pending ProUpServTx before a key change of its ma…
fix: drop stale operator service updates around an operator key change
Merge dashpay#7857: fix: mine a pending ProUpServTx before a key chan…
Merge dashpay#7857: fix: mine a pending ProUpServTx before a key chan…
Merge dashpay#7857: fix: mine a pending ProUpServTx before a key chan…