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

Feat/upgrade v0.50.1 sdk #4

Closed
wants to merge 42 commits into from
Closed

Conversation

yan-soon
Copy link
Collaborator

@yan-soon yan-soon commented Dec 6, 2023

key changes:

  • updating import names due to package locations changing on sdk side
  • general updates to code to replace deprecated cosmos-sdk code
  • post sdk v0.50, msg.GetSigners() is being deprecated and each message must explicitly declare which field within its struc, will be the signer field, in their relevant tx.proto files refactor!: deprecate sdk.Msg.GetSigners cosmos/cosmos-sdk#15284
  • since msgEthereumTx requires their from field to be blank, a customGetSigner func is implemented for this msg, to bypass the new signer check 566bd45

app/ante/eip712.go Show resolved Hide resolved
app/ante/handler_options.go Outdated Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
app/export.go Outdated
@@ -135,12 +144,27 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd
// reinitialize all validators
app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) {
// donate any unwithdrawn outstanding reward fraction tokens to the community pool
scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator())
feePool := app.DistrKeeper.GetFeePool(ctx)
valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes((val.GetOperator()))
Copy link
Member

Choose a reason for hiding this comment

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

any helper?

server/start.go Outdated Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
return common.Address{}, errorsmod.Wrapf(
stakingtypes.ErrNoValidatorFound,
"failed to retrieve validator from block proposer address %s",
proposerAddress.String(),
)
}
valBz, err := k.stakingKeeper.ValidatorAddressCodec().StringToBytes((validator.GetOperator()))
Copy link
Member

Choose a reason for hiding this comment

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

helper?

require.NoError(t, err)
appStakingKeeper := suite.app.StakingKeeper
validator = stakingkeeper.TestingUpdateValidator(&appStakingKeeper, suite.ctx, validator, true)
err = suite.app.StakingKeeper.Hooks().AfterValidatorCreated(suite.ctx, validator.GetOperator())
valBz, err := suite.app.StakingKeeper.ValidatorAddressCodec().StringToBytes((validator.GetOperator()))
Copy link
Member

Choose a reason for hiding this comment

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

helper?

@yan-soon yan-soon closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants