superfluid-finance / superfluid-sentinel

MIT License
24 stars 13 forks source link

[SENTINEL] provide snapshots for GDA release #285

Open d10r opened 9 months ago

d10r commented 9 months ago

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:

25 22 18 * *  . $NVM_DIR/nvm.sh; ./generate-all.sh -cgup >> "logs/snapshotgen_`date '+\%Y-\%m-\%d'`.log" 2>&1;

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:

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:

mmd-afegbua commented 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?

d10r commented 9 months ago

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.