AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#36687: test: wait for the node to finish the last block in p2p_ping_ibd

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36687: test: wait for the node to finish the last block in p2p_ping_ibd

9af82f9872ca1a9e8d4645c537b23af4bc861ed2 test: wait for the node to finish the last block in p2p_ping_ibd (Greg Sanders)

Pull request description:

ProcessBlock() stamps m_last_block_time only after ProcessNewBlock() returns, so getblockcount can show the new height, with nothing in flight, before the stamp is taken. A bumpmocktime in that gap stamps the block with the bumped time, and the final bump then leaves the ping timeout exactly at its boundary, where it never fires. Sync with a ping after the last block, so the node has finished processing it before the clock moves.

The race has been present since the test was added in #36080.

Faling job:
https://github.com/bitcoin/bitcoin/actions/runs/40589303246/job/122489039018

ACKs for top commit:
mzumsande:
Code Review ACK 9af82f9872ca1a9e8d4645c537b23af4bc861ed2
sedited:
ACK 9af82f9872ca1a9e8d4645c537b23af4bc861ed2

Tree-SHA512: b4f98b6a43ff2f8be2e9fc42be9ab1610bf9e87a93f7edd0fc06b67df096c774021e681c3f7d56730e8c987aaf130ae831347c17dcce1c8a88f35df8cc9a0ba0
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This is a fix for a flaky automated test, not a security fix for the Bitcoin Core software itself. The test sometimes failed because it moved the simulated clock forward before the test node had fully finished recording the time of the last downloaded block. The patch adds a small synchronization step so the test waits for the node to finish processing before advancing the clock. It does not change production code or fix any vulnerability that could affect real users.

Recommended action

No security action required. Treat as a routine test reliability improvement.

Security signals we found

01

No production code changed

02

Test-only race condition fix

03

No input validation, memory handling, or network protocol changes

04

No privilege boundary crossed

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.