-
Notifications
You must be signed in to change notification settings - Fork 237
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
Problem: require gas for ica packet callback is not adjusted with ctx params #1251
Conversation
WalkthroughThe changes involve updates to a blockchain application, focusing on interchain communication and Ethereum Virtual Machine (EVM) precompiles. Adjustments to gas requirements, context parameters, and configuration settings suggest enhancements to efficiency and functionality. New functionalities for account registration and transaction handling in tests indicate an expansion of testing capabilities. Additionally, there's a shift in the logic for address handling and validation, as well as a restructuring of interface methods, reflecting a refinement in the application's internal operations. Changes
Poem
TipsChat with CodeRabbit Bot (
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1251 +/- ##
==========================================
- Coverage 35.82% 35.79% -0.04%
==========================================
Files 116 116
Lines 10638 10651 +13
==========================================
+ Hits 3811 3812 +1
- Misses 6452 6464 +12
Partials 375 375
|
Signed-off-by: mmsqe <mavis@crypto.com>
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.
Review Status
Actionable comments generated: 6
Configuration used: CodeRabbit UI
Files ignored due to filter (3)
- go.mod
- go.sum
- gomod2nix.toml
Files selected for processing (11)
- CHANGELOG.md (1 hunks)
- app/app.go (1 hunks)
- integration_tests/configs/ibc.jsonnet (1 hunks)
- integration_tests/cosmoscli.py (1 hunks)
- integration_tests/ibc_utils.py (1 hunks)
- integration_tests/test_ica.py (3 hunks)
- integration_tests/test_ica_ctrl.py (1 hunks)
- integration_tests/utils.py (1 hunks)
- x/cronos/keeper/keeper.go (1 hunks)
- x/cronos/keeper/precompiles/ica.go (4 hunks)
- x/cronos/types/interfaces.go (2 hunks)
Files skipped from review due to trivial changes (1)
- integration_tests/configs/ibc.jsonnet
Additional comments: 14
CHANGELOG.md (1)
- 16-20: The changelog entry for PR #1251 correctly documents the adjustment of required gas for
submitMsgs
in the ICA precompile as a state machine breaking change.app/app.go (1)
- 537-546: The addition of
sdk.Context
to the function signatures withinevmkeeper.CustomContractFn
slice is a significant change. Ensure that all calls to these functions have been updated to pass the context as required.integration_tests/ibc_utils.py (1)
- 638-639: The function correctly returns the ICA address and channel ID, which aligns with the PR objectives.
integration_tests/test_ica.py (2)
31-37:
The refactoring of theregister_acc
function to acceptcli_controller
andconnid
as arguments is correctly implemented and used withintest_ica
.74-80:
The logic for checking the balance after transactions, waiting for the channel to be ready, and reopening the ICA account is correctly implemented.integration_tests/test_ica_ctrl.py (1)
- 78-78: The assertion for the error message is very specific. Ensure that this message is consistent and won't change with different versions or configurations, as it could make the test brittle.
integration_tests/utils.py (1)
- 92-99: The
wait_for_fn
function is well-implemented and follows best practices. It provides a generic way to wait for a condition to be met by a function, with a timeout mechanism to prevent indefinite waiting.x/cronos/keeper/keeper.go (1)
- 294-302: The address conversion and validation logic is correctly implemented.
x/cronos/keeper/precompiles/ica.go (4)
34-38: The addition of the
icaMethodNamesByID
global variable is consistent with the PR objectives and summary.59-62: The update to the
init
function to populateicaMethodNamesByID
with method names is correct and aligns with the PR objectives.80-86: The change in the
NewIcaContract
function signature to includesdk.Context
is consistent with the PR objectives and summary.99-107: The conditional check in the
RequiredGas
method to adjust the required gas based on the method name is correct and aligns with the PR objectives.x/cronos/types/interfaces.go (2)
15-20: The summary indicates that the
ethtypes
import was removed, but it is still present in the provided hunk. This discrepancy should be clarified or corrected.91-95: The change to the
CronosKeeper
interface, replacingCallEVM
withGetParams
, is significant and may affect any code that relies on the old method signature. Ensure that all implementations and usages ofCronosKeeper
have been updated accordingly.
abc3297
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Documentation
Refactor
Tests
Please note that these changes are part of an ongoing effort to improve the application's performance and user experience. Users are encouraged to explore the new features and provide feedback.