mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Move network.rs example to its own folder (#7936)
Co-authored-by: Elijah Hampton <elijahhampton@MBP-de-Elijah-2.lan>
This commit is contained in:
34
Cargo.lock
generated
34
Cargo.lock
generated
@ -2845,29 +2845,6 @@ dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "examples"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"eyre",
|
||||
"futures",
|
||||
"reth-beacon-consensus",
|
||||
"reth-blockchain-tree",
|
||||
"reth-db",
|
||||
"reth-network",
|
||||
"reth-network-api",
|
||||
"reth-primitives",
|
||||
"reth-provider",
|
||||
"reth-revm",
|
||||
"reth-rpc-builder",
|
||||
"reth-rpc-types",
|
||||
"reth-rpc-types-compat",
|
||||
"reth-tasks",
|
||||
"reth-transaction-pool",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "exex-minimal"
|
||||
version = "0.0.0"
|
||||
@ -5066,6 +5043,17 @@ dependencies = [
|
||||
"unsigned-varint 0.7.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "network"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"eyre",
|
||||
"futures",
|
||||
"reth-network",
|
||||
"reth-provider",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "network-txpool"
|
||||
version = "0.0.0"
|
||||
|
||||
@ -72,7 +72,6 @@ members = [
|
||||
"crates/transaction-pool/",
|
||||
"crates/trie/",
|
||||
"crates/trie-parallel/",
|
||||
"examples/",
|
||||
"examples/node-custom-rpc/",
|
||||
"examples/beacon-api-sse/",
|
||||
"examples/node-event-hooks/",
|
||||
@ -82,6 +81,7 @@ members = [
|
||||
"examples/custom-dev-node/",
|
||||
"examples/custom-payload-builder/",
|
||||
"examples/manual-p2p/",
|
||||
"examples/network/",
|
||||
"examples/network-txpool/",
|
||||
"examples/rpc-db/",
|
||||
"examples/txpool-tracing/",
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
[package]
|
||||
name = "examples"
|
||||
version = "0.0.0"
|
||||
publish = false
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
reth-primitives.workspace = true
|
||||
reth-db.workspace = true
|
||||
reth-provider.workspace = true
|
||||
reth-rpc-builder.workspace = true
|
||||
reth-rpc-types.workspace = true
|
||||
reth-rpc-types-compat.workspace = true
|
||||
reth-revm.workspace = true
|
||||
reth-blockchain-tree.workspace = true
|
||||
reth-beacon-consensus.workspace = true
|
||||
reth-network-api.workspace = true
|
||||
reth-network.workspace = true
|
||||
reth-transaction-pool.workspace = true
|
||||
reth-tasks.workspace = true
|
||||
|
||||
eyre.workspace = true
|
||||
futures.workspace = true
|
||||
async-trait.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
[[example]]
|
||||
name = "network"
|
||||
path = "network.rs"
|
||||
@ -10,16 +10,16 @@ to make a PR!
|
||||
|
||||
## Node Builder
|
||||
|
||||
| Example | Description |
|
||||
|---------------------------------------------------------------| ------------------------------------------------------------------------------------------------ |
|
||||
| [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 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 |
|
||||
| Example | Description |
|
||||
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
||||
| [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 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 |
|
||||
|
||||
## ExEx
|
||||
|
||||
@ -36,22 +36,22 @@ to make a PR!
|
||||
|
||||
## Database
|
||||
|
||||
| Example | Description |
|
||||
| --------------------------- | --------------------------------------------------------------- |
|
||||
| Example | Description |
|
||||
| ------------------------ | --------------------------------------------------------------- |
|
||||
| [DB access](./db-access) | Illustrates how to access Reth's database in a separate process |
|
||||
|
||||
## Network
|
||||
|
||||
| Example | Description |
|
||||
| ---------------------------------- | ------------------------------------------------------------ |
|
||||
| [Standalone network](./network.rs) | Illustrates how to use the network as a standalone component |
|
||||
| Example | Description |
|
||||
| ------------------------------- | ------------------------------------------------------------ |
|
||||
| [Standalone network](./network) | Illustrates how to use the network as a standalone component |
|
||||
|
||||
## Mempool
|
||||
|
||||
| Example | Description |
|
||||
|------------------------------------------------------| -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Example | Description |
|
||||
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [Trace pending transactions](./txpool-tracing) | Illustrates how to trace pending transactions as they arrive in the mempool |
|
||||
| [Standalone txpool](./network-txpool) | Illustrates how to use the network as a standalone component together with a transaction pool with a custom pool validator |
|
||||
| [Standalone txpool](./network-txpool) | Illustrates how to use the network as a standalone component together with a transaction pool with a custom pool validator |
|
||||
|
||||
## P2P
|
||||
|
||||
|
||||
13
examples/network/Cargo.toml
Normal file
13
examples/network/Cargo.toml
Normal file
@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "network"
|
||||
version = "0.0.0"
|
||||
publish = false
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
reth-network.workspace = true
|
||||
reth-provider = { workspace = true, features = ["test-utils"] }
|
||||
futures.workspace = true
|
||||
tokio.workspace = true
|
||||
eyre.workspace = true
|
||||
@ -3,7 +3,7 @@
|
||||
//! Run with
|
||||
//!
|
||||
//! ```not_rust
|
||||
//! cargo run --example network
|
||||
//! cargo run --release -p network
|
||||
//! ```
|
||||
|
||||
use futures::StreamExt;
|
||||
Reference in New Issue
Block a user