Permissionless adaptive pairwise reconciliation
Status: the user authorized an isolated implementation experiment on 2026-10-21. This document is the current minimal implementation direction. It supersedes requiring the exploratory epoch-root gossip/causal-clock/finality machinery before improving dissemination. It does not authorize a new consensus or block-parking rule.
1. The baseline being implemented
Every negotiated transaction-relay peer may reconcile, including nodes with no stake proof, no staked coins and Avalanche disabled. Peer selection uses connected reconciliation-capable relay peers, not Avalanche eligibility, proof weight, voting quorum or a roster. Ordinary validation and negotiated resource limits remain mandatory.
The scheduler keeps bounded per-peer initiation timestamps and enforces a 250 ms minimum between summaries sent to the same peer. This limits initiation rate; it does not prove an earlier multi-message exchange has finished or prevent all overlap. It invokes the existing Merklix/BCH/bucket/body-validation path; it does not quietly add a new wire round-owner framework. The desired full reconciliation engine pins immutable local snapshot identity/context for each exchange, compares it with the other endpoint's possibly different root, zooms mismatching prefixes and verifies exact recovered identities. Newly learned compatible data participates in later passes. No agreement on a global snapshot ID or simultaneous snapshot time is required to disseminate data. The inherited moving-window context does not yet provide that full immutable multi-message contract; see §3 before claiming it from this scheduler patch.
The scheduler initiates after a configurable number of distinct eligible local changes, initially 1000, or a monotonic maximum-wait deadline. The count is a bounded scheduling hint, not cumulative mempool size, authenticated pairwise difference or proof that earlier exchanges delivered anything. Implementation-configured minimum interval, maximum wait and existing round/resource limits govern pacing. No tuned performance claim attaches to the initial threshold.
For each initiation choose a fresh random subset using the existing configured transaction-relay fanout percentage/minimum/maximum. Current defaults are 25%, minimum 8 and maximum 32, further bounded by eligible peer count. Thus this is not always a literal quarter of peers: a three-peer node normally selects all three. Sample anew across passes; avoid selecting cooling-down or ineligible peers as though work was dispatched. A separately paced rotating peer receives one reserved opportunity; advance that cursor and its deadline only after that exact peer's summary enqueue succeeds. Other recipients succeeding cannot consume a failed reserved opportunity. Local-origin all-peer transaction relay and parent-route expansion are properties of the existing INV relay path, not automatically additional reconciliation fanout rules.
Successful initiation retires that captured scheduling obligation, not a set-delivery acknowledgement. Capture/swap pending accounting under its owner: a second change to the same TxId after capture belongs to the new generation too. Retire the captured obligation only after at least one actual peer dispatch/enqueue succeeds. If all candidates are busy, disappear or fail enqueue, preserve/rearm work without moving its oldest due deadline into the future. A failed exchange cannot be reported as completed coverage. Bounded distinct-ID tracking may saturate at the trigger threshold; any saturation is a lower-bound scheduling hint, never proof of complete represented membership. Count send metrics only after actual enqueue.
Maximum-wait anti-entropy remains armed even with zero new changes after a sampled send, so unsampled or new peers can still be contacted. The maximum wait is a readiness deadline, not a delivery guarantee: the periodic relay tick, peer cooldown, unavailable peers and ordinary transport backpressure may delay actual dispatch. In particular, setting a wait below 250 ms does not bypass the per-peer spacing. Keep membership-change generation separate from pass sequence. Recheck pending work when completion frees capacity to prevent a lost wake.
2. Epidemic initiation without forwarding connection-bound requests
An eligible inbound reconciliation request may coalesce one local scheduling wake. In this experiment the wake does not bypass count maturity or maximum-wait readiness; it is not an immediate extra fanout obligation. The recipient then initiates its own exchanges with its own freshly sampled subset. It does not forward the original connection-bound request, request ID or response ownership. Requests and responses remain bound to their originating connection and negotiated context.
A readiness margin around the count target can pace initiation; it must not reject otherwise valid inbound service. A low-rate peer with ten pending changes still serves its snapshot to a peer with a thousand. Maximum wait allows the low-rate peer to initiate too. Strict “counts must be close” acceptance can strand heterogeneous peers, and equal counts reveal nothing about overlap: two 1000-element sets can differ in 2000 identities.
Coalesce inbound work once per applicable local membership-change generation/scope, with cooldown, minimum interval and global/per-peer request limits. Resetting this allowance on every pass can sustain stable-peer ping-pong; an attacker-supplied request ID is not a new local generation. Capability/context/rate admission precedes the scheduling hint. Do not recursively fan out on every packet, child-prefix reply, retry or duplicate. An unsolicited nonstaker can request service but cannot force unbounded snapshots, workers, signatures, pins or outbound amplification. Request rate is never vote weight.
The receiver can lazily prepare a local immutable snapshot when a valid request arrives, rather than waiting for an unrelated global clock. In the future layered-epoch design, a validated request for the known anchored active slot can cause its one-time local cut/preparation; that is not permission to allocate arbitrary peer-ahead epochs or recut an already activated layer. The current experiment uses existing contexts and does not implement that new epoch transition as a hidden scheduler side effect.
3. What eventual propagation does and does not require
For a finite stable collection of compatible valid transactions, pairwise union propagates across a connected usable honest graph if interactions are fair, advertised data remains retrievable, each member is eventually represented, and validation permits it at the receiving nodes. A transaction learned on one edge can be advertised on another in a later pass. This needs neither stake nor a network-wide snapshot timestamp. Random resampling supports probabilistic discovery; a deterministic time bound needs an explicit fairness/rotation policy and delivery bounds.
The conditions matter. Different validation anchors, unavailable ancestors, alternative TxHash for one TxId, conflicting spends, retention expiry and malicious omissions can prevent literal union. Ongoing transaction arrivals are a continuing propagation workload, not a finite fixed-set termination problem. Even finite-set dissemination does not tell one node when every other node has everything. None of these limits justifies requiring a new consensus protocol merely to improve ordinary pairwise relay.
The current experimental wire still contains the known 4096-member selection/truncation and recent-window coverage limitations. Relay-epoch bucket comparison also skips nonpositive count differences even when a root/XOR differs; a balanced stable pair can therefore conceal missing identities indefinitely. Later bucket requests can rematerialize the moving window under the same chain-hash context rather than access one immutable round view. Changing scheduling alone fixes none of these. Therefore this implementation may demonstrate improved propagation for its represented sets, but must not claim whole-pool eventual coverage, complete old-transaction repair or exact 500k convergence from this scheduler change alone. Existing full-set owned-view/reconciliation repair remains separate work. A complete future implementation must represent the whole requested snapshot and make bounded per-message progress through it, never call a truncated selection the complete root.
4. Adaptive cadence follows differences, not the cumulative root size
The first experiment uses count-or-timeout and configured random fanout. A later measured adaptation can use eligible additions/removals since a peer's last pinned comparison, observed decoded symmetric differences, decode/extension failures, prefix zoom depth, bytes and CPU. Keep estimation incremental over changed identities and completed exchanges; do not scan/hash the entire cumulative pool on each arrival or timer.
TPS times elapsed time estimates new local arrivals, not exact pairwise difference: peers may already share them, have independent missing sets, or have removals. The target is a bounded expected difference/sketch cost per exchange, not “the whole epoch has at most 1000 transactions.” Cumulative roots can contain millions of shared members while only a small delta differs. If a difference estimate is too low, deeper prefix zoom and bounded retry preserve correctness; do not truncate the represented membership to make a sketch appear successful.
Measure bytes per newly delivered transaction, p50/p99 delivery delay, decode failure/zoom rates, scheduler CPU, retained snapshot/body bytes, no-progress retries and low-rate-peer coverage. Include bursts, overlap/disjoint sets, changing fanout degree, asymmetric rates, peer churn and late joiners. The full-set limitation above must be separated from scheduling effects in those measurements.
5. Three matching rounds: useful observation, not finality
Repeated successful exchanges with an unchanged exact root/base can justify a local quietness heuristic: reduce aggressive work until new changes, mismatches, inbound triggers or a maximum-wait deadline require another pass. No staking is needed for such local stopping. It does not prove global completion, Byzantine agreement or an irreversible epoch decision.
For example, N1 and its three sampled partners repeatedly see AB while another region has ABC. If both regions install their locally stable roots as globally finalized parents, the successor bases/parent IDs differ. Learning C later cannot repair an immutable “AB was the agreed parent” claim without a separate rule. The minimal implementation therefore does not seal a shared finalized layer or increment the shared epoch ordinal from this heuristic. Its pre-seal quietness observation can reset. If a later phase creates a sealed local checkpoint, that checkpoint remains immutable: later changes create pending deltas/new views, never reopen the sealed object.
Current MERKLIXSYNC has root/scope context but no fresh exchange nonce/acknowledgement that proves three new complete bidirectional passes. Identical, delayed or replayed matching messages cannot establish that evidence. The implemented counter records repeated local captures with the same root/base and unchanged local membership generation. It is not evidence of matching peer replies, completed rounds, stable epochs, confirmed epochs or finality. A future genuinely correlated LOCAL_STABLE3 metric must bind the complete sampled pass, exact root/base, local generation and fresh owned request completion; reset on any mismatch or applicable generation change. Even then it remains local quietness unless a stronger finality mechanism is separately specified and validated.
5.1 Proposed next phase: immutable local checkpoints and add/remove membership changes
Phase 1 has no checkpoint-seal API and must not be reported as the complete layered architecture. The recommended next phase retains an owned immutable checkpoint S and a mutable pending delta containing additions A and removals R. The next view is (S minus R) union A, not an insertion-only union. Sealing that view produces a new immutable object and atomically starts a fresh pending delta. A removal never erases a leaf from the old historical S.
Pending operations carry exact TxId/TxHash/incarnation and a local ordering generation. A remove/re-add or witness replacement cannot be resolved by unordered set union or by an old callback overwriting a newer incarnation. Coalesce operations to their latest effective local membership; share unchanged canonical nodes and bodies. Ordinary transaction validation remains the authority for accepted live membership. A peer's historical membership proof is not permission to restore a transaction that current policy/state rejects.
Local checkpoint identity is snapshot-specific; it is not proof of a network-finalized parent. Peers with different local bases may compare their full current canonical views at a compatible chain anchor. Requiring equal local checkpoint-parent IDs would obstruct ordinary propagation. Stronger common-parent requirements belong only to a separately selected authoritative finality mechanism.
This proposal preserves immutable ownership without pretending late-data handling is solved by reopening a sealed snapshot. Implementing checkpoint/pending-delta ownership, pinned multi-message wire contexts and full-set coverage is follow-on work, with its own actual source gate; none is silently claimed by the scheduler experiment.
6. Optional stake experiment: observe first
The first optional stake experiment should observe root agreement only, with no block parking, transaction eviction, hard-consensus change, epoch sealing or authoritative finalized-parent transition. It is not a dependency of reconciliation APIs, peer selection, inbound service or scheduling.
After an immutable candidate is fully reconstructed and validated, an observer may poll its exact (epoch key if used, finalized base, candidate root/header) using authenticated issued Avalanche queries. Record outcomes and root-specific confidence separately from dissemination. A root/base/activation change starts fresh confidence; no AB confidence transfers to ABC, and an AB→ABC→AB activation cannot accept old AB tickets. Forwarded root preferences are discovery hints, not additional random samples or a global quorum certificate. Existing sliding response aggregation and timeout treatment must be reported as they actually operate, not mislabeled as the exploratory fixed-cohort mechanism.
A future authoritative finality experiment needs one exclusive preferred/finalized root per shared slot, exact parent/base validation, current-activation ownership and a reviewed policy for conflicts with local live transactions. These are not supplied merely by observing a few matching polls. The liveness tradeoff also remains explicit: continuing compatible union can change the target and reset confidence; choosing a fixed root can exclude late valid members into a successor. Under arbitrary holdouts, partitions or divergent sampling populations, a finite finality guarantee is not established. The accepted cumulative-layer architecture constrains any eventual finality implementation, but is not a gate on permissionless relay today.
Multi-root Snowball is an optional direction for that study, not a change to this scheduler. Keep exact root choices separate, reconstruct/validate before a positive vote, and bound candidate tracking against arbitrary root spam. The paper's cumulative preference evidence must not be confused with its separate consecutive acceptance condition, nor with current ABC's rolling-response VoteRecord. Reuse authenticated query ownership and sampling plumbing where appropriate; first audit the actual aggregation rather than assuming the existing processor and paper algorithm are equivalent.
7. Focused gates for this implementation
- Avalanche disabled and no stake proofs: two or more negotiated relay peers still initiate, serve and learn transactions.
- Threshold-minus-one then threshold: count trigger behaves once; low-rate traffic triggers by monotonic maximum wait; no wall-clock jump dependence.
- Changes arriving during a pass survive its scheduling-accounting retirement; no available peer or busy rounds leave work pending/rearmed.
- Inbound bursts/duplicates coalesce; low-count recipients still serve; per-peer initiation cooldowns and configured fanout/min/max remain bounded. These timestamps are not falsely reported as authenticated complete wire rounds.
- Fresh random choices across passes are measured; fairness/rotation behavior is stated, not inferred from a tiny test.
- Existing snapshot limitations remain visible in >4096/recent-window/late-peer tests. Such failures cannot be relabeled scheduler convergence.
- The local-capture repeat metric causes no finalized-layer, ordinal, transaction-conflict or block-parking state transition.
Source facts were checked in net_processing.h, transaction fanout selection in net_processing.cpp, and the current V2 handler on the repaired source lineage. Transaction relay uses a fixed 10 ms default tick; the retained Poisson scheduling pertains to proof announcements. Existing continuous reconciliation was a 250 ms round-robin recent-window mechanism, not already the new adaptive random-subset scheduler. Implementation/result claims belong to the isolated candidate's exact source pin and evidence, not to this design document.
8. One chain authority; relay snapshots are derived state
The minimal scheduler creates no independent authoritative epoch chain. Its snapshot records, local pass counters and quietness observations are transport/mempool state. Following a partition, the node applies the chain-selection/finality rules it actually runs, revalidates derived live mempool state, and starts new matching-context exchanges. Old immutable snapshots may remain retained historical views, but cannot make a previously valid block hard-invalid merely because a late reconciliation message arrived.
Two authority policies must not be conflated:
- PoW-only authority plus soft relay snapshots: proof-of-work chain selection is authoritative and relay records are disposable/rebasable derived state. Choosing this policy would require an explicit separate decision concerning existing Avalanche behavior; the user has not authorized its removal.
- Retained existing PoW+Avalanche authority plus soft relay snapshots: preserve the implementation's block preference/parking/finalization precedence. The adaptive scheduler adds no new authority and does not override either existing mechanism. This is the experiment's current preservation rule.
Actual inspected source (recon-storage-latest-source at c3089be8d2151d4c295333ae806355822864647b, on the repaired lineage) routes Avalanche Rejected/Invalid block outcomes to ParkBlock, Accepted to UnparkBlock, and Finalized to AvalancheFinalizeBlock. Chainstate::FindMostWorkChain parks a candidate that conflicts with the stored Avalanche-finalized ancestry regardless of chainwork. The designated soft batch-policy work retry is narrower and does not override that finality. These are current behavior facts, not an endorsement of all unfinished batch-policy code.
Therefore neither one arbitrary new PoW block nor a local three-match relay observation is specified to overturn existing Avalanche finality. Any future change to authority, rollback or partition recovery must state one explicit precedence policy and test it against the actual parking/finalized-ancestry paths. The new reconciliation experiment does not need that redesign to run permissionlessly.