forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat!: port LSM module to SDK v0.50.x #13
Open
stana-miric
wants to merge
40
commits into
release/v0.50.x
Choose a base branch
from
feat/lsm/v0.50.x
base: release/v0.50.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Stana Miric <[email protected]>
Co-authored-by: Stana Miric <[email protected]>
Co-authored-by: Dusan Maksimovic <[email protected]>
Co-authored-by: Dusan Maksimovic <[email protected]>
Co-authored-by: Dusan Maksimovic <[email protected]>
Co-authored-by: Dusan Maksimovic <[email protected]>
…smos#20727) Co-authored-by: Julien Robert <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
…osmos#20805) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
…osmos#20836) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
…tGenesis` in simulation test (backport cosmos#18196) (cosmos#20897) Co-authored-by: Chenqun Lu <[email protected]> Co-authored-by: Julien Robert <[email protected]>
… for simulation test. (backport cosmos#17911) (cosmos#20909) Co-authored-by: Chenqun Lu <[email protected]> Co-authored-by: Julien Robert <[email protected]>
MSalopek
force-pushed
the
feat/lsm/v0.50.x
branch
from
July 18, 2024 06:47
a42d822
to
2150531
Compare
@stana-miric I guess this PR can be closed now, right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Port the LSM module changes from feature/v0.47.x-ics-lsm
Ported PRs:
cosmos#18694
cosmos#19056
cosmos#19076
cosmos#19491
cosmos#19614
cosmos#20444
Backported:
cosmos#17352 and cosmos#18214 and partially cosmos#18737
Except those changes, code is adapted to follow the changes from sdk v0.50 such as the way addresses are parsed from strings and use of LegacyDec values. Also, when reviewing pay attention to the following changes:
x/staking/keeper/msg_server.go
->RedeemTokensForShares()
- GetDelegation used to return bool, and now returns error. If delegation is not found, types.ErrNoDelegation is returned and the code is changed according to it.
x/staking/keeper/liquid_stake.go
->RemoveExpiredTokenizeShareLocks()
- modified signature to return error
->GetTotalLiquidStakedTokens()
- added panic() call if store.Get() fails, because other panic() already existed before
->CheckExceedsGlobalLiquidStakingCap()
- modified signature to return error
->GetTokenizeSharesLock()
- added panic() call if store.Get() fails, because other panic() already existed before
->GetPendingTokenizeShareAuthorizations()
- added panic() call if store.Get() fails, because it makes more sense than returning an error
x/staking/keeper/tokenize_share_record.go
->hasTokenizeShareRecord()
- modified signature to return error
->GetLastTokenizeShareRecordID()
- added panic() call if store.Get() fails, because error should be returned only if the key is nil, which is not the case
x/staking/keeper/params.go
ValidatorBondFactor(), GlobalLiquidStakingCap(), ValidatorLiquidStakingCap()
- modified signature to return error
x/distribution/keeper/keeper.go
->WithdrawSingleShareRecordReward()
- this is only called from staking module hooks in RedeemTokensForShares() and delegation is removed as part of that execution, so it will never exist when called in WithdrawSingleShareRecordReward()
- we made the same change as in RedeemTokensForShares()
proto/cosmos/staking/v1beta1/tx.proto
proto/cosmos/distribution/v1beta1/tx.proto
-> for newly added msgs, ValidateBasic is in the msg server instead in separate ValidateBasic fn (core sdk v0.50 changed this for other msgs, so we addapted newly added lsm msgs according to this)
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...