Skip to content

backport: v0.26 bitcoin#28364 - #102

Merged
DCG-Claude merged 3 commits into
developfrom
backport-0.26-b195-src
Oct 21, 2026
Merged

DCG-Claude merged 3 commits into
developfrom
backport-0.26-b195-src

Conversation

@DCG-Claude

@DCG-Claude DCG-Claude commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Automated Bitcoin Core v0.26 backports, batch backport-0.26-b195-src.

upstream commit gates notes
bitcoin#28364 7b8c1903d3 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass Backports bitcoin#28364: adds the TXPACKAGES log category, moves the orphan and orphanage logging to it, and adds the ex
Provenance

Each commit passed: cherry-pick (adapted by an Opus lane only where conflicts existed), build, touched tests, a mechanical diff-of-diffs check (every upstream hunk landed; no added line without an upstream counterpart), and an independent Opus verification lane where anything was adapted. Gate rows and lane artifacts are in the backportsys DB.

dashpay#7893 reached develop twice: f99212b merged an earlier revision of
its commit, which announces sporks inside the CanRelay() block, and
72a5997 merged the final revision, which announces them after that
block so masternode connections are covered too. Both loops survived,
so on test chains every relay-capable peer had each active spork inv
queued twice at VERACK.

Drop the earlier copy. The handler now matches the final revision
(45acdf3).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28148, bitcoin#28428, bitcoin#23536, bitcoin#28364 backport: v0.26 bitcoin#28428, bitcoin#28364 Oct 19, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b195-src branch from 473dca2 to b04b8d4 Compare October 19, 2026 11:04
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28428, bitcoin#28364 backport: v0.26 bitcoin#28428, bitcoin#28364, bitcoin#28027 Oct 19, 2026
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28428, bitcoin#28364, bitcoin#28027 backport: v0.26 bitcoin#28428, bitcoin#28364 Oct 19, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b195-src branch from e367fde to b04b8d4 Compare October 19, 2026 14:22
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28428, bitcoin#28364 backport: v0.26 bitcoin#28364 Oct 21, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b195-src branch from b04b8d4 to 7b8c190 Compare October 21, 2026 06:07
knst and others added 2 commits October 21, 2026 13:32
ac1bc5d fix(net): announce sporks once per new peer (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
   - dashpay#7893 ("fix(net): announce sporks to new peers instead of requesting them during mnsync") reached `develop` through two merge commits: f99212b carried an earlier revision of the PR's commit (ce24c40) and 72a5997 later carried the final revision (45acdf3). Git merged both without conflict, so the VERACK handler in `src/net_processing.cpp` now announces sporks twice: once inside the `if (pfrom.CanRelay())` block (earlier revision) and once right after that block (final revision, which also covers masternode connections that only become relay-capable after MNAUTH).
   - Effect: on test chains, relay-capable peers get each active spork inv queued twice in `vInventoryOtherToSend` per connection. `SendMessages` checks and updates the known-inventory filter for each queued inv, so the second copy is dropped before it is sent. The wire output is unchanged, and the cost is one extra queue entry and filter lookup per spork. This is a cleanup of dead duplicate code with no correctness or consensus effect. Mainnet is untouched because both copies are gated on `IsTestChain()`.

  ## What was done?
    Removed the earlier copy of the spork announcement loop (and its comment) from inside the `if (pfrom.CanRelay())` block, so that block again ends right after the `SENDCMPCT` push. The copy after the block is kept. The VERACK handler now matches the final revision of dashpay#7893 (45acdf3).

  ## How Has This Been Tested?
    The diff is a pure deletion (8 lines) that restores the final revision of dashpay#7893. I compared the VERACK handler region (from the SENDHEADERS comment through `if (!RejectIncomingTxs(pfrom))`) against `git show 45acdf3:src/net_processing.cpp` and it is identical.

    Built on macOS (Apple silicon, `--enable-debug --enable-werror --disable-hardening --enable-suppress-external-warnings --disable-bench`) and ran:
    - `test/functional/test_runner.py feature_sporks.py p2p_instantsend.py`: both passed.
    - `./src/test/test_dash --run_test=governance_vote_sync_tests`: 6 test cases, no errors detected.

    No new test was added: the duplicate queue entry is filtered before sending, so it has no observable effect on the wire or on peers.

  ## Breaking Changes
    None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  thepastaclaw:
    Verified ac1bc5d: the eight-line deletion removes redundant spork queueing while preserving test-chain gating, masternode coverage, and repeated-VERACK protection; no in-scope defects were found. The existing inventory-send path filters duplicates, so the PR description overstates the wire-level effect, but the cleanup remains correct. Validation was static only: the supplied CI snapshot reports an ASan build failure and several pending jobs, and the failed-log request confirmed logs remain unavailable while the workflow is running.
  knst:
    utACK ac1bc5d

Tree-SHA512: 41ba1b2477e1c8a622fcedda561105497db4f4e8780ce72303aa5d5f26be8fd9ebf56fa6468e96311b9651a8d1a1f5880d2d3b63392ed01aded35ee007897956
…tegory

a3b55c9 [doc] move comment about AlreadyHaveTx DoS score to the right place (glozow)
3b8c178 [log] add more logs related to orphan handling (glozow)
51b3275 [log] add category TXPACKAGES for orphanage and package relay (glozow)
a33dde1 [log] include wtxid in tx {relay,validation,orphanage} logging (glozow)

Pull request description:

  This was taken from bitcoin#28031 (see bitcoin#27463 for project tracking).

  - Log wtxids in addition to txids when possible. This allows us to track the fate of a transaction from inv to mempool accept/reject through logs.
  - Additional orphan-related logging to make testing and debugging easier. Suggested in bitcoin#28031 (review) and bitcoin#28031 (comment)
  - Add `TXPACKAGES` category for logging.
  - Move a nearby comment block that was in the wrong place.

ACKs for top commit:
  instagibbs:
    reACK bitcoin@a3b55c9
  achow101:
    ACK a3b55c9
  brunoerg:
    crACK a3b55c9
  mzumsande:
    Code review ACK a3b55c9

Tree-SHA512: 21884ef7c2ea2fd006e715574a9dd3e6cbbe8f82d62c6187fe1d39aad5a834051203fda5f355a06ca40c3e2b9561aec50d7c922a662b1edc96f7b552c9f4b24d

Dash adaptations:
- src/logging.h: TXPACKAGES = (1 << 29) added to Dash's uint64_t LogFlags enum, keeping the Dash block (bits 32+) and ALL = ~(uint64_t)0.
- src/logging.cpp: txpackages added to LogCategories and LogCategoryToStr next to Dash's own categories (chainlocks, llmq, coinjoin, etc.).
- src/net_processing.cpp: wtxid dropped from all new and changed log lines; Dash transactions have no wtxid (no segwit).
- src/net_processing.cpp: ProcessOrphanTx logs with node_id instead of upstream's peer.m_id; Dash's version takes a NodeId, not a Peer&.
- src/net_processing.cpp: the 'not keeping orphan', MEMPOOLREJ, ATMP-accepted and forcerelay log lines in the TX handler stay as they are; their only upstream change was adding wtxid.
- src/txorphanage.cpp: orphanage logs move to TXPACKAGES and the EraseTxNoLock and workset log lines are added, without wtxid; Dash's size-based orphan limit is kept.
- src/txorphanage.cpp: the large-orphan log label changes from 'hash:' to 'txid:' as upstream does, without the wtxid field.
- test/functional/p2p_permissions.py: expected log strings keep their format without '(wtxid=...)', matching the Dash log lines; Dash's mocktime in_mempool helper is kept.

Not applicable to Dash (intentionally omitted):
- src/validation.cpp: Only edits the RBF 'replacing tx' log in MemPoolAccept::Finalize; Dash has no RBF or m_all_conflicting loop, so there is no counterpart to change.
- src/net_processing.cpp: Upstream conflict context included the witness-stripped m_recent_rejects logic and the m_replaced_transactions loop; Dash has neither (no segwit or RBF), so its code is kept.
@knst
knst force-pushed the backport-0.26-b195-src branch from 7b8c190 to 0745451 Compare October 21, 2026 06:39
@DCG-Claude
DCG-Claude merged commit 43b8ef7 into develop Oct 21, 2026
70 checks passed
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

merged as dashpay#7924

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.

3 participants