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(x/tx): unknown field filtering #15557

Merged
merged 13 commits into from
Mar 28, 2023
Merged

Conversation

kocubinski
Copy link
Member

@kocubinski kocubinski commented Mar 27, 2023

Description

Ref: #15170, #15411

A part of #15515, this patch ports unknown field filtering from codec/ to x/tx, a required feature for legacy amino json signing. This implementation uses the proto3 protoreflect API. For reference, the existing unknown field filter.

Please note that a class of error returned from the filter has been removed, namely mismatched type errors, since it was determined this was superfluous given that an unmarshal will fail anyway. This accounts for most for the reduction in LOC between the 2 implementations.


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)

@kocubinski kocubinski requested a review from a team as a code owner March 27, 2023 16:01
@github-prbot github-prbot requested review from a team, facundomedica and likhita-809 and removed request for a team March 27, 2023 16:01
@github-actions

This comment has been minimized.

@amaury1093 amaury1093 self-assigned this Mar 27, 2023
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

LGTM. I mostly checked that this implementation matches the old one. I didn't dig deep to check for correctness (I'm assuming the old one was correct), plus tests give me good confidence it's correct.

x/tx/CHANGELOG.md Outdated Show resolved Hide resolved
x/tx/decode/util.go Outdated Show resolved Hide resolved
@kocubinski kocubinski enabled auto-merge (squash) March 28, 2023 17:40
@kocubinski kocubinski merged commit 383fed4 into main Mar 28, 2023
@kocubinski kocubinski deleted the kocubinski/proto3-unknown-fields branch March 28, 2023 18:01
@aaronc
Copy link
Member

aaronc commented Mar 28, 2023

Tagging x/tx/v0.4.0 with this

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.

None yet

3 participants