Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use v21 as upgrade base #3063

Merged
merged 2 commits into from
Oct 30, 2024
Merged

chore: use v21 as upgrade base #3063

merged 2 commits into from
Oct 30, 2024

Conversation

gartnera
Copy link
Member

@gartnera gartnera commented Oct 29, 2024

Also remove old usages of IsRunningUpgrade() in the e2e tests.

Summary by CodeRabbit

  • New Features

    • Upgraded the zetanode component to version 21, enhancing the upgrade process for users.
  • Bug Fixes

    • Improved the TestEtherWithdraw functionality by ensuring the transaction receipt type is verified during upgrades, enhancing test reliability.

@gartnera gartnera added UPGRADE_TESTS Run make start-upgrade-tests UPGRADE_IMPORT_MAINNET_TESTS Run make start-upgrade-import-mainnet-test no-changelog Skip changelog CI check labels Oct 29, 2024
Copy link
Contributor

coderabbitai bot commented Oct 29, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request involve updates to the Makefile and modifications to the TestEtherWithdraw function in the e2etests/test_eth_withdraw.go file. The Makefile is modified to reflect an upgrade in the zetanode component version from release/v20 to release/v21, affecting both the source build argument and the binary download URL. The test file changes remove a conditional check, ensuring that the verification of the transaction receipt type is always executed during the test.

Changes

File Change Summary
Makefile Updated OLD_VERSION from release/v20 to release/v21 and from https://github.com/zeta-chain/node/releases/download/v20.0.2 to https://github.com/zeta-chain/node/releases/download/v21.0.0 in the zetanode-upgrade target.
e2e/e2etests/test_eth_withdraw.go Removed conditional check for r.IsRunningUpgrade() in TestEtherWithdraw, ensuring receipt type verification is always executed.

Possibly related PRs

Suggested labels

UPGRADE_LIGHT_TESTS

Suggested reviewers

  • fbac
  • skosito
  • lumtis
  • swift1337
  • kingpinXD
  • ws4charlie
  • brewmaster012

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@gartnera gartnera marked this pull request as ready for review October 29, 2024 22:56
@gartnera gartnera enabled auto-merge October 29, 2024 22:56
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
e2e/e2etests/test_eth_withdraw.go (1)

42-43: LGTM with minor suggestions for improvement.

The removal of the IsRunningUpgrade() conditional check simplifies the logic and ensures consistent receipt type verification. Consider these enhancements:

  1. Extract the expected receipt type to a package-level constant for better maintainability
  2. Enhance the error message to include actual vs expected values

Apply this diff to implement the suggestions:

+const (
+    // ExpectedWithdrawalReceiptType is the expected receipt type for withdrawals
+    ExpectedWithdrawalReceiptType = ethtypes.DynamicFeeTxType
+)

 withdrawalReceipt := mustFetchEthReceipt(r, cctx)
-require.Equal(r, uint8(ethtypes.DynamicFeeTxType), withdrawalReceipt.Type, "receipt type mismatch")
+require.Equal(r, uint8(ExpectedWithdrawalReceiptType), withdrawalReceipt.Type, 
+    "withdrawal receipt type mismatch: expected %d, got %d", 
+    ExpectedWithdrawalReceiptType, withdrawalReceipt.Type)
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9ef4009 and b45a338.

📒 Files selected for processing (2)
  • Makefile (2 hunks)
  • e2e/e2etests/test_eth_withdraw.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
e2e/e2etests/test_eth_withdraw.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

🔇 Additional comments (1)
Makefile (1)

304-304: Verify v21 version references exist

The changes look correct for upgrading the base version. However, let's verify that the referenced version artifacts exist.

Also applies to: 313-313

✅ Verification successful

Version references verified successfully

Both the release branch release/v21 and the release tag v21.0.0 exist in the repository, confirming that the Makefile changes are referencing valid version artifacts.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that both the release branch and binary release exist

# Test 1: Check if release/v21 branch exists
echo "Checking release/v21 branch..."
git ls-remote --heads origin release/v21

# Test 2: Check if v21.0.0 release exists
echo "Checking v21.0.0 release..."
gh release view v21.0.0 --json name,tagName,url

Length of output: 395

@gartnera gartnera added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2024
@lumtis lumtis added this pull request to the merge queue Oct 30, 2024
Merged via the queue into develop with commit 648d2e3 Oct 30, 2024
37 checks passed
@lumtis lumtis deleted the use-v21-upgrade-tests branch October 30, 2024 12:17
@coderabbitai coderabbitai bot mentioned this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Skip changelog CI check UPGRADE_IMPORT_MAINNET_TESTS Run make start-upgrade-import-mainnet-test UPGRADE_TESTS Run make start-upgrade-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants