diff --git a/.env.mainnet b/.env.mainnet index ac9e52b66..e41adef85 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -53,3 +53,9 @@ STATSD_ADDRESS="172.17.0.1" # NOTE: The node type that was chosen when first running a node cannot be changed after the initial sync. Turning Archive into Pruned, or Pruned into Full is not supported [source](https://reth.rs/run/faq/pruning/). # NOTE: The pruned snapshots provided are set with a distance of 1_339_200 (~31 days). # RETH_PRUNING_ARGS="--prune.senderrecovery.distance=50000 --prune.transactionlookup.distance=50000 --prune.receipts.distance=50000 --prune.accounthistory.distance=50000 --prune.storagehistory.distance=50000 --prune.bodies.distance=50000" + +# DATA DIRECTORY +# ----------------- +# Path on the host machine where chain data will be persisted. +# Defaults to ./reth-data relative to docker-compose.yml if not set. +HOST_DATA_DIR=./reth-data diff --git a/.env.sepolia b/.env.sepolia index e518129fb..a7b7d5b5a 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -53,3 +53,9 @@ STATSD_ADDRESS="172.17.0.1" # NOTE: The node type that was chosen when first running a node cannot be changed after the initial sync. Turning Archive into Pruned, or Pruned into Full is not supported [source](https://reth.rs/run/faq/pruning/). # NOTE: The pruned snapshots provided are set with a distance of 1_339_200 (~31 days). # RETH_PRUNING_ARGS="--prune.senderrecovery.distance=50000 --prune.transactionlookup.distance=50000 --prune.receipts.distance=50000 --prune.accounthistory.distance=50000 --prune.storagehistory.distance=50000 --prune.bodies.distance=50000" + +# DATA DIRECTORY +# ----------------- +# Path on the host machine where chain data will be persisted. +# Defaults to ./reth-data relative to docker-compose.yml if not set. +HOST_DATA_DIR=./reth-data diff --git a/README.md b/README.md index 2e0b62998..7cdcf52d7 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,12 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ BASE_NODE_L1_ETH_RPC= BASE_NODE_L1_BEACON= ``` -4. Start the node: +4. Set the data directory (optional but recommended): + ```bash + HOST_DATA_DIR=./reth-data + ``` + This path on the host machine is where chain data will be persisted. If not set, Docker will default to `./reth-data`. +5. Start the node: ```bash # For mainnet (default):