Given that the size of a message is included in the message header, it is possible to determine that an incoming block is over-sized without downloading it, thereby saving bandwidth by not needing to download it before rejecting it and determining misbehavior.
-
rebroad commented at 7:03 AM on February 7, 2017: contributor
- laanwj added the label Priority Low on Feb 7, 2017
- laanwj added the label P2P on Feb 7, 2017
-
laanwj commented at 11:50 AM on February 7, 2017: member
It's the CPU and memory overhead that counts here, not the bandwidth overhead *. Does it check the size of the packet before trying to deserialize it?
It doesn't look like it: https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L2108
*: this would be a lousy bandwidth DoS protection: It's possible for a peer to flood you with an infinite number of other types of messages (including unknown ones) as well. Protecting against floods would need protection at a higher level (keep counters), or throttling at the network level.
- fanquake closed this on Aug 13, 2017
- DrahtBot locked this on Sep 8, 2021