-
Notifications
You must be signed in to change notification settings - Fork 127
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
update simulation #2983
base: master
Are you sure you want to change the base?
update simulation #2983
Conversation
WalkthroughThe pull request introduces modifications across several files in the IrisHub project. In Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 4
🧹 Nitpick comments (1)
go.mod (1)
281-285
: Consider removing commented-out module replacements.The commented-out
replace
directives may no longer be needed. Removing unused code improves maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (5)
app/ante/decorators.go
(1 hunks)app/export.go
(5 hunks)app/sim_test.go
(2 hunks)go.mod
(2 hunks)sims.mk
(0 hunks)
💤 Files with no reviewable changes (1)
- sims.mk
🧰 Additional context used
🪛 golangci-lint (1.62.2)
app/export.go
179-179: Error return value of app.StakingKeeper.IterateRedelegations
is not checked
(errcheck)
191-191: Error return value of app.StakingKeeper.IterateUnbondingDelegations
is not checked
(errcheck)
220-220: Error return value of app.StakingKeeper.SetValidator
is not checked
(errcheck)
🔇 Additional comments (4)
app/ante/decorators.go (1)
79-79
:
Verify removal of validation logic in ValidateServiceDecorator
.
Removing the validation logic in ValidateServiceDecorator.AnteHandle
means MsgCallService
messages are no longer validated. This could introduce security risks if repeatable service invocations are not intended.
Run the following script to assess the impact of this change:
go.mod (1)
14-23
: Verify compatibility and security of updated modules.
Ensure that the updated module versions are compatible with the codebase and do not introduce new vulnerabilities.
Run the following script to check for known vulnerabilities in the updated modules:
app/sim_test.go (2)
199-199
: Ensure newApp
uses newDB
for accurate testing.
Using newDB
instead of db
when creating newApp
ensures that tests are performed on a fresh database, preventing state leakage between tests.
372-377
: Add error handling and specify ChainId
in InitChain
.
Including ChainId
and checking the error returned by newApp.InitChain
ensures proper initialization and catches potential issues early.
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/export.go
(5 hunks)go.mod
(1 hunks)
🧰 Additional context used
🪛 golangci-lint (1.62.2)
app/export.go
197-197: Error return value of app.StakingKeeper.IterateUnbondingDelegations
is not checked
(errcheck)
🔇 Additional comments (5)
app/export.go (4)
86-96
: LGTM: Improved address handling and error management
The changes properly implement the new address codec pattern and add comprehensive error handling for both address conversion and iteration operations.
126-155
: LGTM: Well-structured error handling
The changes implement proper error handling for all operations and consistently use the new address codec pattern.
182-194
: LGTM: Proper error handling added
Error handling has been appropriately added for both redelegation operations and iteration.
197-206
:
Add missing error handling for IterateUnbondingDelegations
While error handling was added for SetUnbondingDelegation
, the error return value from IterateUnbondingDelegations
is not being checked.
Apply this diff to handle the error:
-app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) {
+err = app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) {
for i := range ubd.Entries {
ubd.Entries[i].CreationHeight = 0
}
err = app.StakingKeeper.SetUnbondingDelegation(ctx, ubd)
if err != nil {
panic(err)
}
return false
})
+if err != nil {
+ panic(err)
+}
Likely invalid or redundant comment.
🧰 Tools
🪛 golangci-lint (1.62.2)
197-197: Error return value of app.StakingKeeper.IterateUnbondingDelegations
is not checked
(errcheck)
go.mod (1)
14-23
: LGTM: Consistent version updates
All irisnet modules have been updated to the same version (20241217080151-0ad41be03ac6), maintaining consistency across the codebase.
Closed: #2978 #2979 #2980 #2981
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores