Open DavidNix opened 2 years ago
A couple of notes:
Great idea! There is the StartWithGenesisFile method that can be used in the tests. I think we could add a caching mechanism so that it does the ExportState method on a validator node after the chain start up and writes it to a cache dir, and then for future runs, if caching is enabled and the cached state file exists, it can just run with StartWithGenesisFile instead of Start. Once we have chain capabilities, caching after genesis could be one of them.
https://github.com/strangelove-ventures/interchaintest/tree/andrew/start_with_genesis
All great options. I'm not sure on implementation details yet. There may be additional problems like the ability to ensure steps are idempotent (like creating channels) and/or the ability to no-op, ignore errors, or skip steps which don't need to be run as a result of using a cached state.
andrews idea is the way ™️
Problem
The test setup can take a long time (> 60s) to create clients, connections, channels, faucet accounts, test accounts, etc.
Proposal
Allow a developer (or perhaps an end user) to optionally specify a starting state that already has the above mentioned transactions. That way, we can skip the setup and quickly get into more interesting aspects of IBC such as transfering funds from one chain to another.
This option could be part of the matrix file or command line flags.
Goals