Commit b31dd12
committed
treat blocks below the fork database window as unlinkable rather than invalid
A block older than head - max_size is usually an honest block from a peer
that is slightly behind us (brief disconnection, or relaying a soon-to-be-
orphaned fork branch). With one-block irreversibility the window is
typically only ~2 blocks deep, so this is easy to hit during any network
hiccup.
Previously this raised a generic assert, which the p2p layer treats as
'peer sent an invalid block': it disconnects the sender plus every other
peer advertising the same block. During the 2026-07-09 incident this
turned a routine micro-fork into a network-wide disconnect storm (peer
counts repeatedly collapsing to 0, participation dropping to ~61%).
Throwing unlinkable_block_exception instead routes these blocks through
the existing fork-reconciliation path (restart sync with the peer), which
is the intended behavior between honest nodes on different forks.1 parent 2f7b76b commit b31dd12
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
0 commit comments