Files
nanoreth/src/pseudo_peer/main.rs
sprites0 ba8dfc4d96 feat: Pseudo peer and staged sync
For simplicity, we use with_pow() + pseudo peer that connects to reth itself, so that it can support 1. StateFetcher via NetworkState 2. Block announcement (which requires with_pow()).

For block announcement, another way was using ImportService like before, or calling engine_api. But for simplicitiy, for now we just publish from pseudo peer like pre-PoS, hence with_pow().
2025-06-27 19:39:08 +00:00

17 lines
490 B
Rust

use clap::Parser;
use reth_my_p2p::cli::PseudoPeerCommand;
#[tokio::main]
async fn main() -> eyre::Result<()> {
let cli = PseudoPeerCommand::parse();
cli.logs.init_tracing()?;
// Parse and create block source configuration
let block_source_config = cli.source.parse().await?;
let block_source = block_source_config.create_cached_block_source().await;
// Start the worker
reth_my_p2p::start_pseudo_peer(cli.destination_peer, block_source).await?;
Ok(())
}