Skip to content

Add static file storage crate#85

Open
dapplion wants to merge 7 commits into
unstablefrom
static-file-storage
Open

Add static file storage crate#85
dapplion wants to merge 7 commits into
unstablefrom
static-file-storage

Conversation

@dapplion

Copy link
Copy Markdown
Owner

Summary

  • add and simplify slot-indexed static file storage
  • remove built-in compression so callers own payload encoding
  • move crash cleanup to open-time recovery
  • add critical behavior tests and batch write benchmarks

Testing

  • cargo fmt --package static_file_storage
  • cargo check -p static_file_storage
  • cargo clippy -p static_file_storage --benches --tests -- -D warnings
  • cargo test -p static_file_storage

dapplion added 7 commits June 28, 2026 14:00
Standalone slot-indexed append-only file storage library. One
StaticFile owns a directory of data_*, data_*.off, and column.conf
files; durable on return for put / put_batch, with one fsync per
underlying file in the batched path instead of per-slot. u64 slots,
no consensus types - any caller (cold-DB freezer, lcli ERA importer)
can depend on this without depending on store / beacon_chain.

File format documented in the lib.rs header.

Benches at benches/large_writes.rs target the performance-critical
ERA-load write path: ~30 MB no-compression state-snapshot records.
Four cases: put_single, put_batch_eight_in_one_file (no-compression
and snappy variants), put_batch_32_cross_file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant