-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
awaiting-reviewSub-agent completed work, awaiting main session review/PRSub-agent completed work, awaiting main session review/PRp2-normalRegular queueRegular queue
Description
Deep Fuzz: Masternode List Deterministic Diffs
Parent: Fuzzing initiative (mega PR on ci/fuzz-regression)
Goal
Fuzz the deterministic masternode list diff computation — the mechanism SPV/light clients use to sync the MN list. An error here means light clients see a different MN list than full nodes, which is a consensus split for LLMQ-based features (ChainLocks, InstantSend).
Attack Surface
CDeterministicMNManager::GetListDiffForBlock()— computes diffs between MN list statesCDeterministicMNList::ApplyDiff()— applies diffs to reconstruct listsCSimplifiedMNListDiffserialization/deserialization — what goes over the wire- ProRegTx/ProUpServTx/ProUpRegTx/ProUpRevTx application to the MN list
Harness Design
- Initialize
TestingSetupwith a small deterministic MN list (10-20 masternodes) - Use
FuzzedDataProviderto generate sequences of ProReg/ProUpServ/ProUpReg/ProUpRev transactions - Apply each transaction to the MN list, compute diff, apply diff to a second list
- Assert both lists match (roundtrip consistency)
- Also fuzz
CSimplifiedMNListDiffdeserialization with structured inputs
Corpus Strategy
- Chain data: Extract ProRegTx, ProUpServTx, ProUpRegTx, ProUpRevTx from mainnet (thousands available)
- Simulated: Construct valid MN registration sequences with known keys, then apply update/revoke sequences. Vary: operator key rotations, service address changes, payout address changes, revocation reasons
- Diff roundtrip: Serialize a known MN list state, compute diff, serialize diff, deserialize, apply — verify consistency
Checklist
- Study MN list management in
src/evo/deterministicmns.cpp - Study simplified MN list diff in
src/evo/simplifiedmns.cpp - Design harness with initial MN list population
- Extract ProReg/ProUp* TXs from mainnet for corpus
- Build structured MN operation sequence generator
- Write harness with diff roundtrip assertion
- Add to
ci/fuzz-regressionbranch - Push corpus to
thepastaclaw/qa-assets
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
awaiting-reviewSub-agent completed work, awaiting main session review/PRSub-agent completed work, awaiting main session review/PRp2-normalRegular queueRegular queue