https://github.com/cortze/eth-snappy-benchmarks

Benchmark for the snappy compression capabilities and speeds

https://github.com/cortze/eth-snappy-benchmarks

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

blocks consensus ethereum networking snappy
Last synced: 5 months ago · JSON representation

Repository

Benchmark for the snappy compression capabilities and speeds

Basic Info
  • Host: GitHub
  • Owner: cortze
  • Language: Go
  • Default Branch: master
  • Homepage:
  • Size: 149 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
blocks consensus ethereum networking snappy
Created over 5 years ago · Last pushed almost 2 years ago
Metadata Files
Readme

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.

img width=70%

This repo brings some data on the time/performance of the snappy compression over the serialized Ethereum's beacon blocks.

Usage

  1. git clone the repository shell git clone https://github.com/cortze/eth-snappy-benchmarks.git[compresion_metrics.ipynb](analysis%2Fcompresion_metrics.ipynb)
  2. Build the go code shell make build
  3. Fetch the blocks that we want to test shell bash block_downloader.sh
  4. 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

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

All Time
  • Total Commits: 28
  • Total Committers: 3
  • Avg Commits per committer: 9.333
  • Development Distribution Score (DDS): 0.5
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 8.5%
Dependent repos count: 10.1%
Average: 15.8%
Forks count: 18.9%
Stargazers count: 25.4%
Last synced: 8 months ago