Skip to content

feat(contribs): add gnoupgrade chain upgrade testing toolkit#5369

Draft
moul wants to merge 1 commit intomasterfrom
feat/chain-upgrade-tools
Draft

feat(contribs): add gnoupgrade chain upgrade testing toolkit#5369
moul wants to merge 1 commit intomasterfrom
feat/chain-upgrade-tools

Conversation

@moul
Copy link
Member

@moul moul commented Mar 26, 2026

Summary

Adds contribs/gnoupgrade — a CLI toolkit for testing and verifying gno.land chain upgrades before they touch real chains.

Subcommands

  • replay — Starts a gnoland node against an existing data directory to verify the new binary can replay all committed blocks without panic. This is the primary smoke test gate for chain upgrades.
  • statediff — Captures chain state (chain ID, height, app hash, realm/package listing) in a canonical, sorted JSON format. Run against old and new binaries and diff the output to see exactly what changed.
  • healthcheck — Runs post-upgrade health checks against a running node: connectivity, block production, ABCI query.

Context

This is part of the chain upgrade confidence-building pipeline (braindump). It implements Tools 1-3 from the plan:

  1. Replay smoke test (does the new binary crash on existing state?)
  2. Integration health checks (does the chain actually work after upgrade?)
  3. State diff / snapshot comparator (what exactly changed?)

Usage

# Smoke test: replay chain data with new binary
gnoupgrade replay --data-dir /path/to/gnoland-data --timeout 30m

# Capture state snapshot for comparison
gnoupgrade statediff --remote http://node:26657 --output before.json
# ... upgrade ...
gnoupgrade statediff --remote http://node:26657 --output after.json
diff before.json after.json

# Post-upgrade health check
gnoupgrade healthcheck --remote http://node:26657

Related

Test plan

  • go build ./... passes
  • gnoupgrade --help shows all three subcommands
  • gnoupgrade replay --help shows all flags
  • Manual test: replay against a test12 data snapshot
  • Manual test: statediff against a running node
  • Manual test: healthcheck against a running node

🤖 Generated with Claude Code
via Happy

Add a new contribs tool for testing and verifying gno.land chain upgrades.
The toolkit provides three subcommands:

- replay: starts a node against existing chain data to verify the new
  binary can successfully replay all committed blocks (smoke test)
- statediff: captures chain state in a canonical, sorted JSON format
  for before/after comparison across upgrades
- healthcheck: runs connectivity, block production, and ABCI query
  checks against a running node post-upgrade

This is the first step toward a CI pipeline for chain upgrade confidence
(Tools 1-3 from the chain-upgrade task plan).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Mar 26, 2026

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

No automated checks match this pull request.

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤝 contribs 🐹 golang Pull requests that update Go code

Projects

Status: No status
Status: 📥 Inbox

Development

Successfully merging this pull request may close these issues.

2 participants