Skip to content

Conversation

@kingpinXD
Copy link
Contributor

@kingpinXD kingpinXD commented Oct 7, 2025

Description

Closes: #4261
The pr adds two new targets

  • start-upgrade-test-zetaclient
  • start-upgrade-test-zetaclient-light

These are identical to their older counterparts, but don't upgrade the Zetacored , and dont wait for the upgrade height in between runs
These tests should be used when creating a zetaclient-only release, to work with the existing zetacored

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Note

Introduces a zetaclient-only upgrade E2E path (Make targets, CI wiring, env/compose changes) and adds supervisor support to upgrade zetaclientd via a file trigger, with minor runner/test tweaks.

  • E2E/CI:
    • Add UPGRADE_TEST_ZETACLIENT matrix output/label handling and job to run make start-upgrade-test-zetaclient.
  • Makefile / Localnet:
    • New targets: start-upgrade-test-zetaclient and start-upgrade-test-zetaclient-light setting UPGRADE_ZETACLIENT_ONLY=true and using upgrade-zetaclient profile.
    • Propagate UPGRADE_ZETACLIENT_ONLY env to orchestrator in contrib/localnet/docker-compose.yml.
  • Orchestrator (contrib/localnet/orchestrator/start-zetae2e.sh):
    • Support zetaclient-only upgrade mode: create upgrade trigger files on zetaclient* containers and skip zetacored version change check when UPGRADE_ZETACLIENT_ONLY=true.
  • Zetaclient Supervisor (cmd/zetaclientd-supervisor/lib.go):
    • Add file-based upgrade flow: watch /root/.zetaclientd/zetaclientd-upgrade-trigger, download new zetaclientd from http://upgrade-host:8000/zetaclientd, replace binary, and signal reload.
  • E2E Runner:
    • Add EnvKeyUpgradeZetaclientOnly and IsRunningZetaclientOnlyUpgrade(); adjust post-upgrade handler logic to honor zetaclient-only mode; skip Sui gateway upgrade tests in this mode; fix Sui chain params error msg.
  • Tests/Changelog:
    • Gate TestBitcoinToZEVMCallExcessiveFundsRevert with WithMinimumVersion("v37.0.0").
    • Update changelog.md with "add zetaclient only upgrade tests".

Written by Cursor Bugbot for commit 9dd7cae. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch zetaclient-upgrade

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.17%. Comparing base (a4d4fac) to head (e94e4c0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4310   +/-   ##
=======================================
  Coverage   65.17%   65.17%           
=======================================
  Files         451      451           
  Lines       34141    34141           
=======================================
  Hits        22253    22253           
  Misses      10916    10916           
  Partials      972      972           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot added the ci Changes to CI pipeline or github actions label Oct 7, 2025
@kingpinXD kingpinXD marked this pull request as ready for review October 7, 2025 22:26
@kingpinXD kingpinXD requested review from a team as code owners October 7, 2025 22:26
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment @cursor review or bugbot run to trigger another review on this PR

Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't have to wait for an height for an upgrade since there is now coordinated proposal. We should look into a solution where the orchestrator can signal the zetaclient to upgrade after the first pass of tests complete.

Additional I don't think we need a light version for this test.

@kingpinXD
Copy link
Contributor Author

We shouldn't have to wait for an height for an upgrade since there is now coordinated proposal. We should look into a solution where the orchestrator can signal the zetaclient to upgrade after the first pass of tests complete.

Additional I don't think we need a light version for this test.

Yeah, that's a good idea, we can skip waiting for the height .

However,we should keep the light test, as it provides a quicker way to test the current zetaclient against the old zetacore version, even if we use it for localnet

The only thing that looks a bit weird to me is, we would still need to use the
export UPGRADE_HEIGHT=60
As the height is used to determine whether it's light mode or regular

We can separate the logic out into two flags, UPGRADE_MODE and UPGRADE_HEIGHT, to make it cleaner, but not sure if that is necessary since this is tests only , and a comment can make it easier to understand

@lumtis
Copy link
Member

lumtis commented Oct 8, 2025

However,we should keep the light test, as it provides a quicker way to test the current zetaclient against the old zetacore version, even if we use it for localnet

The previous light test was introduce to quickly test the upgrade script of the zetacore itself, I'm not sure it's this interesting for zetaclient since there is no migration logic for the zetaclient itself, mostly need to ensure that the transition doesn't cause issue in the network activities

@kingpinXD
Copy link
Contributor Author

kingpinXD commented Oct 8, 2025

However,we should keep the light test, as it provides a quicker way to test the current zetaclient against the old zetacore version, even if we use it for localnet

The previous light test was introduce to quickly test the upgrade script of the zetacore itself, I'm not sure it's this interesting for zetaclient since there is no migration logic for the zetaclient itself, mostly need to ensure that the transition doesn't cause issue in the network activities

It's just faster to test using the light script when debugging in local
I would prefer to keep it since adding/removing does not add or remove any code.

@kingpinXD kingpinXD requested a review from lumtis October 8, 2025 13:24
@kingpinXD kingpinXD requested a review from ws4charlie October 8, 2025 17:10
@lumtis
Copy link
Member

lumtis commented Oct 9, 2025

@kingpinXD is it ready for review? Looks like the CI is failing

@kingpinXD
Copy link
Contributor Author

@kingpinXD is it ready for review? Looks like the CI is failing
Yes , re-running the CI fixed it.

@lumtis lumtis linked an issue Oct 10, 2025 that may be closed by this pull request
@lumtis
Copy link
Member

lumtis commented Oct 10, 2025

Please ensure the issue is attached to the PR

@kingpinXD
Copy link
Contributor Author

Please ensure the issue is attached to the PR

Using the closes keyword usually links the issue. I think it did not happen on this pr for some reason

@github-actions
Copy link

!!!WARNING!!!
nosec detected in the following files: cmd/zetaclientd-supervisor/lib.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Oct 10, 2025
@kingpinXD kingpinXD requested a review from lumtis October 10, 2025 15:14
Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM though I don't see that the light upgrade test is run in the CI, was it tested that it is successful?

@kingpinXD
Copy link
Contributor Author

LGTM though I don't see that the light upgrade test is run in the CI, was it tested that it is successful?

yes

@kingpinXD kingpinXD added this pull request to the merge queue Oct 14, 2025
@github-actions github-actions bot added the MERGE_FAILED Merge Queue CI failed label Oct 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2025
@kingpinXD kingpinXD added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@kingpinXD kingpinXD added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@kingpinXD kingpinXD added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@kingpinXD kingpinXD added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit 2b84f94 Oct 15, 2025
49 checks passed
@kingpinXD kingpinXD deleted the zetaclient-upgrade branch October 15, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking:cli ci Changes to CI pipeline or github actions MERGE_FAILED Merge Queue CI failed nosec UPGRADE_TEST_ZETACLIENT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a ZetaClient upgrade tests

5 participants