mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:08:38 +00:00
WIP: p2p: Relay stale tip announcements (BIP 332)(Stale Tip Relay) #36920
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36920
Loading…
Reference in a new issue
No description provided.
Delete branch "bip332-staletips-pt2-headersrelay"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #36833.
Based on #36919; review from
p2p: add staletip message type and payload.This adds the BIP 332
staletipmessage, negotiated through the BIP 434BIP332feature. With-staletips=headers, the node announces the stale tips it tracks and tracks the ones its peers announce. Only headers are relayed.Key changes
New
staletipmessage type and payload.Add a
StaleTipRelayManager, which holds the relay policy.With
-staletips=headers, the node advertisesBIP332(withprefers_blocks=false) and relays only with peers that advertise it too.Stale tips learned from peers are tracked, and listed by
getchaintipswithstaletips_only:Sample output
A node that learned of a stale tip only from a peer's
staletipmessage:getnetworkinfogets alocalfeaturesfield, listing the BIP 434 features the node advertises.Sample output
getpeerinfogets afeaturesfield, listing the BIP 434 features each peer advertises.Sample output
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
clang-tidyoptin.performance.Paddingby fanquake)src/test/fuzzand treat them as errors by hebasto)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
LLM Linter (✨ experimental)
Possible places where comparison-specific test macros should replace generic comparisons:
src/test/staletipmessage_tests.cpp:BOOST_CHECK_THROW(DecodeExact(trailing), std::ios_base::failure)→ PreferBOOST_CHECK_EXCEPTIONwith a predicate checking the expected failure message.src/test/staletipmessage_tests.cpp:BOOST_CHECK_THROW(DecodeExact(invalid_bool), std::ios_base::failure)→ PreferBOOST_CHECK_EXCEPTIONchecking"staletip invalid have_block".src/test/staletipmessage_tests.cpp:BOOST_CHECK_THROW(DecodeExact(truncated), std::ios_base::failure)→ PreferBOOST_CHECK_EXCEPTIONchecking the expected truncation failure.src/test/staletipmessage_tests.cpp:BOOST_CHECK_THROW(DecodeExact(noncanonical), std::ios_base::failure)→ PreferBOOST_CHECK_EXCEPTIONchecking the expected non-canonical CompactSize failure.src/test/staletipmessage_tests.cpp:BOOST_CHECK_THROW(DecodeExact(empty_headers), std::ios_base::failure)→ PreferBOOST_CHECK_EXCEPTIONchecking"staletip headers empty".test/functional/p2p_staletip.py:assert len([msg for msg in peer.staletips if msg.tip_hash() == block.hash_int]) == 1→ Preferassert_equal(len([...]), 1).test/functional/p2p_staletip.py:assert len(tracked) > 0→ Preferassert_greater_than(len(tracked), 0).2026-11-20 19:36:55
🚧 At least one of the CI tasks failed.
Task
i686: https://github.com/bitcoin/bitcoin/actions/runs/44625059152/job/135916554369LLM reason (✨ experimental): The build failed because
staletiprelayman.cppomits theStaleTipMessage::headersinitializer, and warnings are treated as errors.Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
Earlier concerns remain unresolved; see the Run archive linked from the Review report.
No verified findings are available from this review.
Review coverage was incomplete.
Reviewed:
de7a810827be· Review report · Previous reportspermalink
🐙 This pull request conflicts with the target branch and needs rebase.