-
Notifications
You must be signed in to change notification settings - Fork 114
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
fix(e2e): update chain params if deployer account changes #2612
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughWalkthroughRecent changes focus on enhancing the blockchain initialization and EVM setup processes. The shell script for account initialization has been simplified, removing redundant policy account entries and streamlining user account management. Additionally, the EVM setup function has been improved to dynamically fetch and update chain parameters, ensuring alignment with deployment configurations. These updates aim to enhance system robustness and adaptability while minimizing complexity in account management. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EVM Setup
participant Chain Params Service
participant ZetaTxServer
User->>EVM Setup: Initialize EVM
EVM Setup->>Chain Params Service: Fetch current chain parameters
Chain Params Service-->>EVM Setup: Return chain parameters
alt Parameters need update
EVM Setup->>ZetaTxServer: Broadcast parameter updates
ZetaTxServer-->>EVM Setup: Confirm updates
else No update needed
EVM Setup->>User: Chain parameters are current
end
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
de3a509
to
73e598c
Compare
There was a problem hiding this 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.yaml
Review profile: CHILL
Files selected for processing (2)
- contrib/localnet/scripts/start-zetacored.sh (2 hunks)
- e2e/runner/setup_evm.go (2 hunks)
Files skipped from review due to trivial changes (1)
- contrib/localnet/scripts/start-zetacored.sh
Additional context used
Path-based instructions (1)
e2e/runner/setup_evm.go (1)
Pattern
**/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
Additional comments not posted (5)
e2e/runner/setup_evm.go (5)
18-20
: Imports look good.The new imports for
chains
andconstant
are necessary for the added functionality.
172-181
: Fetch chain parameters with appropriate error handling.The logic for fetching chain parameters is well-implemented with appropriate error handling and logging.
182-196
: Logic for identifying discrepancies in chain parameters is sound.The conditions for setting the
needsUpdate
flag are comprehensive and accurately identify discrepancies in the chain parameters.
198-201
: Early return if no updates are needed.The early return when no updates are needed is a good practice to avoid unnecessary operations.
203-209
: Broadcast updated chain parameters with appropriate error handling.The logic for broadcasting the updated chain parameters is well-implemented with appropriate error handling and logging.
5f3c3e3
to
2c42f12
Compare
Description
While I was working on #2238, I missed that I needed to update the EVM contract addresses in ChainParams. The
GetDefaultGoerliLocalnetChainParams()
only work if using the current localnet.yml deployer account.It seems a zetaclient restart is required if this happens though. See #2005
Also fix double
zetacored add-genesis-account
call for policy operations accounts.How Has This Been Tested?
Summary by CodeRabbit
New Features
Bug Fixes