elixir-omg icon indicating copy to clipboard operation
elixir-omg copied to clipboard

Being able to archive and restore Watcher data

Open pnowosie opened this issue 5 years ago • 2 comments

The idea is to provision new Watcher instance from other Watcher's Pg dump file. First, I give ease restore mechanism, then speeds syncing time of new Watchers and reduces round trips to ch-ch.

This requires of recreating leveldb data from Pg (not investigated). Maybe Watcher would need to store a little more data in Pg to allow this?

pnowosie avatar Aug 05 '19 07:08 pnowosie

Why not use the blocks stored in leveldb for this instead? Postgres (WatcherDB) might hold a filtered/truncated set of transactions, and as such should not be relied upon for recovery.

Also note how this feature would interact with child chain checkpoints (which set out to achieve a similar result).

pdobacz avatar Aug 05 '19 08:08 pdobacz

Oh, absolutely @pdobacz I got biased by that it's uneasy to backup lvldb in dockerized env.

pnowosie avatar Aug 05 '19 08:08 pnowosie