Upgrade nodes in CI tests
Motivation
To test upgrading snarkos versions in a network we run a special denvet test as described in #4026
Test Plan
Run the CI and the new test passes.
Documentation
The test works following the steps:
- Download latest snarkOS release source from GitHub.
- Build it via
cargo install --locked --path . --features test_networkinto a separate prefix (SNARKOS_RELEASE_DIR). - Probe latest_consensus_version for release and PR binaries.
- Compute CONSENSUS_VERSION_HEIGHTS for release and PR.
- Rebuild release snarkOS with its heights.
- Rebuild PR snarkOS with its heights.
- Start a devnet with the release binary.
- Restart nodes one-by-one to the PR binary.
Added a new workflow for the new test, extracting it from the devnet tests, as it is time-taking with all the compilations and waiting on the consensus version.
Looks good to me! I pushed one more commit with some minor cleanups (83355c6).
I also rebased https://github.com/ProvableHQ/snarkOS/pull/3902 on it. That PR has some networking changes and the tests succeed. We might still want to test it with a branch that has breaking changes to see that those are caught, or did you do that already?
Also, a side note, it would be great if we could keep the number of commits in PRs to a manageable amount. This one has 14 commits, for ~700 LOC. It's not a huge deal, but it can be a pain when reading the commit logs and or when using git bisect.
@kaimast @vicsn Squashed all into one commit now.
@kaimast good idea. You want to give it another go with a toy PR which changes the gateway handshake in a breaking way?