https://github.com/cowprotocol/etherum-log-size
https://github.com/cowprotocol/etherum-log-size
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cowprotocol/etherum-log-size
- Owner: cowprotocol
- License: mit
- Created: 2023-06-29T08:05:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-29T08:08:14.000Z (almost 3 years ago)
- Last Synced: 2025-03-30T06:15:34.796Z (about 1 year ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository contains code used to estimate how much space storing all ethereum events takes.
The `collect` crate samples the events of random blocks. For each block it collects the number of logs, number of topics, total dynamic log data. This data is stored in binary form in the file `out`. Data collection can be interrupted and resumed at any time. Running it for longer produces more accurate data in the following step because we have more random samples.
The `analyze` crate reads the file produced in the previous step. It extrapolates the data from one random sample to the next. This yields an estimate for the total amount of data needed to store all events.
`collect` requires the environment variable `NODE_URL` to be set. It fetches events from this node. Otherwise there are no external dependencies.
```
env NODE_URL=... cargo run --bin collect --release
cargo run --bin analyze
```