IBD stalls if addnode peer is in IBD #34096

issue davidgumberg opened this issue on December 18, 2025
  1. davidgumberg commented at 3:59 AM on December 18, 2025: contributor

    Starting with two fresh nodes A and B: If you start node A and (before node A completes IBD) start a second node B with -addnode={address of node A}, node B will stall and not proceed in IBD.

    mkdir -p /tmp/nodea /tmp/nodeb
    
    cat > /tmp/nodea/bitcoin.conf << EOF
    prune=1000
    bind=127.0.0.1:8333
    EOF
    
    cat > /tmp/nodeb/bitcoin.conf << EOF
    prune=1000
    rpcport=18331
    bind=127.0.0.1:18335
    addnode=127.0.0.1:8333
    EOF
    

    and then start both nodes however you prefer, e.g.

    bitcoind -datadir=/tmp/nodea --daemonwait
    bitcoind -datadir=/tmp/nodeb --daemonwait
    

    And node B will not advance:

    tail /tmp/nodeb/debug.log
    

    Shutdown node A and node B comes to life!:

    bitcoin-cli -datadir=/tmp/nodea stop
    tail /tmp/nodeb/debug.log
    
  2. l0rinc referenced this in commit 1126d7ed43 on Dec 18, 2025
  3. l0rinc referenced this in commit 549b08e4e8 on Dec 20, 2025
  4. willcl-ark added the label P2P on Jan 14, 2026
  5. mzumsande commented at 2:41 PM on September 18, 2026: contributor

    I don't think that this is a permanent stall - just a delay. If we have other peers, I would expect us to sync headers with them after 1) a new block is found and INVed to us by some peer or 2) m_headers_sync_timeout is reached - whichever comes first.

    In case 2), we would sync headers with a new peer - which may or may not be the old peer, this is depending on the order in which peers are processed by net, see https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L6492-L6500.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-20 21:52 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me