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

Wrap ProtoCodec in interface #7637

Merged
merged 9 commits into from
Oct 27, 2020
Merged

Wrap ProtoCodec in interface #7637

merged 9 commits into from
Oct 27, 2020

Conversation

jackzampolin
Copy link
Member

@jackzampolin jackzampolin commented Oct 23, 2020

Ok cleaned up this PR. Changes are minimal

@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #7637 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #7637   +/-   ##
=======================================
  Coverage   54.15%   54.15%           
=======================================
  Files         611      611           
  Lines       38566    38566           
=======================================
  Hits        20884    20884           
  Misses      15550    15550           
  Partials     2132     2132           

// binary and JSON encoding.
type ProtoCodecMarshaler interface {
Marshaler
InterfaceRegistry() types.InterfaceRegistry
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we want that - this is used for Amino.

Copy link
Member

Choose a reason for hiding this comment

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

What is used for amino?

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

see #7638 for reference. I don't think this change is necessary

@@ -11,13 +11,21 @@ import (
"github.com/gogo/protobuf/proto"
)

// ProtoCodecMarshaler defines and interface for codecs that utilize Protobuf for both
// binary and JSON encoding.
type ProtoCodecMarshaler interface {
Copy link
Member

@aaronc aaronc Oct 23, 2020

Choose a reason for hiding this comment

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

Suggested change
type ProtoCodecMarshaler interface {
type ProtoCodecI interface {

Copy link
Member Author

Choose a reason for hiding this comment

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

The ProtoMarshaler type is already defined in that package.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe ProtoMarshalerI to align with other interface names in the SDK like AccountI ?

Copy link
Member

Choose a reason for hiding this comment

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

This is a terrible name but I understand the reasoning. We should rename the other ProtoMarshaler separately

Copy link
Member

Choose a reason for hiding this comment

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

Actually how about ProtoCodecI. Maybe that's best?

@jackzampolin jackzampolin changed the title WIP encoding change Wrap ProtoCodec in interface Oct 23, 2020
@jackzampolin jackzampolin marked this pull request as ready for review October 23, 2020 16:11
@jackzampolin
Copy link
Member Author

also per @colin-axner's comment, this doesn't touch the getsignbytes thing. This touches the tx encoding for proto and is needed.

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

ACK

codec/proto_codec.go Outdated Show resolved Hide resolved
@jackzampolin
Copy link
Member Author

jackzampolin commented Oct 26, 2020

Can we merge this and include in rc2?

edit: looks like that is the case with the backports tag

@robert-zaremba
Copy link
Collaborator

Can we merge this and include in rc2?

I think the rc1 is the next one.

codec/proto_codec.go Outdated Show resolved Hide resolved
@aaronc aaronc added the A:automerge Automatically merge PR once all prerequisites pass. label Oct 27, 2020
@mergify mergify bot merged commit 9befc6c into master Oct 27, 2020
@mergify mergify bot deleted the jack/tx-encoding-config branch October 27, 2020 13:53
@aaronc
Copy link
Member

aaronc commented Oct 27, 2020

We did rc1 last week

clevinson pushed a commit that referenced this pull request Oct 29, 2020
* WIP encoding change

* Add test that describes issue

* WIP debugging

* remove extra code

* Update codec/proto_codec.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants