Re-genesis upgrade integration testing(advanced)
- Dominant language
- Rust
- Stars
- 56.8k
- Forks
- 2.9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 5
Description
## Description
Add tests that an existing chain can be snapshotted via the `fuel-core` CLI and restored onto a fresh node without breaking backward compatibility.
It can be one test or a bunch of tests for different scenarios. The test should:
1. Create a Network 1.
2. Fill it with data like contracts, coins, and messages.
3. Stop Network 1 and make a spanshot.
4. Start a new Network 2 from the snapshot.
5. Run some predefined scenarios on the Network 2.
6. Start and run the same scenarios for Network 1.
7. Compare results.
The main goal of these tests is to be sure that the usage of the networks feels the same and generates the same results.
## Implementation details
Instead of using CLI, we can reuse snapshot save/load functions directly in the test. It allows debugging of the code and avoids breaking changes from CLI.
We don't need to test the performance of this process(Another test should handle it). These tests are fully dedicated to compatibility and transitioning from an old network to a new one.
To verify the expected results from the scenario, we need to use `FuelClient` and request all information publicly.
It also would be nice to have a dedicated test that verifies Merkle roots of contract states, balances, and receipts for both networks. In this case, we can be sure that we also migrated the whole SMT and BMT structures.
Contributor guide
Assessment
This issue has not been assessed yet.