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

refactor(codec)!: update codec to x/tx v0.6.0 #15873

Merged
merged 50 commits into from
Apr 28, 2023
Merged

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Apr 18, 2023

Description

Ref: #11275
Pulls out the codec updates from #15284 into a smaller PR


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...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers 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...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@aaronc aaronc marked this pull request as ready for review April 18, 2023 18:08
@aaronc aaronc requested a review from a team as a code owner April 18, 2023 18:08
@aaronc aaronc requested a review from kocubinski April 18, 2023 18:20
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

utACK

@@ -26,15 +26,15 @@ type (
// GetMsgAnySigners returns the signers of the given message encoded in a protobuf Any
// as well as the decoded google.golang.org/protobuf/proto.Message that was used to
// extract the signers so that this can be used in other contexts.
GetMsgAnySigners(msg *types.Any) ([]string, protov2.Message, error)
Copy link
Member

Choose a reason for hiding this comment

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

Does changing this interface contract require a mention in the CHANGELOG?

Copy link
Member Author

@aaronc aaronc Apr 26, 2023

Choose a reason for hiding this comment

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

No, it's new anyway and there are CHANGELOG entries already for this addition

Copy link
Member

@kocubinski kocubinski left a comment

Choose a reason for hiding this comment

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

General approach looks good, but it seems there are test failures whose cause isn't obvious to me from first read, will need a deeper look to understand if there is a fundamental problem with this approach or (hopefully) if they are trivial to address.

@github-actions github-actions bot added the C:Rosetta Issues and PR related to Rosetta label Apr 20, 2023
}
opts.FieldMaps = append(opts.FieldMaps, mapFn)
return opts
}
Copy link
Member Author

Choose a reason for hiding this comment

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

What is this change needed for @kocubinski ?

// - Provide static prefix there exported from config?
// - Just do as below?
AddressCodec: authcodec.NewBech32Codec(sdkConfig.GetBech32AccountAddrPrefix()),
ValidatorCodec: authcodec.NewBech32Codec(sdkConfig.GetBech32ValidatorAddrPrefix()),
Copy link
Member

Choose a reason for hiding this comment

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

I'd like some feedback re the above comments. What approach do you think is best?

Copy link
Member Author

@aaronc aaronc Apr 26, 2023

Choose a reason for hiding this comment

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

We will need to find an alternative way to do this that pulls the codecs from the depinject container. I think it's fine for now as I did something similar and I intend to address in a follow up.

Copy link
Member

@mark-rushakoff mark-rushakoff left a comment

Choose a reason for hiding this comment

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

A couple minor nits, nothing blocking a merge. I don't have the full picture in my head on this, but all the changes in the PR seem fine.

CHANGELOG.md Outdated Show resolved Hide resolved
codec/types/interface_registry.go Outdated Show resolved Hide resolved
x/auth/client/cli/tx_multisign.go Outdated Show resolved Hide resolved
x/auth/client/cli/validate_sigs.go Outdated Show resolved Hide resolved
@aaronc aaronc enabled auto-merge April 27, 2023 17:13
@aaronc aaronc added this pull request to the merge queue Apr 28, 2023
Merged via the queue into main with commit cb1641c Apr 28, 2023
@aaronc aaronc deleted the aaronc/11275-update-codec branch April 28, 2023 08:16
rllola pushed a commit to Zondax/cosmos-sdk that referenced this pull request May 11, 2023
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
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