Open d10r opened 9 months ago
@d10r any update on the IPFS server issue on Hetzner?
Also, considering the number quota for third party providers, how often should we run the snapshot script?
IPFS issue is solved. We had the cronjob monthly, would keep it at that. However in the future we shouldn't re-run all if it fails for any network. Instead skip that network.
What & Why
We provide DB snapshots for sentinels in order to facilitate sentinel operation with cheap or free rate limited RPC providers. The GDA release came with a breaking change of the DB schema.
Since newly bootstrapping sentinels fetch the latest manifest.json (which contains IPFS hashes of the latest DB snapshots), we couldn't just switch the snapshot backend to the latest version.
Once the GDA sentinel is released, compatible snapshots shall be in place. They were not released before because that would have broken the fast-sync for pre-GDA sentinels (which is still the latest public release).
Acceptance Criteria
How
Status quo
The backend for snapshot generation is set up at
sentinel@buck1.superfluid.dev
. Before being disabled, it was monthly triggered by a cronjob:The bash script
generate-all.sh
is currently not regular part of any repo (but covered by the backups for ad-hoc code here - it contains credentials, thus do NOT add to any public repo as is!)Running this script does:
snapshots/
networks
(format: non-canonical name (used only for logging), rpc). This creates a filesnapshots_<chainId>_<timestamp>.sqlite.gz
for each networkipfs add
for each generated snapshot file, using the SF IPFS node, writing the log toipfs_log.txt
manifest.json
to this cid's.manifest.json
(example).Smells
Since we're touching the process, there's an opportunity to look at what's not great about it and do some incremental improvements. Some of the smells:
networks
to be manually maintainedbuildSnapshot.js
does and what happens between that and the IPFS upload)