Skip to content

Commit d867b84

Browse files
committed
Add back remark about compression bombs
1 parent e8eb367 commit d867b84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

specs/phase0/p2p-interface.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,6 +1721,8 @@ To derive "encoded size limits" from desired application sizes, we take into acc
17211721

17221722
In the case of gossipsub, the protocol supports sending multiple application payloads as well as mixing application data with control messages in each gossipsub frame. The limit is set such that at least one max-sized application-level message together with a small amount (1 KiB) of gossipsub overhead is allowed. Implementations are free to pack multiple smaller application messages into a single gossipsub frame, and/or combine it with control messages as they see fit.
17231723

1724+
The limit is set on the uncompressed payload size in particular to protect against decompression bombs.
1725+
17241726
#### Why is there a limit on message sizes at all?
17251727

17261728
The message size limit protects against several forms of DoS and network-based amplification attacks and provides upper bounds for resource (network, memory) usage in the client based on protocol requirements to decode, buffer, cache, store and re-transmit messages which in turn translate into performance and protection tradeoffs, ensuring capacity to handle worst cases during recovery from network instability.

0 commit comments

Comments
 (0)