From e13870b6213dbe64797402f7dc5006e8a90fc76e Mon Sep 17 00:00:00 2001 From: Joseph Livesey Date: Fri, 20 Dec 2024 11:44:46 -0500 Subject: [PATCH] chore: rename decoder crate --- .release-please-manifest.json | 2 +- Cargo.lock | 48 +++++++++---------- Cargo.toml | 2 +- README.md | 2 +- .../Cargo.toml | 2 +- .../{flat-files-decoder => decoder}/README.md | 10 ++-- .../benches/decoder.rs | 0 .../benches/stream_blocks.rs | 0 .../examples/cli.rs | 0 .../examples/compression.rs | 0 .../examples/read_blocks.rs | 0 .../src/dbin.rs | 0 .../src/decoder.rs | 0 .../src/error.rs | 0 .../src/lib.rs | 0 crates/firehose-protos/README.md | 2 +- crates/header-accumulator/Cargo.toml | 2 +- crates/header-accumulator/README.md | 4 +- crates/vee/Cargo.toml | 2 +- release-please-config.json | 2 +- 20 files changed, 39 insertions(+), 39 deletions(-) rename crates/{flat-files-decoder => decoder}/Cargo.toml (96%) rename crates/{flat-files-decoder => decoder}/README.md (84%) rename crates/{flat-files-decoder => decoder}/benches/decoder.rs (100%) rename crates/{flat-files-decoder => decoder}/benches/stream_blocks.rs (100%) rename crates/{flat-files-decoder => decoder}/examples/cli.rs (100%) rename crates/{flat-files-decoder => decoder}/examples/compression.rs (100%) rename crates/{flat-files-decoder => decoder}/examples/read_blocks.rs (100%) rename crates/{flat-files-decoder => decoder}/src/dbin.rs (100%) rename crates/{flat-files-decoder => decoder}/src/decoder.rs (100%) rename crates/{flat-files-decoder => decoder}/src/error.rs (100%) rename crates/{flat-files-decoder => decoder}/src/lib.rs (100%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6ef198a1..af8c0cbe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { "crates/vee": "0.1.0", - "crates/flat-files-decoder": "0.1.0", + "crates/decoder": "0.1.0", "crates/header-accumulator": "0.1.0", "crates/firehose-protos": "0.1.0", "crates/firehose-protos-examples": "0.1.0" diff --git a/Cargo.lock b/Cargo.lock index be53f74e..de3a5331 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1445,6 +1445,28 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "decoder" +version = "0.1.0" +dependencies = [ + "alloy-consensus", + "alloy-eip2930", + "alloy-primitives", + "bincode", + "clap", + "criterion", + "firehose-protos", + "prost", + "rand", + "reth-primitives", + "serde", + "serde_json", + "thiserror 2.0.3", + "tracing", + "tracing-subscriber", + "zstd", +] + [[package]] name = "delay_map" version = "0.3.0" @@ -1966,28 +1988,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "flat-files-decoder" -version = "0.1.0" -dependencies = [ - "alloy-consensus", - "alloy-eip2930", - "alloy-primitives", - "bincode", - "clap", - "criterion", - "firehose-protos", - "prost", - "rand", - "reth-primitives", - "serde", - "serde_json", - "thiserror 2.0.3", - "tracing", - "tracing-subscriber", - "zstd", -] - [[package]] name = "flate2" version = "1.0.35" @@ -2317,9 +2317,9 @@ dependencies = [ "alloy-primitives", "base64 0.21.7", "clap", + "decoder", "ethportal-api", "firehose-protos", - "flat-files-decoder", "primitive-types", "rlp", "serde", @@ -5700,8 +5700,8 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" name = "vee" version = "0.1.0" dependencies = [ + "decoder", "firehose-protos", - "flat-files-decoder", "header-accumulator", "tree_hash", ] diff --git a/Cargo.toml b/Cargo.toml index e7a064cd..d4d6b11a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ criterion = { version = "0.5.1", features = ["html_reports"] } ethportal-api = { git = "https://github.com/ethereum/trin.git", version = "0.2.2", tag = "v0.1.0-alpha.51" } firehose-protos = { path = "crates/firehose-protos", version = "0.1.0" } firehose-rs = { git = "https://github.com/semiotic-ai/firehose-rs.git", branch = "main" } -flat-files-decoder = { path = "crates/flat-files-decoder", version = "0.1.0" } +decoder = { path = "crates/decoder", version = "0.1.0" } header-accumulator = { path = "crates/header-accumulator", version = "0.1.0" } hex = "0.4.3" primitive-types = "0.12.2" diff --git a/README.md b/README.md index 5b8c8daf..fc00e1c7 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,5 @@ Semiotic Labs monorepo for Verifiable Extraction of blockchain data. [vee](./crates/vee/README.md) is the main crate for the project. It re-exports: - [firehose-protos](./crates/firehose-protos/README.md) -- [flat-files-decoder](./crates/flat-files-decoder/README.md) +- [decoder](./crates/decoder/README.md) - [header-accumulator](./crates/header-accumulator/README.md) diff --git a/crates/flat-files-decoder/Cargo.toml b/crates/decoder/Cargo.toml similarity index 96% rename from crates/flat-files-decoder/Cargo.toml rename to crates/decoder/Cargo.toml index 8dbe8ec7..e78c72f5 100644 --- a/crates/flat-files-decoder/Cargo.toml +++ b/crates/decoder/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "flat-files-decoder" +name = "decoder" version = "0.1.0" edition = "2021" diff --git a/crates/flat-files-decoder/README.md b/crates/decoder/README.md similarity index 84% rename from crates/flat-files-decoder/README.md rename to crates/decoder/README.md index cfe6067b..7626416d 100644 --- a/crates/flat-files-decoder/README.md +++ b/crates/decoder/README.md @@ -8,7 +8,7 @@ Check out the crate documentation in your browser by running, from the root of the `veemon` workspace: ```terminal -cd crates/flat-files-decoder && cargo doc --open +cd crates/decoder && cargo doc --open ``` ## Running CLI Example @@ -35,11 +35,11 @@ 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 +cargo run -p decoder --example cli stream ``` ```terminal -cat example0017686312.dbin | cargo run -p flat-files-decoder --example cli stream +cat example0017686312.dbin | cargo run -p decoder --example cli stream ``` This will output decoded header records as bytes into `stdout` @@ -47,13 +47,13 @@ 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 +cargo run -p 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 +cargo run -p decoder --example cli decode --input test-assets/benchmark_files/pre_merge ``` This will store the block headers as json format in the output folder. diff --git a/crates/flat-files-decoder/benches/decoder.rs b/crates/decoder/benches/decoder.rs similarity index 100% rename from crates/flat-files-decoder/benches/decoder.rs rename to crates/decoder/benches/decoder.rs diff --git a/crates/flat-files-decoder/benches/stream_blocks.rs b/crates/decoder/benches/stream_blocks.rs similarity index 100% rename from crates/flat-files-decoder/benches/stream_blocks.rs rename to crates/decoder/benches/stream_blocks.rs diff --git a/crates/flat-files-decoder/examples/cli.rs b/crates/decoder/examples/cli.rs similarity index 100% rename from crates/flat-files-decoder/examples/cli.rs rename to crates/decoder/examples/cli.rs diff --git a/crates/flat-files-decoder/examples/compression.rs b/crates/decoder/examples/compression.rs similarity index 100% rename from crates/flat-files-decoder/examples/compression.rs rename to crates/decoder/examples/compression.rs diff --git a/crates/flat-files-decoder/examples/read_blocks.rs b/crates/decoder/examples/read_blocks.rs similarity index 100% rename from crates/flat-files-decoder/examples/read_blocks.rs rename to crates/decoder/examples/read_blocks.rs diff --git a/crates/flat-files-decoder/src/dbin.rs b/crates/decoder/src/dbin.rs similarity index 100% rename from crates/flat-files-decoder/src/dbin.rs rename to crates/decoder/src/dbin.rs diff --git a/crates/flat-files-decoder/src/decoder.rs b/crates/decoder/src/decoder.rs similarity index 100% rename from crates/flat-files-decoder/src/decoder.rs rename to crates/decoder/src/decoder.rs diff --git a/crates/flat-files-decoder/src/error.rs b/crates/decoder/src/error.rs similarity index 100% rename from crates/flat-files-decoder/src/error.rs rename to crates/decoder/src/error.rs diff --git a/crates/flat-files-decoder/src/lib.rs b/crates/decoder/src/lib.rs similarity index 100% rename from crates/flat-files-decoder/src/lib.rs rename to crates/decoder/src/lib.rs diff --git a/crates/firehose-protos/README.md b/crates/firehose-protos/README.md index bbb8fe38..86d1c01f 100644 --- a/crates/firehose-protos/README.md +++ b/crates/firehose-protos/README.md @@ -16,7 +16,7 @@ Representation of the tracing of a block in the Ethereum blockchain. ## Usage To ingest these block types from flat files, check out -[`veemon/crates/flat-files-decoder`](../flat-files-decoder/index.html). +[`veemon/crates/decoder`](../decoder/index.html). For a high-level Rust client to use with Firehose endpoint providers like Pinax or StremaingFast, check out [`semiotic-ai/firehose-client`](https://github.com/semiotic-ai/firehose-client). diff --git a/crates/header-accumulator/Cargo.toml b/crates/header-accumulator/Cargo.toml index f7de5ac5..1d1bd7d3 100644 --- a/crates/header-accumulator/Cargo.toml +++ b/crates/header-accumulator/Cargo.toml @@ -21,5 +21,5 @@ trin-validation.workspace = true thiserror.workspace = true [dev-dependencies] -flat-files-decoder.workspace = true +decoder.workspace = true tempfile.workspace = true diff --git a/crates/header-accumulator/README.md b/crates/header-accumulator/README.md index bdc8955f..7f6ab026 100644 --- a/crates/header-accumulator/README.md +++ b/crates/header-accumulator/README.md @@ -43,12 +43,12 @@ cd crates/header-accumulator && cargo doc --open The main objective of this library is to provide a tool for verifying blocks from [StreamingFast Firehose](https://firehose.streamingfast.io/). -It works in conjunction with [flat-files-decoder](https://github.com/semiotic-ai/flat-files-decoder) +It works in conjunction with [decoder](https://github.com/semiotic-ai/decoder) to offer a comprehensive solution. ## Testing -Some tests depend on [flat-files-decoder](../flat-files-decoder/README.md) as a development dependency. +Some tests depend on [decoder](../decoder/README.md) as a development dependency. Run all tests with: diff --git a/crates/vee/Cargo.toml b/crates/vee/Cargo.toml index 0a336deb..93f5c0fa 100644 --- a/crates/vee/Cargo.toml +++ b/crates/vee/Cargo.toml @@ -9,7 +9,7 @@ name = "vee" [dependencies] firehose-protos.workspace = true -flat-files-decoder.workspace = true +decoder.workspace = true header-accumulator.workspace = true [dev-dependencies] diff --git a/release-please-config.json b/release-please-config.json index bff3bc77..d2813161 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -7,7 +7,7 @@ ], "packages": { "crates/vee": {}, - "crates/flat-files-decoder": {}, + "crates/decoder": {}, "crates/header-accumulator": {}, "crates/firehose-protos": {}, "crates/firehose-protos-examples": {}