-
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: no plan for testnet to update default max_callback_gas param #1252
Conversation
WalkthroughThe changes involve a new testnet plan Changes
TipsChat with CodeRabbit Bot (
|
Signed-off-by: mmsqe <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1252 +/- ##
==========================================
- Coverage 35.79% 35.75% -0.04%
==========================================
Files 116 116
Lines 10651 10663 +12
==========================================
+ Hits 3812 3813 +1
- Misses 6464 6474 +10
- Partials 375 376 +1
|
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (5)
- CHANGELOG.md (1 hunks)
- app/upgrades.go (1 hunks)
- integration_tests/test_ica.py (4 hunks)
- integration_tests/test_upgrade.py (1 hunks)
- x/cronos/types/params.go (1 hunks)
Additional comments: 9
CHANGELOG.md (1)
- 20-20: The addition of the new plan
v1.1.0-testnet
to update the defaultmax_callback_gas
parameter is correctly documented in the CHANGELOG.md and aligns with the PR objectives and the AI-generated summaries.app/upgrades.go (3)
121-133: The addition of the
v1.1.0-testnet
upgrade handler correctly implements the new plan to update themax_callback_gas
parameter as per the PR objective.135-137: The code for reading upgrade information from disk and handling errors is correctly implemented and will panic if it fails to read the information, which is a standard approach for critical startup operations.
117-118: The change to enlarge the block gas limit is not mentioned in the PR objective or the AI-generated summaries. Ensure this change is intentional and documented appropriately.
integration_tests/test_ica.py (3)
36-81: The addition of
deploy_contract
andcheck_for_ack
functions, and modifications tosend_tx
are consistent with the summary provided. These changes introduce new functionality and modify existing behavior to accommodate the updatedmax_callback_gas
parameter.98-104: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [100-125]
The
submit_msgs
function has been modified to include atimeout_in_s
parameter and atimeout
variable to handle timeouts, which is not mentioned in the summary. This change is significant as it introduces new behavior for handling transaction timeouts.
- 123-128: The logic for reopening the ICA account after the channel gets closed is present in the code but not mentioned in the summary. This is an important aspect of the test that ensures the ICA account can be re-established after a channel closure.
integration_tests/test_upgrade.py (1)
- 180-182: The assertion for
max_callback_gas
has been correctly updated to "50000" to reflect the new expected value as per the PR objectives and summary. However, there is an additional assertion formin_timeout_duration
being "3600s" which is not mentioned in the summary. Please ensure that this change is intentional and documented if necessary.x/cronos/types/params.go (1)
- 28-28: The change in
MaxCallbackGasDefaultValue
from300000
to50000
aligns with the PR objectives to update themax_callback_gas
parameter on the testnet.
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (5)
- app/upgrades.go (2 hunks)
- integration_tests/configs/cosmovisor.jsonnet (1 hunks)
- integration_tests/configs/upgrade-test-package.nix (1 hunks)
- integration_tests/cosmoscli.py (7 hunks)
- integration_tests/test_upgrade.py (4 hunks)
Files skipped from review as they are similar to previous changes (2)
- app/upgrades.go
- integration_tests/test_upgrade.py
Additional comments: 8
integration_tests/configs/cosmovisor.jsonnet (1)
- 12-23: The summary states that the
params
field was removed frombank
, but the hunk shows thatsend_enabled
has been added or modified withinbank
. This is an inconsistency that should be clarified.integration_tests/configs/upgrade-test-package.nix (1)
- 10-16: The updates to the Nix expression file correctly reflect the new version and commit hash for the
v1.1.0-testnet
upgrade plan as described in the PR objectives and AI-generated summaries.integration_tests/cosmoscli.py (6)
- 715-728: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [670-741]
The refactoring of the
gov_propose_legacy
method to include error handling based on the response code is a good practice, as it allows for more granular control over the function's output and error management.
- 715-728: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [670-741]
The refactoring of the
gov_propose_legacy
method to include error handling based on the response code is a good practice, as it allows for more granular control over the function's output and error management.
- 736-748: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [743-760]
The
gov_vote
method has been updated to include error handling similar to thegov_propose_legacy
method. This consistency in error handling across methods is beneficial for maintainability and reliability of the code.
- 736-748: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [743-760]
The
gov_vote
method has been updated to include error handling similar to thegov_propose_legacy
method. This consistency in error handling across methods is beneficial for maintainability and reliability of the code.
- 1147-1153: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1148-1164]
The
submit_gov_proposal
method has been updated to include error handling based on the response code. This change aligns with the updates made to thegov_propose_legacy
andgov_vote
methods, ensuring a consistent approach to error handling across the class.
- 1147-1153: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1148-1164]
The
submit_gov_proposal
method has been updated to include error handling based on the response code. This change aligns with the updates made to thegov_propose_legacy
andgov_vote
methods, ensuring a consistent approach to error handling across the class.
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: 1
Configuration used: CodeRabbit UI
Files selected for processing (10)
- app/upgrades.go (1 hunks)
- integration_tests/configs/cosmovisor.jsonnet (1 hunks)
- integration_tests/configs/cosmovisor_testnet.jsonnet (1 hunks)
- integration_tests/configs/default.jsonnet (1 hunks)
- integration_tests/configs/upgrade-test-package.nix (1 hunks)
- integration_tests/configs/upgrade-testnet-test-package.nix (1 hunks)
- integration_tests/cosmoscli.py (7 hunks)
- integration_tests/test_upgrade.py (1 hunks)
- integration_tests/test_upgrade_testnet.py (1 hunks)
- integration_tests/utils.py (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- app/upgrades.go
- integration_tests/configs/cosmovisor.jsonnet
- integration_tests/configs/upgrade-test-package.nix
- integration_tests/test_upgrade.py
Additional comments: 11
integration_tests/configs/cosmovisor_testnet.jsonnet (1)
- 1-33: The changes to the
cosmovisor_testnet.jsonnet
file reflect updates to thebank
andfeemarket
sections within theapp_state
of thegenesis
configuration, as mentioned in the summary. However, the summary also mentions the removal of thegov
section withinapp_state
, adjustments to the maximum gas limit for block validation, and updates to package paths and version references, which are not visible in the provided hunk. Please verify if these changes are part of other hunks or files.integration_tests/configs/default.jsonnet (2)
64-69: The change in the
max_gas
parameter from81,500,000
to60,000,000
is correctly implemented in the hunk. This adjustment will affect the block validation process and should be communicated to the network participants.64-70: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-70]
No further issues or changes are detected in the provided hunk and surrounding context.
integration_tests/cosmoscli.py (4)
- 716-729: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [670-742]
The refactoring of the
gov_propose_legacy
method to handle different proposal types and conditionally process the response is a significant improvement in error handling and control flow. This change should make the method more robust and easier to maintain.
- 737-749: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [744-761]
The update to the
gov_vote
method to check the response code before querying the transaction event is a good practice for robust error handling.
- 1148-1154: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1149-1165]
The addition of default keyword arguments for gas prices and gas adjustment in the
submit_gov_proposal
method is a good practice for providing sensible defaults.
- 1160-1168: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1167-1174]
The update to the
update_token_mapping
method to check the response code before querying the transaction event is a good practice for robust error handling.integration_tests/test_upgrade_testnet.py (3)
77-197: The
test_cosmovisor_upgrade
function appears to be well-structured and follows the described upgrade testing process. It includes proposing an upgrade, stopping and starting services, waiting for blocks, deploying contracts, and checking various parameters post-upgrade. Ensure that the upgrade process is thoroughly tested and that all assertions accurately reflect the expected state of the system after the upgrade.25-53: The
init_cosmovisor
andpost_init
functions are utility functions that set up the cosmovisor directory structure and prepare cosmovisor for each node, respectively. They seem to be correctly implemented and serve their purpose without any apparent issues.56-74: The
custom_cronos
fixture is responsible for setting up a custom Cronos test environment, which includes building the upgrade package and initializing with the genesis binary. It seems to be correctly implemented and serves its purpose without any apparent issues.integration_tests/utils.py (1)
- 145-151: The addition of the
event_query_tx
parameter to thegov_vote
method call within theapprove_proposal
function is a significant change that alters the control flow. Ensure that all calls togov_vote
are updated accordingly if this is a required change across the codebase.
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (10)
- app/upgrades.go (1 hunks)
- integration_tests/configs/cosmovisor.jsonnet (1 hunks)
- integration_tests/configs/cosmovisor_testnet.jsonnet (1 hunks)
- integration_tests/configs/default.jsonnet (1 hunks)
- integration_tests/configs/upgrade-testnet-test-package.nix (1 hunks)
- integration_tests/cosmoscli.py (7 hunks)
- integration_tests/test_upgrade.py (3 hunks)
- integration_tests/test_upgrade_testnet.py (1 hunks)
- integration_tests/upgrade_utils.py (1 hunks)
- integration_tests/utils.py (1 hunks)
Files skipped from review due to trivial changes (1)
- integration_tests/configs/default.jsonnet
Files skipped from review as they are similar to previous changes (8)
- app/upgrades.go
- integration_tests/configs/cosmovisor.jsonnet
- integration_tests/configs/cosmovisor_testnet.jsonnet
- integration_tests/configs/upgrade-testnet-test-package.nix
- integration_tests/cosmoscli.py
- integration_tests/test_upgrade.py
- integration_tests/test_upgrade_testnet.py
- integration_tests/utils.py
Additional comments: 2
integration_tests/upgrade_utils.py (2)
8-15: The
init_cosmovisor
function correctly sets up the cosmovisor directory structure.18-35: Verify that the hardcoded
chain_id
is consistent with the rest of the codebase and that theconfig.json
file structure matches the expected format.
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- integration_tests/test_upgrade.py (2 hunks)
- integration_tests/test_upgrade_testnet.py (1 hunks)
- integration_tests/upgrade_utils.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- integration_tests/test_upgrade.py
Additional comments: 7
integration_tests/test_upgrade_testnet.py (2)
10-28: The fixture
custom_cronos
is correctly set up to build the test environment using Nix and to initialize the testnet with a genesis binary. Ensure that the paths and configurations specified are consistent with the new testnet setup.31-32: The
test_cosmovisor_upgrade
function appears to be correctly structured to test the upgrade process. Ensure that theexec
function is properly implemented to handle the upgrade logic as intended.integration_tests/upgrade_utils.py (5)
1-189: The summary mentions changes to
MaxCallbackGasDefaultValue
and the addition of anenlargeBlockGasLimit
function, but these changes are not visible in the provided hunks. Please ensure that all relevant changes are included in the review to verify their correctness and impact.23-30: The
init_cosmovisor
function correctly sets up the cosmovisor directory structure as described in the summary.1-189: The summary indicates updates to configuration files, but these changes are not visible in the provided hunks. Please ensure that all relevant changes are included in the review to verify their correctness and impact.
1-189: The summary describes significant changes to the
gov_propose_legacy
method in theintegration_tests/cosmoscli.py
file, but this file is not included in the provided hunks. Please ensure that all relevant changes are included in the review to verify their correctness and impact.54-189: The
exec
function has been modified to handle the upgrade process, including proposing an upgrade, waiting for it to happen, and verifying the upgrade's success. Ensure that the logic within this function is robust and correctly implements the upgrade process as intended by the PR objectives.
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (5)
- integration_tests/cosmoscli.py (8 hunks)
- integration_tests/test_broadcast.py (1 hunks)
- integration_tests/test_gov_update_params.py (1 hunks)
- integration_tests/test_upgrade.py (7 hunks)
- integration_tests/utils.py (3 hunks)
Files skipped from review due to trivial changes (1)
- integration_tests/test_broadcast.py
Files skipped from review as they are similar to previous changes (2)
- integration_tests/test_gov_update_params.py
- integration_tests/test_upgrade.py
Additional comments: 8
integration_tests/cosmoscli.py (5)
- 716-729: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [670-742]
The changes to the
gov_propose_legacy
method introduce new branches for handling different proposal types. Ensure that the logic for each branch correctly processes the proposal based on its kind and that thersp
variable is correctly used to capture the response from theself.raw
calls.
- 737-749: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [744-761]
The
gov_vote
method now includes additional logic to check the response code and query the transaction event if the response code is 0. Verify that this new logic is intended and correctly implemented.
- 1124-1130: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1124-1150]
The
gov_propose_update_client_legacy
method has been updated to include default gas prices and amounts. Verify that these defaults are appropriate for the expected transactions and that the logic for handling the response is correct.
- 1145-1157: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1152-1168]
The
submit_gov_proposal
method has been updated to include default gas prices and amounts. Verify that these defaults are appropriate for the expected transactions and that the logic for handling the response is correct.
- 1170-1171: The
update_token_mapping
method has been updated to include default gas prices and amounts. Verify that these defaults are appropriate for the expected transactions and that the logic for handling the response is correct.integration_tests/utils.py (3)
136-136: The summary states that the
approve_proposal
function'sevent_query_tx
parameter default value was changed fromTrue
toFalse
, but the provided hunk shows that the parameter's default value was alreadyFalse
. This indicates a discrepancy between the summary and the actual code.652-652: The summary indicates that the
submit_any_proposal
function had theevent_query_tx
parameter removed from its signature, but the provided hunk does not show the function signature or its call toapprove_proposal
, so we cannot verify this change. We would need to see the previous version of the function to confirm this change.649-649: The function
module_address
is shown in the hunk, but there is no context provided in the summary about any changes to this function. Without additional context or a previous version of the code, it's unclear if any changes were made here.
f97e655
👮🏻👮🏻👮🏻 !!!! 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
v1.1.0-testnet
to enhance system performance.Bug Fixes
max_callback_gas
parameter to optimize resource usage.Documentation
Refactor
Tests
max_callback_gas
parameter value.