Repository navigation
backport: v0.26 bitcoin#28364 - #102
Merged
Merged
Conversation
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>
6 tasks
DCG-Claude
force-pushed
the
backport-0.26-b195-src
branch
from
October 19, 2026 11:04
473dca2 to
b04b8d4
Compare
DCG-Claude
force-pushed
the
backport-0.26-b195-src
branch
from
October 19, 2026 14:22
e367fde to
b04b8d4
Compare
DCG-Claude
force-pushed
the
backport-0.26-b195-src
branch
from
October 21, 2026 06:07
b04b8d4 to
7b8c190
Compare
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
force-pushed
the
backport-0.26-b195-src
branch
from
October 21, 2026 06:39
7b8c190 to
0745451
Compare
Collaborator
Author
|
merged as dashpay#7924 |
3 tasks
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.
Automated Bitcoin Core v0.26 backports, batch
backport-0.26-b195-src.7b8c1903d3Provenance
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.