diff --git a/Cargo.lock b/Cargo.lock index 6b2e0d017..343697508 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,19 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "additional-rpc-namespace-in-cli" -version = "0.0.0" -dependencies = [ - "clap", - "eyre", - "jsonrpsee", - "reth", - "reth-node-ethereum", - "reth-transaction-pool", - "tokio", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -1564,14 +1551,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" -[[package]] -name = "cli-extension-event-hooks" -version = "0.0.0" -dependencies = [ - "reth", - "reth-node-ethereum", -] - [[package]] name = "coins-bip32" version = "0.8.7" @@ -2009,6 +1988,26 @@ dependencies = [ "tokio", ] +[[package]] +name = "custom-engine-types" +version = "0.0.0" +dependencies = [ + "eyre", + "reth", + "reth-basic-payload-builder", + "reth-ethereum-payload-builder", + "reth-node-api", + "reth-node-core", + "reth-node-ethereum", + "reth-payload-builder", + "reth-primitives", + "reth-rpc-types", + "reth-tracing", + "serde", + "thiserror", + "tokio", +] + [[package]] name = "custom-evm" version = "0.0.0" @@ -2033,26 +2032,6 @@ dependencies = [ "reth-node-ethereum", ] -[[package]] -name = "custom-node" -version = "0.0.0" -dependencies = [ - "eyre", - "reth", - "reth-basic-payload-builder", - "reth-ethereum-payload-builder", - "reth-node-api", - "reth-node-core", - "reth-node-ethereum", - "reth-payload-builder", - "reth-primitives", - "reth-rpc-types", - "reth-tracing", - "serde", - "thiserror", - "tokio", -] - [[package]] name = "custom-node-components" version = "0.0.0" @@ -4904,6 +4883,27 @@ dependencies = [ "libc", ] +[[package]] +name = "node-custom-rpc" +version = "0.0.0" +dependencies = [ + "clap", + "eyre", + "jsonrpsee", + "reth", + "reth-node-ethereum", + "reth-transaction-pool", + "tokio", +] + +[[package]] +name = "node-event-hooks" +version = "0.0.0" +dependencies = [ + "reth", + "reth-node-ethereum", +] + [[package]] name = "nom" version = "7.1.3" @@ -9277,16 +9277,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" -[[package]] -name = "trace-transaction-cli" -version = "0.0.0" -dependencies = [ - "clap", - "futures-util", - "reth", - "reth-node-ethereum", -] - [[package]] name = "tracing" version = "0.1.40" @@ -9531,6 +9521,16 @@ dependencies = [ "toml", ] +[[package]] +name = "txpool-tracing" +version = "0.0.0" +dependencies = [ + "clap", + "futures-util", + "reth", + "reth-node-ethereum", +] + [[package]] name = "typenum" version = "1.17.0" diff --git a/Cargo.toml b/Cargo.toml index 73597b311..7b9b63e95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,17 +71,17 @@ members = [ "crates/trie/", "crates/trie-parallel/", "examples/", - "examples/additional-rpc-namespace-in-cli/", + "examples/node-custom-rpc/", "examples/beacon-api-sse/", - "examples/cli-extension-event-hooks/", + "examples/node-event-hooks/", "examples/custom-evm/", - "examples/custom-node/", + "examples/custom-engine-types/", "examples/custom-node-components/", "examples/custom-dev-node/", "examples/custom-payload-builder/", "examples/manual-p2p/", "examples/rpc-db/", - "examples/trace-transaction-cli/", + "examples/txpool-tracing/", "examples/polygon-p2p/", "examples/custom-inspector/", "examples/exex/minimal/", diff --git a/examples/README.md b/examples/README.md index 791851a46..db0bdb999 100644 --- a/examples/README.md +++ b/examples/README.md @@ -11,13 +11,13 @@ to make a PR! ## Node Builder | Example | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| [Additional RPC namespace](./additional-rpc-namespace-in-cli) | Illustrates how to add custom CLI parameters and set up a custom RPC namespace | -| [Custom event hooks](./cli-extension-event-hooks) | Illustrates how to hook to various node lifecycle events | +|---------------------------------------------------------------| ------------------------------------------------------------------------------------------------ | +| [Additional RPC namespace](./node-custom-rpc) | Illustrates how to add custom CLI parameters and set up a custom RPC namespace | +| [Custom event hooks](./node-event-hooks) | Illustrates how to hook to various node lifecycle events | | [Custom dev node](./custom-dev-node) | Illustrates how to run a custom dev node programmatically and submit a transaction to it via RPC | | [Custom EVM](./custom-evm) | Illustrates how to implement a node with a custom EVM | | [Custom inspector](./custom-inspector) | Illustrates how to use a custom EVM inspector to trace new transactions | -| [Custom node](./custom-node) | Illustrates how to create a node with custom engine types | +| [Custom engine types](./custom-engine-types) | Illustrates how to create a node with custom engine types | | [Custom node components](./custom-node-components) | Illustrates how to configure custom node components | | [Custom payload builder](./custom-payload-builder) | Illustrates how to use a custom payload builder | @@ -50,7 +50,7 @@ to make a PR! | Example | Description | | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| [Trace pending transactions](./trace-transaction-cli) | Illustrates how to trace pending transactions as they arrive in the mempool | +| [Trace pending transactions](./txpool-tracing) | Illustrates how to trace pending transactions as they arrive in the mempool | | [Standalone txpool](./network-txpool.rs) | Illustrates how to use the network as a standalone component together with a transaction pool with a custom pool validator | ## P2P diff --git a/examples/custom-node/Cargo.toml b/examples/custom-engine-types/Cargo.toml similarity index 95% rename from examples/custom-node/Cargo.toml rename to examples/custom-engine-types/Cargo.toml index 9d41edafd..738631306 100644 --- a/examples/custom-node/Cargo.toml +++ b/examples/custom-engine-types/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "custom-node" +name = "custom-engine-types" version = "0.0.0" publish = false edition.workspace = true diff --git a/examples/custom-node/src/main.rs b/examples/custom-engine-types/src/main.rs similarity index 100% rename from examples/custom-node/src/main.rs rename to examples/custom-engine-types/src/main.rs diff --git a/examples/additional-rpc-namespace-in-cli/Cargo.toml b/examples/node-custom-rpc/Cargo.toml similarity index 90% rename from examples/additional-rpc-namespace-in-cli/Cargo.toml rename to examples/node-custom-rpc/Cargo.toml index 960dd86d0..f1c5d95d9 100644 --- a/examples/additional-rpc-namespace-in-cli/Cargo.toml +++ b/examples/node-custom-rpc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "additional-rpc-namespace-in-cli" +name = "node-custom-rpc" version = "0.0.0" publish = false edition.workspace = true diff --git a/examples/additional-rpc-namespace-in-cli/src/main.rs b/examples/node-custom-rpc/src/main.rs similarity index 97% rename from examples/additional-rpc-namespace-in-cli/src/main.rs rename to examples/node-custom-rpc/src/main.rs index a4713f931..08b27d3ac 100644 --- a/examples/additional-rpc-namespace-in-cli/src/main.rs +++ b/examples/node-custom-rpc/src/main.rs @@ -3,7 +3,7 @@ //! Run with //! //! ```not_rust -//! cargo run -p additional-rpc-namespace-in-cli -- node --http --ws --enable-ext +//! cargo run -p node-custom-rpc -- node --http --ws --enable-ext //! ``` //! //! This installs an additional RPC method `txpoolExt_transactionCount` that can be queried via [cast](https://github.com/foundry-rs/foundry) diff --git a/examples/cli-extension-event-hooks/Cargo.toml b/examples/node-event-hooks/Cargo.toml similarity index 82% rename from examples/cli-extension-event-hooks/Cargo.toml rename to examples/node-event-hooks/Cargo.toml index 8664057e7..eb36722aa 100644 --- a/examples/cli-extension-event-hooks/Cargo.toml +++ b/examples/node-event-hooks/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cli-extension-event-hooks" +name = "node-event-hooks" version = "0.0.0" publish = false edition.workspace = true diff --git a/examples/cli-extension-event-hooks/src/main.rs b/examples/node-event-hooks/src/main.rs similarity index 95% rename from examples/cli-extension-event-hooks/src/main.rs rename to examples/node-event-hooks/src/main.rs index 9f09d7a3c..b9cd53298 100644 --- a/examples/cli-extension-event-hooks/src/main.rs +++ b/examples/node-event-hooks/src/main.rs @@ -4,7 +4,7 @@ //! Run with //! //! ```not_rust -//! cargo run -p cli-extension-event-hooks -- node +//! cargo run -p node-event-hooks -- node //! ``` //! //! This launch the regular reth node and also print: diff --git a/examples/trace-transaction-cli/Cargo.toml b/examples/txpool-tracing/Cargo.toml similarity index 88% rename from examples/trace-transaction-cli/Cargo.toml rename to examples/txpool-tracing/Cargo.toml index 3f681c2de..220e5d8d5 100644 --- a/examples/trace-transaction-cli/Cargo.toml +++ b/examples/txpool-tracing/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "trace-transaction-cli" +name = "txpool-tracing" version = "0.0.0" publish = false edition.workspace = true diff --git a/examples/trace-transaction-cli/src/main.rs b/examples/txpool-tracing/src/main.rs similarity index 96% rename from examples/trace-transaction-cli/src/main.rs rename to examples/txpool-tracing/src/main.rs index ab72c2720..85a5b795a 100644 --- a/examples/trace-transaction-cli/src/main.rs +++ b/examples/txpool-tracing/src/main.rs @@ -3,7 +3,7 @@ //! Run with //! //! ```not_rust -//! cargo run --release -p trace-transaction-cli -- node --http --ws --recipients 0x....,0x.... +//! cargo run --release -p txpool-tracing -- node --http --ws --recipients 0x....,0x.... //! ``` //! //! If no recipients are specified, all transactions will be traced.