aws-samples / aws-blockchain-node-runners

Run blockchain nodes on cloud
https://aws-samples.github.io/aws-blockchain-node-runners/
MIT No Attribution
55 stars 47 forks source link

Took hours to download mainnet-beta snapshot #139

Open lubao opened 1 week ago

lubao commented 1 week ago

Community Note

What is the outcome that you are trying to reach?

Reducing time to download snapshot Downloading snapshot from known validator can take hours to finish since the speed is low.

Describe the solution you would like

  1. Adding downloading snapshot in user-data script. Following is a sample script

    cd /var/solana/data/ledger
    wget --trust-server-names http://entrypoint3.mainnet-beta.solana.com/snapshot.tar.bz2
    wget --trust-server-names http://entrypoint3.mainnet-beta.solana.com/incremental-snapshot.tar.bz2
    sed -i "s/--log -/--no-snapshot-fetch --log -/g" /home/solana/bin/validator.sh
    cd -
  2. leverage https://github.com/c29r3/solana-snapshot-finder

  3. TBD

Describe alternatives you have considered

Additional context

frbrkoala commented 3 days ago

Thank you for suggestion! Will explore it as an add-on feature for Solana. Depending on location, snapshot download time varies. For the last couple of tests it took 1.5-2 hours to download the snapshot the default way. How long does it take to do it with the suggested script?