{"id":49137360,"url":"https://github.com/init4tech/storage-benches","last_synced_at":"2026-04-21T22:36:14.212Z","repository":{"id":350038104,"uuid":"1203889290","full_name":"init4tech/storage-benches","owner":"init4tech","description":"Storage layer benchmarks for signet vs reth","archived":false,"fork":false,"pushed_at":"2026-04-08T16:17:18.000Z","size":137,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T17:28:35.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/init4tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T13:36:00.000Z","updated_at":"2026-04-08T16:17:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/init4tech/storage-benches","commit_stats":null,"previous_names":["init4tech/storage-benches"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/init4tech/storage-benches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fstorage-benches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fstorage-benches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fstorage-benches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fstorage-benches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/init4tech","download_url":"https://codeload.github.com/init4tech/storage-benches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fstorage-benches/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32113346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-21T22:36:13.249Z","updated_at":"2026-04-21T22:36:14.204Z","avatar_url":"https://github.com/init4tech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# storage-benches\n\nPerformance comparison of two Ethereum execution client storage stacks wrapping\nlibmdbx 0.13.x:\n\n| Layer | reth | signet |\n|-------|------|--------|\n| Raw MDBX bindings | `reth-libmdbx` | `signet-libmdbx` |\n| Typed hot DB | `reth-db` | `signet-hot-mdbx` |\n\n## Quick Start\n\n```bash\n# Full run (bindings + hot DB)\n./run_benches.sh\n\n# Quick mode (~10 min, ~5% noise)\n./run_benches.sh --quick\n\n# Subset\n./run_benches.sh --bindings   # B1-B7 only\n./run_benches.sh --hotdb      # H1-H6 only\n./run_benches.sh B2           # filter to a specific group\n```\n\n**Prerequisites:** Rust toolchain (edition 2024, MSRV 1.92), Linux x86_64.\n\n## Methodology\n\nAll benchmarks use **Criterion.rs 0.5** with deterministic, seeded\npseudo-random data (shared `bench-shared` crate, seed `0xBEEF_CAFE_DEAD_F00D`).\nBoth sides use matched MDBX configuration: 1 GB max, SafeNoSync, WRITEMAP,\nNO_RDAHEAD, 4 KB pages.\n\nCompilation uses `opt-level = 3`, `lto = \"fat\"`, `codegen-units = 1` to\nminimize measurement noise.\n\nTwo run modes:\n\n| Mode | Warmup | Measurement | Notes |\n|------|--------|-------------|-------|\n| Quick | 1 s | 3 s | Parallel, ~5% variance |\n| Sequential | 2 s | 5 s | No parallel, authoritative |\n\nSee [METHODOLOGY.md](METHODOLOGY.md) for full details on data generation,\nenvironment configuration, fairness controls, and benchmark design.\n\n## Benchmarks\n\n### Part 1: Raw Bindings (B1-B7)\n\nCompares the Rust wrappers around the same C library. Signet provides both\nsync and unsync (`!Send`, `!Sync`) transaction types; reth has sync only.\n\n| Benchmark | What it measures |\n|-----------|-----------------|\n| **B1** Transaction creation | Wrapper overhead: mutex, channel, Arc vs raw pointer |\n| **B2** Point reads | 1,000 random gets on 100K entries (32B, 256B, 4KB values) |\n| **B3** Batch writes | N upserts/appends in a single RW txn (N = 100, 1K, 10K) |\n| **B4** Cursor iteration | Full forward/reverse scan over 100K entries |\n| **B5** Range queries | Seek to midpoint + 1,000 entries forward |\n| **B6** DUPSORT | Per-key dup reads, full scan, DUPFIXED page-batched scan |\n| **B7** Commit latency | Commit cost at batch sizes 1, 100, 1K, 10K |\n\n**Key finding:** Sync-vs-sync performance is identical (same C library).\nSignet's unsync transactions are the differentiator: 286x faster RW txn\ncreation, 1.6-2.2x faster cursor scans, 87x faster single-item commits.\nDUPFIXED page-batched scan is 3.4x faster (signet-only feature).\n\n### Part 2: Hot DB Layer (H1-H6)\n\nCompares the typed abstraction layers with serialization codecs, table schemas,\nand cursor management. Each side uses its idiomatic API (reth = sync txns,\nsignet = unsync txns).\n\n| Benchmark | What it measures |\n|-----------|-----------------|\n| **H1** Account reads | 1,000 random lookups on 100K PlainAccountState (100% hit, 50% miss) |\n| **H2** Storage slot reads | 1,000 random DUPSORT lookups (10K addrs x 10 slots) |\n| **H3** Header reads | Random + sequential access on 10K headers |\n| **H4** Block ingestion | Write 100 accounts + 500 slots + 1 header per block (1, 10, 100 blocks) |\n| **H5** Full table scans | Complete iteration over accounts (100K) and headers (10K) |\n| **H6** Mixed workload | Simulated block execution: reads + writes + commit, 10 blocks |\n\n**Key findings:**\n- **Signet wins scans**: 2.4x faster full account scan (fixed-size codec +\n  unsync cursors)\n- **Reth wins random DUPSORT**: ~20% faster storage slot lookup (signet's\n  `exact_dual` does a redundant B-tree traversal — tracked as ENG-2126)\n- **Mixed workload**: reth 10% faster in production path; signet 4% faster\n  with cursor reuse\n\n### Summary\n\n| Category | Winner | Magnitude |\n|----------|--------|-----------|\n| RW txn creation | signet | 286x |\n| Small commits | signet | 87x |\n| Cursor iteration | signet | 1.6-2.2x |\n| Full account scan | signet | 2.4x |\n| DUPFIXED scan | signet | 3.4x |\n| Point reads | signet | 6-36% |\n| Random slot lookup | reth | 20% |\n| Mixed workload (production) | reth | 10% |\n| Mixed workload (cursor reuse) | signet | 4% |\n| Large batches / headers | ~tied | \u003c3% |\n\nNeither side is categorically faster. Signet wins sequential and\ntransaction-heavy workloads via unsync transactions. Reth wins random DUPSORT\naccess due to a fixable redundant traversal in signet's `exact_dual`.\n\n## Results\n\n- [RESULTS.md](RESULTS.md) — quick mode results\n- [RESULTS_SEQUENTIAL.md](RESULTS_SEQUENTIAL.md) — sequential mode results\n  (authoritative)\n- [ANALYSIS.md](ANALYSIS.md) — detailed analysis with root cause explanations\n- [FUZZ_RESULTS.md](FUZZ_RESULTS.md) — fuzz and proptest results for\n  signet-libmdbx\n- [results/](results/) — raw Criterion output\n\n## Project Structure\n\n```\n├── crates/\n│   ├── shared/          # bench-shared: constants + data generators\n│   ├── reth-bench/      # B1-B7 bindings + H1-H6 hot DB for reth\n│   └── signet-bench/    # B1-B7 bindings + H1-H6 hot DB for signet\n├── results/             # raw benchmark output\n├── run_benches.sh       # benchmark runner script\n├── METHODOLOGY.md       # detailed methodology\n├── BENCH_SPEC.md        # original benchmark specification\n├── RESULTS.md           # quick mode results\n├── RESULTS_SEQUENTIAL.md # sequential mode results\n└── ANALYSIS.md          # detailed analysis\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit4tech%2Fstorage-benches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finit4tech%2Fstorage-benches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit4tech%2Fstorage-benches/lists"}