Skip to content

test: add hard-fork test from 0.21.0#834

Merged
gilescope merged 12 commits into
mainfrom
ozgb-add-hard-fork-test
Mar 3, 2026
Merged

test: add hard-fork test from 0.21.0#834
gilescope merged 12 commits into
mainfrom
ozgb-add-hard-fork-test

Conversation

@ozgb

@ozgb ozgb commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Overview

Ticket: https://shielded.atlassian.net/browse/PM-22108

After this PR is merged, we can remove the hard-fork-test ledger version
This will speed-up CI, and will allow us to use the cargo versions of midnight-ledger everywhere.

🗹 TODO before merging

  • Ready
  • Use correct NODE_IMAGE rather than the default latest-main

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

ozgb added 4 commits March 2, 2026 11:13
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.
@ozgb ozgb requested a review from a team as a code owner March 2, 2026 13:10
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.19

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 93
LOW LOW 12
INFO INFO 83
TRACE TRACE 0
TOTAL TOTAL 188
Metric Values
Files scanned placeholder 31
Files parsed placeholder 31
Files failed to scan placeholder 0
Total executed queries placeholder 73
Queries failed to execute placeholder 0
Execution time placeholder 11

Comment thread util/toolkit/test-images.docker-compose.yml Fixed
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
ozgb added 7 commits March 2, 2026 13:26
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.
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
Comment thread util/toolkit/test-images.docker-compose.yml Fixed
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.
@gilescope

Copy link
Copy Markdown
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 gilescope added this pull request to the merge queue Mar 3, 2026
Merged via the queue into main with commit 608f8c0 Mar 3, 2026
56 checks passed
@gilescope gilescope deleted the ozgb-add-hard-fork-test branch March 3, 2026 10:08
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants