Skip to content

Fix governance requests and compact block downloads - #313

Merged
minuszka merged 1 commit into
defcon-project:v22.1.xfrom
minuszka:fix/upstream-network-group3
Oct 19, 2026
Merged

minuszka merged 1 commit into
defcon-project:v22.1.xfrom
minuszka:fix/upstream-network-group3

Conversation

@minuszka

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

When several peers announce or deliver the same data, governance responses and
compact-block downloads need consistent request state for each peer. This
backport preserves legitimate downloads while processing responses and allows
compact-block reconstruction to continue through another peer.

What was done?

  • Bind governance object and vote authorization to the announcing or requested
    peer and the full inventory entry.
  • Support up to three parallel compact-block downloads, with per-peer cleanup
    and upstream fallback behavior.
  • Preserve the fork's proof-of-stake validation and signature serialization rules.
  • Align the Python block models with the existing signature fields and add
    governance, reconstruction and peer-protocol regressions.

Backports: Dash #7442,
Dash #7398 and the
Bitcoin #27608 prerequisite
(4b4d96a6, 8ffdf7ff, 29151420). Upstream authors: Pasta, PastaClaw
and The Bitcoin Core developers. Adapted to this fork's interfaces.

How Has This Been Tested?

On local Linux/WSL, with the final approved tree 44205443 and commit db78dfa5:

  • Independent Claude review APPROVED the complete patch 35be948e.
  • Full local CI: 8/8 stages passed, including the existing unit gate
    (783 cases), all compiled Qt suites, strict LSan and its canary,
    configure and no-wallet regressions.
  • Complete named functional gate: 30/30 variants passed, including descriptor
    and legacy-wallet PoS; separate p2p_compactblocks.py and
    p2p_mutated_blocks.py passed.
  • Same-tree helper regressions: 24 prefix-transport and 12 detached-signing
    tests passed.
  • Actual commit checks: commit scripts, message, whitespace and file modes passed.
  • Focused pre-fix controls fail at the changed governance and reconstruction
    behavior; the original logs and all failed attempts were retained.

Hosted PR CI remains pending. Local unit exclusions and existing Qt skips are
unchanged from the workflow.

Breaking Changes

No consensus rule, RPC schema, production wire format or wallet format changes.
Peer request authorization and compact-block download selection intentionally change.

Limits

The earlier legacy PoS disconnect timeout remains unexplained; the retained
old/new binary diagnostic and this complete functional run passed, but do not
establish its cause. No fuzz campaign, signed-governance integration,
native Windows/macOS or live-network validation is claimed.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

Bind governance object and vote responses to each peer's typed request
state. Preserve another peer's download when an unsolicited reply arrives.

Allow concurrent compact-block reconstruction from up to three peers and
clean up requests per peer. Retain the fork's PoS signature rules and align
the Python block models with the existing signature fields.

Backport Dash #7442 and #7398 with the Bitcoin #27608 prerequisite.
Upstream Dash authors: Pasta and PastaClaw.
Original compact-block work: The Bitcoin Core developers.
@minuszka
minuszka merged commit 0decee2 into defcon-project:v22.1.x Oct 19, 2026
4 checks passed
@minuszka
minuszka deleted the fix/upstream-network-group3 branch October 19, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant