From b7a67fe0137bc5eea7a493b99f22c3476e3e2c6f Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 3 Jan 2020 11:45:22 -0500 Subject: [PATCH] Start integrating cosmos-proto (#5473) * Start integrating cosmos-proto * Comment out tendermint stuff that won't build --- Makefile | 1 + crypto/codec.pb.go | 288 ++------------------------------------- crypto/codec.proto | 19 +-- go.mod | 1 + go.sum | 2 + scripts/protocgen.sh | 7 +- types/codec.pb.go | 14 +- types/codec.proto | 3 - x/auth/types/codec.pb.go | 49 ++++--- x/auth/types/codec.proto | 3 - 10 files changed, 60 insertions(+), 327 deletions(-) diff --git a/Makefile b/Makefile index e0b02d93e961..695f31758681 100644 --- a/Makefile +++ b/Makefile @@ -231,6 +231,7 @@ proto-all: proto-gen proto-lint proto-check-breaking proto-gen: @go mod vendor + @go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos @./scripts/protocgen.sh proto-lint: diff --git a/crypto/codec.pb.go b/crypto/codec.pb.go index 06f67b5187e3..7df8f55185fd 100644 --- a/crypto/codec.pb.go +++ b/crypto/codec.pb.go @@ -6,7 +6,8 @@ package crypto import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -21,23 +22,16 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // PublicKey defines a proto message with a single oneof field that represents a // public key as a byte slice. // // NOTE: Private keys must still be amino-encoded for backwards compatiblity. type PublicKey struct { - // pub defines an single supported public key type as a byte slice. - // - // Types that are valid to be assigned to Pub: - // *PublicKey_Secp256K1 - // *PublicKey_Ed25519 - // *PublicKey_Multisig - Pub isPublicKey_Pub `protobuf_oneof:"pub"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PublicKey) Reset() { *m = PublicKey{} } @@ -73,63 +67,6 @@ func (m *PublicKey) XXX_DiscardUnknown() { var xxx_messageInfo_PublicKey proto.InternalMessageInfo -type isPublicKey_Pub interface { - isPublicKey_Pub() - MarshalTo([]byte) (int, error) - Size() int -} - -type PublicKey_Secp256K1 struct { - Secp256K1 []byte `protobuf:"bytes,1,opt,name=secp256k1,proto3,oneof" json:"secp256k1,omitempty"` -} -type PublicKey_Ed25519 struct { - Ed25519 []byte `protobuf:"bytes,2,opt,name=ed25519,proto3,oneof" json:"ed25519,omitempty"` -} -type PublicKey_Multisig struct { - Multisig []byte `protobuf:"bytes,3,opt,name=multisig,proto3,oneof" json:"multisig,omitempty"` -} - -func (*PublicKey_Secp256K1) isPublicKey_Pub() {} -func (*PublicKey_Ed25519) isPublicKey_Pub() {} -func (*PublicKey_Multisig) isPublicKey_Pub() {} - -func (m *PublicKey) GetPub() isPublicKey_Pub { - if m != nil { - return m.Pub - } - return nil -} - -func (m *PublicKey) GetSecp256K1() []byte { - if x, ok := m.GetPub().(*PublicKey_Secp256K1); ok { - return x.Secp256K1 - } - return nil -} - -func (m *PublicKey) GetEd25519() []byte { - if x, ok := m.GetPub().(*PublicKey_Ed25519); ok { - return x.Ed25519 - } - return nil -} - -func (m *PublicKey) GetMultisig() []byte { - if x, ok := m.GetPub().(*PublicKey_Multisig); ok { - return x.Multisig - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PublicKey) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PublicKey_Secp256K1)(nil), - (*PublicKey_Ed25519)(nil), - (*PublicKey_Multisig)(nil), - } -} - func init() { proto.RegisterType((*PublicKey)(nil), "cosmos_sdk.crypto.v1.PublicKey") } @@ -137,21 +74,18 @@ func init() { func init() { proto.RegisterFile("crypto/codec.proto", fileDescriptor_0402281428f37664) } var fileDescriptor_0402281428f37664 = []byte{ - // 217 bytes of a gzipped FileDescriptorProto + // 174 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4a, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x4f, 0xce, 0x4f, 0x49, 0x4d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x49, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x8e, 0x2f, 0x4e, 0xc9, 0xd6, 0x83, 0x48, 0xeb, 0x95, 0x19, 0x4a, 0x99, 0x94, 0xa5, 0xe6, 0xa5, 0xe4, 0x17, 0xe9, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0xf5, 0x24, 0x95, 0xa6, 0x81, 0x79, - 0x60, 0x0e, 0x98, 0x05, 0x31, 0x4b, 0x29, 0x87, 0x8b, 0x33, 0xa0, 0x34, 0x29, 0x27, 0x33, 0xd9, - 0x3b, 0xb5, 0x52, 0x48, 0x8e, 0x8b, 0xb3, 0x38, 0x35, 0xb9, 0xc0, 0xc8, 0xd4, 0x2c, 0xdb, 0x50, - 0x82, 0x51, 0x81, 0x51, 0x83, 0xc7, 0x83, 0x21, 0x08, 0x21, 0x24, 0x24, 0xc5, 0xc5, 0x9e, 0x9a, - 0x62, 0x64, 0x6a, 0x6a, 0x68, 0x29, 0xc1, 0x04, 0x95, 0x85, 0x09, 0x08, 0xc9, 0x70, 0x71, 0xe4, - 0x96, 0xe6, 0x94, 0x64, 0x16, 0x67, 0xa6, 0x4b, 0x30, 0x43, 0x25, 0xe1, 0x22, 0x4e, 0xac, 0x5c, - 0xcc, 0x05, 0xa5, 0x49, 0x4e, 0xa6, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, - 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x51, 0xca, 0x48, 0xce, 0x85, 0x78, 0x0b, 0x4a, 0xe9, - 0x16, 0xa7, 0x64, 0xeb, 0x43, 0x7c, 0x97, 0xc4, 0x06, 0x76, 0xab, 0x31, 0x20, 0x00, 0x00, 0xff, - 0xff, 0x1d, 0x9c, 0xc5, 0xf1, 0x0d, 0x01, 0x00, 0x00, + 0x60, 0x0e, 0x98, 0x05, 0x31, 0x4b, 0xca, 0x12, 0x53, 0x57, 0x51, 0x6a, 0x7a, 0x6a, 0x9e, 0x6e, + 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0xb6, 0x3e, 0xc4, 0x2e, 0x5d, 0x88, 0x46, 0x08, 0x07, 0xa2, + 0x55, 0x89, 0x9b, 0x8b, 0x33, 0xa0, 0x34, 0x29, 0x27, 0x33, 0xd9, 0x3b, 0xb5, 0xd2, 0xc9, 0xf0, + 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x8c, 0x52, 0x46, 0x32, + 0x0e, 0xa2, 0x07, 0x66, 0x4e, 0x71, 0x4a, 0xb6, 0x3e, 0xc4, 0xcd, 0x49, 0x6c, 0x60, 0x63, 0x8c, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xaf, 0xbc, 0x68, 0xe3, 0x00, 0x00, 0x00, } func (m *PublicKey) Marshal() (dAtA []byte, err error) { @@ -178,66 +112,9 @@ func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Pub != nil { - { - size := m.Pub.Size() - i -= size - if _, err := m.Pub.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *PublicKey_Secp256K1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PublicKey_Secp256K1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Secp256K1 != nil { - i -= len(m.Secp256K1) - copy(dAtA[i:], m.Secp256K1) - i = encodeVarintCodec(dAtA, i, uint64(len(m.Secp256K1))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *PublicKey_Ed25519) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *PublicKey_Ed25519) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Ed25519 != nil { - i -= len(m.Ed25519) - copy(dAtA[i:], m.Ed25519) - i = encodeVarintCodec(dAtA, i, uint64(len(m.Ed25519))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *PublicKey_Multisig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PublicKey_Multisig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Multisig != nil { - i -= len(m.Multisig) - copy(dAtA[i:], m.Multisig) - i = encodeVarintCodec(dAtA, i, uint64(len(m.Multisig))) - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} func encodeVarintCodec(dAtA []byte, offset int, v uint64) int { offset -= sovCodec(v) base := offset @@ -255,52 +132,12 @@ func (m *PublicKey) Size() (n int) { } var l int _ = l - if m.Pub != nil { - n += m.Pub.Size() - } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } -func (m *PublicKey_Secp256K1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Secp256K1 != nil { - l = len(m.Secp256K1) - n += 1 + l + sovCodec(uint64(l)) - } - return n -} -func (m *PublicKey_Ed25519) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ed25519 != nil { - l = len(m.Ed25519) - n += 1 + l + sovCodec(uint64(l)) - } - return n -} -func (m *PublicKey_Multisig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Multisig != nil { - l = len(m.Multisig) - n += 1 + l + sovCodec(uint64(l)) - } - return n -} - func sovCodec(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -336,105 +173,6 @@ func (m *PublicKey) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secp256K1", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCodec - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCodec - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCodec - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Pub = &PublicKey_Secp256K1{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCodec - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCodec - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCodec - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Pub = &PublicKey_Ed25519{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Multisig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCodec - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCodec - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCodec - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Pub = &PublicKey_Multisig{v} - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCodec(dAtA[iNdEx:]) diff --git a/crypto/codec.proto b/crypto/codec.proto index 32c26e1a0186..099daf7e5817 100644 --- a/crypto/codec.proto +++ b/crypto/codec.proto @@ -2,21 +2,22 @@ syntax = "proto3"; package cosmos_sdk.crypto.v1; import "vendor/github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "vendor/github.com/regen-network/cosmos-proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/crypto"; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; // PublicKey defines a proto message with a single oneof field that represents a // public key as a byte slice. // // NOTE: Private keys must still be amino-encoded for backwards compatiblity. message PublicKey { - // pub defines an single supported public key type as a byte slice. - oneof pub { - bytes secp256k1 = 1; - bytes ed25519 = 2; - bytes multisig = 3; - } +// option (cosmos_proto.interface_type) = "github.com/tendermint/tendermint/crypto.PubKey"; +// // pub defines an single supported public key type as a byte slice. +// oneof pub { +// // TODO make tendermint keys use []byte instead of [32]byte or generate the interface marshaling manually +// bytes secp256k1 = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/crypto/secp256k1.PubKeySecp256k1"]; +// bytes ed25519 = 2 [(gogoproto.casttype) = "github.com/tendermint/tendermint/crypto/ed25519.PubKeyEd25519"]; +// // TODO define multisig as a proto message in tendermint: +// bytes multisig = 3; +// } } diff --git a/go.mod b/go.mod index bb0a000b84a3..95496bbd0361 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/pelletier/go-toml v1.6.0 github.com/pkg/errors v0.8.1 github.com/rakyll/statik v0.1.6 + github.com/regen-network/cosmos-proto v0.0.0-20200103153758-711a23958115 github.com/spf13/afero v1.2.1 // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/jwalterweatherman v1.1.0 // indirect diff --git a/go.sum b/go.sum index cc5d9b873f77..8e8ee0297870 100644 --- a/go.sum +++ b/go.sum @@ -199,6 +199,8 @@ github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 h1:nkcn14uNmFEuGCb2mBZbBb24RdNRL08b/wb+xBOYpuk= github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/regen-network/cosmos-proto v0.0.0-20200103153758-711a23958115 h1:ML7849Fm5pC076eQ/mfYSqHf9IlUH+7DUW0hQf0tk7M= +github.com/regen-network/cosmos-proto v0.0.0-20200103153758-711a23958115/go.mod h1:z+OxEChBwVwsOhJeKyvS6WqPRFDV/w2hhwDF6qpi4dA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index ebe4ba0b96ac..b2f46670dad4 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -4,10 +4,7 @@ set -eo pipefail proto_dirs=$(find . -path ./vendor -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - protoc -I/usr/local/include \ - -I. \ - -I${GOPATH}/src \ - -Ivendor/github.com/gogo/protobuf/gogoproto \ - --gofast_out=$GOPATH/src \ + protoc -I. \ + --gocosmos_out=plugins=interfacetype,paths=source_relative:. \ $(find "${dir}" -name '*.proto') done diff --git a/types/codec.pb.go b/types/codec.pb.go index 11f1c5a65894..f4a3b87b9112 100644 --- a/types/codec.pb.go +++ b/types/codec.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -21,7 +21,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Coin defines a token with a denomination and an amount. // @@ -137,7 +137,7 @@ func init() { func init() { proto.RegisterFile("types/codec.proto", fileDescriptor_97e5f89da6f0daf0) } var fileDescriptor_97e5f89da6f0daf0 = []byte{ - // 216 bytes of a gzipped FileDescriptorProto + // 212 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xce, 0x4f, 0x49, 0x4d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4d, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x8e, 0x2f, 0x4e, 0xc9, 0xd6, 0x2b, 0x33, 0x94, 0x32, 0x29, 0x4b, @@ -147,11 +147,11 @@ var fileDescriptor_97e5f89da6f0daf0 = []byte{ 0x5e, 0x7e, 0xae, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x84, 0x23, 0xa4, 0xcc, 0xc5, 0x96, 0x98, 0x9b, 0x5f, 0x9a, 0x57, 0x22, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe3, 0xc4, 0x7d, 0xe2, 0x9e, 0x3c, 0xc3, 0xad, 0x7b, 0xf2, 0xcc, 0x9e, 0x79, 0x25, 0x41, 0x50, 0x29, 0x25, 0x17, 0x2e, 0x76, - 0x97, 0xd4, 0x64, 0x72, 0x4c, 0x71, 0x49, 0x4d, 0x86, 0x99, 0xe2, 0x64, 0x73, 0xe3, 0xa1, 0x1c, + 0x97, 0xd4, 0x64, 0x72, 0x4c, 0x71, 0x49, 0x4d, 0x86, 0x99, 0xe2, 0x64, 0x71, 0xe3, 0xa1, 0x1c, 0x43, 0xc3, 0x23, 0x39, 0x86, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, - 0x8e, 0x71, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x25, 0x24, 0x1f, 0x41, 0xbc, 0x0c, 0xa5, 0x74, 0x8b, - 0x53, 0xb2, 0xf5, 0xc1, 0xe1, 0x92, 0xc4, 0x06, 0xf6, 0x8d, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, - 0xef, 0x4e, 0x92, 0x34, 0x27, 0x01, 0x00, 0x00, + 0x8e, 0x31, 0x4a, 0x09, 0xc9, 0x37, 0x10, 0xef, 0x42, 0x29, 0xdd, 0xe2, 0x94, 0x6c, 0x7d, 0x70, + 0x98, 0x24, 0xb1, 0x81, 0x7d, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xba, 0x45, 0x2c, 0xa6, + 0x23, 0x01, 0x00, 0x00, } func (m *Coin) Marshal() (dAtA []byte, err error) { diff --git a/types/codec.proto b/types/codec.proto index a7275ed004ca..8732c9dc1cf7 100644 --- a/types/codec.proto +++ b/types/codec.proto @@ -4,9 +4,6 @@ package cosmos_sdk.v1; option go_package = "github.com/cosmos/cosmos-sdk/types"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; import "vendor/github.com/gogo/protobuf/gogoproto/gogo.proto"; diff --git a/x/auth/types/codec.pb.go b/x/auth/types/codec.pb.go index 5e9d9d12f30f..6c0f52c2af17 100644 --- a/x/auth/types/codec.pb.go +++ b/x/auth/types/codec.pb.go @@ -9,7 +9,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -24,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // BaseAccount defines a base account message structure. This can be extended by // embedding within another account type that extends functionality. A BaseAccount @@ -114,29 +114,28 @@ func init() { func init() { proto.RegisterFile("x/auth/types/codec.proto", fileDescriptor_e44d2a11716720ad) } var fileDescriptor_e44d2a11716720ad = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0xbf, 0x4e, 0xf3, 0x30, - 0x1c, 0x8c, 0xfb, 0xe7, 0xfb, 0xc0, 0x05, 0x24, 0x0c, 0x43, 0x94, 0x21, 0x8d, 0x90, 0x90, 0xc2, - 0x50, 0x5b, 0x2d, 0xcc, 0x48, 0x4d, 0xc7, 0x4a, 0x08, 0x65, 0x64, 0xa9, 0x12, 0xc7, 0xb4, 0x51, - 0x69, 0x1c, 0xe2, 0x38, 0x6a, 0x36, 0x9e, 0x80, 0x99, 0x47, 0xea, 0xc8, 0xc8, 0x54, 0x41, 0x78, - 0x0b, 0x26, 0x54, 0xbb, 0x45, 0x91, 0x90, 0x98, 0xfc, 0xbb, 0xd3, 0xdd, 0xd9, 0xf7, 0x33, 0x34, - 0x97, 0x24, 0x90, 0xf9, 0x8c, 0xe4, 0x65, 0xca, 0x04, 0xa1, 0x3c, 0x62, 0x14, 0xa7, 0x19, 0xcf, - 0x39, 0x3a, 0xa5, 0x5c, 0x2c, 0xb8, 0x98, 0x88, 0x68, 0x8e, 0x97, 0x78, 0x23, 0xc2, 0x45, 0xdf, - 0xba, 0x2a, 0x58, 0x12, 0xf1, 0x8c, 0x4c, 0xe3, 0x7c, 0x26, 0x43, 0x4c, 0xf9, 0x82, 0x4c, 0xf9, - 0x94, 0x13, 0xe5, 0x09, 0xe5, 0xbd, 0x42, 0x0a, 0xa8, 0x49, 0x67, 0x59, 0xc7, 0xbf, 0xe2, 0x2d, - 0x44, 0xb3, 0x32, 0xcd, 0x79, 0x9d, 0x3b, 0x7b, 0x6e, 0xc0, 0x8e, 0x17, 0x08, 0x36, 0xa4, 0x94, - 0xcb, 0x24, 0x47, 0x63, 0xf8, 0x3f, 0x88, 0xa2, 0x8c, 0x09, 0x61, 0x02, 0x07, 0xb8, 0x07, 0x5e, - 0xff, 0x6b, 0xdd, 0xed, 0xd5, 0xae, 0xd6, 0x4f, 0xdc, 0x1e, 0x3d, 0x11, 0xcd, 0x75, 0x0f, 0x3c, - 0xa4, 0x74, 0xa8, 0x8d, 0xfe, 0x2e, 0x01, 0x11, 0xd8, 0xa6, 0x3c, 0x4e, 0x84, 0xd9, 0x70, 0x9a, - 0x6e, 0x67, 0x70, 0x82, 0x6b, 0xfd, 0x8a, 0x3e, 0x1e, 0xf1, 0x38, 0xf1, 0x5a, 0xab, 0x75, 0xd7, - 0xf0, 0xb5, 0x0e, 0x5d, 0x43, 0x98, 0xca, 0xf0, 0x21, 0xa6, 0x93, 0x39, 0x2b, 0xcd, 0xa6, 0x03, - 0xdc, 0xce, 0xa0, 0x5b, 0x77, 0xe9, 0x06, 0x1b, 0xf3, 0xad, 0xd2, 0x8d, 0x59, 0xe9, 0xef, 0xa7, - 0xbb, 0x11, 0x9d, 0xc3, 0xa3, 0x40, 0x17, 0x99, 0x24, 0x72, 0x11, 0xb2, 0xcc, 0x6c, 0x39, 0xc0, - 0x6d, 0xf9, 0x87, 0x5b, 0xf6, 0x46, 0x91, 0xc8, 0x82, 0x7b, 0x82, 0x3d, 0x4a, 0x96, 0x50, 0x66, - 0xb6, 0x95, 0xe0, 0x07, 0x7b, 0xa3, 0xb7, 0x0f, 0xdb, 0x78, 0xaa, 0x6c, 0x63, 0x55, 0xd9, 0xe0, - 0xb5, 0xb2, 0xc1, 0x7b, 0x65, 0x83, 0x97, 0x4f, 0xdb, 0xb8, 0xbb, 0xf8, 0x73, 0x0b, 0xf5, 0x4f, - 0x0d, 0xff, 0xa9, 0xe5, 0x5e, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x3d, 0x84, 0x92, 0xeb, - 0x01, 0x00, 0x00, + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x3d, 0x4f, 0xf3, 0x30, + 0x18, 0xac, 0xfb, 0xf1, 0x7e, 0xb8, 0xef, 0x8b, 0x84, 0x61, 0x88, 0x32, 0xa4, 0x11, 0x12, 0x52, + 0x18, 0x6a, 0xab, 0x85, 0x19, 0xd4, 0x30, 0x56, 0x42, 0x28, 0x23, 0x4b, 0x95, 0x38, 0xa6, 0x8d, + 0x4a, 0xf3, 0x84, 0x38, 0xae, 0x9a, 0x8d, 0x5f, 0xc0, 0xef, 0xea, 0xc8, 0xc8, 0x54, 0x41, 0x7e, + 0x06, 0x13, 0xaa, 0xdd, 0xa2, 0x48, 0x48, 0x4c, 0x7e, 0xee, 0x74, 0x77, 0xf6, 0x3d, 0xc6, 0xd6, + 0x8a, 0x85, 0xaa, 0x98, 0xb1, 0xa2, 0xcc, 0x84, 0x64, 0x1c, 0x62, 0xc1, 0x69, 0x96, 0x43, 0x01, + 0xe4, 0x98, 0x83, 0x5c, 0x80, 0x9c, 0xc8, 0x78, 0x4e, 0x57, 0x74, 0x2b, 0xa2, 0xcb, 0x81, 0x7d, + 0xb1, 0x14, 0x69, 0x0c, 0x39, 0x9b, 0x26, 0xc5, 0x4c, 0x45, 0x94, 0xc3, 0x82, 0x4d, 0x61, 0x0a, + 0x4c, 0x7b, 0x22, 0x75, 0xaf, 0x91, 0x06, 0x7a, 0x32, 0x59, 0xf6, 0xe1, 0xb7, 0x78, 0x9b, 0xf0, + 0xbc, 0xcc, 0x0a, 0xa8, 0x73, 0x27, 0xcf, 0x4d, 0xdc, 0xf5, 0x43, 0x29, 0x46, 0x9c, 0x83, 0x4a, + 0x0b, 0x32, 0xc6, 0xbf, 0xc3, 0x38, 0xce, 0x85, 0x94, 0x16, 0x72, 0x91, 0xf7, 0xcf, 0x1f, 0x7c, + 0x6c, 0x7a, 0xfd, 0xda, 0xd5, 0xe6, 0x89, 0xbb, 0xa3, 0x2f, 0xe3, 0xb9, 0xe9, 0x41, 0x47, 0x9c, + 0x8f, 0x8c, 0x31, 0xd8, 0x27, 0x10, 0x86, 0x3b, 0x1c, 0x92, 0x54, 0x5a, 0x4d, 0xb7, 0xe5, 0x75, + 0x87, 0x47, 0xb4, 0xd6, 0x6f, 0x39, 0xa0, 0xd7, 0x90, 0xa4, 0x7e, 0x7b, 0xbd, 0xe9, 0x35, 0x02, + 0xa3, 0x23, 0x97, 0x18, 0x67, 0x2a, 0x7a, 0x48, 0xf8, 0x64, 0x2e, 0x4a, 0xab, 0xe5, 0x22, 0xaf, + 0x3b, 0xec, 0xd5, 0x5d, 0xa6, 0xc1, 0xd6, 0x7c, 0xab, 0x75, 0x63, 0x51, 0x06, 0x7f, 0xb3, 0xfd, + 0x48, 0x4e, 0xf1, 0x41, 0x68, 0x8a, 0x4c, 0x52, 0xb5, 0x88, 0x44, 0x6e, 0xb5, 0x5d, 0xe4, 0xb5, + 0x83, 0xff, 0x3b, 0xf6, 0x46, 0x93, 0xc4, 0xc6, 0x7f, 0xa4, 0x78, 0x54, 0x22, 0xe5, 0xc2, 0xea, + 0x68, 0xc1, 0x17, 0xf6, 0xaf, 0x5e, 0xdf, 0x9d, 0xc6, 0x53, 0xe5, 0x34, 0xd6, 0x95, 0x83, 0x5e, + 0x2a, 0x07, 0xbd, 0x55, 0x0e, 0xba, 0x3b, 0xfb, 0x71, 0x03, 0xf5, 0x0f, 0x8d, 0x7e, 0xe9, 0xc5, + 0x9e, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x51, 0x92, 0x91, 0xe2, 0xe7, 0x01, 0x00, 0x00, } func (m *BaseAccount) Marshal() (dAtA []byte, err error) { diff --git a/x/auth/types/codec.proto b/x/auth/types/codec.proto index af106a771946..de15b9e776bb 100644 --- a/x/auth/types/codec.proto +++ b/x/auth/types/codec.proto @@ -8,9 +8,6 @@ import "crypto/codec.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = false; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; // TODO: //