Skip to content

Commit

Permalink
refactor: create firehose-protos-examples to fix circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
suchapalaver committed Oct 29, 2024
1 parent ad65d08 commit a53feb3
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"crates/forrestrie": "0.1.1",
"crates/forrestrie-examples": "0.1.1",
"crates/header-accumulator": "0.2.0",
"crates/firehose-protos": "0.1.0"
}
"crates/firehose-protos": "0.1.0",
"crates/firehose-protos-examples": "0.1.0"
}
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions crates/firehose-protos-examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "firehose-protos-examples"
version = "0.1.1"
edition = "2021"

[dev-dependencies]
alloy-primitives.workspace = true
firehose-client = { path = "../firehose-client" }
firehose-protos = { path = "../firehose-protos" }
tokio.workspace = true
14 changes: 14 additions & 0 deletions crates/firehose-protos-examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Firehose Protos Examples

Here's an example of how to run one of the examples in the `firehose-protos-examples` crate:

```terminal
cd crates/firehose-protos-examples && cargo run -- --examples receipt_root
```

Use environment variables to provide Firehose Ethereum and Firehose
Beacon providers of your choice.

To do this, place a `.env` file in the root of `veemon`. See the
`.env.example` file in the root of this repository for what you'll need,
depending on your requirements.
15 changes: 0 additions & 15 deletions crates/firehose-protos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,3 @@ Representation of the tracing of a block in the Ethereum blockchain.
### [`firehose.proto`](https://github.com/streamingfast/proto/blob/develop/sf/firehose/v2/firehose.proto)

Firehose fetch and streaming, client and server gRPC implementation.

## Examples

Here's an example of how to run one of the examples:

```terminal
cd crates/firehose-protos && cargo run -- --examples receipt_root
```

Use environment variables to provide Firehose Ethereum and Firehose
Beacon providers of your choice.

To do this, place a `.env` file in the root of `veemon`. See the
`.env.example` file in the root of this repository for what you'll need,
depending on your requirements.
2 changes: 1 addition & 1 deletion crates/firehose-protos/src/ethereum_v2/eth_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl Block {
///
/// # Note on Testing
///
/// See the [receipt_root.rs](../examples/receipt_root.rs) example for a usage example.
/// See the [receipt_root.rs](../../../firehose-protos-examples/examples/receipt_root.rs) example for a usage example.
///
pub fn calculate_receipt_root(&self) -> Result<B256, ProtosError> {
let receipts = self.full_receipts()?;
Expand Down
9 changes: 6 additions & 3 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/refs/heads/main/schemas/config.json",
"bootstrap-sha": "ba33f662ca04f59eeffa523b220545126cda17ad",
"release-type": "rust",
"plugins": ["cargo-workspace"],
"plugins": [
"cargo-workspace"
],
"packages": {
"crates/firehose-client": {},
"crates/flat-files-decoder": {},
"crates/flat-head": {},
"crates/forrestrie": {},
"crates/forrestrie-examples": {},
"crates/header-accumulator": {},
"crates/firehose-protos": {}
"crates/firehose-protos": {},
"crates/firehose-protos-examples": {}
}
}
}

0 comments on commit a53feb3

Please sign in to comment.