https://github.com/cortze/eth-snappy-benchmarks
Benchmark for the snappy compression capabilities and speeds
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Keywords
Repository
Benchmark for the snappy compression capabilities and speeds
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Eth snappy benchmarks
Benchmark repository to measure the compression ratio and speed of Ethereum CL block using the snappy compression and the Golang implementation.
Motivation
Ethereum CL blocks need to be broadcasted through a p2p network layer as in any other blockchain. Because the size of these blocks tends to increase over time, e.g., more validators are added to the chain over time, or we increase the size to aggregate more blocks, there is a considerable need to reduce the overall chunk of bytes that we send over the wire.
Ethereum uses the ssz serialization (more optimized than the plain json ) for broadcasting, in combination with the Snappy Compression algorithm to broadcast all their messages over the network.

This repo brings some data on the time/performance of the snappy compression over the serialized Ethereum's beacon blocks.
Usage
- git clone the repository
shell git clone https://github.com/cortze/eth-snappy-benchmarks.git[compresion_metrics.ipynb](analysis%2Fcompresion_metrics.ipynb) - Build the go code
shell make build - Fetch the blocks that we want to test
shell bash block_downloader.sh - Run the benchmark with the given raw blocks
shell bash snappy_benchmark.sh
Note: the code execution can be modified by changing the parameters on each <.sh> script, where the serialization of the blocks and the output folders and formats can be defined.
Results
We ran the Go version of snappy v0.0.4 on an AMD Ryzen 9 5900X 12-Core Processor. The current results were generated from Ethereum's 100 blocks downloaded from a local Beacon Node in Mainnet. We ran the test 10 times for each block, and we always obtained the exact same compressed result for each block, but the compression time changes, so we took the average of the ten runs.
| metric | AVG JSON values | AVG SSZ values | |--------------------------|-----------------|------------| | Raw Block Size (MB) | 2.139934 | 1.043237 | | Compress Block Size (MB) | 1.384319 | 0.731517 | | Encoding Time (ms) | 2.852173 | 1.030198 | | Decoding Time (ms) | 1.128296 | 0.466800 | | Compression Speed (MB/s) | 1101.098184 | 2150.391500 |
All the results are aggregated in the following CSV file:
Owner
- Name: Mikel Cortes
- Login: cortze
- Kind: user
- Location: Barcelona
- Company: Barcelona Supercomputing Center
- Repositories: 8
- Profile: https://github.com/cortze
Research Engineer and Ph.D. student on Distributed P2P Networks. LIbp2p, IPFS, GossipSub, Eth CL, and more
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Mikel Cortes | C****e | 14 |
| Cortze | 4****e | 8 |
| cortze | c****e@p****m | 6 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- cortze (5)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
proxy.golang.org: github.com/cortze/eth-snappy-benchmarks
- Homepage: https://github.com/cortze/eth-snappy-benchmarks
- Documentation: https://pkg.go.dev/github.com/cortze/eth-snappy-benchmarks#section-documentation
-
Latest release: v0.0.0-20230904095837-7026e6bdba22
published over 2 years ago