Skip to content
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

bump sdk50 #144

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

bump sdk50 #144

wants to merge 23 commits into from

Conversation

sontrinh16
Copy link

No description provided.

@catShaark catShaark marked this pull request as ready for review October 11, 2024 14:56
go.mod Show resolved Hide resolved
x/multi-staking/keeper/msg_server.go Show resolved Hide resolved
x/multi-staking/keeper/store.go Outdated Show resolved Hide resolved
x/multi-staking/module.go Outdated Show resolved Hide resolved
x/multi-staking/types/codec.go Outdated Show resolved Hide resolved
test/simapp/app.go Outdated Show resolved Hide resolved
x/multi-staking/keeper/keeper.go Outdated Show resolved Hide resolved
x/multi-staking/keeper/keeper.go Outdated Show resolved Hide resolved
x/multi-staking/keeper/abci.go Outdated Show resolved Hide resolved
x/multi-staking/keeper/msg_server.go Show resolved Hide resolved
x/multi-staking/keeper/msg_server.go Show resolved Hide resolved
x/multi-staking/keeper/msg_server.go Outdated Show resolved Hide resolved
x/multi-staking/keeper/unlock.go Outdated Show resolved Hide resolved
x/multi-staking/keeper/unlock.go Outdated Show resolved Hide resolved
@neitdung
Copy link
Collaborator

@vietanh2k all lint errors must be fixed

@neitdung
Copy link
Collaborator

neitdung commented Oct 24, 2024

@catShaark @sontrinh16 ValAddressFromBech32 and AccAddressFromBech32 still exist in cosmos-sdk@v0.50.10 but module staking have used new function to get validator address and account address is validatorAddressCodec.StringToBytes(msg.ValidatorAddress), authKeeper.AddressCodec().StringToBytes(msg.DelegatorAddress). Should we replace to new function, does it effect current logic?

@sontrinh16
Copy link
Author

ValAddressFromBech32

yep, both still uses Bech32Codec so still the same

multiStakerAddr, valAcc, err := types.AccAddrAndValAddrFromStrings(msg.DelegatorAddress, msg.ValidatorAddress)
func (k msgServer) CreateValidator(ctx context.Context, msg *stakingtypes.MsgCreateValidator) (*stakingtypes.MsgCreateValidatorResponse, error) {
sdkCtx := sdk.UnwrapSDKContext(ctx)
multiStakerAddr, valAcc, err := types.ValidatorAccAddrAndValAddrFromStrings(msg.ValidatorAddress)
Copy link
Collaborator

@neitdung neitdung Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is false, validator address is not multi staker address, validator and delegator have different address' prefix and we don't need to create new function to generate validator address.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've re-read sdk50, it still work, but I think we should add address codec and validator codec for transparent this logic

return valUpdates, nil
}

func (am AppModule) StakingAppModule() staking.AppModule {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants