vegaprotocol / vegacapsule

Run a complete Vega Protocol network locally
MIT License
4 stars 7 forks source link

Support resetting network to clean state even after protocol upgrade #268

Open jgsbennett opened 2 years ago

jgsbennett commented 2 years ago

It would be nice to have a supported workflow to reset a network back to a clean state, pointing at the original binary, even after undergoing protocol upgrade. Something like the following vegacapsule commands:

Currently, when I attempt the above steps, I still see the network attempting to load the wrong binary, and then panic, complaining about snapshots, like in this log file: visor-0-with-vega.stderr-2022-09-14T123458+0100.log After chatting to @karlem , we've agreed that currently the reset command does nothing to reset visor config, which would probably be a useful thing for it to do.

The "workaround" choices right now, are:

The second is better (but still not great), since the first assumes we don't even run into issues which leave the network in a broken state, which we may very well do testing the feature. The latter loses all current network logs, which isn't great for issue traceability in CI, so we'd need to manually write some test code to preserve and restore those log files.

(Cannot currently view these tests in CI, since they don't yet run there, but can view the code here)

gordsport commented 2 years ago

Hey @jgsbennett @jeremyletang As we have a workaround for this, I propose this be moved to a stretch for now based on other work remaining ahead of the trading enabled vote?

jgsbennett commented 1 year ago

Per this comment , it would be nice to do this ticket at some point, since then the system tests wouldn't need to guess about which network is currently in use by vegacapsule when it wants to reset things.