mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-10 11:06:49 +00:00
Turns out `{.rlpInline.}` doesn't do anything. It's documented but not implemented. Due to this, whenever a peer sent us a `NewBlock` message, we had an RLP decoding error processing it, and disconnected the peer thinking it was the peer's error. These messages are sent often by good peers, so whenever we connected to a really good peer, we'd end up disconnecting from it due to this. Because a block body is a list of transactions, the parse errors looked suspiciously like EIP-2718/2976/2930/1559 typed transaction RLP errors. But it was a failure to parse `BlockBody` inline. Conveniently, the `EthBlock` type defined for another reason is encoded exactly the way `NewBlockAnnounce` needs to be, so we can reuse that type. This didn't stand out before updating to `eth/65`, because with old protocols we tend to only connect to old peers, which may be out of date themselves and have no new blocks to send. Also, we didn't really investigate occasional disconnects before, we assumed they're just part of P2P life. Signed-off-by: Jamie Lokier <jamie@shareable.org>