Gossip that remembers the last message
Compressing each peer's gossip stream with a 64 KiB history cut a mainnet node's inbound bytes to 44.1%, still in the Snappy format.
2 minEthereum & Layer-2Fresh · 24 Sept
Every gossip message on Ethereum's consensus layer is compressed with Snappy on its own. Anton Nashatyrev proposes compressing the whole stream to each peer instead, keeping context across messages so that the redundancy between them is caught too. The idea came out of networking research for Fast Finality, where attestation and aggregate traffic grows a lot.
What the measurements show
The offline analysis used a Teku node on mainnet subscribed to all subnets, with about 45 peers, and evaluated 60 minutes of recorded traffic. Plain LZ77 with a 64 KiB history per stream, still in the unmodified Snappy block format, brought a default node to 72.8% of current bytes and an all-subnets node to 63.1%; attestations fell to 42% and aggregates to 63%. The topic string sent with every message becomes a few-byte back-reference, and the attestation data repeated across a slot is effectively sent once per stream.
A live run between three Teku nodes on mainnet went further. Over 40 minutes, the node receiving the compressed stream took 594.7 MB on the wire against 1,349.6 MB for the node on plain gossip, or 44.1%, with identical message counts in every category. The author cautions that this run carried no control traffic, which is 35% of inbound bytes on an all-subnets node and compresses poorly, so a real mesh stream should land near the offline 63%.
The cost is some CPU and a little memory. The prototype decoder ran at 1.3 GB/s, which is effectively free, while the unoptimised Kotlin encoder reached 129 MB/s, estimated at 3 to 4% of a core for about eight mesh peers. Memory is 64 KiB of history per direction per peer.
The proposed rollout avoids a hard switch: an optional protocol such as /snappy-stream/meshsub/1.2.0 offered alongside the plain one, with message ids, validation and payload encoding unchanged. Peers that do not support it simply negotiate the old protocol.
Retold from Ethereum Research. This is a summary in our own words; follow the link for the original reporting.