Issue: Legacy Geth snapshot consistency notes.
Issue 1
URLS:
- MAINNET FULL NODE SNAPSHOT = https://download.xinfin.network/xdcchain.tar
- MAINNET ARCHIVE NODE SNAPSHOT = https://downloads.xinfin.network/xdcchain_archive.tar
- TESTNET FULL NODE SNAPSHOT = https://downloads.apothem.network/xdcchain.tar
- TESTNET ARCHIVE NODE SNAPSHOT = https://downloads.apothem.network/xdcchain_archive.tar
Note in the above URLs that the Full node snapshot URL has no "s" at the end of download, so it differs from the naming convention of the other 3 snapshots.
SOLUTION: Add a 301 or 302 to server or Cloudflare pointing:
https://downloads.xinfin.network/xdcchain.tar
to
https://download.xinfin.network/xdcchain.tar
Issue 2
Mainnet full node snapshot tar file uses gzip compression whereas Mainnet archive, Apothem full and Apothem archive snapshots all have no compression.
The effect is that when mainnet full node snapshots are extracted, they need:
tar -xzf SNAPSHOT_FILE
Whereas all the other snapshot types require:
tar -xf SNAPSHOT_FILE
SOLUTION: For the script that is creating each of the snapshots, can we use the following across all of them:
tar -czf xdcchain.tar XDC
That would make all of them extractable with the same flags.
If the creation script is being updated anyway, zstd would also be a nice improvement for download size…
Issue 3
Mainnet full and archive node snapshots contain a single folder "XDC" that contains all the necessary chain files.
Apothem full and archive node snapshots do not contain the XDC directory but look like they have been created one level down the tree such that the root directory of the tar file is the CONTENTS of the XDC directory instead of being encapsulated in an XDC directory like the Mainnet snapshots.
This is conisistent with the path specified in the snapshot creation command for Mainnet snapshots being:
tar -cf xdcchain.tar XDC
And for Apothem snapshots being something like:
tar -cf xdcchain.tar XDC/*
Solution: When the snapshots are created, always wrap the contents in an XDC directory:
tar -cf xdcchain.tar XDC
tar -cf xdcchain_archive.tar XDC
If new clients supercede the geth client, then the above issues may no longer be relevant. In the lead up until then, if it is possible it would be great to just make those tweaks (as long as its not going to break infrastructure elsewhere).
Happy to test any updated snapshots if that would help.
Discussion (2)
rpc.xdc.network/snapshots/ please use this endpoint for download snapshot
That looks amazing Nolan! Confirming they're for the Geth-based client?