fix(evm): correct chain ID extraction and configuration for compatibility tests #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request focuses on improving the handling and extraction of EVM chain IDs throughout the codebase and scripts, particularly to ensure compatibility between the Cosmos chain ID and EVM tooling (like viem). It also introduces a new upgrade proposal for EpixChain v0.5.1. The changes aim to make the chain ID handling more robust and less error-prone, especially in local development and testing environments.
Chain ID Extraction and EVM Compatibility Improvements:
evmd/cmd/evmd/cmd/root.goto prioritize extracting the EVM chain ID from the command flag or context, ensuring that the correct EVM chain ID is set even if the Cosmos chain ID format varies.scripts/local_node.shto delay setting the client chain ID until afterepixd init, preventing the default EVM chain ID from overwriting the intended value, and added explicit extraction of the EVM chain ID from the Cosmos chain ID with robust fallback logic. The extracted EVM chain ID is now passed directly to the node startup command. [1] [2] [3]scripts/tests_compatibility_viem.shto source the.envfile early, convert the numericCHAIN_IDto the correct Cosmos chain ID format for node startup, and restore the numeric value for viem tests, ensuring seamless compatibility between the node and EVM tooling. [1] [2].envand test files intests/evm-tools-compatibility/viemto clarify and enforce the correct EVM chain ID usage, and improved parsing in the test script to ensure the chain ID is always numeric. [1] [2]Governance and Upgrade:
proposals/v0.5.1-upgrade-proposal.jsonfor EpixChain v0.5.1, detailing the expedited upgrade, key changes, and instructions for binary verification.