smartcontracts/simple-optimism-node

download bedrock data very slow

Closed this issue · 4 comments

Env:

  • use simple-optimism-node branch is sc/bedrock.
  • the server is aws ec2,and location is `us-east-1
  • has open udp and tcp port 6881

But the data download is very slow
logs:

Bedrock node needs to be initialized...
Initializing via download...
Fetching download link...
Downloading bedrock.tar...
Download Progress: 0.00%
Download Progress: 0.00%
Download Progress: 0.00%
Download Progress: 0.01%
Download Progress: 0.01%
Download Progress: 0.01%
^[Download Progress: 0.01%
Download Progress: 0.01%
Download Progress: 0.01%
Download Progress: 0.01%
kchojn commented

@0xwhatly, my solution was:

  • download file:
aria2c -c -o /chaindata/mainnet-bedrock.tar.zst https://datadirs.optimism.io/mainnet-bedrock.tar.zst > aria2c.log 2>&1 &
  • tar (you need to swap to your own volumes, where you keep the download)
zstd -d /chaindata/mainnet-bedrock.tar.zst -o /chaindata/optimism/torrent_downloads/bedrock.tar
  • then comment out these lines in scripts/init-bedrock.sh
#echo "Fetching download link..."
#BEDROCK_TAR_DOWNLOAD=$(config "bedrock/$NETWORK_NAME/bedrock-download")

#echo "Downloading bedrock.tar..."
#download $BEDROCK_TAR_DOWNLOAD $BEDROCK_TAR_PATH

the whole thing took less than 3h

Use you solution,i have download data,but when i start docker,the simple-optimism-node-op-geth-1 have error: Failed to register the Ethereum service: ancient chain segments already extracted, please set --datadir.ancient to the correct path
log
image

In the end, I solved it. thanks @kchojn ,the bedrock data url has change,we can query by here
the new url is https://op.datadirs.xyz/mainnet-bedrock.tar.

kchojn commented

Great! Sorry @0xwhatly, I noticed the message only when you tagged me.
My link was from the official documentation: https://community.optimism.io/docs/useful-tools/networks/#, and it worked for me 😅