From 21d911abb2cf594834c1818d2f723718b5109f8b Mon Sep 17 00:00:00 2001 From: Kien Trinh <51135161+kien6034@users.noreply.github.com> Date: Mon, 4 Nov 2024 00:49:07 +0700 Subject: [PATCH] docs: add debug.etherscan in the book (#12293) Co-authored-by: Matthias Seitz --- book/run/mainnet.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/book/run/mainnet.md b/book/run/mainnet.md index 6f1ec144df81..c4908971f69f 100644 --- a/book/run/mainnet.md +++ b/book/run/mainnet.md @@ -84,3 +84,13 @@ In the meantime, consider setting up [observability](./observability.md) to moni ## Running without a Consensus Layer We provide a method for running Reth without a Consensus Layer via the `--debug.tip ` parameter. If you provide that to your node, it will simulate sending an `engine_forkchoiceUpdated` message _once_ and will trigger syncing to the provided block hash. This is useful for testing and debugging purposes, but in order to have a node that can keep up with the tip you'll need to run a CL alongside it. At the moment we have no plans of including a Consensus Layer implementation in Reth, and we are open to including light clients other methods of syncing like importing Lighthouse as a library. + +## Running with Etherscan as Block Source + +You can use `--debug.etherscan` to run Reth with a fake consensus client that advances the chain using recent blocks on Etherscan. This requires an Etherscan API key (set via `ETHERSCAN_API_KEY` environment variable). Optionally, specify a custom API URL with `--debug.etherscan `. + +Example: +```bash +export ETHERSCAN_API_KEY=your_api_key_here +reth node --debug.etherscan +``` \ No newline at end of file