Commit 16a419d
committed
don't send the full rejected block inside closing_connection_message
When a node disconnects a peer for offering a bad block, it sends the
exception in the goodbye message. The generic capture embedded the entire
block; a block with transactions serializes deeper than the unpack-side
recursion limit (MAX_RECURSION_DEPTH=20), so no peer on the network could
actually decode these goodbyes -- during the 2026-07-09 incident one node
logged 6176 such failed unpacks, hiding the real disconnect reasons.
Capture only the block num and id (still useful to the disconnected peer).
Also make the receiver tolerant: if a closing_connection_message can't be
deserialized, log it and treat it as a close request without details
instead of tearing down the read loop with an assert -- the peer is
closing the connection either way.1 parent b31dd12 commit 16a419d
2 files changed
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2052 | 2052 | | |
2053 | 2053 | | |
2054 | 2054 | | |
2055 | | - | |
2056 | | - | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
2057 | 2074 | | |
2058 | 2075 | | |
2059 | 2076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1043 | 1043 | | |
1044 | 1044 | | |
1045 | 1045 | | |
| 1046 | + | |
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
| |||
1083 | 1084 | | |
1084 | 1085 | | |
1085 | 1086 | | |
1086 | | - | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
1087 | 1091 | | |
1088 | 1092 | | |
1089 | 1093 | | |
| |||
0 commit comments