### Install Rust using rustup Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/installation/source.mdx Installs the Rust programming language toolchain, which is a prerequisite for building Reth. Follow the on-screen prompts for a default installation. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Start Development Server with Bun Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/CLAUDE.md Run this command to start the development server for the Reth documentation website. ```bash bun run dev ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/CLAUDE.md Use this command to install project dependencies using Bun. ```bash bun install ``` -------------------------------- ### Download Snapshot and Start Reth Node Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/storage.mdx Download a pre-built snapshot and then start the Reth node. This allows for a faster sync by avoiding starting from genesis. Requires a JWT secret. ```bash reth download -y reth node \ --authrpc.jwtsecret /path/to/secret ``` -------------------------------- ### Basic E2E Test Setup in Rust Source: https://github.com/paradigmxyz/reth/blob/main/crates/e2e-test-utils/src/testsuite/README.md Demonstrates the basic setup for an E2E test using the `reth_e2e_test_utils` crate. It shows how to initialize the test environment and handle results. ```rust use reth_e2e_test_utils::{setup_import, Environment, TestBuilder}; #[tokio::test] async fn test_example() -> eyre::Result<()> { // Create test environment let (mut env, mut handle) = TestBuilder::new() .build() .await?; // Perform test actions... Ok(()) } ``` -------------------------------- ### Run Full Contract State Example Source: https://github.com/paradigmxyz/reth/blob/main/examples/full-contract-state/README.md Execute the full contract state example by setting the RETH_DATADIR and CONTRACT_ADDRESS environment variables and running the cargo command. ```bash # Set your reth data directory export RETH_DATADIR="/path/to/your/reth/datadir" # Set target contract address export CONTRACT_ADDRESS="0x0..." # Run the example cargo run --example full-contract-state ``` -------------------------------- ### Install txgen tools Source: https://github.com/paradigmxyz/reth/blob/main/bin/reth-bb/README.md Installs txgen-ethereum for big-block extraction and bench for Engine API replay. ```bash cargo install --git https://github.com/tempoxyz/txgen txgen-ethereum --locked ``` ```bash cargo install --git https://github.com/tempoxyz/txgen bench-cli --locked ``` -------------------------------- ### Start Services on Windows Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Use these PowerShell commands to start Prometheus and Grafana services if they were installed as such on a Windows system. ```powershell Start-Service prometheus Start-Service grafana ``` -------------------------------- ### Start Reth Node with Configuration File Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/node.mdx Specify a custom configuration file using the `--config` option. ```bash $ reth node --config /path/to/your/config.toml ``` -------------------------------- ### Install and Run Reth Node Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/index.mdx Install the Reth binary using Homebrew and run a node with JSON-RPC enabled. This is useful for quickly setting up an Ethereum node for development or testing. ```bash # Install the binary brew install paradigmxyz/brew/reth # Run the node with JSON-RPC enabled reth node --http --http.api eth,trace ``` -------------------------------- ### Install Grafana on Debian/Ubuntu Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Install Grafana on Debian/Ubuntu systems by adding the Grafana repository and using apt-get. Ensure necessary packages for adding repositories are installed. ```bash # Install Grafana sudo apt-get install -y apt-transport-https software-properties-common wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - echo "deb https://packages.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list sudo apt-get update sudo apt-get install grafana ``` -------------------------------- ### Start reth-bb node Source: https://github.com/paradigmxyz/reth/blob/main/bin/reth-bb/README.md Starts the reth-bb node with specified datadir, chain, and API configurations. ```bash reth-bb node \ --datadir /data/reth/hoodi \ --chain hoodi \ --http --http.api debug,eth \ --authrpc.jwtsecret /tmp/jwt.hex \ -d ``` -------------------------------- ### Install Prometheus on Debian/Ubuntu Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Install Prometheus on Debian/Ubuntu systems by downloading the latest version from GitHub and extracting the archive. This script dynamically fetches the latest release version. ```bash # Install Prometheus # Visit https://prometheus.io/download/ for the latest version PROM_VERSION=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -c 2-) wget https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz tar xvfz prometheus-*.tar.gz cd prometheus-* ``` -------------------------------- ### Download minimal snapshot Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/storage/minimal.mdx Download a snapshot specifically for the minimal component set. This is useful for starting a new node with reduced storage requirements. ```bash reth download --chain mainnet --minimal ``` -------------------------------- ### Metric Key Example Source: https://github.com/paradigmxyz/reth/blob/main/docs/design/metrics.md Illustrates how a metric is identified by a `Key`, composed of a `KeyName` and `Label`s. This example shows a `stage_progress` metric with a `stage` label. ```rust let key = metrics::Key::new("stage_progress", [metrics::Label::new("stage", "headers")]); ``` -------------------------------- ### Start Reth Node Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth.mdx Initiates the Reth node process. This is the primary command for running the Ethereum client. ```bash reth node ``` -------------------------------- ### Start Reth with Docker Compose Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/installation/docker.mdx Start Reth and associated services (like Prometheus and Grafana) using Docker Compose. This command should be run from the root directory of the repository. ```bash docker compose -f etc/docker-compose.yml -f etc/lighthouse.yml up -d ``` -------------------------------- ### Clone Reth Repository and Install Dependencies Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/introduction/contributing.mdx Clone your fork of the Reth repository and set up the development environment, including installing nightly Rust for formatting and running the validation suite. ```bash git clone https://github.com/YOUR_USERNAME/reth.git cd reth # Install dependencies and tools # Use nightly Rust for formatting rustup install nightly rustup component add rustfmt --toolchain nightly # Run the validation suite make pr ``` -------------------------------- ### Start Prometheus and Grafana Services on Linux Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Start the Prometheus and Grafana server services on Linux systems using systemctl. This command is applicable for systems using systemd. ```bash sudo systemctl start prometheus sudo systemctl start grafana-server ``` -------------------------------- ### Start Reth Full Node Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/ethereum.mdx Run this command to start the Reth node in full mode. This mode stores the entire blockchain history but may prune older states. ```bash reth node --full ``` -------------------------------- ### Display reth init help information Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/init.mdx Use this command to view all available options and their descriptions for initializing the reth database. ```bash $ reth init --help ``` -------------------------------- ### Install Prometheus and Grafana on Windows using Chocolatey Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Install Prometheus and Grafana on Windows using the Chocolatey package manager. This is a quick way to get both tools installed. ```powershell choco install prometheus choco install grafana ``` -------------------------------- ### trace_call RPC Method Example Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/jsonrpc/trace.mdx An example of invoking the trace_call RPC method to get a transaction trace. The 'params' array includes the transaction object and the desired trace type. ```javascript // > {"jsonrpc":"2.0","id":1,"method":"trace_call","params":[{},["trace"]]} ``` ```javascript { "id": 1, "jsonrpc": "2.0", "result": { "output": "0x", "stateDiff": null, "trace": [{ "action": { "callType": "call", "from": "0x0000000000000000000000000000000000000000", "to": "0x0000000000000000000000000000000000000000", "gas": "0x76c0", "input": "0x", "value": "0x0" }, "result": { "gasUsed": "0x0", "output": "0x" }, "subtraces": 0, "traceAddress": [], "type": "call" }], "vmTrace": null } } ``` -------------------------------- ### Preview Production Build with Bun Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/CLAUDE.md Use this command to preview the production build of the website. ```bash bun run preview ``` -------------------------------- ### Example Usage of reth db get static-file Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/db/get/static-file.mdx Demonstrates how to retrieve data from a specific static file segment. Replace ``, ``, and `[SUBKEY]` with your desired values. ```bash reth db get static-file [SUBKEY] ``` -------------------------------- ### Run Lighthouse Consensus Node Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/ethereum.mdx Start a Lighthouse consensus node, connecting it to the Reth execution endpoint and providing a JWT secret for authentication. Ensure Lighthouse is installed and configured according to its documentation. ```bash lighthouse bn \ --checkpoint-sync-url https://mainnet.checkpoint.sigp.io \ --execution-endpoint http://localhost:8551 \ --execution-jwt /path/to/secret ``` -------------------------------- ### Install Prometheus and Grafana on macOS Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Install Prometheus and Grafana using Homebrew on macOS. Ensure Homebrew is updated before installation. ```bash brew update brew install prometheus brew install grafana ``` -------------------------------- ### Build for Production with Bun Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/CLAUDE.md Execute this command to build the project for production deployment. ```bash bun run build ``` -------------------------------- ### Install Reth with Homebrew Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/installation/binaries.mdx Use this command to install Reth if you are using macOS Homebrew or Linuxbrew. This installs Reth from the Paradigm's homebrew tap. ```bash brew install paradigmxyz/brew/reth ``` -------------------------------- ### Display P2P Help Information Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/p2p.mdx Use this command to view all available P2P subcommands and their options. ```bash $ reth p2p --help ``` -------------------------------- ### Install Grafana on Fedora/RHEL/CentOS Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Install Grafana on Fedora/RHEL/CentOS systems using the provided DNF command. This command installs the latest stable version of Grafana OSS. ```bash # Install Grafana # Visit https://grafana.com/grafana/download for the latest version sudo dnf install -y https://dl.grafana.com/oss/release/grafana-latest-1.x86_64.rpm ``` -------------------------------- ### Get Help for reth db stage-checkpoints get Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/db/stage-checkpoints/get.mdx Displays the help message for the `reth db stage-checkpoints get` command, outlining its usage and available options. ```bash $ reth db stage-checkpoints get --help ``` -------------------------------- ### Get Help for reth db get static-file Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/db/get/static-file.mdx Displays the help message for the `reth db get static-file` command, outlining its usage, arguments, and options. ```bash $ reth db get static-file --help ``` -------------------------------- ### Configure and Run Node Pipeline Source: https://github.com/paradigmxyz/reth/blob/main/docs/crates/network.md Initializes the network, sets up the data fetching pipeline with various stages (Headers, Bodies, SenderRecovery, Execution), and runs the pipeline. This is used when starting the main node process. ```rust let network = start_network(network_config(db.clone(), chain_id, genesis_hash)).await?; let fetch_client = Arc::new(network.fetch_client().await?); let mut pipeline = reth_stages::Pipeline::new() .push(HeaderStage { downloader: headers::reverse_headers::ReverseHeadersDownloaderBuilder::default() .batch_size(config.stages.headers.downloader_batch_size) .retries(config.stages.headers.downloader_retries) .build(consensus.clone(), fetch_client.clone()), consensus: consensus.clone(), client: fetch_client.clone(), network_handle: network.clone(), commit_threshold: config.stages.headers.commit_threshold, metrics: HeaderMetrics::default(), }) .push(BodyStage { downloader: Arc::new( bodies::bodies::BodiesDownloader::new( fetch_client.clone(), consensus.clone(), ) .with_batch_size(config.stages.bodies.downloader_batch_size) .with_retries(config.stages.bodies.downloader_retries) .with_concurrency(config.stages.bodies.downloader_concurrency), ), consensus: consensus.clone(), commit_threshold: config.stages.bodies.commit_threshold, }) .push(SenderRecoveryStage { commit_threshold: config.stages.sender_recovery.commit_threshold, }) .push(ExecutionStage { config: ExecutorConfig::new_ethereum() }); if let Some(tip) = self.tip { debug!("Tip manually set: {}", tip); consensus.notify_fork_choice_state(ForkchoiceState { head_block_hash: tip, safe_block_hash: tip, finalized_block_hash: tip, })?; } // Run pipeline info!("Starting pipeline"); pipeline.run(db.clone()).await?; ``` -------------------------------- ### Get Help for reth db get mdbx Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/db/get/mdbx.mdx Displays the help message for the `reth db get mdbx` command, outlining its usage, arguments, and options. ```bash $ reth db get mdbx --help ``` -------------------------------- ### Choose Snapshot Profile Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/storage/snapshots.mdx Select a built-in profile for snapshot downloads: minimal, full-node, or archive. ```bash # Smallest built-in profile reth download --minimal # Full-node profile reth download --full # Archive profile reth download --archive ``` -------------------------------- ### Conventional Commit Example 1 Source: https://github.com/paradigmxyz/reth/blob/main/CLAUDE.md Example of a conventional commit message for a fix. ```text fix(rpc): correct gas estimation for ERC-20 transfers ``` -------------------------------- ### Reth P2P Bootnode Help Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/p2p/bootnode.mdx Displays the help message for the `reth p2p bootnode` command, outlining available options and their default values. ```bash $ reth p2p bootnode --help ``` -------------------------------- ### Bad PR Description Example Source: https://github.com/paradigmxyz/reth/blob/main/CLAUDE.md An example of a verbose and unhelpful Pull Request description. ```text ## Summary This PR introduces comprehensive improvements to the IP resolution system. ## Changes - Modified `crates/net/discv4/src/lib.rs` to add fallback - Modified `crates/net/discv4/src/config.rs` to add default IP - Added tests in `crates/net/discv4/src/tests/ip.rs` ## Files Changed - crates/net/discv4/src/lib.rs - crates/net/discv4/src/config.rs - crates/net/discv4/src/tests/ip.rs ``` -------------------------------- ### Good PR Description Example Source: https://github.com/paradigmxyz/reth/blob/main/CLAUDE.md An example of a concise and informative Pull Request description. ```text Closes #16800 Adds fallback for external IP resolution so node startup doesn't fail when STUN is unreachable. Falls back to the configured default. ``` -------------------------------- ### Run node after downloading minimal snapshot Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/storage/minimal.mdx After downloading a minimal snapshot, you can start the Reth node. The `--minimal` flag is not required here as the node will use the downloaded snapshot's configuration. ```bash reth node \ --authrpc.jwtsecret /path/to/secret ``` -------------------------------- ### Conventional Commit Example 3 Source: https://github.com/paradigmxyz/reth/blob/main/CLAUDE.md Example of a conventional commit message for a new feature. ```text feat(engine): add new_payload_interval metric ``` -------------------------------- ### Display reth init-state help message Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/init-state.mdx Use the `--help` flag to display the usage information and available options for the `reth init-state` command. ```bash $ reth init-state --help ``` -------------------------------- ### Display reth p2p enode help Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/p2p/enode.mdx Use the --help flag to display the available options and arguments for the `reth p2p enode` command. This is useful for understanding its full capabilities and usage. ```bash $ reth p2p enode --help ``` -------------------------------- ### Conventional Commit Example 2 Source: https://github.com/paradigmxyz/reth/blob/main/CLAUDE.md Example of a conventional commit message for a performance improvement. ```text perf: batch trie updates to reduce cursor overhead ``` -------------------------------- ### Conventional Commit Scope Examples Source: https://github.com/paradigmxyz/reth/blob/main/CLAUDE.md Examples of scopes that can be used in conventional commit messages. ```text evm, trie, rpc, engine, net ``` -------------------------------- ### Run Ethereum Package with Kurtosis Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/private-testnets.mdx Use this command to spin up a private Ethereum testnet. Ensure you have a network_params.yaml file configured. ```bash kurtosis run github.com/ethpandaops/ethereum-package --args-file ~/network_params.yaml --image-download always ``` -------------------------------- ### Install Reth from Arch Linux AUR Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/installation/binaries.mdx Install stable or unstable (git) versions of Reth from the Arch Linux AUR using an AUR helper like paru. Ensure you have an AUR helper installed. ```bash paru -S reth # Stable paru -S reth-git # Unstable (git) ``` -------------------------------- ### Initialize Chain from Execution APIs Data Source: https://github.com/paradigmxyz/reth/blob/main/crates/e2e-test-utils/src/testsuite/README.md Use `InitializeFromExecutionApis::new` to set up the blockchain state using data from the execution-apis test suite. Custom paths for chain RLP and head FCE JSON can be provided. ```rust use reth_rpc_e2e_tests::rpc_compat::InitializeFromExecutionApis; // With default paths let action = InitializeFromExecutionApis::new(); // With custom paths let action = InitializeFromExecutionApis::new() .with_chain_rlp("path/to/chain.rlp") .with_fcu_json("path/to/headfcu.json"); ``` -------------------------------- ### Integrate ExEx and gRPC server in the main binary Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/exex/remote.mdx Connect all components by installing the ExEx in the node and passing the communication channel sender to it. This sets up both the gRPC server and the ExEx to work together. ```rust use crate::exex::MyExEx; use crate::exex_server::{ExEx, ExExNotification}; use reth_builder::NodeBuilder; use reth_tasks::TaskExecutor; use std::sync::Arc; use tokio::sync::broadcast; mod exex; mod exex_server; #[tokio::main] async fn main() { let mut builder = NodeBuilder::default().with_components(); let executor = builder.task_executor(); // Create a broadcast channel for notifications let (notifications_tx, _notifications_rx) = broadcast::channel::(100); // Run the gRPC server let grpc_server_handle = executor.spawn(async move { run_grpc_server(executor.clone(), notifications_tx.clone()).await; }); // Install the ExEx let my_exex = MyExEx::new(notifications_tx); builder = builder.install_exex(my_exex); // Build and run the node let node = builder.build().await.unwrap(); let node_handle = node.run().await.unwrap(); // Keep the gRPC server running grpc_server_handle.await; node_handle.await; } async fn run_grpc_server(executor: TaskExecutor, notifications_tx: tokio::sync::broadcast::Sender) { let addr = "[::1]:10000".parse().unwrap(); let exex_service = MyExEx { notifications_tx }; executor .spawn(async move { tonic::transport::Server::builder() .add_service(crate::exex_server::remote_ex_ex_server::RemoteExExServer::new(exex_service)) .serve(addr) .await .unwrap(); }) .await; } ``` -------------------------------- ### Show reth download help Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/download.mdx Display the help message for the `reth download` command to understand all available options and their usage. ```bash $ reth download --help ``` -------------------------------- ### Get RocksDB Table Help Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/db/get/rocksdb.mdx Displays the help information for the 'reth db get rocksdb' command, outlining its usage, arguments, and options. ```bash $ reth db get rocksdb --help ``` -------------------------------- ### Start Reth Archive Node Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/ethereum.mdx Run this command to start the Reth node in archive mode. This mode stores the entire blockchain history. ```bash reth node ``` -------------------------------- ### Check Documentation Source: https://github.com/paradigmxyz/reth/blob/main/CLAUDE.md Generate documentation, including private items, to ensure comprehensive API coverage. ```bash cargo docs --document-private-items ``` -------------------------------- ### Start Prometheus and Grafana Services on macOS Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Start the Prometheus and Grafana services on macOS using Homebrew services. This ensures they run in the background. ```bash brew services start prometheus brew services start grafana ``` -------------------------------- ### Enable Reth Node Metrics Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/monitoring.mdx Start a Reth node with metrics enabled and exposed on a specific address and port. This is the initial step to gather node performance data. ```bash reth node --metrics 127.0.0.1:9001 ``` -------------------------------- ### Install Reth Binary Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/installation/source.mdx Installs the Reth binary into your system's PATH using Cargo. This makes the `reth` command directly accessible from your terminal. ```bash cargo install --locked --path bin/reth --bin reth ``` -------------------------------- ### Display Storage Hashing Stage Help Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/cli/reth/stage/dump/storage-hashing.mdx Use this command to view the help message for the storage hashing stage dump functionality, which outlines all available options and their descriptions. ```bash $ reth stage dump storage-hashing --help ``` -------------------------------- ### Download Latest Minimal Snapshot Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/storage/snapshots.mdx Use this command to download the default minimal component set for snapshots. After download, start the Reth node normally. ```bash reth download -y reth node ``` -------------------------------- ### Implement minimal gRPC server Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/exex/remote.mdx Create a basic gRPC server that listens on a specified port. This server will be spawned using the Reth node's task executor. ```rust use std::sync::Arc; use crate::exex::RemoteExEx; use crate::exex_server::{ExEx, ExExNotification, ExExNotificationResponse}; use reth_tasks::TaskExecutor; use tonic::{transport::Server, Request, Response, Status, Streaming}; struct MyExEx { notifications_tx: tokio::sync::broadcast::Sender, } #[tonic::async_trait] impl RemoteExEx for MyExEx { async fn subscribe( &self, request: Request>, ) -> Result, Status> { let mut stream = request.into_inner(); let notifications_tx = self.notifications_tx.clone(); tokio::spawn(async move { while let Ok(notification) = stream.next().await { if let Err(e) = notifications_tx.send(notification) { eprintln!("Failed to send notification: {:?}", e); } } }); Ok(Response::new(ExExNotificationResponse { success: true })) } } pub async fn run_grpc_server(executor: TaskExecutor, notifications_tx: tokio::sync::broadcast::Sender) { let addr = "[::1]:10000".parse().unwrap(); let exex_service = MyExEx { notifications_tx }; executor .spawn(async move { Server::builder() .add_service(crate::exex_server::remote_ex_ex_server::RemoteExExServer::new(exex_service)) .serve(addr) .await .unwrap(); }) .await; } ``` -------------------------------- ### Start Reth Node with Minimal Mode and Storage V2 Source: https://github.com/paradigmxyz/reth/blob/main/docs/vocs/docs/pages/run/storage.mdx Use storage V2 with the 'minimal' node mode to prioritize disk usage. Requires a JWT secret. ```bash reth node \ --minimal \ --authrpc.jwtsecret /path/to/secret ``` -------------------------------- ### Add Legacy C Example Executable Source: https://github.com/paradigmxyz/reth/blob/main/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/ut_and_examples/CMakeLists.txt Adds an executable for the legacy C example and links it against the MDBX library. This is a standard way to build C executables with CMake. ```cmake add_executable(mdbx_legacy_example example-mdbx.c) target_link_libraries(mdbx_legacy_example ${MDBX_LIBRARY}) ```