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

Merge dev #369

Closed
wants to merge 24 commits into from
Closed

Merge dev #369

wants to merge 24 commits into from

Conversation

mani99brar
Copy link
Contributor

@mani99brar mani99brar commented Dec 4, 2024

PR-Codex overview

This PR focuses on enhancing the VeaInbox and VeaOutbox functionalities, improving the handling of epoch periods, and introducing new methods for message execution and state management across different blockchain networks.

Detailed summary

  • Added event AffirmationCompleted to IAMB.sol.
  • Reduced epochPeriod from 7200 to 3600 in 01-arb-to-gnosis-outbox.ts.
  • Introduced new environment variables in .env.dist.
  • Added start-testnet-relayer script in package.json.
  • Updated @arbitrum/sdk dependency version.
  • Introduced new functions for handling RouterArbToGnosis and IAMB in ethers.ts.
  • Enhanced testnetRelayer.ts with new functionality for processing messages.
  • Added new RPC endpoints and addresses in .env.dist.
  • Improved watcherArbToEth.ts for better claim and challenge handling.
  • Refactored integration tests for improved clarity and functionality.
  • Added getters for bridge configurations in bridgeRoutes.ts.
  • Introduced ShutdownManager and improved state file management in relayerHelpers.ts.

The following files were skipped due to too many changes: validator-cli/src/ArbToEth/watcherArbToEth.ts, validator-cli/src/ArbToEth/watcherArbToGnosis.ts, contracts/deployments/arbitrumSepolia/VeaInboxArbToEthTestnet.json, contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisTestnet.json, contracts/deployments/sepolia/RouterArbToGnosisTestnet.json, contracts/deployments/sepolia/VeaOutboxArbToEthTestnet.json, contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced deployment parameters for Gnosis Chiado network.
    • New smart contracts for messaging between Arbitrum and Gnosis.
    • Introduced a ShutdownManager for improved process control.
    • Added functions for executing and checking the status of messages in Arbitrum.
  • Improvements

    • Streamlined integration tests for better clarity and efficiency.
    • Updated environment variables for enhanced configuration options.
    • Refined error handling and logging in claim monitoring processes.
  • Bug Fixes

    • Corrected error messages in claim handling logic.

Copy link
Contributor

coderabbitai bot commented Dec 4, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces several modifications across various files related to the deployment and functionality of smart contracts within the Arbitrum and Gnosis networks. Key changes include updates to parameters in deployment configurations, enhancements in the deployment functions, the addition of new contracts and their respective JSON deployment files, and improvements to integration tests and utility functions. Additionally, new environment variables and scripts have been added to facilitate better configuration and execution of the relayer CLI. The overall structure and logic of the existing systems remain intact, with a focus on improving functionality and maintainability.

Changes

File Change Summary
contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts Updated paramsByChainId for GNOSIS_CHIADO: changed epochPeriod from 7200 to 3600, numEpochTimeout remains 1000000, and maxMissingBlocks updated from 1000000 to 10000000000000.
contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts Added providers import; introduced routerNetworks object. Modified liveDeployer to create a JsonRpcProvider using routerNetworks based on chain ID.
contracts/deployments/arbitrumSepolia/VeaInboxArbToEthTestnet.json New file containing deployment details for VeaInboxArbToEth, including address, ABI, and events.
contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisTestnet.json New file for VeaInboxArbToGnosis contract deployment details, including functions and events.
contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json Deleted file for VeaInboxGnosisToArb contract deployment details.
contracts/deployments/sepolia/RouterArbToGnosisTestnet.json New file for RouterArbToGnosis contract deployment details, including functions and events.
contracts/src/canonical/gnosis-chain/IAMB.sol Added new event AffirmationCompleted with parameters for tracking message status.
contracts/test/integration/ArbToEth.ts Updated EPOCH_PERIOD and CHALLENGE_PERIOD constants from 1800 to 600. Modified claim handling logic and added new test cases.
relayer-cli/.env.dist Added new environment variables for Devnet configuration, including DEVNET_SENDER and VEAOUTBOX_CHAIN_ID.
relayer-cli/package.json Added new script start-testnet-relayer and updated dependencies.
relayer-cli/src/consts/bridgeRoutes.ts Updated IBridge interface and added new properties; introduced getEpochPeriod and updated exports.
relayer-cli/src/devnetRelayExample.ts Restructured code for transaction relaying, added start function for improved organization.
relayer-cli/src/testnetRelayer.ts New file for managing message relaying on testnet.
relayer-cli/src/utils/ethers.ts Refactored functions to include chainId parameter for connecting to multiple chains.
relayer-cli/src/utils/relay.ts Enhanced message relaying functions to support multiple outbox contracts and improved efficiency.
relayer-cli/src/utils/relayerHelpers.ts Introduced ShutdownManager class and several utility functions for state management.
validator-cli/.env.dist Added new RPC endpoints and addresses for various networks.
validator-cli/package.json Updated scripts for running various development environments and adjusted dependency versions.
validator-cli/src/ArbToEth/watcherArbToEth.ts Renamed functions and added new logic for claims and challenges.
validator-cli/src/ArbToEth/watcherArbToGnosis.ts Enhanced functionality for claims and challenges, introduced new utility functions.
validator-cli/src/utils/arbMsgExecutor.ts New file with functions for executing and retrieving status of child-to-parent messages.

Possibly related PRs

  • Feat/arb sep chaido deploy #359: The changes in this PR include modifications to the epochPeriod for the GNOSIS_CHIADO configuration, which aligns with the updates made in the main PR regarding the epochPeriod value in the paramsByChainId configuration object.

Suggested reviewers

  • alcercu
  • jaybuidl
  • madhurMongia

🐰 In the fields so green and bright,
The contracts dance in morning light.
With epochs short and claims refined,
Our bridges strong, our paths aligned.
So hop along, let’s code away,
For every change brings a new day! 🌼

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@typescript-eslint/parser' declared in 'contracts/.eslintrc.js': Cannot find module '@typescript-eslint/parser'
Require stack:

  • /contracts/.eslintrc.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 84b65d6 and 3eebb3f.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (23)
  • contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts (1 hunks)
  • contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts (3 hunks)
  • contracts/deployments/arbitrumSepolia/VeaInboxArbToEthTestnet.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/VeaInboxArbToGnosisTestnet.json (1 hunks)
  • contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json (0 hunks)
  • contracts/deployments/sepolia/RouterArbToGnosisTestnet.json (1 hunks)
  • contracts/src/canonical/gnosis-chain/IAMB.sol (1 hunks)
  • contracts/test/integration/ArbToEth.ts (8 hunks)
  • relayer-cli/.env.dist (1 hunks)
  • relayer-cli/package.json (2 hunks)
  • relayer-cli/src/consts/bridgeRoutes.ts (1 hunks)
  • relayer-cli/src/devnetRelayExample.ts (1 hunks)
  • relayer-cli/src/state/11155111.json (0 hunks)
  • relayer-cli/src/testnetRelayer.ts (1 hunks)
  • relayer-cli/src/utils/ethers.ts (3 hunks)
  • relayer-cli/src/utils/relay.ts (3 hunks)
  • relayer-cli/src/utils/relayerHelpers.ts (1 hunks)
  • validator-cli/.env.dist (1 hunks)
  • validator-cli/package.json (2 hunks)
  • validator-cli/src/ArbToEth/watcherArbToEth.ts (13 hunks)
  • validator-cli/src/ArbToEth/watcherArbToGnosis.ts (14 hunks)
  • validator-cli/src/utils/arbMsgExecutor.ts (1 hunks)
  • validator-cli/src/utils/ethers.ts (3 hunks)

🪧 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 or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for veascan ready!

Name Link
🔨 Latest commit 3eebb3f
🔍 Latest deploy log https://app.netlify.com/sites/veascan/deploys/674fda6253d6d00008af1f16
😎 Deploy Preview https://deploy-preview-369--veascan.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mani99brar mani99brar closed this Dec 4, 2024
Copy link

sonarqubecloud bot commented Dec 4, 2024

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.

4 participants