smartcontracts / simple-optimism-node

The easiest way to run an Optimism node
MIT License
318 stars 106 forks source link

bedrock snapshot file downloads are slow #92

Closed imtipi closed 6 months ago

imtipi commented 11 months ago

bedrock snapshot file downloads are slow,recommend use axel(multi-threaded) to get better speed

Rogalek commented 9 months ago

it is still really slow

imtipi commented 9 months ago

it is still really slow

better download the snapshot manually https://community.optimism.io/docs/useful-tools/networks/#links

Rogalek commented 9 months ago

it is still really slow

better download the snapshot manually https://community.optimism.io/docs/useful-tools/networks/#links

so if you download it from that page, how do you use it here? with this docker compose files? thanks for help

imtipi commented 9 months ago

it is still really slow

better download the snapshot manually https://community.optimism.io/docs/useful-tools/networks/#links

so if you download it from that page, how do you use it here? with this docker compose files? thanks for help

https://github.com/Chomtana/simple-optimism-node this repo replaced the download link to official one,you can just use it image

Rogalek commented 9 months ago

yeah I see but this not answer my question - how can I use already downloaded file inside this init-bedrock.sh script.

Because this init-bedrock.sh will try again downloading the file. I want point it to: BEDROCK_TAR_PATH=/my-local-disk/Documents/mainnet-bedrock.tar.zst

imtipi commented 9 months ago

yeah I see but this not answer my question - how can I use already downloaded file inside this init-bedrock.sh script.

Because this init-bedrock.sh will try again downloading the file. I want point it to: BEDROCK_TAR_PATH=/my-local-disk/Documents/mainnet-bedrock.tar.zst

  1. download snapshot
  2. find the geth volume(volume root path is /var/lib/docker/volumes)
  3. exact the tar.zst file to _data folder tar --use-compress-program=unzstd -xvf /path/to/mainnet-bedrock.tar.zst
  4. then move the data because all data needs be in _data folder,no more sub folder mv geth/* /var/lib/docker/volumes/simple-optimism-node_op_geth/_data/
  5. then go to shared volume and create your jwt

openssl rand -hex 32 > jwt.txt

finanlly create initialized.txt in the shared volume touch initialized.txt

and your node will start running

basiclly you are manually execute script command of https://github.com/smartcontracts/simple-optimism-node/blob/main/scripts/init-bedrock.sh

note1:if you don’t know or your volume root path isn’t /var/lib/docker/volumes ,run docker volume inspect ‘volumename’ and you can find the root path(mountpoint)

Rogalek commented 9 months ago

thanks! Actually I did something different I just create directory called geth inside my repo and did mapping in docker-compose.yml: ./geth:/geth and it worked.

Thank you for your assist

Rogalek commented 9 months ago

@imtipi hey, can you tell me what kind of L1 keys are you using for your optimism node? are they free key from providers like alchemy or infura or something else? or maybe paid? or your L1 nodes?

imtipi commented 9 months ago

@imtipi hey, can you tell me what kind of L1 keys are you using for your optimism node? are they free key from providers like alchemy or infura or something else? or maybe paid? or your L1 nodes?

i use alchemy free plan.it is enough to sync a single node as long as you don't also use this key for other things at the same time

smartcontracts commented 8 months ago

I believe this should be faster now that #97 is merged