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: add validation with context information #316

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

forcodedancing
Copy link
Collaborator

@forcodedancing forcodedancing commented Sep 18, 2023

Description

Some validations are needed for different hardforks.
ValidateBasic does not have information to detect hardforks.
ValidateRuntime can be used for validations with hardfork information.

Rationale

New feature

Example

NA

Changes

Notable changes:

  • ValidateRuntime function

types/upgrade.go Outdated Show resolved Hide resolved
@@ -43,6 +43,12 @@ func (k Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata, ti
return v1.Proposal{}, sdkerrors.Wrap(types.ErrInvalidProposalMsg, err.Error())
}

if runtimeMsg, ok := msg.(sdk.MsgWithRuntimeValidation); ok {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this a hardfork?

@unclezoro unclezoro added this pull request to the merge queue Oct 18, 2023
Merged via the queue into bnb-chain:develop with commit 3803e78 Oct 18, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants