-
Notifications
You must be signed in to change notification settings - Fork 61
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
Base signalling intent off the most recent claims #1345
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes focus on ensuring that the Changes
Assessment against linked issues
Poem
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 Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1345 +/- ##
=======================================
Coverage 63.48% 63.48%
=======================================
Files 171 171
Lines 11536 11536
=======================================
Hits 7324 7324
Misses 3469 3469
Partials 743 743
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 (2)
- x/interchainstaking/keeper/intent.go (1 hunks)
- x/interchainstaking/types/expected_keepers.go (1 hunks)
Additional comments: 2
x/interchainstaking/types/expected_keepers.go (1)
- 50-50: The addition of
IterateUserClaims
to theClaimsManagerKeeper
interface aligns with the PR objectives to ensure the most recent claims are used in the signaling process. This change is crucial for addressing the issue of outdated data affecting the signaling intent process.x/interchainstaking/keeper/intent.go (1)
- 105-105: The change from
IterateLastEpochUserClaims
toIterateUserClaims
in theAggregateDelegatorIntents
function is a direct response to the issue described in the PR objectives. It ensures that the most recent claims are used in the signaling process, addressing the problem of outdated data.Please verify the impact of this change on performance and correctness, especially in scenarios with a large number of claims.
This pull request has been deployed to Vercel.
|
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.
makes perfect sense
* fix(intent-test): fix the claim to match the supply * refactor: enable some tests and convert them to keeper tests * fix int64 to sdkmath.Int * rename alias to sdkmath to avoid confusion * fix claim to match supply * remove balance * add unclaimedRatio * add multi claim, less than 100% supply * add tests, write comment for reasoning expected output * fix tests failing due to #1345 * fix test --------- Co-authored-by: Jacob Gadikian <[email protected]> Co-authored-by: Joe Bowman <[email protected]>
* fix undefined window error (#1396) * chore(deps): bump github.com/cosmos/ibc-go/v5 from 5.3.2 to 5.4.0 (#1398) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.3.2 to 5.4.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v5.4.0/CHANGELOG.md) - [Commits](cosmos/ibc-go@v5.3.2...v5.4.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/tools from 0.19.0 to 0.20.0 (#1392) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.19.0 to 0.20.0. - [Release notes](https://github.com/golang/tools/releases) - [Commits](golang/tools@v0.19.0...v0.20.0) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump google.golang.org/grpc from 1.62.1 to 1.63.0 (#1383) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.1 to 1.63.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.62.1...v1.63.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joe Bowman <[email protected]> * use correct supply when determining proportions (#1389) * use correct supply when determining proportions * fix HandleMsgTransfer tests --------- Co-authored-by: Tuan Tran <[email protected]> * Reinstate the TestAggregateIntentWithPRClaims (#1320) * fix(intent-test): fix the claim to match the supply * refactor: enable some tests and convert them to keeper tests * fix int64 to sdkmath.Int * rename alias to sdkmath to avoid confusion * fix claim to match supply * remove balance * add unclaimedRatio * add multi claim, less than 100% supply * add tests, write comment for reasoning expected output * fix tests failing due to #1345 * fix test --------- Co-authored-by: Jacob Gadikian <[email protected]> Co-authored-by: Joe Bowman <[email protected]> * fix: Withdrawal records should not exist with 0 burnAmount (#1284) * add guard to ```AddWithdrawalRecord``` and ```SetWithdrawalRecord``` * fix tests missing BurnAmount field * return error instead of panic for ```SetwithdrawalRecord``` and ```AddWithdrawalRecord``` * fix linting * return error * refactor to check for error * add missing BurnAmount field in TestGetRatio * refactor test * add old function for testing upgrade handler * add upgrade handler and test * add Upgrade handler to testnet upgrades * Update x/interchainstaking/keeper/withdrawal_record.go comment Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * add test for set withdrawal records * refactor: remove old code from keeper * linting * linting * resolve conflict, fix upgrade name * linting --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Jacob Gadikian <[email protected]> Co-authored-by: Joe Bowman <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Joseph Chalabi <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joe Bowman <[email protected]> Co-authored-by: Tuan Tran <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1. Summary
Fixes #1344
Use k.ClaimsManagerKeeper.IterateUserClaims instead of k.ClaimsManagerKeeper.IterateLastEpochUserClaims for AggregateIntent function.
2.Type of change
Summary by CodeRabbit