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

Raunak/uch upgrade testing #96

Merged
merged 1 commit into from
May 7, 2024
Merged

Raunak/uch upgrade testing #96

merged 1 commit into from
May 7, 2024

Conversation

RnkSngh
Copy link
Collaborator

@RnkSngh RnkSngh commented Apr 25, 2024

PR to test upgrades to our uch proxy

The main state we need to worry about in UCH is the mwStackAddrs array so this testing orients around that, and tests both a direct Earth-> UCH connection and also one with an extra middleware layer(i.e. Earth -> GeneralMiddleware -> UCH) .

Summary by CodeRabbit

  • New Features
    • Enhanced upgrade capabilities for Universal Channel Handler, supporting transitions up to version 3.
  • Tests
    • Expanded testing suite with new imports and functions to support comprehensive testing of upgrade processes.

Copy link

coderabbitai bot commented Apr 25, 2024

Warning

Rate Limit Exceeded

@RnkSngh has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 13 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between fca85a4 and 5c5beac.

Walkthrough

The recent updates focus on enhancing and expanding the capabilities of the Dispatcher and upgradeable proxy systems. New imports and functionalities have been introduced, including the addition of version upgrades for UniversalChannelHandler and the integration of new components such as Earth and GeneralMiddleware. These changes are geared towards improving modularity and upgrade flexibility within the system.

Changes

File Path Summary of Changes
test/Dispatcher/Dispatcher.t.sol Added import for {Base}.
test/upgradeableProxy/Dispatcher.upgrade.t.sol Added imports and functionalities for upgrading UniversalChannelHandler to newer versions.
test/upgradeableProxy/DispatcherRC4.upgrade.t.sol Added multiple new imports including Earth, UniversalPacket, and GeneralMiddleware. Also included integration with VirtualChain.

🐰✨🎉
In code we trust, with each commit we thrust,
Upgrades and imports, in Dispatcher's crust.
A hop, skip, and a jump, new versions we bust,
Through lines of code, our goals we adjust.
Celebrate the changes, in CodeRabbit we trust!
🌟🐇💻


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@RnkSngh RnkSngh force-pushed the raunak/upgrade-testing branch 2 times, most recently from dee7968 to 7e2d744 Compare April 25, 2024 15:42
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from fe30152 to 2206290 Compare April 25, 2024 15:47
@RnkSngh RnkSngh linked an issue Apr 25, 2024 that may be closed by this pull request
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from 2206290 to 34527ea Compare May 3, 2024 18:26
@RnkSngh RnkSngh force-pushed the raunak/upgrade-testing branch 2 times, most recently from 91d32e4 to 6847751 Compare May 6, 2024 15:32
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from 34527ea to 3ce2273 Compare May 6, 2024 15:40
@RnkSngh RnkSngh force-pushed the raunak/upgrade-testing branch 2 times, most recently from 3f57d4b to b774356 Compare May 6, 2024 18:19
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from 3ce2273 to f5bda64 Compare May 6, 2024 18:19
@RnkSngh RnkSngh force-pushed the raunak/upgrade-testing branch from b774356 to 3161ac7 Compare May 6, 2024 18:21
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from f5bda64 to 8f381e7 Compare May 6, 2024 18:22
Copy link
Collaborator

@dshiell dshiell left a comment

Choose a reason for hiding this comment

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

Lgtm

@RnkSngh RnkSngh force-pushed the raunak/upgrade-testing branch 3 times, most recently from 70df3c0 to 1a4ecea Compare May 7, 2024 16:32
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from 8f381e7 to 952b487 Compare May 7, 2024 16:43
Base automatically changed from raunak/upgrade-testing to main May 7, 2024 17:06
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from 952b487 to b895ff7 Compare May 7, 2024 17:07
@RnkSngh RnkSngh force-pushed the raunak/UCHUpgradeTesting branch from b895ff7 to 5c5beac Compare May 7, 2024 17:08
Copy link

@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

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between fca85a4 and b895ff7.
Files selected for processing (3)
  • test/Dispatcher/Dispatcher.t.sol (1 hunks)
  • test/upgradeableProxy/Dispatcher.upgrade.t.sol (3 hunks)
  • test/upgradeableProxy/DispatcherRC4.upgrade.t.sol (11 hunks)
Additional comments not posted (13)
test/upgradeableProxy/Dispatcher.upgrade.t.sol (4)

30-31: New imports for UniversalChannelHandler and IUniversalChannelHandler have been added.

Ensure that these new dependencies are properly managed and documented, especially since they are critical for the upgrade testing of the UCH.


33-33: Introduction of UniversalChannelHandlerV2 suggests testing against a new version of UCH.

Verify that UniversalChannelHandlerV2 is fully compatible with existing systems and that all necessary migration steps are documented.


54-57: The upgradeUch function has been added to handle the upgrade of the UCH from version 2 to version 3.

Ensure comprehensive testing of this function to prevent any issues during the upgrade process.


69-73: Deployment of UniversalChannelHandlerV2 via a proxy.

Confirm that the initialization data and proxy setup are correctly configured to ensure that the new UCH version functions as expected.

test/upgradeableProxy/DispatcherRC4.upgrade.t.sol (8)

8-8: Import of Earth from ../../contracts/examples/Earth.sol.

Ensure that the Earth contract is correctly integrated and used within the tests.


21-22: Introduction of UniversalPacket from the Ibc library.

Check that UniversalPacket is being used appropriately in the context of the tests and that its interactions are well-documented.


35-37: New imports for IUniversalChannelHandler, VirtualChain, and GeneralMiddleware.

These additions suggest a broader and more complex test setup. Confirm that these components are integrated correctly and that their interactions are tested.


44-46: Setup of test environment with IUniversalChannelHandler, Earth, and local ends.

Ensure that the setup is robust and covers all necessary scenarios for upgrade testing.


58-59: Deployment of UniversalChannelHandlerV2 and instantiation of Earth in the context of Dispatcher RC4 upgrade testing.

Verify the correct deployment and initialization of these components, especially in the upgrade context.


68-68: Setup of local ends for UCH in the test environment.

Confirm that the local end configurations are correct and that they properly simulate the intended test scenarios.


79-82: Execution of channel handshake via UCH and interaction with Earth.

Ensure that the handshake and interactions are correctly implemented and that they accurately reflect the upgrade scenario being tested.


85-85: Upgrading of dispatcherProxy and UCH for tests.

Confirm that the upgrade process is correctly implemented and thoroughly tested to prevent any issues.

test/Dispatcher/Dispatcher.t.sol (1)

10-10: Introduction of Base from ../utils/Dispatcher.base.t.sol.

Check that Base is correctly utilized within the test suites and that it provides the necessary functionalities for the tests.

@RnkSngh RnkSngh merged commit 683fc26 into main May 7, 2024
2 checks passed
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.

Add upgrade testing for UCH proxy
2 participants