feat!: port LSM module to SDK v0.50.x#13
Open
stana-miric wants to merge 40 commits intorelease/v0.50.xfrom
Open
feat!: port LSM module to SDK v0.50.x#13stana-miric wants to merge 40 commits intorelease/v0.50.xfrom
stana-miric wants to merge 40 commits intorelease/v0.50.xfrom
Conversation
Co-authored-by: Stana Miric <stana.miric@ethernal.tech>
Co-authored-by: Stana Miric <stana.miric@ethernal.tech>
Co-authored-by: Dusan Maksimovic <dusan.maksimovic@ethernal.tech>
Co-authored-by: Dusan Maksimovic <dusan.maksimovic@ethernal.tech>
Co-authored-by: Dusan Maksimovic <dusan.maksimovic@ethernal.tech>
Co-authored-by: Dusan Maksimovic <dusan.maksimovic@ethernal.tech>
sainoe
reviewed
Jun 17, 2024
sainoe
reviewed
Jun 17, 2024
sainoe
reviewed
Jun 17, 2024
|
All the LSM-related logic LGTM! |
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
…20690) (cosmos#20712) Co-authored-by: Hieu Vu <72878483+hieuvubk@users.noreply.github.com> Co-authored-by: marbar3778 <marbar3778@yahoo.com>
* replace the last gogo/protobuf imports and comment old migration codes using it * go mod tidy * fix go list
…smos#20692) Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Co-authored-by: marbar3778 <marbar3778@yahoo.com> Co-authored-by: Facundo <facundomedica@gmail.com>
…smos#20727) Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…osmos#20805) Signed-off-by: dependabot[bot] <support@github.com> 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] <support@github.com> 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 <luchenqun@qq.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
… for simulation test. (backport cosmos#17911) (cosmos#20909) Co-authored-by: Chenqun Lu <luchenqun@qq.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
Collaborator
|
@stana-miric I guess this PR can be closed now, right? |
This file contains hidden or 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
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.mdReviewers 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...