Open saki-osive opened 2 months ago
@saki-osive Try to confirm that the twin tool is creating the relevant directories for swarm. This should be one of the check a meta test. (There is a swam method that reveals the directory of each node, note that it may be a temp folder).
- Read snapshot
- Test for snapshot (not passing)
- TODO: Add test for upgradeability
- TODO: (nice to have) use a genesis.blob to speed up.
Is your feature request related to a problem? Please describe. Currently the twin tests use the full zipped archive of a DB.
Describe the solution you'd like Extend the twin test to use snapshot file to load the DB
Ideally the CLI interface for the twin tests has three db options a) use a full directory --db-path b) use a snapshot --snapshot-path c) (nice to have) use a genesis.blob --genesis-blob, which would have been generated in a previous test run. Speeds up testing
Twin tests location: https://github.com/0LNetworkCommunity/libra-framework/blob/main/tools/rescue/src/twin.rs
Storage: read snapshot https://github.com/0LNetworkCommunity/libra-framework/blob/main/tools/storage/src/read_snapshot.rs
It might might be possible to import read_snapshot into twin.rs
Here is a test using the twin with a local copy db https://github.com/0LNetworkCommunity/libra-framework/blob/0c279849dd48081bd738a1388ad73f68db742439/tools/rescue/tests/upgrade_multi_action.rs
Repo of snapshots: https://github.com/0LNetworkCommunity/epoch-archive-mainnet Alternative to TASK ONE: take the libra binary, and start in fullnode mode, to populate a ./db/ which then can be used for twin