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

hotfix: fixing marshaling of MsgWrappedCreateValidator #393

Merged
merged 1 commit into from
May 30, 2023

Conversation

SebastianElvis
Copy link
Member

@SebastianElvis SebastianElvis commented May 30, 2023

This PR fixes marshaling of MsgWrappedCreateValidator. The Pubkey inside MsgWrappedCreateValidator.MsgCreateValidator is in type Any, thus requires extra handling for marshaling/unmarshaling. Specifically, MsgWrappedCreateValidator needs to implement UnpackInterfacesMessage interface. This PR also adds a test ensuring the decoding is correct. This PR is largely based on #215 (files).

Copy link
Member

@vitsalis vitsalis left a comment

Choose a reason for hiding this comment

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

Some concerns about the fix of the flaky test. Overall, I recommend that we don't include the fix to the flaky test here as it should not be part of the hotfix, it can be another PR.

@@ -417,7 +417,7 @@ func FuzzFinalizedChainInfo(f *testing.F) {
)
numChains := datagen.RandomInt(r, 100) + 1
for i := uint64(0); i < numChains; i++ {
czChainIDLen := datagen.RandomInt(r, 50) + 1
czChainIDLen := datagen.RandomInt(r, 50) + 100
Copy link
Member

Choose a reason for hiding this comment

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

This does not completely solve the issue as you can still have the same chain ID albeit with a lower probability. I suggest we create a hashmap or something to check for existing values and recreate the chainID until we get a unique one.

@SebastianElvis SebastianElvis changed the title hotfix: fixing marshaling of MsgWrappedCreateValidator and a flaky test hotfix: fixing marshaling of MsgWrappedCreateValidator May 30, 2023
@SebastianElvis SebastianElvis merged commit be2787a into main May 30, 2023
@SebastianElvis SebastianElvis deleted the hotfix-create-val branch May 30, 2023 07:21
@SebastianElvis SebastianElvis restored the hotfix-create-val branch May 30, 2023 07:26
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.

2 participants