From 072239087ed0b345afb0004e85729a14e187889f Mon Sep 17 00:00:00 2001 From: boldkoala4615 Date: Wed, 1 Nov 2023 08:35:06 +0100 Subject: [PATCH 1/2] docs: clarify that snapshots have to be decompressed --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bf4894f6..a7f0d992c 100644 --- a/README.md +++ b/README.md @@ -91,20 +91,23 @@ docker run --env-file .env.goerli -e OP_NODE_L2_ENGINE_RPC=ws://localhost:8551 - ### Snapshots -If you're a prospective or current Base Node operator and would like to restore from a snapshot to save time on the initial sync, it's possible to always get the latest available snapshot of the Base chain on mainnet and/or testnet by using the following CLI commands. The snapshots are updated every hour. +If you're a prospective or current Base Node operator and would like to restore from a snapshot to save time on the initial sync, it's always possible to download and decompress the latest available snapshot of the Base chain on mainnet and/or testnet by using the following CLI commands. The snapshots are updated every hour. **Mainnet** ``` wget https://base-mainnet-archive-snapshots.s3.us-east-1.amazonaws.com/$(curl https://base-mainnet-archive-snapshots.s3.us-east-1.amazonaws.com/latest) +tar -xvf $(curl https://base-mainnet-archive-snapshots.s3.us-east-1.amazonaws.com/latest) ``` **Testnet** ``` wget https://base-goerli-archive-snapshots.s3.us-east-1.amazonaws.com/$(curl https://base-goerli-archive-snapshots.s3.us-east-1.amazonaws.com/latest) +tar -xvf $(curl https://base-goerli-archive-snapshots.s3.us-east-1.amazonaws.com/latest) ``` + ### Syncing Sync speed depends on your L1 node, as the majority of the chain is derived from data submitted to the L1. You can check your syncing status using the `optimism_syncStatus` RPC on the `op-node` container. Example: From 0193f11578e45322e887aa167fc8fb2714233f6c Mon Sep 17 00:00:00 2001 From: boldkoala4615 Date: Tue, 7 Nov 2023 13:31:08 +0100 Subject: [PATCH 2/2] Update README.md docs: clarify that a volume has to be mounted for snapshots --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a7f0d992c..efd2fc2a6 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ If you encounter problems with your node, please open a [GitHub issue](https://g docker compose up --build ``` -3. You should now be able to `curl` your Base node: +4. You should now be able to `curl` your Base node: ``` curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \ @@ -68,7 +68,7 @@ curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["late Note: Some L1 nodes (e.g. Erigon) do not support fetching storage proofs. You can work around this by specifying `--l1.trustrpc` when starting op-node (add it in `op-node-entrypoint` and rebuild the docker image with `docker compose build`.) Do not do this unless you fully trust the L1 node provider. -You can map a local data directory for `op-geth` by adding a volume mapping to the `docker-compose.yaml`: +5. Map a local data directory for `op-geth` by adding a volume mapping to the `docker-compose.yaml`: ```yaml services: @@ -78,6 +78,8 @@ services: - $HOME/data/base:/data ``` +This is where your node data will be stored. This is for example where you would extract your [snapshot](#snapshots) to. + #### Running in single container with `supervisord` If you'd like to run the node in a single container instead of `docker-compose`, you can use the `supervisord` entrypoint. @@ -97,16 +99,15 @@ If you're a prospective or current Base Node operator and would like to restore ``` wget https://base-mainnet-archive-snapshots.s3.us-east-1.amazonaws.com/$(curl https://base-mainnet-archive-snapshots.s3.us-east-1.amazonaws.com/latest) -tar -xvf $(curl https://base-mainnet-archive-snapshots.s3.us-east-1.amazonaws.com/latest) ``` **Testnet** ``` wget https://base-goerli-archive-snapshots.s3.us-east-1.amazonaws.com/$(curl https://base-goerli-archive-snapshots.s3.us-east-1.amazonaws.com/latest) -tar -xvf $(curl https://base-goerli-archive-snapshots.s3.us-east-1.amazonaws.com/latest) ``` +Use `tar -xvf` to decompress the downloaded archive to the local data directory you previously configured a volume mapping for. ### Syncing