test: add hard-fork test from 0.21.0#834
Merged
Merged
Conversation
Verify that a new node can boot from a chain-spec generated by an older node version and accept transactions. Generates the chain-spec from a configurable fork-from node image (default 0.21.0), starts the latest node with it, and runs single-tx before and after a placeholder runtime upgrade step.
Add a `runtime-upgrade` toolkit command that performs a runtime upgrade through federated governance. It authorizes the upgrade via root-call, then applies it, accepting governance keys as CLI arguments so it works on real networks (unlike the upgrader binary which hardcodes dev keys). Wire up the new command in the hardfork e2e test to exercise the full upgrade flow: extract WASM, authorize, apply, and verify post-upgrade.
Contributor
Accept NODE_IMAGE and FORK_FROM_NODE_IMAGE as optional build args in +test-toolkit and conditionally forward them to the test container. When not provided, the test-images.docker-compose.yml defaults apply.
Make test-toolkit depend on the run job so the freshly-built node image is available in GHCR. Add Docker login and pass NODE_IMAGE as a build arg to earthly. In the Earthfile, conditionally --pull the image into the DinD daemon so testcontainers can use it for the hardfork e2e test.
The DinD daemon doesn't inherit Docker auth, so testcontainers can't pull private GHCR images at runtime. Use Earthly's --pull directive to pre-pull NODE_IMAGE into DinD when provided. Without NODE_IMAGE, testcontainers pulls the public default images itself.
Bind mounts fail in DinD because the tempdir exists inside the test container but not on the Docker host. with_copy_to sends data via the Docker API, which works regardless of filesystem sharing. Also adds kics-scan disable for the test-images docker-compose file since it is never run directly.
Contributor
|
Post-mainnet, ledger 7 won't have created a block once we re-genesis preprod env. Once that happens we can delete ledger 7. The fewer ledger versions we have to keep around the better - so yes to removing hardfork but not quite yet. |
gilescope
approved these changes
Mar 3, 2026
gilescope
pushed a commit
that referenced
this pull request
Apr 8, 2026
m2ux
added a commit
that referenced
this pull request
Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux
added a commit
that referenced
this pull request
Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Overview
runtime-upgradecommand to the toolkitroot-callvia goverenanceTicket: https://shielded.atlassian.net/browse/PM-22108
After this PR is merged, we can remove the
hard-fork-testledger versionThis will speed-up CI, and will allow us to use the cargo versions of
midnight-ledgereverywhere.🗹 TODO before merging
NODE_IMAGErather than the defaultlatest-main📌 Submission Checklist
🧪 Testing Evidence
Please describe any additional testing aside from CI:
🔱 Fork Strategy
Links