diff --git a/.env.mainnet b/.env.mainnet index c5bd040b5..a679f8c11 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -120,3 +120,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 ./data relative to docker-compose.yml if not set. +HOST_DATA_DIR=./data diff --git a/.env.sepolia b/.env.sepolia index cb9a8b545..46bd499d0 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -120,3 +120,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 ./data relative to docker-compose.yml if not set. +HOST_DATA_DIR=./data diff --git a/README.md b/README.md index 1cbaad17d..811520371 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,12 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built on Optimism's [ OP_NODE_L1_BEACON= OP_NODE_L1_BEACON_ARCHIVER= ``` -4. Start the node: +4. Set the data directory (optional but recommended): + ```bash + HOST_DATA_DIR=./data + ``` + This path on the host machine is where chain data will be persisted. If not set, Docker may use an anonymous volume. +5. Start the node: ```bash # For mainnet (default):