Repository navigation
feat(rpc): warn operators before their signing history gets them PoSe-voted bad - #8207
Draft
PastaPastaPasta wants to merge 4 commits into
Draft
PastaPastaPasta wants to merge 4 commits into
PastaPastaPasta wants to merge 4 commits into
Conversation
3 tasks done
Collaborator
|
🕓 Review not started yet because this PR is a draft.
Commit 1f88342. Normal review starts when eligible; priority review starts as soon as a slot is available. |
PastaPastaPasta
force-pushed
the
pose-signing-history-warning
branch
5 times, most recently
from
November 20, 2026 14:34
cf02567 to
3e95b65
Compare
…mmitments PoSe only punishes members that are not valid in a mined commitment. A member that sends its contributions but never signs the commitment stays valid and is never punished. During the complaint phase, count from mined commitments of the last 4032 blocks how many each member was valid in and how many it signed, ignoring those before its registration or last revival. A member that signed at most a quarter of at least six of them gets a bad vote, so with enough votes the existing PoSe penalty applies. The counts are derived from chain data up to the start of the DKG cycle only, so all members agree on them. The check is gated by SPORK_23 like the other bad votes. These votes are dropped in a round where they would leave fewer than minSize of the members this node has not already voted bad, after the contribution phase and its other bad-connection votes. This is the node's own estimate, not a prediction of the round: a round that ends below minSize neither penalizes the member nor lets it add a signed record, so the node does not cast votes that would cause that by its own count. The counts are the same for every member; only the set of remaining members depends on the node's view, and a node that drops the votes only lowers their count. GetSigningRecords() gathers the records against the active chain and the active-chain check runs on a cache hit too, so a result cached while the gathering block was on the active chain is not reused once a reorg has disconnected it. A member voted down for too little signing history is flagged badConnection, the flag a bad peer connection already sets. SendComplaint() no longer lets that flag hide a complaint about an invalid share from the same member: when the bad votes stay below dkgBadVotesThreshold the member remains valid, and only a complaint makes it justify its share, which is what lets the complaining member build its key and sign the commitment. Receivers count the bad-vote and complaint bitsets independently, so a member may appear in both. A dedicated simulated DKG error, commit-omit-all-types, omits premature commitments in the DKGs of every LLMQ type, so a test can produce a member that signs no commitment in any type. Only this error is allowed outside LLMQ_TEST, and only on a mockable chain; the gate of every other simulated error is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
…em voted bad A masternode that stops signing final commitments carries no PoSe penalty until other members first vote it bad for its signing history, and from then on the ban is effectively certain. Give operators the days in between as a warning period: - `masternode status` reports `signingHistory`: the gathering height, the height the history is counted since (registration or last revival), the valid and signed commitments, `recentUnsigned`, `oneMissAway`, `expiringSoon`, `atRisk` and `votedBad`. It is gathered at the block the hourly DKG sessions gather at, so the result is shared with them, and it is an estimate: each session gathers at its own block and counts since the registration or revival known at its quorum base block; - `quorum info` members report `signed`, and `quorum memberof` reports `isSigner`, so an operator can see which commitments it missed; - a DKG session the masternode is a member of logs a warning when its own history is at risk or already gets it voted bad. `recentUnsigned` counts the unsigned commitments of quorums based strictly after the most recent signed one: quorums of different types share base heights, so records of the same height have no order. At risk means any of: - at least 2 such commitments; - fewer than half signed out of at least 6; - `expiringSoon`: the window slides, so signed records leaving it can push a history to being voted bad without another unsigned commitment. The check looks a day ahead, and evaluates the threshold after each quorum height leaves, since old signed records may leave before old unsigned ones and the history only crosses the threshold on the way; - `oneMissAway`: one more unsigned commitment would get it voted bad, now or at any of those points as records leave. Several new unsigned commitments mined between two hourly gatherings can still take a history from no warning to being voted bad; warning for that would need a far more conservative rule. Unit tests cover the summary against the vote's counts and cutoffs, same-height records in either order, streak resets, the at-risk thresholds, one miss from being voted bad, the expiry transitions at the end of and partway through the lookahead, and expiry together with one more miss. Making the height comparison inclusive, dropping the lookahead, checking expiry only at its end, disabling the one-miss check, or checking one more miss only against the current totals makes them fail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Extend the existing non-signer scenario of feature_llmq_simplepose_capabilities.py: - sample `masternode status` `signingHistory` at the start of every DKG round while the masternode omits its commitments, and check that it starts empty after the earlier revival, never counts a signed commitment, counts every unsigned one as recent, reports `atRisk` before it is voted bad and `votedBad` (without `atRisk`) in the round that gets it banned; - check `gatheringHeight`, `window` and `countedSince` against the tip and `protx info`; - check `quorum info` member `signed` and `quorum memberof` `isSigner` for a commitment it omitted and, after the revival, one it signed; - check the masternode logs both its own at-risk and voted-bad warnings, and that once it signs again the history is no longer at risk. The status is sampled at DKG start because a PoSe-banned masternode's `masternode status` no longer reports its proTxHash, and so neither its signing history. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta
force-pushed
the
pose-signing-history-warning
branch
from
November 27, 2026 08:20
3e95b65 to
1f88342
Compare
|
This pull request has conflicts, please rebase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #8086; only the last three commits are new. Draft until #8086 merges.
Issue being fixed or feature implemented
With #8086, DKG members vote a member bad once it has signed at most a quarter of at least 6 recent commitments it was a valid member of. A masternode that stops signing carries no PoSe penalty until that first happens, and from then on fixing it doesn't help, because a member voted bad adds nothing to its history. A previously healthy masternode needs about 5 days of not signing to get there, and its operator sees nothing during those days.
This turns those days into a warning period. The feature commit is UdjinM6's, offered during review of #8086 and kept with his authorship.
What was done?
masternode statusgets asigningHistoryobject (gatheringHeight,window,countedSince,validCommitments,signedCommitments,recentUnsigned,oneMissAway,expiringSoon,atRisk,votedBad), gathered at the block the hourly DKG sessions gather at so the cached result is shared with them.quorum infomembers getsigned, andquorum memberofentries getisSigner, so an operator can see which commitments were missed.WARNINGabout its own history when it is at risk or already voted bad.CountSignedCommitmentsandHasInsufficientSigningHistoryreturn the same results as on feat: PoSe-vote members that persistently do not sign quorum commitments #8086; the summary shares the vote's cutoff filter. The vote itself does not change.votedBadreports the history alone: a session still drops its signing-history votes when they would leave fewer members than the quorum's minimum size, as on feat: PoSe-vote members that persistently do not sign quorum commitments #8086.feature_llmq_simplepose_capabilities.py, inside the existing non-signer scenario.ProUpRegTxwith a new operator key bans at once, aProUpServTxwith the new key revives and restarts the history).How Has This Been Tested?
llmq_dkg_testsgets a table-driven case for the summary (same-height records in either order, streak resets, the at-risk thresholds, one miss away, expiry at the end of and partway through the lookahead) and checks that the summary counts the same records as the vote.llmq_dkg_tests,llmq_blockprocessor_testsandrpc_testspass.feature_llmq_simplepose_capabilities.pynow samplesmasternode statusat the start of every DKG round while the masternode omits its commitments. It checks that the history starts empty after the earlier revival, thatatRiskis reported beforevotedBad, and thatvotedBad(withoutatRisk) is reported in the round that gets it banned. It also checksgatheringHeight,windowandcountedSince,quorum infosignedandquorum memberofisSignerfor an omitted and for a signed commitment, both of the masternode's ownWARNINGlines, and that the history is no longer at risk once it signs again. The status is sampled at DKG start because a PoSe-banned masternode'smasternode statusno longer reports its proTxHash, so it has no signing history to show.signedtaken fromvalidMembers,isSignertaken fromvalidMembers,atRiskforced to false,votedBadforced to false,recentUnsignedforced to 0,countedSinceignoring revivals, the at-risk log line removed, and the voted-bad log line removed.feature_llmq_simplepose_capabilities.py,feature_llmq_simplepose_capabilities.py --disable-spork23,feature_llmq_dkgerrors.pyandrpc_help.py, plus the three unit suites above.Breaking Changes
None. New RPC fields only; consensus and the PoSe vote are unchanged.
Checklist:
🤖 Generated with Claude Code