1

Is there a "latest" URL for https://snapshots-tezos.giganode.io/?

I mean, if I want to download the latest rolling snapshot, I'd like to retrieve something like https://snapshots-tezos.giganode.io/latest.rolling

2
  • Ideally, when you import your snapshot, you should know the block hash and should provide the hash during import. This way, you and the import are verifying that the block is correct. This is a safety feature.
    – utdrmac
    Jun 30, 2020 at 13:04
  • I agree with you, but in case you want to automate a snapshot import for a new node, it'd be easier to just hardcode a "latest" snapshot file and maybe a "latest-blockhash.txt" in order to check the correctness
    – Babell
    Jul 1, 2020 at 10:08

2 Answers 2

1

xtz-shots.io has "latest snapshot" links.

For example, to download the most recent mainnet rolling snapshot:

wget https://mainnet.xtz-shots.io/rolling

More details can be found on XTZ-shots documentation page

0

Ideally the xtz-shots.io answer will suffice for you, but if you really want to use giganode, or want to have a fall-back mechanism to giganode, you can try a simple one liner to extract the latest URL from their webpage.

A rudimentary approach to extract the latest mainnet rolling snapshot:

curl -s https://snapshots-tezos.giganode.io/ | grep "<a href=\"https://snapshots-tezos.giganode.io/snapshots/mainnet_" | grep rolling | sed -En "s/.*href=\"(.*).rolling\".*/\1\.rolling/p" | head -1

As of this writing (27 July 2022) this is the output of that command:

https://snapshots-tezos.giganode.io/snapshots/mainnet_20220727-135814_BKiVX84KL7pPHfoJRMmCumfJipLbj8iz6vzy3x8EFEitu4A3Rqa.rolling

This is not ideal, as it can easily break if they make any changes to their HTML.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.