-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(decoder): clean up flat-files-decoder
- Loading branch information
1 parent
4b62d16
commit 0eb3314
Showing
55 changed files
with
951 additions
and
1,083 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,3 @@ tracing.workspace = true | |
|
||
[dev-dependencies] | ||
hex.workspace = true | ||
insta.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Flat Files Decoder | ||
|
||
## Running CLI Example | ||
|
||
### Commands | ||
|
||
The tool provides the following commands for various operations: | ||
|
||
- `stream`: Stream data continuously. | ||
- `decode`: Decode files from input to output. | ||
- `help`: Print this message or the help of the given subcommand(s). | ||
|
||
### Options | ||
|
||
You can use the following options with the commands for additional functionalities: | ||
|
||
- `-h, --help`: Print help information about specific command and options. | ||
- `-V, --version`: Print the version information of the tool. | ||
|
||
### Usage Examples | ||
|
||
Here are some examples of how to use the commands: | ||
|
||
1. To stream data continuously from `stdin`: | ||
|
||
```terminal | ||
cargo run -p flat-files-decoder --example cli stream | ||
``` | ||
|
||
```terminal | ||
cat example0017686312.dbin | cargo run -p flat-files-decoder --example cli stream | ||
``` | ||
|
||
This will output decoded header records as bytes into `stdout` | ||
|
||
1. To check a folder of dbin files: | ||
|
||
```terminal | ||
cargo run -p flat-files-decoder --example cli decode --input ./input_files/ --compression true | ||
``` | ||
|
||
So, if using test data from a `test-assets/` folder in the root of the `veemon` repo: | ||
|
||
```terminal | ||
cargo run -p flat-files-decoder --example cli decode --input test-assets/benchmark_files/pre_merge | ||
``` | ||
|
||
This will store the block headers as json format in the output folder. | ||
By passing `--headers-dir` a folder of assumed valid block headers can be provided to compare | ||
with the input flat files. Valid headers can be pulled from the [sync committee subprotocol](https://github.com/ethereum/annotated-spec/blob/master/altair/sync-protocol.md) for post-merge data. | ||
|
||
## Benchmarking | ||
|
||
- Run `cargo bench` in the root directory of the project | ||
- Benchmark results will be output to the terminal | ||
- Benchmark time includes reading from disk & writing output to disk | ||
- Results can be found in `target/criterion/report/index.html` | ||
|
||
For proper benchmarking of future improvements, fixes and features please compare baselines. | ||
Refer to [the end of this section of Criterion documentation](https://bheisler.github.io/criterion.rs/book/user_guide/command_line_options.html) for more information on creating and comparing baselines. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.