#36410 test: cover compact blocks far ahead of the tip
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36410 test: cover compact blocks far ahead of the tip | Ready | 0 | Crickets | 0 + 85 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Adds a functional test covering compact blocks received more than two blocks ahead of the chain tip. It verifies that when a node receives such a compact block for a block it previously requested, it re-requests the full block via getdata. It also tests that receiving an unrequested far-ahead compact block from an outbound high-bandwidth peer falls back to header processing and protects the peer from eviction.
Problem: Handling of compact blocks more than two blocks ahead of the tip was completely uncovered by tests. Either the full-block getdata re-request path or the fallback header processing branch (fRevertToHeaderProcessing) could be deleted without failing any test in the test suite.
Evidence of importance:
- Commit de16833975 notes that 'No test checked what either branch does, so removing both made no test fail.'
- Linked issue #34618 reported missing test coverage for fRevertToHeaderProcessing in compact block message handling.
Risk of a mistake: low (tests). Only adds a new functional test and touches no production node code.
Reviewability
Ready
Nothing known that would invalidate a review now.
Agreement
Crickets
no substantive comment either way
Objections, suggestions, and questions: none recorded.
Files
85 lines under test/bench/ci.
- test/functional/p2p_compactblocks_far_ahead.py +84/-0
- test/functional/test_runner.py +1/-0
Card
The short text the ranking pass compares across PRs.
Adds a functional test covering compact blocks received more than two blocks ahead of the active chain tip. Previously, neither the full-block getdata retry path for requested blocks nor the fallback header-processing branch (fRevertToHeaderProcessing) for unrequested blocks was tested, so either code path could be disabled without causing test failures. The new test verifies both that the node requests the full block again and that an outbound high-bandwidth peer is protected from eviction upon header processing. This resolves issue #34618.
Data
labels: Tests
Categories
P2P
P3 · test coverage (ranking pass: New coverage only; ordered inside the test cluster.)
Adds missing test coverage for compact block processing when received far ahead of the chain tip. Issue #34618 and commit de16833975 noted that handling of these branches, including fallback header processing (`fRevertToHeaderProcessing`), had no test coverage.
Membership: Adds a functional test pinning P2P compact block handling and fallback behaviors (`test/functional/p2p_compactblocks_far_ahead.py`).
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0