diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index e20fccc1c..bd0d0bb2f 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -31,6 +31,8 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi - multisig: type `PubKeyMultisigThreshold` is now `PubKey` - [light] \#4946 Rename `lite2` pkg to `light`, the lite cmd has also been renamed to `light`. Remove `lite` implementation. - [rpc] \#4937 Return an error when `page` pagination param is 0 in `/validators`, `tx_search` (@melekes) + - [state] \#4679 `TxResult` is a Protobuf type defined in `abci` types directory + - [state] \#4679 `state` reactor migration to Protobuf encoding - [evidence] \#4959 Add json tags to `DuplicateVoteEvidence` - Apps diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index abe65cda4..7f6a178ff 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -17,7 +17,7 @@ var ( stateKey = []byte("stateKey") kvPairPrefixKey = []byte("kvPairKey:") - ProtocolVersion version.Protocol = 0x1 + ProtocolVersion uint64 = 0x1 ) type State struct { @@ -76,7 +76,7 @@ func (app *Application) Info(req types.RequestInfo) (resInfo types.ResponseInfo) return types.ResponseInfo{ Data: fmt.Sprintf("{\"size\":%v}", app.state.Size), Version: version.ABCIVersion, - AppVersion: ProtocolVersion.Uint64(), + AppVersion: ProtocolVersion, LastBlockHeight: app.state.Height, LastBlockAppHash: app.state.AppHash, } diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index 4d8c829ad..ef678d40c 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -16,6 +16,7 @@ import ( "github.com/tendermint/tendermint/abci/example/code" abciserver "github.com/tendermint/tendermint/abci/server" "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/types" ) const ( @@ -103,7 +104,7 @@ func TestPersistentKVStoreInfo(t *testing.T) { // make and apply block height = int64(1) hash := []byte("foo") - header := types.Header{ + header := tmproto.Header{ Height: height, } kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header}) @@ -193,7 +194,7 @@ func makeApplyBlock( // make and apply block height := int64(heightInt) hash := []byte("foo") - header := types.Header{ + header := tmproto.Header{ Height: height, } @@ -273,7 +274,7 @@ func TestClientServer(t *testing.T) { // set up socket app kvstore := NewApplication() client, server, err := makeSocketClientServer(kvstore, "kvstore-socket") - require.Nil(t, err) + require.NoError(t, err) defer server.Stop() defer client.Stop() @@ -282,7 +283,7 @@ func TestClientServer(t *testing.T) { // set up grpc app kvstore = NewApplication() gclient, gserver, err := makeGRPCClientServer(kvstore, "kvstore-grpc") - require.Nil(t, err) + require.NoError(t, err) defer gserver.Stop() defer gclient.Stop() diff --git a/abci/types/messages_test.go b/abci/types/messages_test.go index 16729cb4b..03986379d 100644 --- a/abci/types/messages_test.go +++ b/abci/types/messages_test.go @@ -8,6 +8,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" + + tmproto "github.com/tendermint/tendermint/proto/types" ) func TestMarshalJSON(t *testing.T) { @@ -53,13 +55,13 @@ func TestWriteReadMessageSimple(t *testing.T) { err = ReadMessage(buf, msg) assert.Nil(t, err) - assert.Equal(t, c, msg) + assert.True(t, proto.Equal(c, msg)) } } func TestWriteReadMessage(t *testing.T) { cases := []proto.Message{ - &Header{ + &tmproto.Header{ Height: 4, ChainID: "test", }, @@ -71,11 +73,11 @@ func TestWriteReadMessage(t *testing.T) { err := WriteMessage(c, buf) assert.Nil(t, err) - msg := new(Header) + msg := new(tmproto.Header) err = ReadMessage(buf, msg) assert.Nil(t, err) - assert.Equal(t, c, msg) + assert.True(t, proto.Equal(c, msg)) } } @@ -107,6 +109,6 @@ func TestWriteReadMessage2(t *testing.T) { err = ReadMessage(buf, msg) assert.Nil(t, err) - assert.Equal(t, c, msg) + assert.True(t, proto.Equal(c, msg)) } } diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index a64d87a12..b70073b2a 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -13,6 +13,7 @@ import ( _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" merkle "github.com/tendermint/tendermint/crypto/merkle" + types "github.com/tendermint/tendermint/proto/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -742,7 +743,7 @@ func (m *RequestQuery) GetProve() bool { type RequestBeginBlock struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` + Header types.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"` ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -790,11 +791,11 @@ func (m *RequestBeginBlock) GetHash() []byte { return nil } -func (m *RequestBeginBlock) GetHeader() Header { +func (m *RequestBeginBlock) GetHeader() types.Header { if m != nil { return m.Header } - return Header{} + return types.Header{} } func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo { @@ -2923,43 +2924,31 @@ func (m *Event) GetAttributes() []EventAttribute { return nil } -type Header struct { - // basic block info - Version Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` - ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` - // prev block info - LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` - // hashes of block data - LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` - DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` - // hashes from the app output from the prev block - ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` - ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` - AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` - // consensus info - EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` - ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +// TxResult contains results of executing the transaction. +// +// One usage is indexing transaction results. +type TxResult struct { + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Index uint32 `protobuf:"varint,2,opt,name=Index,proto3" json:"Index,omitempty"` + Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` + Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { +func (m *TxResult) Reset() { *m = TxResult{} } +func (m *TxResult) String() string { return proto.CompactTextString(m) } +func (*TxResult) ProtoMessage() {} +func (*TxResult) Descriptor() ([]byte, []int) { return fileDescriptor_9f1eaa49c51fa1ac, []int{40} } -func (m *Header) XXX_Unmarshal(b []byte) error { +func (m *TxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Header.Marshal(b, m, deterministic) + return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2969,169 +2958,44 @@ func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_Header.Merge(m, src) +func (m *TxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxResult.Merge(m, src) } -func (m *Header) XXX_Size() int { +func (m *TxResult) XXX_Size() int { return m.Size() } -func (m *Header) XXX_DiscardUnknown() { - xxx_messageInfo_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_Header proto.InternalMessageInfo - -func (m *Header) GetVersion() Version { - if m != nil { - return m.Version - } - return Version{} +func (m *TxResult) XXX_DiscardUnknown() { + xxx_messageInfo_TxResult.DiscardUnknown(m) } -func (m *Header) GetChainID() string { - if m != nil { - return m.ChainID - } - return "" -} +var xxx_messageInfo_TxResult proto.InternalMessageInfo -func (m *Header) GetHeight() int64 { +func (m *TxResult) GetHeight() int64 { if m != nil { return m.Height } return 0 } -func (m *Header) GetTime() time.Time { - if m != nil { - return m.Time - } - return time.Time{} -} - -func (m *Header) GetLastBlockId() BlockID { - if m != nil { - return m.LastBlockId - } - return BlockID{} -} - -func (m *Header) GetLastCommitHash() []byte { - if m != nil { - return m.LastCommitHash - } - return nil -} - -func (m *Header) GetDataHash() []byte { +func (m *TxResult) GetIndex() uint32 { if m != nil { - return m.DataHash - } - return nil -} - -func (m *Header) GetValidatorsHash() []byte { - if m != nil { - return m.ValidatorsHash - } - return nil -} - -func (m *Header) GetNextValidatorsHash() []byte { - if m != nil { - return m.NextValidatorsHash - } - return nil -} - -func (m *Header) GetConsensusHash() []byte { - if m != nil { - return m.ConsensusHash - } - return nil -} - -func (m *Header) GetAppHash() []byte { - if m != nil { - return m.AppHash - } - return nil -} - -func (m *Header) GetLastResultsHash() []byte { - if m != nil { - return m.LastResultsHash - } - return nil -} - -func (m *Header) GetEvidenceHash() []byte { - if m != nil { - return m.EvidenceHash + return m.Index } - return nil + return 0 } -func (m *Header) GetProposerAddress() []byte { +func (m *TxResult) GetTx() []byte { if m != nil { - return m.ProposerAddress + return m.Tx } return nil } -type Version struct { - Block uint64 `protobuf:"varint,1,opt,name=Block,proto3" json:"Block,omitempty"` - App uint64 `protobuf:"varint,2,opt,name=App,proto3" json:"App,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{41} -} -func (m *Version) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Version.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Version) XXX_Merge(src proto.Message) { - xxx_messageInfo_Version.Merge(m, src) -} -func (m *Version) XXX_Size() int { - return m.Size() -} -func (m *Version) XXX_DiscardUnknown() { - xxx_messageInfo_Version.DiscardUnknown(m) -} - -var xxx_messageInfo_Version proto.InternalMessageInfo - -func (m *Version) GetBlock() uint64 { - if m != nil { - return m.Block - } - return 0 -} - -func (m *Version) GetApp() uint64 { +func (m *TxResult) GetResult() ResponseDeliverTx { if m != nil { - return m.App + return m.Result } - return 0 + return ResponseDeliverTx{} } type BlockID struct { @@ -3146,7 +3010,7 @@ func (m *BlockID) Reset() { *m = BlockID{} } func (m *BlockID) String() string { return proto.CompactTextString(m) } func (*BlockID) ProtoMessage() {} func (*BlockID) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{42} + return fileDescriptor_9f1eaa49c51fa1ac, []int{41} } func (m *BlockID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3201,7 +3065,7 @@ func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } func (*PartSetHeader) ProtoMessage() {} func (*PartSetHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{43} + return fileDescriptor_9f1eaa49c51fa1ac, []int{42} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3258,7 +3122,7 @@ func (m *Validator) Reset() { *m = Validator{} } func (m *Validator) String() string { return proto.CompactTextString(m) } func (*Validator) ProtoMessage() {} func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{44} + return fileDescriptor_9f1eaa49c51fa1ac, []int{43} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3314,7 +3178,7 @@ func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} } func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) } func (*ValidatorUpdate) ProtoMessage() {} func (*ValidatorUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{45} + return fileDescriptor_9f1eaa49c51fa1ac, []int{44} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3370,7 +3234,7 @@ func (m *VoteInfo) Reset() { *m = VoteInfo{} } func (m *VoteInfo) String() string { return proto.CompactTextString(m) } func (*VoteInfo) ProtoMessage() {} func (*VoteInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{46} + return fileDescriptor_9f1eaa49c51fa1ac, []int{45} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3425,7 +3289,7 @@ func (m *PubKey) Reset() { *m = PubKey{} } func (m *PubKey) String() string { return proto.CompactTextString(m) } func (*PubKey) ProtoMessage() {} func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{47} + return fileDescriptor_9f1eaa49c51fa1ac, []int{46} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3483,7 +3347,7 @@ func (m *Evidence) Reset() { *m = Evidence{} } func (m *Evidence) String() string { return proto.CompactTextString(m) } func (*Evidence) ProtoMessage() {} func (*Evidence) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{48} + return fileDescriptor_9f1eaa49c51fa1ac, []int{47} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3562,7 +3426,7 @@ func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_9f1eaa49c51fa1ac, []int{49} + return fileDescriptor_9f1eaa49c51fa1ac, []int{48} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3713,10 +3577,8 @@ func init() { golang_proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.types.EventAttribute") proto.RegisterType((*Event)(nil), "tendermint.abci.types.Event") golang_proto.RegisterType((*Event)(nil), "tendermint.abci.types.Event") - proto.RegisterType((*Header)(nil), "tendermint.abci.types.Header") - golang_proto.RegisterType((*Header)(nil), "tendermint.abci.types.Header") - proto.RegisterType((*Version)(nil), "tendermint.abci.types.Version") - golang_proto.RegisterType((*Version)(nil), "tendermint.abci.types.Version") + proto.RegisterType((*TxResult)(nil), "tendermint.abci.types.TxResult") + golang_proto.RegisterType((*TxResult)(nil), "tendermint.abci.types.TxResult") proto.RegisterType((*BlockID)(nil), "tendermint.abci.types.BlockID") golang_proto.RegisterType((*BlockID)(nil), "tendermint.abci.types.BlockID") proto.RegisterType((*PartSetHeader)(nil), "tendermint.abci.types.PartSetHeader") @@ -3739,192 +3601,181 @@ func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_9f1eaa func init() { golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_9f1eaa49c51fa1ac) } var fileDescriptor_9f1eaa49c51fa1ac = []byte{ - // 2945 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xcd, 0x73, 0x23, 0x47, - 0x15, 0xf7, 0x48, 0xb2, 0xa4, 0x79, 0xb2, 0x3e, 0xb6, 0xd7, 0xd9, 0x28, 0x22, 0xb1, 0xb7, 0x66, - 0xb3, 0x5f, 0x49, 0xb0, 0x37, 0x4e, 0x85, 0x4a, 0xd8, 0x24, 0x94, 0xe4, 0x75, 0x90, 0xc9, 0xae, - 0xd7, 0x19, 0x7b, 0x97, 0x04, 0xaa, 0x32, 0xb4, 0x34, 0x6d, 0x69, 0x62, 0x69, 0x66, 0x32, 0xd3, - 0x72, 0x2c, 0x8a, 0x03, 0xc5, 0x85, 0xe2, 0x06, 0x07, 0xaa, 0xb8, 0x70, 0xe4, 0xce, 0x81, 0xaa, - 0x70, 0xe4, 0x42, 0x55, 0x8e, 0x1c, 0x38, 0x6f, 0xa8, 0x85, 0x13, 0x70, 0xe4, 0x0f, 0xa0, 0xfa, - 0x63, 0xbe, 0x64, 0x7d, 0x8c, 0xc2, 0xde, 0xb8, 0xd8, 0xd3, 0x6f, 0xde, 0x7b, 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, 0xb2, 0x6a, 0x55, 0x28, 0x27, 0x60, 0x5d, 0xbb, - 0x02, 0xeb, 0xd3, 0xf0, 0x59, 0xb3, 0x43, 0x79, 0x02, 0x61, 0xd1, 0x5d, 0x28, 0x86, 0x00, 0x2d, - 0x76, 0xe2, 0xac, 0xb8, 0x05, 0x26, 0x7a, 0x68, 0xc0, 0x36, 0x22, 0xfb, 0x98, 0xf9, 0xc7, 0x92, - 0xe1, 0xc3, 0x2f, 0x60, 0xd7, 0x6d, 0x63, 0xbf, 0xaf, 0xfd, 0x08, 0xea, 0xb3, 0x60, 0x77, 0x62, - 0x32, 0xb9, 0xf0, 0x1b, 0xbd, 0x02, 0xf9, 0x13, 0xc7, 0x1b, 0x62, 0xca, 0x9d, 0x95, 0x75, 0xd9, - 0x62, 0xdf, 0xae, 0x80, 0xe0, 0x2c, 0x17, 0x8b, 0x86, 0x66, 0xc0, 0x0b, 0x33, 0x41, 0x97, 0x99, - 0x58, 0xb6, 0x49, 0x44, 0x54, 0xcb, 0xba, 0x68, 0x44, 0x8e, 0xc4, 0x60, 0x45, 0x83, 0x75, 0xeb, - 0xf3, 0x19, 0x73, 0xff, 0xaa, 0x2e, 0x5b, 0xda, 0x9f, 0x55, 0x28, 0xea, 0xc4, 0x77, 0x19, 0x1e, - 0xa0, 0x36, 0xa8, 0xe4, 0xbc, 0x4b, 0x04, 0xad, 0x52, 0x16, 0x90, 0x10, 0x61, 0xb3, 0x17, 0xe8, - 0xb3, 0xac, 0x1f, 0x1a, 0xa3, 0xb7, 0x13, 0x94, 0xf2, 0xda, 0x22, 0x27, 0x71, 0x4e, 0xf9, 0x4e, - 0x92, 0x53, 0xbe, 0xbc, 0xc0, 0x76, 0x82, 0x54, 0xbe, 0x9d, 0x20, 0x95, 0x8b, 0x3a, 0x4e, 0xb0, - 0xca, 0xfd, 0x29, 0xac, 0x72, 0xd1, 0xf4, 0x67, 0xd0, 0xca, 0xfd, 0x29, 0xb4, 0xf2, 0xd6, 0xc2, - 0x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, 0x98, 0x6e, 0x98, 0xa2, 0x04, 0xd1, 0xaa, 0x85, - 0xda, 0x4d, 0x99, 0xab, 0x1e, 0x44, 0x01, 0x8a, 0xb8, 0x2d, 0x82, 0x5c, 0xd7, 0x31, 0x89, 0x4c, - 0x20, 0xfc, 0x99, 0xf1, 0xdd, 0x81, 0xd3, 0x93, 0x69, 0x82, 0x3d, 0x32, 0xad, 0x10, 0x53, 0x55, - 0x01, 0x96, 0xda, 0x1f, 0x94, 0xc8, 0x5f, 0x44, 0x77, 0xa7, 0x31, 0x53, 0xe5, 0x59, 0x32, 0xd3, - 0xcc, 0xff, 0xc6, 0x4c, 0xb5, 0xff, 0x28, 0xd1, 0x92, 0x86, 0x9c, 0xf3, 0xeb, 0x85, 0x20, 0x4a, - 0xbf, 0xab, 0x7c, 0x81, 0x64, 0xfa, 0x95, 0xc7, 0x85, 0x3c, 0x5f, 0x86, 0xe4, 0x71, 0xa1, 0x20, - 0x12, 0x32, 0x6f, 0xa0, 0x37, 0x39, 0x57, 0x75, 0x4e, 0x24, 0x26, 0x27, 0x08, 0x89, 0x28, 0x10, - 0x6d, 0xc9, 0xca, 0xd0, 0x21, 0x53, 0xd3, 0x85, 0x76, 0x8c, 0x56, 0xa8, 0x09, 0xea, 0xfb, 0x22, - 0xa8, 0x6c, 0xe8, 0xbe, 0x8b, 0xbb, 0x84, 0x83, 0xaa, 0xaa, 0x47, 0x02, 0xcd, 0x04, 0x74, 0x11, - 0xdc, 0xd1, 0x01, 0xe4, 0xc9, 0x19, 0xb1, 0x29, 0x5b, 0x23, 0x16, 0xd6, 0x17, 0x67, 0x92, 0x49, - 0x62, 0xd3, 0x56, 0x9d, 0x05, 0xf3, 0x9f, 0x4f, 0x36, 0x6b, 0xc2, 0xe6, 0x35, 0x67, 0x68, 0x51, - 0x32, 0x74, 0xe9, 0x58, 0x97, 0x5e, 0xb4, 0x9f, 0x67, 0x18, 0xa7, 0x4b, 0x00, 0xff, 0xd4, 0xf0, - 0x06, 0x9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, 0x23, 0xdb, 0xe4, 0x13, 0x5a, 0xd5, 0x45, 0x03, 0xdd, 0x85, 0xd5, 0x33, 0x47, - 0x80, 0xec, 0x3c, 0x78, 0x79, 0xec, 0x50, 0x12, 0xab, 0x76, 0x09, 0x1b, 0xed, 0x80, 0x85, 0x90, - 0xd8, 0xb4, 0x49, 0xa9, 0x67, 0x75, 0x46, 0x94, 0xc4, 0xab, 0xae, 0x6b, 0x53, 0xaa, 0xae, 0x21, - 0x8d, 0x0a, 0x49, 0x58, 0x56, 0x94, 0xfc, 0x78, 0x43, 0xfb, 0xa9, 0x02, 0xab, 0xdc, 0x21, 0xc3, - 0x52, 0x5e, 0xc2, 0x92, 0x04, 0x9d, 0x3d, 0xa3, 0x2e, 0x00, 0x0e, 0x3a, 0x0a, 0xc6, 0x7b, 0x7d, - 0x1e, 0x8a, 0x87, 0xc3, 0x6a, 0xbd, 0x28, 0xe1, 0x7c, 0x3d, 0x72, 0x10, 0x83, 0xf4, 0x98, 0x5b, - 0xed, 0xdf, 0x39, 0xc8, 0x8b, 0x3a, 0x21, 0x7a, 0x2f, 0x59, 0xb5, 0x2e, 0xed, 0x6c, 0xcc, 0x0a, - 0x8e, 0xd0, 0x92, 0xb1, 0x09, 0x8f, 0x0d, 0x37, 0x26, 0x4b, 0xc1, 0xad, 0xd2, 0xd3, 0x27, 0x9b, - 0x05, 0x4e, 0xb9, 0xf7, 0xef, 0x45, 0x75, 0xe1, 0x59, 0x65, 0xd1, 0xa0, 0x08, 0x9d, 0x5b, 0xba, - 0x08, 0xdd, 0x86, 0x72, 0xec, 0x8c, 0x61, 0x99, 0xb2, 0x2a, 0xb2, 0x31, 0x6f, 0xaf, 0xef, 0xdf, - 0x93, 0xe3, 0x2f, 0x85, 0x67, 0x90, 0x7d, 0x13, 0xdd, 0x4a, 0x56, 0x47, 0xf9, 0x51, 0x45, 0x70, - 0xe4, 0x58, 0xc1, 0x93, 0x1d, 0x54, 0xd8, 0x2e, 0x64, 0x19, 0x4f, 0xa8, 0x08, 0xca, 0x5c, 0x64, - 0x02, 0xfe, 0xf2, 0x26, 0x54, 0x23, 0x36, 0x2f, 0x54, 0x8a, 0xc2, 0x4b, 0x24, 0xe6, 0x8a, 0x77, - 0x60, 0xdd, 0x26, 0xe7, 0xd4, 0x98, 0xd4, 0x56, 0xb9, 0x36, 0x62, 0xef, 0x1e, 0x27, 0x2d, 0xae, - 0x43, 0x25, 0xe2, 0x0d, 0x5c, 0x17, 0x44, 0xcd, 0x3a, 0x94, 0x72, 0xb5, 0x78, 0x39, 0xb0, 0x94, - 0x28, 0x07, 0x86, 0xa7, 0x37, 0x81, 0xeb, 0xd2, 0xc9, 0x1a, 0xd7, 0xe1, 0xa7, 0x37, 0x81, 0xcb, - 0xc2, 0xcd, 0x35, 0x28, 0x07, 0x60, 0x26, 0xf4, 0xca, 0x5c, 0x6f, 0x2d, 0x10, 0x72, 0xa5, 0xdb, - 0x50, 0x73, 0x3d, 0xc7, 0x75, 0x7c, 0xe2, 0x19, 0xd8, 0x34, 0x3d, 0xe2, 0xfb, 0xbc, 0x02, 0xb0, - 0xa6, 0x57, 0x03, 0x79, 0x53, 0x88, 0xb5, 0xd7, 0xa1, 0x10, 0x1c, 0x22, 0xd7, 0x61, 0xb5, 0x15, - 0x02, 0x73, 0x4e, 0x17, 0x0d, 0xb6, 0xa1, 0x9a, 0xae, 0x2b, 0x7f, 0x16, 0x61, 0x8f, 0xda, 0x00, - 0x0a, 0x72, 0xc1, 0xa6, 0x16, 0xc3, 0x1f, 0xc0, 0x9a, 0x8b, 0x3d, 0x36, 0x8d, 0x78, 0x49, 0x7c, - 0x56, 0xfd, 0xe9, 0x10, 0x7b, 0xf4, 0x88, 0xd0, 0x44, 0x65, 0xbc, 0xc4, 0xed, 0x85, 0x48, 0x7b, - 0x1b, 0xca, 0x09, 0x1d, 0x36, 0x4c, 0xea, 0x50, 0x3c, 0x08, 0x60, 0x84, 0x37, 0xc2, 0x91, 0x64, - 0xa2, 0x91, 0x68, 0x77, 0x41, 0x0d, 0xd7, 0x8a, 0x9d, 0xae, 0x83, 0x50, 0x28, 0x32, 0xfc, 0xa2, - 0xc9, 0xab, 0xff, 0xce, 0xe7, 0xb2, 0xc2, 0x99, 0xd5, 0x45, 0x43, 0x23, 0x31, 0xd8, 0x13, 0x14, - 0x0e, 0xbd, 0x03, 0x05, 0x09, 0x7b, 0x72, 0x3f, 0xce, 0xaa, 0xf3, 0x1f, 0x72, 0x1c, 0x0c, 0xea, - 0xfc, 0x02, 0x15, 0xa3, 0x6e, 0x32, 0xf1, 0x6e, 0x7e, 0x02, 0xc5, 0x00, 0xda, 0x92, 0xc9, 0x49, - 0xf4, 0x70, 0x75, 0x51, 0x72, 0x92, 0x9d, 0x44, 0x86, 0xec, 0x6b, 0xf2, 0xad, 0x9e, 0x4d, 0x4c, - 0x23, 0xda, 0x82, 0xbc, 0xcf, 0xa2, 0x5e, 0x15, 0x2f, 0xee, 0x07, 0xfb, 0x4b, 0xbb, 0x03, 0x79, - 0x31, 0xd6, 0xa9, 0x78, 0x37, 0x85, 0x4f, 0x6a, 0xff, 0x50, 0xa0, 0x18, 0x64, 0xad, 0xa9, 0x46, - 0x89, 0x49, 0x64, 0xbe, 0xee, 0x24, 0x9e, 0x3d, 0x24, 0xbd, 0x06, 0x88, 0x7f, 0x29, 0xc6, 0x99, - 0x43, 0x2d, 0xbb, 0x67, 0x88, 0xb5, 0x10, 0xc7, 0x9f, 0x1a, 0x7f, 0xf3, 0x98, 0xbf, 0x38, 0xe4, - 0xcb, 0xf2, 0x33, 0x05, 0x8a, 0x21, 0x59, 0x5d, 0xb6, 0x24, 0x7f, 0x05, 0xf2, 0x92, 0x90, 0xc9, - 0x4c, 0x2a, 0x5a, 0xe1, 0x37, 0x9a, 0x8b, 0xed, 0x96, 0x06, 0x14, 0x87, 0x84, 0x62, 0x1e, 0x67, - 0x51, 0x82, 0x09, 0xdb, 0xaf, 0x5c, 0x83, 0x52, 0xec, 0x37, 0x12, 0x54, 0x80,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0xfb, 0x32, 0xd7, 0x53, 0x1a, 0x4b, 0xfd, 0xd8, 0x80, 0xce, 0xe0, 0xd2, - 0xc5, 0x83, 0xf6, 0xb2, 0x77, 0x56, 0x1a, 0x4b, 0xff, 0x08, 0x81, 0xc6, 0x80, 0xa6, 0x1c, 0xd6, - 0x97, 0xbe, 0xc8, 0xd2, 0x58, 0xfe, 0x97, 0x89, 0xd6, 0xbb, 0x5f, 0x3e, 0xdd, 0x50, 0xfe, 0xf2, - 0x74, 0x43, 0xf9, 0xdb, 0xd3, 0x0d, 0xe5, 0x4f, 0x7f, 0xdf, 0x50, 0x7e, 0xf0, 0x6a, 0xcf, 0xa2, - 0xfd, 0x51, 0x67, 0xab, 0xeb, 0x0c, 0xb7, 0x23, 0x77, 0xf1, 0xc7, 0xe8, 0xc6, 0x60, 0x27, 0xcf, - 0x93, 0xde, 0x1b, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x7c, 0xe1, 0x09, 0x39, 0x46, 0x28, 0x00, - 0x00, + // 2780 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xcf, 0x73, 0x23, 0x47, + 0xf5, 0xf7, 0x48, 0xb2, 0xa4, 0x79, 0xb2, 0x7e, 0x6c, 0xef, 0x66, 0xa3, 0xe8, 0x9b, 0xac, 0xb7, + 0x66, 0xb3, 0x9b, 0xcd, 0x8f, 0xaf, 0x9d, 0x38, 0x15, 0x2a, 0x61, 0x37, 0x50, 0x96, 0xd7, 0x8b, + 0x4c, 0x76, 0x6d, 0x67, 0x6c, 0x2f, 0x09, 0x54, 0x65, 0x68, 0x69, 0xda, 0xd2, 0xc4, 0xd2, 0xcc, + 0x64, 0xa6, 0xe5, 0x58, 0x14, 0x07, 0x8a, 0x0b, 0xc5, 0x2d, 0x5c, 0x28, 0x2e, 0x1c, 0xb9, 0x73, + 0xa0, 0x2a, 0x1c, 0xb9, 0x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0x19, 0x89, 0x93, 0xca, 0xfb, 0x49, 0x52, 0xf9, 0x62, + 0x8a, 0xee, 0x14, 0xab, 0x7c, 0x27, 0xc1, 0x2a, 0xd3, 0x06, 0x4e, 0xd0, 0xca, 0xbd, 0x19, 0xb4, + 0x32, 0x6d, 0xf9, 0x73, 0x78, 0xe5, 0xde, 0x0c, 0x5e, 0x79, 0x37, 0x75, 0x2e, 0x33, 0x89, 0xe5, + 0xfd, 0x24, 0xb1, 0x4c, 0x73, 0xc7, 0x14, 0xb3, 0x7c, 0x34, 0x8b, 0x59, 0xbe, 0x9c, 0x62, 0x63, + 0x2e, 0xb5, 0xdc, 0xb9, 0x44, 0x2d, 0xef, 0xa4, 0x98, 0x9a, 0xc1, 0x2d, 0xf7, 0x12, 0xdc, 0x12, + 0x32, 0xf9, 0x66, 0x0e, 0xb9, 0x7c, 0x78, 0x99, 0x5c, 0xbe, 0x94, 0x76, 0xd4, 0x66, 0xb1, 0xcb, + 0xef, 0x4e, 0xb1, 0xcb, 0xdb, 0x69, 0xab, 0x9a, 0xa6, 0x97, 0x27, 0x73, 0xe8, 0xe5, 0x6b, 0x29, + 0x86, 0x52, 0xf8, 0xe5, 0xc9, 0x1c, 0x7e, 0x99, 0x66, 0x36, 0x85, 0x60, 0x76, 0x17, 0x11, 0xcc, + 0xd7, 0xd3, 0xa6, 0x9c, 0x8d, 0x61, 0x92, 0x85, 0x0c, 0xf3, 0x8d, 0x94, 0x41, 0x96, 0xa7, 0x98, + 0x2f, 0xb3, 0x20, 0x3f, 0x05, 0x49, 0x0c, 0x0a, 0x89, 0xe7, 0x39, 0x9e, 0x64, 0x6f, 0xa2, 0xa1, + 0xdd, 0x65, 0xb4, 0x23, 0x02, 0x9e, 0x05, 0x74, 0x94, 0x07, 0x9e, 0x18, 0xcc, 0x68, 0x7f, 0x54, + 0x22, 0x5d, 0x1e, 0x9d, 0xe3, 0x94, 0x45, 0x95, 0x94, 0x25, 0xc6, 0x52, 0x73, 0x49, 0x96, 0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x28, 0xeb, 0x6f, 0x28, 0x5a, + 0x99, 0x8b, 0xe2, 0x08, 0x03, 0xc4, 0x4a, 0x17, 0x99, 0x7f, 0x1c, 0xd1, 0xca, 0x5e, 0xec, 0x46, + 0x3f, 0x82, 0x72, 0x98, 0xa0, 0x66, 0xfc, 0x91, 0x42, 0x2b, 0x6b, 0xbd, 0x19, 0x7d, 0x0c, 0xd5, + 0x64, 0x4e, 0xb6, 0xcc, 0x4f, 0x0f, 0x5a, 0x4b, 0x15, 0x92, 0xd9, 0x58, 0xc9, 0x34, 0x6d, 0x99, + 0x1f, 0x24, 0xb4, 0x96, 0xaa, 0x2e, 0xa3, 0x73, 0xb8, 0x72, 0x39, 0xb3, 0x5a, 0xf6, 0x57, 0x0a, + 0xad, 0xa5, 0xab, 0xce, 0x68, 0x02, 0x68, 0x46, 0x76, 0xb6, 0xf4, 0x4f, 0x17, 0x5a, 0xcb, 0x97, + 0xa2, 0xdb, 0xef, 0x7e, 0xf1, 0xf5, 0x0d, 0xe5, 0x2f, 0x5f, 0xdf, 0x50, 0xfe, 0xf6, 0xf5, 0x0d, + 0xe5, 0x4f, 0x7f, 0xbf, 0xa1, 0xfc, 0xf0, 0xd5, 0xbe, 0x45, 0x07, 0xe3, 0xee, 0x46, 0xcf, 0x19, + 0x6d, 0x46, 0xe6, 0xe2, 0x8f, 0xd1, 0x8f, 0xc7, 0xba, 0x45, 0x1e, 0xf4, 0xde, 0xfc, 0x4f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xad, 0xe2, 0x3b, 0x32, 0x51, 0x26, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -7026,7 +6877,7 @@ func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Header) Marshal() (dAtA []byte, err error) { +func (m *TxResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -7036,12 +6887,12 @@ func (m *Header) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Header) MarshalTo(dAtA []byte) (int, error) { +func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -7050,71 +6901,8 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x72 - } - if len(m.EvidenceHash) > 0 { - i -= len(m.EvidenceHash) - copy(dAtA[i:], m.EvidenceHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) - i-- - dAtA[i] = 0x6a - } - if len(m.LastResultsHash) > 0 { - i -= len(m.LastResultsHash) - copy(dAtA[i:], m.LastResultsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) - i-- - dAtA[i] = 0x62 - } - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x5a - } - if len(m.ConsensusHash) > 0 { - i -= len(m.ConsensusHash) - copy(dAtA[i:], m.ConsensusHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) - i-- - dAtA[i] = 0x52 - } - if len(m.NextValidatorsHash) > 0 { - i -= len(m.NextValidatorsHash) - copy(dAtA[i:], m.NextValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) - i-- - dAtA[i] = 0x4a - } - if len(m.ValidatorsHash) > 0 { - i -= len(m.ValidatorsHash) - copy(dAtA[i:], m.ValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) - i-- - dAtA[i] = 0x42 - } - if len(m.DataHash) > 0 { - i -= len(m.DataHash) - copy(dAtA[i:], m.DataHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.LastCommitHash) > 0 { - i -= len(m.LastCommitHash) - copy(dAtA[i:], m.LastCommitHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) - i-- - dAtA[i] = 0x32 - } { - size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -7122,71 +6910,21 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - n47, err47 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err47 != nil { - return 0, err47 - } - i -= n47 - i = encodeVarintTypes(dAtA, i, uint64(n47)) - i-- dAtA[i] = 0x22 - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 - } - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) + if len(m.Tx) > 0 { + i -= len(m.Tx) + copy(dAtA[i:], m.Tx) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx))) i-- - dAtA[i] = 0x12 - } - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Version) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Version) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Version) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + dAtA[i] = 0x1a } - if m.App != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.App)) + if m.Index != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Index)) i-- dAtA[i] = 0x10 } - if m.Block != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Block)) + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) i-- dAtA[i] = 0x8 } @@ -7474,12 +7212,12 @@ func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n52, err52 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err52 != nil { - return 0, err52 + n50, err50 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err50 != nil { + return 0, err50 } - i -= n52 - i = encodeVarintTypes(dAtA, i, uint64(n52)) + i -= n50 + i = encodeVarintTypes(dAtA, i, uint64(n50)) i-- dAtA[i] = 0x22 if m.Height != 0 { @@ -8806,79 +8544,24 @@ func (m *Event) Size() (n int) { return n } -func (m *Header) Size() (n int) { +func (m *TxResult) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Version.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) - n += 1 + l + sovTypes(uint64(l)) - l = m.LastBlockId.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.LastCommitHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DataHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.NextValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ConsensusHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.LastResultsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.EvidenceHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + if m.Index != 0 { + n += 1 + sovTypes(uint64(m.Index)) } - l = len(m.ProposerAddress) + l = len(m.Tx) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Version) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Block != 0 { - n += 1 + sovTypes(uint64(m.Block)) - } - if m.App != 0 { - n += 1 + sovTypes(uint64(m.App)) - } + l = m.Result.Size() + n += 1 + l + sovTypes(uint64(l)) if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -15106,7 +14789,7 @@ func (m *Event) Unmarshal(dAtA []byte) error { } return nil } -func (m *Header) Unmarshal(dAtA []byte) error { +func (m *TxResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15129,17 +14812,17 @@ func (m *Header) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Header: wiretype end group for non-group") + return fmt.Errorf("proto: TxResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } - var msglen int + m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15149,62 +14832,16 @@ func (m *Header) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - m.Height = 0 + m.Index = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15214,16 +14851,16 @@ func (m *Header) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Index |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15233,28 +14870,29 @@ func (m *Header) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err + m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) + if m.Tx == nil { + m.Tx = []byte{} } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15281,408 +14919,10 @@ func (m *Header) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastCommitHash == nil { - m.LastCommitHash = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) - if m.DataHash == nil { - m.DataHash = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorsHash == nil { - m.ValidatorsHash = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.NextValidatorsHash == nil { - m.NextValidatorsHash = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) - if m.ConsensusHash == nil { - m.ConsensusHash = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastResultsHash == nil { - m.LastResultsHash = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) - if m.EvidenceHash == nil { - m.EvidenceHash = []byte{} - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerAddress == nil { - m.ProposerAddress = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Version) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Version: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - m.Block = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Block |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field App", wireType) - } - m.App = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.App |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/abci/types/types.proto b/abci/types/types.proto index bf096706b..9035dc776 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -5,6 +5,7 @@ option go_package = "github.com/tendermint/tendermint/abci/types"; // For more information on gogo.proto, see: // https://github.com/gogo/protobuf/blob/master/extensions.md import "crypto/merkle/merkle.proto"; +import "proto/types/types.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "third_party/proto/gogoproto/gogo.proto"; @@ -77,7 +78,7 @@ message RequestQuery { message RequestBeginBlock { bytes hash = 1; - Header header = 2 [(gogoproto.nullable) = false]; + tendermint.proto.types.Header header = 2 [(gogoproto.nullable) = false]; LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; } @@ -326,40 +327,18 @@ message Event { (gogoproto.jsontag) = "attributes,omitempty"]; } -//---------------------------------------- -// Blockchain Types - -message Header { - // basic block info - Version version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of tx results from prev block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block +// TxResult contains results of executing the transaction. +// +// One usage is indexing transaction results. +message TxResult { + int64 height = 1; + uint32 Index = 2; + bytes tx = 3; + ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; } -message Version { - uint64 Block = 1; - uint64 App = 2; -} +//---------------------------------------- +// Blockchain Types message BlockID { bytes hash = 1; diff --git a/consensus/replay.go b/consensus/replay.go index 4dc0eefa8..90642056d 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -19,7 +19,6 @@ import ( "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - "github.com/tendermint/tendermint/version" ) var crc32c = crc32.MakeTable(crc32.Castagnoli) @@ -259,8 +258,8 @@ func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error { ) // Set AppVersion on the state. - if h.initialState.Version.Consensus.App != version.Protocol(res.AppVersion) { - h.initialState.Version.Consensus.App = version.Protocol(res.AppVersion) + if h.initialState.Version.Consensus.App != res.AppVersion { + h.initialState.Version.Consensus.App = res.AppVersion sm.SaveState(h.stateDB, h.initialState) } diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 82420b094..7189bfa3b 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -31,7 +31,6 @@ import ( "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - "github.com/tendermint/tendermint/version" ) func TestMain(m *testing.M) { @@ -1086,7 +1085,7 @@ func readPieceFromWAL(msg *TimedWALMessage) interface{} { func stateAndStore( config *cfg.Config, pubKey crypto.PubKey, - appVersion version.Protocol) (dbm.DB, sm.State, *mockBlockStore) { + appVersion uint64) (dbm.DB, sm.State, *mockBlockStore) { stateDB := dbm.NewMemDB() state, _ := sm.MakeGenesisStateFromFile(config.GenesisFile()) state.Version.Consensus.App = appVersion diff --git a/go.mod b/go.mod index 10a04f913..26bd80b71 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/go-kit/kit v0.10.0 github.com/go-logfmt/logfmt v0.5.0 github.com/gogo/protobuf v1.3.1 - github.com/golang/protobuf v1.4.2 + github.com/golang/protobuf v1.4.0 github.com/gorilla/websocket v1.4.2 github.com/gtank/merlin v0.1.1 github.com/libp2p/go-buffer-pool v0.0.2 diff --git a/go.sum b/go.sum index 0bccd1ccd..11b93c02b 100644 --- a/go.sum +++ b/go.sum @@ -160,14 +160,13 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -652,8 +651,6 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/node/node_test.go b/node/node_test.go index 8888a9aa6..6f5060a30 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -29,7 +29,6 @@ import ( "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - "github.com/tendermint/tendermint/version" ) func TestNodeStartStop(t *testing.T) { @@ -120,7 +119,7 @@ func TestNodeSetAppVersion(t *testing.T) { require.NoError(t, err) // default config uses the kvstore app - var appVersion version.Protocol = kvstore.ProtocolVersion + var appVersion uint64 = kvstore.ProtocolVersion // check version is set in state state := sm.LoadState(n.stateDB) diff --git a/p2p/node_info.go b/p2p/node_info.go index 24d5e11e1..ea7fc961c 100644 --- a/p2p/node_info.go +++ b/p2p/node_info.go @@ -44,9 +44,9 @@ type nodeInfoTransport interface { // ProtocolVersion contains the protocol versions for the software. type ProtocolVersion struct { - P2P version.Protocol `json:"p2p"` - Block version.Protocol `json:"block"` - App version.Protocol `json:"app"` + P2P uint64 `json:"p2p"` + Block uint64 `json:"block"` + App uint64 `json:"app"` } // defaultProtocolVersion populates the Block and P2P versions using @@ -58,7 +58,7 @@ var defaultProtocolVersion = NewProtocolVersion( ) // NewProtocolVersion returns a fully populated ProtocolVersion. -func NewProtocolVersion(p2p, block, app version.Protocol) ProtocolVersion { +func NewProtocolVersion(p2p, block, app uint64) ProtocolVersion { return ProtocolVersion{ P2P: p2p, Block: block, diff --git a/proto/crypto/merkle/types.pb.go b/proto/crypto/merkle/types.pb.go index 69397ff86..61174333c 100644 --- a/proto/crypto/merkle/types.pb.go +++ b/proto/crypto/merkle/types.pb.go @@ -5,8 +5,11 @@ package merkle import ( fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -37,16 +40,25 @@ func (*SimpleProof) Descriptor() ([]byte, []int) { return fileDescriptor_57e39eefdaf7ae96, []int{0} } func (m *SimpleProof) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SimpleProof.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SimpleProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SimpleProof.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SimpleProof.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *SimpleProof) XXX_Merge(src proto.Message) { xxx_messageInfo_SimpleProof.Merge(m, src) } func (m *SimpleProof) XXX_Size() int { - return xxx_messageInfo_SimpleProof.Size(m) + return m.Size() } func (m *SimpleProof) XXX_DiscardUnknown() { xxx_messageInfo_SimpleProof.DiscardUnknown(m) @@ -89,17 +101,361 @@ func init() { func init() { proto.RegisterFile("proto/crypto/merkle/types.proto", fileDescriptor_57e39eefdaf7ae96) } var fileDescriptor_57e39eefdaf7ae96 = []byte{ - // 188 bytes of a gzipped FileDescriptorProto + // 225 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0xcf, 0x4d, 0x2d, 0xca, 0xce, 0x49, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x03, 0xcb, 0x08, 0xc9, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, - 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4, 0x20, 0x6a, 0xf5, 0x20, 0x6a, 0x95, 0x72, 0xb8, 0xb8, - 0x83, 0x33, 0x73, 0x0b, 0x72, 0x52, 0x03, 0x8a, 0xf2, 0xf3, 0xd3, 0x84, 0x44, 0xb8, 0x58, 0x4b, - 0xf2, 0x4b, 0x12, 0x73, 0x24, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x20, 0x1c, 0x90, 0x68, 0x66, - 0x5e, 0x4a, 0x6a, 0x85, 0x04, 0x13, 0x44, 0x14, 0xcc, 0x11, 0x92, 0xe6, 0xe2, 0xcc, 0x49, 0x4d, - 0x4c, 0x8b, 0xcf, 0x48, 0x2c, 0xce, 0x90, 0x60, 0x56, 0x60, 0xd4, 0xe0, 0x09, 0xe2, 0x00, 0x09, - 0x78, 0x24, 0x16, 0x67, 0x80, 0xb4, 0x24, 0x96, 0xe6, 0x95, 0x14, 0x4b, 0xb0, 0x28, 0x30, 0x6b, - 0xf0, 0x04, 0x41, 0x38, 0x4e, 0x66, 0x51, 0x26, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, - 0xf9, 0xb9, 0xfa, 0x08, 0xa7, 0x21, 0x33, 0xb1, 0xf8, 0x28, 0x89, 0x0d, 0x2c, 0x68, 0x0c, 0x08, - 0x00, 0x00, 0xff, 0xff, 0x4f, 0x08, 0x9a, 0xf1, 0xef, 0x00, 0x00, 0x00, + 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4, 0x20, 0x6a, 0xf5, 0x20, 0x6a, 0xa5, 0xd4, 0x4a, 0x32, + 0x32, 0x8b, 0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0x21, 0x86, 0xa5, 0xe7, 0xa7, 0xe7, + 0x23, 0x58, 0x10, 0x5d, 0x4a, 0x39, 0x5c, 0xdc, 0xc1, 0x99, 0xb9, 0x05, 0x39, 0xa9, 0x01, 0x45, + 0xf9, 0xf9, 0x69, 0x42, 0x22, 0x5c, 0xac, 0x25, 0xf9, 0x25, 0x89, 0x39, 0x12, 0x8c, 0x0a, 0x8c, + 0x1a, 0xcc, 0x41, 0x10, 0x0e, 0x48, 0x34, 0x33, 0x2f, 0x25, 0xb5, 0x42, 0x82, 0x09, 0x22, 0x0a, + 0xe6, 0x08, 0x49, 0x73, 0x71, 0xe6, 0xa4, 0x26, 0xa6, 0xc5, 0x67, 0x24, 0x16, 0x67, 0x48, 0x30, + 0x2b, 0x30, 0x6a, 0xf0, 0x04, 0x71, 0x80, 0x04, 0x3c, 0x12, 0x8b, 0x33, 0x40, 0x5a, 0x12, 0x4b, + 0xf3, 0x4a, 0x8a, 0x25, 0x58, 0x14, 0x98, 0x35, 0x78, 0x82, 0x20, 0x1c, 0x27, 0xa7, 0x13, 0x8f, + 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0xca, 0x24, 0x3d, 0xb3, 0x24, + 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe1, 0x1d, 0x64, 0x26, 0x96, 0x50, 0x48, 0x62, + 0x03, 0x0b, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x90, 0x2f, 0xe5, 0x58, 0x23, 0x01, 0x00, + 0x00, +} + +func (m *SimpleProof) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SimpleProof) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SimpleProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Aunts) > 0 { + for iNdEx := len(m.Aunts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Aunts[iNdEx]) + copy(dAtA[i:], m.Aunts[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Aunts[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.LeafHash) > 0 { + i -= len(m.LeafHash) + copy(dAtA[i:], m.LeafHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LeafHash))) + i-- + dAtA[i] = 0x1a + } + if m.Index != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x10 + } + if m.Total != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SimpleProof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovTypes(uint64(m.Total)) + } + if m.Index != 0 { + n += 1 + sovTypes(uint64(m.Index)) + } + l = len(m.LeafHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Aunts) > 0 { + for _, b := range m.Aunts { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SimpleProof) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SimpleProof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimpleProof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeafHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LeafHash = append(m.LeafHash[:0], dAtA[iNdEx:postIndex]...) + if m.LeafHash == nil { + m.LeafHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aunts", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aunts = append(m.Aunts, make([]byte, postIndex-iNdEx)) + copy(m.Aunts[len(m.Aunts)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/crypto/merkle/types.proto b/proto/crypto/merkle/types.proto index c7dc355a5..66141bb6e 100644 --- a/proto/crypto/merkle/types.proto +++ b/proto/crypto/merkle/types.proto @@ -3,6 +3,12 @@ package tendermint.proto.crypto.merkle; option go_package = "github.com/tendermint/tendermint/proto/crypto/merkle"; +import "third_party/proto/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.sizer_all) = true; + message SimpleProof { int64 total = 1; int64 index = 2; diff --git a/proto/libs/bits/types.pb.go b/proto/libs/bits/types.pb.go index 05cfefa4c..d43ab94fd 100644 --- a/proto/libs/bits/types.pb.go +++ b/proto/libs/bits/types.pb.go @@ -5,12 +5,17 @@ package bits import ( fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -35,16 +40,25 @@ func (*BitArray) Descriptor() ([]byte, []int) { return fileDescriptor_3f1fbe70d7999e09, []int{0} } func (m *BitArray) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BitArray.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BitArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BitArray.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BitArray.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *BitArray) XXX_Merge(src proto.Message) { xxx_messageInfo_BitArray.Merge(m, src) } func (m *BitArray) XXX_Size() int { - return xxx_messageInfo_BitArray.Size(m) + return m.Size() } func (m *BitArray) XXX_DiscardUnknown() { xxx_messageInfo_BitArray.DiscardUnknown(m) @@ -68,19 +82,349 @@ func (m *BitArray) GetElems() []uint64 { func init() { proto.RegisterType((*BitArray)(nil), "tendermint.proto.libs.bits.BitArray") + golang_proto.RegisterType((*BitArray)(nil), "tendermint.proto.libs.bits.BitArray") } func init() { proto.RegisterFile("proto/libs/bits/types.proto", fileDescriptor_3f1fbe70d7999e09) } +func init() { + golang_proto.RegisterFile("proto/libs/bits/types.proto", fileDescriptor_3f1fbe70d7999e09) +} var fileDescriptor_3f1fbe70d7999e09 = []byte{ - // 140 bytes of a gzipped FileDescriptorProto + // 182 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0xc9, 0x4c, 0x2a, 0xd6, 0x4f, 0xca, 0x2c, 0x29, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x03, 0x8b, 0x0a, 0x49, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, - 0x40, 0x44, 0xf4, 0x40, 0xea, 0xf4, 0x40, 0xea, 0x94, 0x4c, 0xb8, 0x38, 0x9c, 0x32, 0x4b, 0x1c, - 0x8b, 0x8a, 0x12, 0x2b, 0x85, 0x84, 0xb8, 0x58, 0x40, 0x62, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, - 0x41, 0x60, 0xb6, 0x90, 0x08, 0x17, 0x6b, 0x6a, 0x4e, 0x6a, 0x6e, 0xb1, 0x04, 0x93, 0x02, 0xb3, - 0x06, 0x4b, 0x10, 0x84, 0xe3, 0x64, 0x14, 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, - 0x9c, 0x9f, 0xab, 0x8f, 0x30, 0x1e, 0x99, 0x89, 0xe6, 0xa2, 0x24, 0x36, 0xb0, 0x80, 0x31, 0x20, - 0x00, 0x00, 0xff, 0xff, 0x49, 0xc4, 0x52, 0x81, 0xab, 0x00, 0x00, 0x00, + 0x40, 0x44, 0xf4, 0x40, 0xea, 0xf4, 0x40, 0xea, 0xa4, 0xd4, 0x4a, 0x32, 0x32, 0x8b, 0x52, 0xe2, + 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0x21, 0x86, 0xa4, 0xe7, 0xa7, 0xe7, 0x23, 0x58, 0x10, 0x1d, + 0x4a, 0x26, 0x5c, 0x1c, 0x4e, 0x99, 0x25, 0x8e, 0x45, 0x45, 0x89, 0x95, 0x42, 0x42, 0x5c, 0x2c, + 0x20, 0xbd, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x60, 0xb6, 0x90, 0x08, 0x17, 0x6b, 0x6a, + 0x4e, 0x6a, 0x6e, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0x4b, 0x10, 0x84, 0xe3, 0xe4, 0x74, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x1e, 0x78, 0x2c, 0xc7, 0x18, + 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0x70, 0x16, 0x32, + 0x13, 0xcd, 0x27, 0x49, 0x6c, 0x60, 0x01, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xed, + 0xf8, 0x61, 0xe3, 0x00, 0x00, 0x00, } + +func (m *BitArray) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BitArray) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BitArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Elems) > 0 { + dAtA2 := make([]byte, len(m.Elems)*10) + var j1 int + for _, num := range m.Elems { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintTypes(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x12 + } + if m.Bits != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Bits)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *BitArray) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Bits != 0 { + n += 1 + sovTypes(uint64(m.Bits)) + } + if len(m.Elems) > 0 { + l = 0 + for _, e := range m.Elems { + l += sovTypes(uint64(e)) + } + n += 1 + sovTypes(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BitArray) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BitArray: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BitArray: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType) + } + m.Bits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Bits |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Elems = append(m.Elems, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Elems) == 0 { + m.Elems = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Elems = append(m.Elems, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Elems", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/libs/bits/types.proto b/proto/libs/bits/types.proto index f59b28f5c..9b34bf68b 100644 --- a/proto/libs/bits/types.proto +++ b/proto/libs/bits/types.proto @@ -3,6 +3,13 @@ package tendermint.proto.libs.bits; option go_package = "github.com/tendermint/tendermint/proto/libs/bits"; +import "third_party/proto/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.goproto_registration) = true; + message BitArray { int64 bits = 1; repeated uint64 elems = 2; diff --git a/proto/types/types.pb.go b/proto/types/types.pb.go index babb580f6..1cbce69f5 100644 --- a/proto/types/types.pb.go +++ b/proto/types/types.pb.go @@ -7,16 +7,21 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" merkle "github.com/tendermint/tendermint/proto/crypto/merkle" bits "github.com/tendermint/tendermint/proto/libs/bits" version "github.com/tendermint/tendermint/proto/version" + io "io" math "math" + math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -99,16 +104,25 @@ func (*PartSetHeader) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{0} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PartSetHeader.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *PartSetHeader) XXX_Merge(src proto.Message) { xxx_messageInfo_PartSetHeader.Merge(m, src) } func (m *PartSetHeader) XXX_Size() int { - return xxx_messageInfo_PartSetHeader.Size(m) + return m.Size() } func (m *PartSetHeader) XXX_DiscardUnknown() { xxx_messageInfo_PartSetHeader.DiscardUnknown(m) @@ -146,16 +160,25 @@ func (*Part) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{1} } func (m *Part) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Part.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Part.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Part.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Part) XXX_Merge(src proto.Message) { xxx_messageInfo_Part.Merge(m, src) } func (m *Part) XXX_Size() int { - return xxx_messageInfo_Part.Size(m) + return m.Size() } func (m *Part) XXX_DiscardUnknown() { xxx_messageInfo_Part.DiscardUnknown(m) @@ -200,16 +223,25 @@ func (*BlockID) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{2} } func (m *BlockID) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockID.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockID.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BlockID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *BlockID) XXX_Merge(src proto.Message) { xxx_messageInfo_BlockID.Merge(m, src) } func (m *BlockID) XXX_Size() int { - return xxx_messageInfo_BlockID.Size(m) + return m.Size() } func (m *BlockID) XXX_DiscardUnknown() { xxx_messageInfo_BlockID.DiscardUnknown(m) @@ -239,7 +271,7 @@ type Header struct { Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` // prev block info - LastBlockID BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` + LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` // hashes of block data LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` @@ -264,16 +296,25 @@ func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{3} } func (m *Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Header.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Header.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Header.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Header) XXX_Merge(src proto.Message) { xxx_messageInfo_Header.Merge(m, src) } func (m *Header) XXX_Size() int { - return xxx_messageInfo_Header.Size(m) + return m.Size() } func (m *Header) XXX_DiscardUnknown() { xxx_messageInfo_Header.DiscardUnknown(m) @@ -309,9 +350,9 @@ func (m *Header) GetTime() time.Time { return time.Time{} } -func (m *Header) GetLastBlockID() BlockID { +func (m *Header) GetLastBlockId() BlockID { if m != nil { - return m.LastBlockID + return m.LastBlockId } return BlockID{} } @@ -399,16 +440,25 @@ func (*Data) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{4} } func (m *Data) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Data.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Data.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Data.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Data) XXX_Merge(src proto.Message) { xxx_messageInfo_Data.Merge(m, src) } func (m *Data) XXX_Size() int { - return xxx_messageInfo_Data.Size(m) + return m.Size() } func (m *Data) XXX_DiscardUnknown() { xxx_messageInfo_Data.DiscardUnknown(m) @@ -453,16 +503,25 @@ func (*Vote) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{5} } func (m *Vote) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Vote.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Vote.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Vote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Vote) XXX_Merge(src proto.Message) { xxx_messageInfo_Vote.Merge(m, src) } func (m *Vote) XXX_Size() int { - return xxx_messageInfo_Vote.Size(m) + return m.Size() } func (m *Vote) XXX_DiscardUnknown() { xxx_messageInfo_Vote.DiscardUnknown(m) @@ -546,16 +605,25 @@ func (*Commit) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{6} } func (m *Commit) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Commit.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Commit.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Commit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Commit) XXX_Merge(src proto.Message) { xxx_messageInfo_Commit.Merge(m, src) } func (m *Commit) XXX_Size() int { - return xxx_messageInfo_Commit.Size(m) + return m.Size() } func (m *Commit) XXX_DiscardUnknown() { xxx_messageInfo_Commit.DiscardUnknown(m) @@ -623,16 +691,25 @@ func (*CommitSig) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{7} } func (m *CommitSig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CommitSig.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *CommitSig) XXX_Merge(src proto.Message) { xxx_messageInfo_CommitSig.Merge(m, src) } func (m *CommitSig) XXX_Size() int { - return xxx_messageInfo_CommitSig.Size(m) + return m.Size() } func (m *CommitSig) XXX_DiscardUnknown() { xxx_messageInfo_CommitSig.DiscardUnknown(m) @@ -688,16 +765,25 @@ func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{8} } func (m *Proposal) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Proposal.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Proposal) XXX_Merge(src proto.Message) { xxx_messageInfo_Proposal.Merge(m, src) } func (m *Proposal) XXX_Size() int { - return xxx_messageInfo_Proposal.Size(m) + return m.Size() } func (m *Proposal) XXX_DiscardUnknown() { xxx_messageInfo_Proposal.DiscardUnknown(m) @@ -769,16 +855,25 @@ func (*SignedHeader) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{9} } func (m *SignedHeader) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SignedHeader.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *SignedHeader) XXX_Merge(src proto.Message) { xxx_messageInfo_SignedHeader.Merge(m, src) } func (m *SignedHeader) XXX_Size() int { - return xxx_messageInfo_SignedHeader.Size(m) + return m.Size() } func (m *SignedHeader) XXX_DiscardUnknown() { xxx_messageInfo_SignedHeader.DiscardUnknown(m) @@ -817,16 +912,25 @@ func (*BlockMeta) Descriptor() ([]byte, []int) { return fileDescriptor_ff06f8095857fb18, []int{10} } func (m *BlockMeta) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlockMeta.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *BlockMeta) XXX_Merge(src proto.Message) { xxx_messageInfo_BlockMeta.Merge(m, src) } func (m *BlockMeta) XXX_Size() int { - return xxx_messageInfo_BlockMeta.Size(m) + return m.Size() } func (m *BlockMeta) XXX_DiscardUnknown() { xxx_messageInfo_BlockMeta.DiscardUnknown(m) @@ -864,102 +968,3405 @@ func (m *BlockMeta) GetNumTxs() int64 { func init() { proto.RegisterEnum("tendermint.proto.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value) + golang_proto.RegisterEnum("tendermint.proto.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value) proto.RegisterEnum("tendermint.proto.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value) + golang_proto.RegisterEnum("tendermint.proto.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value) proto.RegisterType((*PartSetHeader)(nil), "tendermint.proto.types.PartSetHeader") + golang_proto.RegisterType((*PartSetHeader)(nil), "tendermint.proto.types.PartSetHeader") proto.RegisterType((*Part)(nil), "tendermint.proto.types.Part") + golang_proto.RegisterType((*Part)(nil), "tendermint.proto.types.Part") proto.RegisterType((*BlockID)(nil), "tendermint.proto.types.BlockID") + golang_proto.RegisterType((*BlockID)(nil), "tendermint.proto.types.BlockID") proto.RegisterType((*Header)(nil), "tendermint.proto.types.Header") + golang_proto.RegisterType((*Header)(nil), "tendermint.proto.types.Header") proto.RegisterType((*Data)(nil), "tendermint.proto.types.Data") + golang_proto.RegisterType((*Data)(nil), "tendermint.proto.types.Data") proto.RegisterType((*Vote)(nil), "tendermint.proto.types.Vote") + golang_proto.RegisterType((*Vote)(nil), "tendermint.proto.types.Vote") proto.RegisterType((*Commit)(nil), "tendermint.proto.types.Commit") + golang_proto.RegisterType((*Commit)(nil), "tendermint.proto.types.Commit") proto.RegisterType((*CommitSig)(nil), "tendermint.proto.types.CommitSig") + golang_proto.RegisterType((*CommitSig)(nil), "tendermint.proto.types.CommitSig") proto.RegisterType((*Proposal)(nil), "tendermint.proto.types.Proposal") + golang_proto.RegisterType((*Proposal)(nil), "tendermint.proto.types.Proposal") proto.RegisterType((*SignedHeader)(nil), "tendermint.proto.types.SignedHeader") + golang_proto.RegisterType((*SignedHeader)(nil), "tendermint.proto.types.SignedHeader") proto.RegisterType((*BlockMeta)(nil), "tendermint.proto.types.BlockMeta") + golang_proto.RegisterType((*BlockMeta)(nil), "tendermint.proto.types.BlockMeta") } func init() { proto.RegisterFile("proto/types/types.proto", fileDescriptor_ff06f8095857fb18) } +func init() { golang_proto.RegisterFile("proto/types/types.proto", fileDescriptor_ff06f8095857fb18) } var fileDescriptor_ff06f8095857fb18 = []byte{ - // 1270 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6e, 0xdb, 0xc6, - 0x13, 0x37, 0x25, 0xca, 0x92, 0x86, 0x92, 0x2d, 0xf3, 0xef, 0x7f, 0xa2, 0xca, 0xad, 0xa5, 0xc8, - 0x4d, 0xea, 0x7c, 0x80, 0x2a, 0x5c, 0xa0, 0x68, 0x80, 0x5e, 0x24, 0xdb, 0x71, 0x84, 0xd8, 0xb2, - 0x40, 0xa9, 0xe9, 0xc7, 0x85, 0x58, 0x89, 0x1b, 0x8a, 0x08, 0x45, 0x12, 0xdc, 0x95, 0x61, 0xa7, - 0x40, 0x81, 0xde, 0x0a, 0x9f, 0xfa, 0x02, 0x3e, 0xa5, 0x05, 0xfa, 0x16, 0xed, 0xb1, 0xa7, 0x3e, - 0x42, 0x0a, 0xa4, 0xaf, 0xd0, 0x07, 0x28, 0xf6, 0x83, 0x94, 0x14, 0x5b, 0x6d, 0xd0, 0x04, 0xbd, - 0xd8, 0xdc, 0x99, 0xdf, 0xcc, 0xee, 0xfc, 0xe6, 0x37, 0xbb, 0x36, 0x5c, 0x0f, 0xa3, 0x80, 0x06, - 0x0d, 0x7a, 0x16, 0x62, 0x22, 0x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0x64, 0x61, 0xeb, 0xdb, 0x50, 0xe2, 0x99, 0x87, 0xc1, 0x78, 0xec, 0x52, 0x8b, 0xf7, - 0x64, 0x99, 0xf7, 0x64, 0x85, 0xd9, 0x77, 0xb9, 0xf9, 0x21, 0xeb, 0xce, 0x06, 0xe4, 0x6d, 0x44, - 0x91, 0x80, 0x64, 0x39, 0x24, 0xc7, 0x0c, 0xdc, 0xf9, 0x01, 0xac, 0x9e, 0x20, 0xcf, 0xb5, 0x11, - 0x0d, 0x22, 0x22, 0x20, 0x39, 0x91, 0x65, 0x6a, 0xe6, 0xc0, 0x0f, 0x61, 0xdd, 0xc7, 0xa7, 0xd4, - 0x7a, 0x15, 0x9d, 0xe7, 0x68, 0x9d, 0xf9, 0x1e, 0xcf, 0x47, 0xdc, 0x84, 0x95, 0x61, 0xdc, 0x11, - 0x81, 0x05, 0x8e, 0x2d, 0x26, 0x56, 0x0e, 0x7b, 0x07, 0x72, 0x28, 0x0c, 0x05, 0x40, 0xe3, 0x80, - 0x2c, 0x0a, 0x43, 0xee, 0xba, 0x03, 0x6b, 0xbc, 0xc6, 0x08, 0x93, 0x89, 0x47, 0x65, 0x92, 0x02, - 0xc7, 0xac, 0x32, 0x87, 0x29, 0xec, 0x1c, 0xbb, 0x05, 0x45, 0x7c, 0xe2, 0xda, 0xd8, 0x1f, 0x62, - 0x81, 0x2b, 0x72, 0x5c, 0x21, 0x36, 0x72, 0xd0, 0x6d, 0x28, 0x85, 0x51, 0x10, 0x06, 0x04, 0x47, - 0x16, 0xb2, 0xed, 0x08, 0x13, 0x52, 0x5e, 0x11, 0xf9, 0x62, 0x7b, 0x53, 0x98, 0xeb, 0xf7, 0x40, - 0xdd, 0x43, 0x14, 0xe9, 0x25, 0x48, 0xd3, 0x53, 0x52, 0x56, 0x6a, 0xe9, 0xed, 0x82, 0xc9, 0x3e, - 0xaf, 0x9c, 0xce, 0x3f, 0x53, 0xa0, 0x3e, 0x0e, 0x28, 0xd6, 0xef, 0x83, 0xca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0xee, 0x35, - 0x0f, 0x05, 0x2a, 0x5d, 0x29, 0x9d, 0x5f, 0xd4, 0x0a, 0xf1, 0x88, 0x33, 0xd0, 0xf4, 0x9c, 0x2d, - 0xe3, 0xab, 0x7b, 0x8e, 0x4b, 0x47, 0x93, 0x81, 0x31, 0x0c, 0xc6, 0x8d, 0x69, 0xf7, 0x66, 0x3f, - 0x67, 0xfe, 0xa3, 0x18, 0x2c, 0xf3, 0xc5, 0x47, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x96, - 0xf2, 0xb9, 0x67, 0x0c, 0x00, 0x00, + // 1276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdf, 0x6e, 0x1a, 0xc7, + 0x17, 0xf6, 0xc2, 0x62, 0xe0, 0x00, 0x36, 0x5e, 0xf9, 0x97, 0xf0, 0xc3, 0x2d, 0x26, 0xb8, 0x49, + 0x9d, 0x3f, 0x5a, 0x2a, 0x57, 0xaa, 0x1a, 0xa9, 0xaa, 0x04, 0xb6, 0x43, 0x50, 0x6c, 0x40, 0x0b, + 0x4d, 0xd5, 0xde, 0xac, 0x06, 0x76, 0xb2, 0xac, 0xb2, 0xec, 0xae, 0x76, 0x07, 0xcb, 0xa4, 0x52, + 0xaf, 0x2b, 0x5f, 0xf5, 0x05, 0x7c, 0x95, 0x56, 0xea, 0x5b, 0x34, 0x97, 0xb9, 0xaa, 0xfa, 0x04, + 0x69, 0xe5, 0xbc, 0x41, 0xd5, 0x07, 0xa8, 0xe6, 0xcf, 0x2e, 0x10, 0x4c, 0x6b, 0x35, 0x51, 0x6f, + 0xec, 0x9d, 0x73, 0xbe, 0xef, 0xcc, 0x9c, 0x6f, 0xbe, 0x99, 0x11, 0x70, 0xdd, 0xf3, 0x5d, 0xe2, + 0x56, 0xc9, 0xc4, 0xc3, 0x01, 0xff, 0xab, 0xb2, 0x88, 0x72, 0x8d, 0x60, 0xc7, 0xc0, 0xfe, 0xc8, + 0x72, 0x08, 0x8f, 0xa8, 0x2c, 0x5b, 0xbc, 0x45, 0x86, 0x96, 0x6f, 0xe8, 0x1e, 0xf2, 0xc9, 0xa4, + 0xca, 0xc9, 0xa6, 0x6b, 0xba, 0xd3, 0x2f, 0x8e, 0x2e, 0x6e, 0x9b, 0xae, 0x6b, 0xda, 0x98, 0x43, + 0xfa, 0xe3, 0x27, 0x55, 0x62, 0x8d, 0x70, 0x40, 0xd0, 0xc8, 0x13, 0x80, 0x2d, 0x4e, 0xb1, 0xad, + 0x7e, 0x50, 0xed, 0x5b, 0x64, 0x6e, 0xf6, 0xe2, 0x36, 0x4f, 0x0e, 0xfc, 0x89, 0x47, 0xdc, 0xea, + 0x08, 0xfb, 0x4f, 0x6d, 0x3c, 0x07, 0x10, 0xec, 0x13, 0xec, 0x07, 0x96, 0xeb, 0x84, 0xff, 0x79, + 0xb2, 0x72, 0x1f, 0x72, 0x1d, 0xe4, 0x93, 0x2e, 0x26, 0x0f, 0x31, 0x32, 0xb0, 0xaf, 0x6c, 0x42, + 0x82, 0xb8, 0x04, 0xd9, 0x05, 0xa9, 0x2c, 0xed, 0xe6, 0x34, 0x3e, 0x50, 0x14, 0x90, 0x87, 0x28, + 0x18, 0x16, 0x62, 0x65, 0x69, 0x37, 0xab, 0xb1, 0xef, 0xca, 0x37, 0x20, 0x53, 0x2a, 0x65, 0x58, + 0x8e, 0x81, 0x4f, 0x43, 0x06, 0x1b, 0xd0, 0x68, 0x7f, 0x42, 0x70, 0x20, 0x28, 0x7c, 0xa0, 0x34, + 0x20, 0xe1, 0xf9, 0xae, 0xfb, 0xa4, 0x10, 0x2f, 0x4b, 0xbb, 0x99, 0xbd, 0xbb, 0xea, 0x82, 0x74, + 0xbc, 0x0f, 0x95, 0xf7, 0xa1, 0x76, 0xad, 0x91, 0x67, 0xe3, 0x0e, 0xa5, 0xd4, 0xe5, 0x97, 0xaf, + 0xb6, 0x57, 0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35, 0x1a, 0xdf, 0x67, 0xe1, 0x87, 0x74, + 0x3b, 0xb6, 0x20, 0x6d, 0x20, 0x82, 0x38, 0x24, 0xc9, 0x20, 0x29, 0x1a, 0x60, 0xc9, 0x0f, 0x61, + 0xfd, 0x04, 0xd9, 0x96, 0x81, 0x88, 0xeb, 0x07, 0x1c, 0x92, 0xe2, 0x55, 0xa6, 0x61, 0x06, 0xfc, + 0x08, 0x36, 0x1d, 0x7c, 0x4a, 0xf4, 0x37, 0xd1, 0x69, 0x86, 0x56, 0x68, 0xee, 0xf1, 0x3c, 0xe3, + 0x26, 0xac, 0x0d, 0xc2, 0x2d, 0xe0, 0x58, 0x60, 0xd8, 0x5c, 0x14, 0x65, 0xb0, 0xff, 0x43, 0x0a, + 0x79, 0x1e, 0x07, 0x64, 0x18, 0x20, 0x89, 0x3c, 0x8f, 0xa5, 0xee, 0xc0, 0x06, 0xeb, 0xd1, 0xc7, + 0xc1, 0xd8, 0x26, 0xa2, 0x48, 0x96, 0x61, 0xd6, 0x69, 0x42, 0xe3, 0x71, 0x86, 0xdd, 0x81, 0x1c, + 0x3e, 0xb1, 0x0c, 0xec, 0x0c, 0x30, 0xc7, 0xe5, 0x18, 0x2e, 0x1b, 0x06, 0x19, 0xe8, 0x36, 0xe4, + 0x3d, 0xdf, 0xf5, 0xdc, 0x00, 0xfb, 0x3a, 0x32, 0x0c, 0x1f, 0x07, 0x41, 0x61, 0x8d, 0xd7, 0x0b, + 0xe3, 0x35, 0x1e, 0xae, 0xdc, 0x03, 0xf9, 0x00, 0x11, 0xa4, 0xe4, 0x21, 0x4e, 0x4e, 0x83, 0x82, + 0x54, 0x8e, 0xef, 0x66, 0x35, 0xfa, 0x79, 0xe9, 0x71, 0xfc, 0x33, 0x06, 0xf2, 0x63, 0x97, 0x60, + 0xe5, 0x3e, 0xc8, 0x74, 0xeb, 0x98, 0x3b, 0xd7, 0x96, 0x7b, 0xbe, 0x6b, 0x99, 0x0e, 0x36, 0x8e, + 0x03, 0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 0x0a, 0x9a, 0xae, 0xb3, 0xfe, 0xf9, 0xcb, 0x8b, 0x92, 0xf4, 0xeb, 0x45, 0x49, 0xfa, 0xfd, + 0xa2, 0x24, 0xbd, 0x78, 0x5d, 0x92, 0xbe, 0xbe, 0x67, 0x5a, 0x64, 0x38, 0xee, 0xab, 0x03, 0x77, + 0x54, 0x9d, 0xee, 0xe6, 0xec, 0xe7, 0xcc, 0x4f, 0x8a, 0xfe, 0x2a, 0x1b, 0x7c, 0xfc, 0x57, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xb0, 0x53, 0xb3, 0xf9, 0x68, 0x0c, 0x00, 0x00, +} + +func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PartSetHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if m.Total != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Part) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Part) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Bytes) > 0 { + i -= len(m.Bytes) + copy(dAtA[i:], m.Bytes) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Bytes))) + i-- + dAtA[i] = 0x12 + } + if m.Index != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BlockID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.PartsHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Header) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x72 + } + if len(m.EvidenceHash) > 0 { + i -= len(m.EvidenceHash) + copy(dAtA[i:], m.EvidenceHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) + i-- + dAtA[i] = 0x6a + } + if len(m.LastResultsHash) > 0 { + i -= len(m.LastResultsHash) + copy(dAtA[i:], m.LastResultsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) + i-- + dAtA[i] = 0x62 + } + if len(m.AppHash) > 0 { + i -= len(m.AppHash) + copy(dAtA[i:], m.AppHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) + i-- + dAtA[i] = 0x5a + } + if len(m.ConsensusHash) > 0 { + i -= len(m.ConsensusHash) + copy(dAtA[i:], m.ConsensusHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) + i-- + dAtA[i] = 0x52 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x4a + } + if len(m.ValidatorsHash) > 0 { + i -= len(m.ValidatorsHash) + copy(dAtA[i:], m.ValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) + i-- + dAtA[i] = 0x42 + } + if len(m.DataHash) > 0 { + i -= len(m.DataHash) + copy(dAtA[i:], m.DataHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.LastCommitHash) > 0 { + i -= len(m.LastCommitHash) + copy(dAtA[i:], m.LastCommitHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) + i-- + dAtA[i] = 0x32 + } + { + size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintTypes(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x22 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Data) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Data) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Vote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Vote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x42 + } + if m.ValidatorIndex != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x32 + } + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintTypes(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x2a + { + size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.Round != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Round)) + i-- + dAtA[i] = 0x18 + } + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 + } + if m.Type != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Commit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Commit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.BitArray != nil { + { + size, err := m.BitArray.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x2a + } + if len(m.Signatures) > 0 { + for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + { + size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Round != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Round)) + i-- + dAtA[i] = 0x10 + } + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *CommitSig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommitSig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x22 + } + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintTypes(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if m.BlockIdFlag != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Proposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x3a + } + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err11 != nil { + return 0, err11 + } + i -= n11 + i = encodeVarintTypes(dAtA, i, uint64(n11)) + i-- + dAtA[i] = 0x32 + { + size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.PolRound != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.PolRound)) + i-- + dAtA[i] = 0x20 + } + if m.Round != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Round)) + i-- + dAtA[i] = 0x18 + } + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 + } + if m.Type != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SignedHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignedHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Commit != nil { + { + size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockMeta) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockMeta) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.NumTxs != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.BlockSize != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PartSetHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovTypes(uint64(m.Total)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Part) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Index != 0 { + n += 1 + sovTypes(uint64(m.Index)) + } + l = len(m.Bytes) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Proof.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BlockID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.PartsHeader.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Header) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Version.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.ChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = m.LastBlockId.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.LastCommitHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DataHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ConsensusHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.LastResultsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.EvidenceHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Data) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Vote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovTypes(uint64(m.Type)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + if m.Round != 0 { + n += 1 + sovTypes(uint64(m.Round)) + } + l = m.BlockID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.ValidatorIndex != 0 { + n += 1 + sovTypes(uint64(m.ValidatorIndex)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Commit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + if m.Round != 0 { + n += 1 + sovTypes(uint64(m.Round)) + } + l = m.BlockID.Size() + n += 1 + l + sovTypes(uint64(l)) + if len(m.Signatures) > 0 { + for _, e := range m.Signatures { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.BitArray != nil { + l = m.BitArray.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CommitSig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockIdFlag != 0 { + n += 1 + sovTypes(uint64(m.BlockIdFlag)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Proposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovTypes(uint64(m.Type)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + if m.Round != 0 { + n += 1 + sovTypes(uint64(m.Round)) + } + if m.PolRound != 0 { + n += 1 + sovTypes(uint64(m.PolRound)) + } + l = m.BlockID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SignedHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Commit != nil { + l = m.Commit.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BlockMeta) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BlockID.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.BlockSize != 0 { + n += 1 + sovTypes(uint64(m.BlockSize)) + } + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.NumTxs != 0 { + n += 1 + sovTypes(uint64(m.NumTxs)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PartSetHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PartSetHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Part) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Part: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) + if m.Bytes == nil { + m.Bytes = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } +func (m *BlockID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PartsHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PartsHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastCommitHash == nil { + m.LastCommitHash = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) + if m.DataHash == nil { + m.DataHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorsHash == nil { + m.ValidatorsHash = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) + if m.ConsensusHash == nil { + m.ConsensusHash = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastResultsHash == nil { + m.LastResultsHash = []byte{} + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) + if m.EvidenceHash == nil { + m.EvidenceHash = []byte{} + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Data) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Data: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Vote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Vote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= SignedMsgType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) + } + m.Round = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Round |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorAddress == nil { + m.ValidatorAddress = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) + } + m.ValidatorIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorIndex |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Commit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Commit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) + } + m.Round = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Round |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signatures = append(m.Signatures, CommitSig{}) + if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BitArray", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BitArray == nil { + m.BitArray = &bits.BitArray{} + } + if err := m.BitArray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommitSig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommitSig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) + } + m.BlockIdFlag = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorAddress == nil { + m.ValidatorAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Proposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Proposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= SignedMsgType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) + } + m.Round = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Round |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType) + } + m.PolRound = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PolRound |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignedHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignedHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignedHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Commit == nil { + m.Commit = &Commit{} + } + if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockMeta) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType) + } + m.BlockSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockSize |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) + } + m.NumTxs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumTxs |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/types/types.proto b/proto/types/types.proto index 01ae987f4..f9eb85823 100644 --- a/proto/types/types.proto +++ b/proto/types/types.proto @@ -9,6 +9,11 @@ import "proto/libs/bits/types.proto"; import "proto/crypto/merkle/types.proto"; import "proto/version/version.proto"; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.goproto_registration) = true; + // BlockIdFlag indicates which BlcokID the signature is for enum BlockIDFlag { option (gogoproto.goproto_enum_stringer) = false; @@ -60,7 +65,7 @@ message Header { google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; + BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data bytes last_commit_hash = 6; // commit from validators from the last block diff --git a/proto/version/version.pb.go b/proto/version/version.pb.go index ef217c88d..ec46281ef 100644 --- a/proto/version/version.pb.go +++ b/proto/version/version.pb.go @@ -8,11 +8,15 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -40,16 +44,25 @@ func (*App) Descriptor() ([]byte, []int) { return fileDescriptor_14aa2353622f11e1, []int{0} } func (m *App) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_App.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_App.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_App.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *App) XXX_Merge(src proto.Message) { xxx_messageInfo_App.Merge(m, src) } func (m *App) XXX_Size() int { - return xxx_messageInfo_App.Size(m) + return m.Size() } func (m *App) XXX_DiscardUnknown() { xxx_messageInfo_App.DiscardUnknown(m) @@ -89,16 +102,25 @@ func (*Consensus) Descriptor() ([]byte, []int) { return fileDescriptor_14aa2353622f11e1, []int{1} } func (m *Consensus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Consensus.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Consensus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Consensus.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Consensus.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Consensus) XXX_Merge(src proto.Message) { xxx_messageInfo_Consensus.Merge(m, src) } func (m *Consensus) XXX_Size() int { - return xxx_messageInfo_Consensus.Size(m) + return m.Size() } func (m *Consensus) XXX_DiscardUnknown() { xxx_messageInfo_Consensus.DiscardUnknown(m) @@ -122,13 +144,18 @@ func (m *Consensus) GetApp() uint64 { func init() { proto.RegisterType((*App)(nil), "tendermint.proto.version.App") + golang_proto.RegisterType((*App)(nil), "tendermint.proto.version.App") proto.RegisterType((*Consensus)(nil), "tendermint.proto.version.Consensus") + golang_proto.RegisterType((*Consensus)(nil), "tendermint.proto.version.Consensus") } func init() { proto.RegisterFile("proto/version/version.proto", fileDescriptor_14aa2353622f11e1) } +func init() { + golang_proto.RegisterFile("proto/version/version.proto", fileDescriptor_14aa2353622f11e1) +} var fileDescriptor_14aa2353622f11e1 = []byte{ - // 198 bytes of a gzipped FileDescriptorProto + // 216 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x60, 0x51, 0x21, 0x89, 0x92, 0xd4, 0xbc, 0x94, 0xd4, 0xa2, 0xdc, 0xcc, 0xbc, 0x12, 0x88, 0x88, 0x1e, 0x54, 0x5e, 0x4a, @@ -138,10 +165,11 @@ var fileDescriptor_14aa2353622f11e1 = []byte{ 0xb9, 0xe2, 0xfc, 0xb4, 0x92, 0xf2, 0xc4, 0xa2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x38, 0x5f, 0xc9, 0x92, 0x8b, 0xd3, 0x39, 0x3f, 0xaf, 0x38, 0x35, 0xaf, 0xb8, 0xb4, 0x58, 0x48, 0x84, 0x8b, 0x35, 0x29, 0x27, 0x3f, 0x39, 0x1b, 0x6a, 0x02, 0x84, 0x23, 0x24, 0xc0, 0xc5, 0x9c, - 0x58, 0x50, 0x00, 0xd6, 0xc9, 0x12, 0x04, 0x62, 0x5a, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xe8, 0x64, - 0x10, 0xa5, 0x97, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0xf0, 0x08, - 0x32, 0x13, 0xc5, 0xef, 0x49, 0x6c, 0x60, 0xae, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xd3, - 0x5b, 0xf2, 0x13, 0x01, 0x00, 0x00, + 0x58, 0x50, 0x00, 0xd6, 0xc9, 0x12, 0x04, 0x62, 0x5a, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xe8, 0xe4, + 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x1e, 0x78, 0x2c, + 0xc7, 0x18, 0xa5, 0x97, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0xf0, + 0x18, 0x32, 0x13, 0x25, 0x2c, 0x92, 0xd8, 0xc0, 0x5c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xe4, 0xc8, 0xb4, 0x99, 0x23, 0x01, 0x00, 0x00, } func (this *Consensus) Equal(that interface{}) bool { @@ -174,3 +202,414 @@ func (this *Consensus) Equal(that interface{}) bool { } return true } +func (m *App) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *App) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *App) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Software) > 0 { + i -= len(m.Software) + copy(dAtA[i:], m.Software) + i = encodeVarintVersion(dAtA, i, uint64(len(m.Software))) + i-- + dAtA[i] = 0x12 + } + if m.Protocol != 0 { + i = encodeVarintVersion(dAtA, i, uint64(m.Protocol)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Consensus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Consensus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Consensus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.App != 0 { + i = encodeVarintVersion(dAtA, i, uint64(m.App)) + i-- + dAtA[i] = 0x10 + } + if m.Block != 0 { + i = encodeVarintVersion(dAtA, i, uint64(m.Block)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintVersion(dAtA []byte, offset int, v uint64) int { + offset -= sovVersion(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *App) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Protocol != 0 { + n += 1 + sovVersion(uint64(m.Protocol)) + } + l = len(m.Software) + if l > 0 { + n += 1 + l + sovVersion(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Consensus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Block != 0 { + n += 1 + sovVersion(uint64(m.Block)) + } + if m.App != 0 { + n += 1 + sovVersion(uint64(m.App)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovVersion(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozVersion(x uint64) (n int) { + return sovVersion(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *App) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVersion + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: App: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: App: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + m.Protocol = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVersion + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Protocol |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Software", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVersion + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVersion + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVersion + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Software = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVersion(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVersion + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVersion + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Consensus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVersion + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Consensus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + m.Block = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVersion + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Block |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field App", wireType) + } + m.App = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVersion + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.App |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipVersion(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVersion + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthVersion + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVersion(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVersion + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVersion + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVersion + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthVersion + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupVersion + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthVersion + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthVersion = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVersion = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupVersion = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/version/version.proto b/proto/version/version.proto index 9d501572f..277d84f02 100644 --- a/proto/version/version.proto +++ b/proto/version/version.proto @@ -5,6 +5,11 @@ option go_package = "github.com/tendermint/tendermint/proto/version"; import "third_party/proto/gogoproto/gogo.proto"; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.goproto_registration) = true; + // App includes the protocol and software version for the application. // This information is included in ResponseInfo. The App.Protocol can be // updated in ResponseEndBlock. @@ -17,7 +22,7 @@ message App { // including all blockchain data structures and the rules of the application's // state transition machine. message Consensus { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; uint64 block = 1; uint64 app = 2; diff --git a/proxy/version.go b/proxy/version.go index fb506e659..2109a45eb 100644 --- a/proxy/version.go +++ b/proxy/version.go @@ -10,6 +10,6 @@ import ( // It contains only compile-time version information. var RequestInfo = abci.RequestInfo{ Version: version.Version, - BlockVersion: version.BlockProtocol.Uint64(), - P2PVersion: version.P2PProtocol.Uint64(), + BlockVersion: version.BlockProtocol, + P2PVersion: version.P2PProtocol, } diff --git a/rpc/core/tx.go b/rpc/core/tx.go index 63edbaa6b..53e32d9ef 100644 --- a/rpc/core/tx.go +++ b/rpc/core/tx.go @@ -112,7 +112,7 @@ func TxSearch(ctx *rpctypes.Context, query string, prove bool, pagePtr, perPageP } apiResults = append(apiResults, &ctypes.ResultTx{ - Hash: r.Tx.Hash(), + Hash: types.Tx(r.Tx).Hash(), Height: r.Height, Index: r.Index, TxResult: r.Result, diff --git a/rpc/grpc/types.pb.go b/rpc/grpc/types.pb.go index 1fc7411c5..f49f384e0 100644 --- a/rpc/grpc/types.pb.go +++ b/rpc/grpc/types.pb.go @@ -226,27 +226,27 @@ func init() { golang_proto.RegisterFile("rpc/grpc/types.proto", fileDescriptor_1 var fileDescriptor_15f63baabf91876a = []byte{ // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x4b, 0xc3, 0x30, - 0x18, 0xc6, 0xc9, 0x10, 0xff, 0xbc, 0x9b, 0x3b, 0x64, 0x22, 0xd2, 0x43, 0x99, 0x43, 0xe6, 0x4e, - 0x29, 0xcc, 0xa3, 0xa7, 0xcd, 0x81, 0x88, 0x97, 0x51, 0x76, 0xf2, 0x32, 0xbb, 0x34, 0xb4, 0x41, - 0xd7, 0xc4, 0x34, 0x93, 0xee, 0xe3, 0xf8, 0x41, 0x04, 0x8f, 0x1e, 0xfd, 0x08, 0x52, 0xbf, 0x88, - 0xa4, 0x5d, 0x6d, 0x0e, 0x3a, 0x2f, 0xe5, 0x69, 0x78, 0x9e, 0x1f, 0xcf, 0xfb, 0x26, 0x70, 0xa4, - 0x24, 0xf5, 0x22, 0xf3, 0xd1, 0x6b, 0xc9, 0x52, 0x22, 0x95, 0xd0, 0x02, 0x77, 0x34, 0x4b, 0x42, - 0xa6, 0x96, 0x3c, 0xd1, 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 0x2e, 0xfa, 0xcc, 0x5d, 0xf4, - 0xf6, 0xe5, 0xa2, 0xbb, 0x61, 0xc4, 0x75, 0xbc, 0x5a, 0x10, 0x2a, 0x96, 0x5e, 0x4d, 0xb1, 0x65, - 0xf5, 0x8c, 0x2e, 0xa9, 0x50, 0xcc, 0x88, 0xc5, 0x6e, 0x71, 0xeb, 0x17, 0xdf, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x67, 0x85, 0x6c, 0xf2, 0x62, 0x02, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcd, 0x4a, 0xc3, 0x40, + 0x14, 0x85, 0x99, 0x22, 0xfe, 0xdc, 0xd6, 0x2e, 0xa6, 0x22, 0x92, 0x45, 0xa8, 0x45, 0x6a, 0x57, + 0x13, 0xa8, 0x4b, 0x57, 0xad, 0x05, 0x11, 0x37, 0x25, 0x74, 0xe5, 0xa6, 0xa6, 0x93, 0x21, 0x19, + 0xb4, 0x99, 0x71, 0x32, 0x95, 0xf4, 0x71, 0x7c, 0x10, 0xc1, 0xa5, 0x4b, 0x1f, 0x41, 0xe2, 0x8b, + 0xc8, 0x24, 0x8d, 0x99, 0x85, 0xd6, 0x4d, 0x38, 0xb9, 0x7c, 0xe7, 0x70, 0xee, 0x4d, 0xe0, 0x48, + 0x49, 0xea, 0x45, 0xe6, 0xa1, 0xd7, 0x92, 0xa5, 0x44, 0x2a, 0xa1, 0x05, 0xee, 0x68, 0x96, 0x84, + 0x4c, 0x2d, 0x79, 0xa2, 0x89, 0x92, 0x94, 0x18, 0xc0, 0x39, 0x0e, 0x16, 0x94, 0x97, 0x98, 0x0d, + 0x3b, 0x7d, 0x1d, 0x73, 0x15, 0xce, 0x65, 0xa0, 0xf4, 0xda, 0x2b, 0x46, 0x5e, 0x24, 0x22, 0x51, + 0xab, 0x92, 0xeb, 0x1d, 0x42, 0xd3, 0x67, 0x4f, 0x2b, 0x96, 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 0xff, 0xff, 0x21, 0xfc, 0xde, 0xc4, 0x62, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/rpc/grpc/types.proto b/rpc/grpc/types.proto index d08719732..90dd86ed1 100644 --- a/rpc/grpc/types.proto +++ b/rpc/grpc/types.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package tendermint.rpc.grpc; option go_package = "github.com/tendermint/tendermint/rpc/grpc;coregrpc"; -import "third_party/proto/gogoproto/gogo.proto"; import "abci/types/types.proto"; +import "third_party/proto/gogoproto/gogo.proto"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; @@ -11,9 +11,6 @@ option (gogoproto.sizer_all) = true; option (gogoproto.goproto_registration) = true; -//---------------------------------------- -// Message types - //---------------------------------------- // Request types diff --git a/state/execution.go b/state/execution.go index 0d87f85b3..03c9e93a3 100644 --- a/state/execution.go +++ b/state/execution.go @@ -1,6 +1,7 @@ package state import ( + "errors" "fmt" "time" @@ -279,9 +280,13 @@ func execBlockOnProxyApp( // Begin block var err error + pbh := block.Header.ToProto() + if pbh == nil { + return nil, errors.New("nil header") + } abciResponses.BeginBlock, err = proxyAppConn.BeginBlockSync(abci.RequestBeginBlock{ Hash: block.Hash(), - Header: types.TM2PB.Header(&block.Header), + Header: *pbh, LastCommitInfo: commitInfo, ByzantineValidators: byzVals, }) @@ -466,7 +471,7 @@ func fireEvents( }) for i, tx := range block.Data.Txs { - eventBus.PublishEventTx(types.EventDataTx{TxResult: types.TxResult{ + eventBus.PublishEventTx(types.EventDataTx{TxResult: abci.TxResult{ Height: block.Height, Index: uint32(i), Tx: tx, diff --git a/state/state.go b/state/state.go index 3143da079..b7fd0988a 100644 --- a/state/state.go +++ b/state/state.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "time" + tmversion "github.com/tendermint/tendermint/proto/version" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" @@ -23,7 +24,7 @@ var ( // and the software version to support upgrades to the format of // the State as stored on disk. type Version struct { - Consensus version.Consensus + Consensus tmversion.Consensus Software string } @@ -32,7 +33,7 @@ type Version struct { // The Consensus.App version will be set during the Handshake, once // we hear from the app what protocol version it is running. var InitStateVersion = Version{ - Consensus: version.Consensus{ + Consensus: tmversion.Consensus{ Block: version.BlockProtocol, App: 0, }, diff --git a/state/txindex/indexer.go b/state/txindex/indexer.go index 5f7ee7544..e141f82d8 100644 --- a/state/txindex/indexer.go +++ b/state/txindex/indexer.go @@ -4,8 +4,8 @@ import ( "context" "errors" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" - "github.com/tendermint/tendermint/types" ) // TxIndexer interface defines methods to index and search transactions. @@ -15,14 +15,14 @@ type TxIndexer interface { AddBatch(b *Batch) error // Index analyzes, indexes and stores a single transaction. - Index(result *types.TxResult) error + Index(result *abci.TxResult) error // Get returns the transaction specified by hash or nil if the transaction is not indexed // or stored. - Get(hash []byte) (*types.TxResult, error) + Get(hash []byte) (*abci.TxResult, error) // Search allows you to query for transactions. - Search(ctx context.Context, q *query.Query) ([]*types.TxResult, error) + Search(ctx context.Context, q *query.Query) ([]*abci.TxResult, error) } //---------------------------------------------------- @@ -31,18 +31,18 @@ type TxIndexer interface { // Batch groups together multiple Index operations to be performed at the same time. // NOTE: Batch is NOT thread-safe and must not be modified after starting its execution. type Batch struct { - Ops []*types.TxResult + Ops []*abci.TxResult } // NewBatch creates a new Batch. func NewBatch(n int64) *Batch { return &Batch{ - Ops: make([]*types.TxResult, n), + Ops: make([]*abci.TxResult, n), } } // Add or update an entry for the given result.Index. -func (b *Batch) Add(result *types.TxResult) error { +func (b *Batch) Add(result *abci.TxResult) error { b.Ops[result.Index] = result return nil } diff --git a/state/txindex/indexer_service_test.go b/state/txindex/indexer_service_test.go index 23968dbca..05be5efd2 100644 --- a/state/txindex/indexer_service_test.go +++ b/state/txindex/indexer_service_test.go @@ -39,14 +39,14 @@ func TestIndexerServiceIndexesBlocks(t *testing.T) { Header: types.Header{Height: 1}, NumTxs: int64(2), }) - txResult1 := &types.TxResult{ + txResult1 := &abci.TxResult{ Height: 1, Index: uint32(0), Tx: types.Tx("foo"), Result: abci.ResponseDeliverTx{Code: 0}, } eventBus.PublishEventTx(types.EventDataTx{TxResult: *txResult1}) - txResult2 := &types.TxResult{ + txResult2 := &abci.TxResult{ Height: 1, Index: uint32(1), Tx: types.Tx("bar"), diff --git a/state/txindex/kv/codec.go b/state/txindex/kv/codec.go deleted file mode 100644 index de168b228..000000000 --- a/state/txindex/kv/codec.go +++ /dev/null @@ -1,10 +0,0 @@ -package kv - -import ( - amino "github.com/tendermint/go-amino" -) - -var cdc = amino.NewCodec() - -func init() { -} diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index 9c6414c80..da672aef5 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -9,8 +9,10 @@ import ( "strings" "time" + "github.com/gogo/protobuf/proto" dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" tmstring "github.com/tendermint/tendermint/libs/strings" "github.com/tendermint/tendermint/state/txindex" @@ -55,7 +57,7 @@ func IndexAllEvents() func(*TxIndex) { // Get gets transaction from the TxIndex storage and returns it or nil if the // transaction is not found. -func (txi *TxIndex) Get(hash []byte) (*types.TxResult, error) { +func (txi *TxIndex) Get(hash []byte) (*abci.TxResult, error) { if len(hash) == 0 { return nil, txindex.ErrorEmptyHash } @@ -68,8 +70,8 @@ func (txi *TxIndex) Get(hash []byte) (*types.TxResult, error) { return nil, nil } - txResult := new(types.TxResult) - err = cdc.UnmarshalBinaryBare(rawBytes, &txResult) + txResult := new(abci.TxResult) + err = proto.Unmarshal(rawBytes, txResult) if err != nil { return nil, fmt.Errorf("error reading TxResult: %v", err) } @@ -86,7 +88,7 @@ func (txi *TxIndex) AddBatch(b *txindex.Batch) error { defer storeBatch.Close() for _, result := range b.Ops { - hash := result.Tx.Hash() + hash := types.Tx(result.Tx).Hash() // index tx by events txi.indexEvents(result, hash, storeBatch) @@ -97,7 +99,7 @@ func (txi *TxIndex) AddBatch(b *txindex.Batch) error { } // index tx by hash - rawBytes, err := cdc.MarshalBinaryBare(result) + rawBytes, err := proto.Marshal(result) if err != nil { return err } @@ -112,11 +114,11 @@ func (txi *TxIndex) AddBatch(b *txindex.Batch) error { // that indexed from the tx's events is a composite of the event type and the // respective attribute's key delimited by a "." (eg. "account.number"). // Any event with an empty type is not indexed. -func (txi *TxIndex) Index(result *types.TxResult) error { +func (txi *TxIndex) Index(result *abci.TxResult) error { b := txi.store.NewBatch() defer b.Close() - hash := result.Tx.Hash() + hash := types.Tx(result.Tx).Hash() // index tx by events txi.indexEvents(result, hash, b) @@ -127,7 +129,7 @@ func (txi *TxIndex) Index(result *types.TxResult) error { } // index tx by hash - rawBytes, err := cdc.MarshalBinaryBare(result) + rawBytes, err := proto.Marshal(result) if err != nil { return err } @@ -138,7 +140,7 @@ func (txi *TxIndex) Index(result *types.TxResult) error { return nil } -func (txi *TxIndex) indexEvents(result *types.TxResult, hash []byte, store dbm.SetDeleter) { +func (txi *TxIndex) indexEvents(result *abci.TxResult, hash []byte, store dbm.SetDeleter) { for _, event := range result.Result.Events { // only index events with a non-empty type if len(event.Type) == 0 { @@ -169,11 +171,11 @@ func (txi *TxIndex) indexEvents(result *types.TxResult, hash []byte, store dbm.S // // Search will exit early and return any result fetched so far, // when a message is received on the context chan. -func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*types.TxResult, error) { +func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*abci.TxResult, error) { // Potentially exit early. select { case <-ctx.Done(): - results := make([]*types.TxResult, 0) + results := make([]*abci.TxResult, 0) return results, nil default: } @@ -195,11 +197,11 @@ func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*types.TxResu res, err := txi.Get(hash) switch { case err != nil: - return []*types.TxResult{}, fmt.Errorf("error while retrieving the result: %w", err) + return []*abci.TxResult{}, fmt.Errorf("error while retrieving the result: %w", err) case res == nil: - return []*types.TxResult{}, nil + return []*abci.TxResult{}, nil default: - return []*types.TxResult{res}, nil + return []*abci.TxResult{res}, nil } } @@ -252,7 +254,7 @@ func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*types.TxResu } } - results := make([]*types.TxResult, 0, len(filteredHashes)) + results := make([]*abci.TxResult, 0, len(filteredHashes)) for _, h := range filteredHashes { res, err := txi.Get(h) if err != nil { @@ -593,7 +595,7 @@ func extractValueFromKey(key []byte) string { return parts[1] } -func keyForEvent(key string, value []byte, result *types.TxResult) []byte { +func keyForEvent(key string, value []byte, result *abci.TxResult) []byte { return []byte(fmt.Sprintf("%s/%s/%d/%d", key, value, @@ -602,7 +604,7 @@ func keyForEvent(key string, value []byte, result *types.TxResult) []byte { )) } -func keyForHeight(result *types.TxResult) []byte { +func keyForHeight(result *abci.TxResult) []byte { return []byte(fmt.Sprintf("%s/%d/%d/%d", types.TxHeightKey, result.Height, diff --git a/state/txindex/kv/kv_bench_test.go b/state/txindex/kv/kv_bench_test.go index 61c167600..72c4658eb 100644 --- a/state/txindex/kv/kv_bench_test.go +++ b/state/txindex/kv/kv_bench_test.go @@ -44,7 +44,7 @@ func BenchmarkTxSearch(b *testing.B) { b.Errorf("failed produce random bytes: %s", err) } - txResult := &types.TxResult{ + txResult := &abci.TxResult{ Height: int64(i), Index: 0, Tx: types.Tx(string(txBz)), diff --git a/state/txindex/kv/kv_test.go b/state/txindex/kv/kv_test.go index 2cada9ee6..209fa8bae 100644 --- a/state/txindex/kv/kv_test.go +++ b/state/txindex/kv/kv_test.go @@ -7,6 +7,7 @@ import ( "os" "testing" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -23,7 +24,7 @@ func TestTxIndex(t *testing.T) { indexer := NewTxIndex(db.NewMemDB()) tx := types.Tx("HELLO WORLD") - txResult := &types.TxResult{ + txResult := &abci.TxResult{ Height: 1, Index: 0, Tx: tx, @@ -43,10 +44,10 @@ func TestTxIndex(t *testing.T) { loadedTxResult, err := indexer.Get(hash) require.NoError(t, err) - assert.Equal(t, txResult, loadedTxResult) + assert.True(t, proto.Equal(txResult, loadedTxResult)) tx2 := types.Tx("BYE BYE WORLD") - txResult2 := &types.TxResult{ + txResult2 := &abci.TxResult{ Height: 1, Index: 0, Tx: tx2, @@ -62,7 +63,7 @@ func TestTxIndex(t *testing.T) { loadedTxResult2, err := indexer.Get(hash2) require.NoError(t, err) - assert.Equal(t, txResult2, loadedTxResult2) + assert.True(t, proto.Equal(txResult2, loadedTxResult2)) } func TestTxSearch(t *testing.T) { @@ -74,7 +75,7 @@ func TestTxSearch(t *testing.T) { {Type: "account", Attributes: []abci.EventAttribute{{Key: []byte("owner"), Value: []byte("Ivan")}}}, {Type: "", Attributes: []abci.EventAttribute{{Key: []byte("not_allowed"), Value: []byte("Vlad")}}}, }) - hash := txResult.Tx.Hash() + hash := types.Tx(txResult.Tx).Hash() err := indexer.Index(txResult) require.NoError(t, err) @@ -128,7 +129,9 @@ func TestTxSearch(t *testing.T) { assert.Len(t, results, tc.resultsLength) if tc.resultsLength > 0 { - assert.Equal(t, []*types.TxResult{txResult}, results) + for _, txr := range results { + assert.True(t, proto.Equal(txResult, txr)) + } } }) } @@ -161,7 +164,7 @@ func TestTxSearchDeprecatedIndexing(t *testing.T) { txResult1 := txResultWithEvents([]abci.Event{ {Type: "account", Attributes: []abci.EventAttribute{{Key: []byte("number"), Value: []byte("1")}}}, }) - hash1 := txResult1.Tx.Hash() + hash1 := types.Tx(txResult1.Tx).Hash() err := indexer.Index(txResult1) require.NoError(t, err) @@ -170,10 +173,10 @@ func TestTxSearchDeprecatedIndexing(t *testing.T) { txResult2 := txResultWithEvents(nil) txResult2.Tx = types.Tx("HELLO WORLD 2") - hash2 := txResult2.Tx.Hash() + hash2 := types.Tx(txResult2.Tx).Hash() b := indexer.store.NewBatch() - rawBytes, err := cdc.MarshalBinaryBare(txResult2) + rawBytes, err := proto.Marshal(txResult2) require.NoError(t, err) depKey := []byte(fmt.Sprintf("%s/%s/%d/%d", @@ -190,27 +193,27 @@ func TestTxSearchDeprecatedIndexing(t *testing.T) { testCases := []struct { q string - results []*types.TxResult + results []*abci.TxResult }{ // search by hash - {fmt.Sprintf("tx.hash = '%X'", hash1), []*types.TxResult{txResult1}}, + {fmt.Sprintf("tx.hash = '%X'", hash1), []*abci.TxResult{txResult1}}, // search by hash - {fmt.Sprintf("tx.hash = '%X'", hash2), []*types.TxResult{txResult2}}, + {fmt.Sprintf("tx.hash = '%X'", hash2), []*abci.TxResult{txResult2}}, // search by exact match (one key) - {"account.number = 1", []*types.TxResult{txResult1}}, - {"account.number >= 1 AND account.number <= 5", []*types.TxResult{txResult1}}, + {"account.number = 1", []*abci.TxResult{txResult1}}, + {"account.number >= 1 AND account.number <= 5", []*abci.TxResult{txResult1}}, // search by range (lower bound) - {"account.number >= 1", []*types.TxResult{txResult1}}, + {"account.number >= 1", []*abci.TxResult{txResult1}}, // search by range (upper bound) - {"account.number <= 5", []*types.TxResult{txResult1}}, + {"account.number <= 5", []*abci.TxResult{txResult1}}, // search using not allowed key - {"not_allowed = 'boom'", []*types.TxResult{}}, + {"not_allowed = 'boom'", []*abci.TxResult{}}, // search for not existing tx result - {"account.number >= 2 AND account.number <= 5", []*types.TxResult{}}, + {"account.number >= 2 AND account.number <= 5", []*abci.TxResult{}}, // search using not existing key - {"account.date >= TIME 2013-05-03T14:45:00Z", []*types.TxResult{}}, + {"account.date >= TIME 2013-05-03T14:45:00Z", []*abci.TxResult{}}, // search by deprecated key - {"sender = 'addr1'", []*types.TxResult{txResult2}}, + {"sender = 'addr1'", []*abci.TxResult{txResult2}}, } ctx := context.Background() @@ -220,7 +223,11 @@ func TestTxSearchDeprecatedIndexing(t *testing.T) { t.Run(tc.q, func(t *testing.T) { results, err := indexer.Search(ctx, query.MustParse(tc.q)) require.NoError(t, err) - require.Equal(t, results, tc.results) + for _, txr := range results { + for _, tr := range tc.results { + assert.True(t, proto.Equal(tr, txr)) + } + } }) } } @@ -243,7 +250,9 @@ func TestTxSearchOneTxWithMultipleSameTagsButDifferentValues(t *testing.T) { assert.NoError(t, err) assert.Len(t, results, 1) - assert.Equal(t, []*types.TxResult{txResult}, results) + for _, txr := range results { + assert.True(t, proto.Equal(txResult, txr)) + } } func TestTxSearchMultipleTxs(t *testing.T) { @@ -301,9 +310,9 @@ func TestTxSearchMultipleTxs(t *testing.T) { require.Len(t, results, 3) } -func txResultWithEvents(events []abci.Event) *types.TxResult { +func txResultWithEvents(events []abci.Event) *abci.TxResult { tx := types.Tx("HELLO WORLD") - return &types.TxResult{ + return &abci.TxResult{ Height: 1, Index: 0, Tx: tx, @@ -330,7 +339,7 @@ func benchmarkTxIndex(txsCount int64, b *testing.B) { txIndex := uint32(0) for i := int64(0); i < txsCount; i++ { tx := tmrand.Bytes(250) - txResult := &types.TxResult{ + txResult := &abci.TxResult{ Height: 1, Index: txIndex, Tx: tx, diff --git a/state/txindex/null/null.go b/state/txindex/null/null.go index 1ae7f7942..98e4db79e 100644 --- a/state/txindex/null/null.go +++ b/state/txindex/null/null.go @@ -4,9 +4,9 @@ import ( "context" "errors" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/state/txindex" - "github.com/tendermint/tendermint/types" ) var _ txindex.TxIndexer = (*TxIndex)(nil) @@ -15,7 +15,7 @@ var _ txindex.TxIndexer = (*TxIndex)(nil) type TxIndex struct{} // Get on a TxIndex is disabled and panics when invoked. -func (txi *TxIndex) Get(hash []byte) (*types.TxResult, error) { +func (txi *TxIndex) Get(hash []byte) (*abci.TxResult, error) { return nil, errors.New(`indexing is disabled (set 'tx_index = "kv"' in config)`) } @@ -25,10 +25,10 @@ func (txi *TxIndex) AddBatch(batch *txindex.Batch) error { } // Index is a noop and always returns nil. -func (txi *TxIndex) Index(result *types.TxResult) error { +func (txi *TxIndex) Index(result *abci.TxResult) error { return nil } -func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*types.TxResult, error) { - return []*types.TxResult{}, nil +func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*abci.TxResult, error) { + return []*abci.TxResult{}, nil } diff --git a/state/validation.go b/state/validation.go index b00b0440e..f1c369652 100644 --- a/state/validation.go +++ b/state/validation.go @@ -21,7 +21,8 @@ func validateBlock(evidencePool EvidencePool, stateDB dbm.DB, state State, block } // Validate basic info. - if block.Version != state.Version.Consensus { + if block.Version.App != state.Version.Consensus.App || + block.Version.Block != state.Version.Consensus.Block { return fmt.Errorf("wrong Block.Header.Version. Expected %v, got %v", state.Version.Consensus, block.Version, diff --git a/statesync/syncer.go b/statesync/syncer.go index 836dfb2ec..6ebd4cb05 100644 --- a/statesync/syncer.go +++ b/statesync/syncer.go @@ -15,7 +15,6 @@ import ( "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - "github.com/tendermint/tendermint/version" ) const ( @@ -263,7 +262,7 @@ func (s *syncer) Sync(snapshot *snapshot, chunks *chunkQueue) (sm.State, *types. if err != nil { return sm.State{}, nil, err } - state.Version.Consensus.App = version.Protocol(appVersion) + state.Version.Consensus.App = appVersion // Done! 🎉 s.logger.Info("Snapshot restored", "height", snapshot.Height, "format", snapshot.Format, diff --git a/statesync/syncer_test.go b/statesync/syncer_test.go index ee7158987..0f8e6b40e 100644 --- a/statesync/syncer_test.go +++ b/statesync/syncer_test.go @@ -15,6 +15,7 @@ import ( "github.com/tendermint/tendermint/p2p" p2pmocks "github.com/tendermint/tendermint/p2p/mocks" ssproto "github.com/tendermint/tendermint/proto/statesync" + tmversion "github.com/tendermint/tendermint/proto/version" "github.com/tendermint/tendermint/proxy" proxymocks "github.com/tendermint/tendermint/proxy/mocks" sm "github.com/tendermint/tendermint/state" @@ -44,7 +45,7 @@ func TestSyncer_SyncAny(t *testing.T) { state := sm.State{ ChainID: "chain", Version: sm.Version{ - Consensus: version.Consensus{ + Consensus: tmversion.Consensus{ Block: version.BlockProtocol, App: 0, }, diff --git a/types/block.go b/types/block.go index fab1614da..c4fc98fc5 100644 --- a/types/block.go +++ b/types/block.go @@ -16,7 +16,6 @@ import ( tmmath "github.com/tendermint/tendermint/libs/math" tmproto "github.com/tendermint/tendermint/proto/types" tmversion "github.com/tendermint/tendermint/proto/version" - "github.com/tendermint/tendermint/version" ) const ( @@ -333,10 +332,10 @@ func MaxDataBytesUnknownEvidence(maxBytes int64, valsCount int, maxNumEvidence u // - https://github.com/tendermint/spec/blob/master/spec/blockchain/blockchain.md type Header struct { // basic block info - Version version.Consensus `json:"version"` - ChainID string `json:"chain_id"` - Height int64 `json:"height"` - Time time.Time `json:"time"` + Version tmversion.Consensus `json:"version"` + ChainID string `json:"chain_id"` + Height int64 `json:"height"` + Time time.Time `json:"time"` // prev block info LastBlockID BlockID `json:"last_block_id"` @@ -361,7 +360,7 @@ type Header struct { // Populate the Header with state-derived data. // Call this after MakeBlock to complete the Header. func (h *Header) Populate( - version version.Consensus, chainID string, + version tmversion.Consensus, chainID string, timestamp time.Time, lastBlockID BlockID, valHash, nextValHash []byte, consensusHash, appHash, lastResultsHash []byte, @@ -507,12 +506,13 @@ func (h *Header) ToProto() *tmproto.Header { if h == nil { return nil } + return &tmproto.Header{ - Version: tmversion.Consensus{Block: h.Version.App.Uint64(), App: h.Version.App.Uint64()}, + Version: h.Version, ChainID: h.ChainID, Height: h.Height, Time: h.Time, - LastBlockID: h.LastBlockID.ToProto(), + LastBlockId: h.LastBlockID.ToProto(), ValidatorsHash: h.ValidatorsHash, NextValidatorsHash: h.NextValidatorsHash, ConsensusHash: h.ConsensusHash, @@ -534,12 +534,12 @@ func HeaderFromProto(ph *tmproto.Header) (Header, error) { h := new(Header) - bi, err := BlockIDFromProto(&ph.LastBlockID) + bi, err := BlockIDFromProto(&ph.LastBlockId) if err != nil { return Header{}, err } - h.Version = version.Consensus{Block: version.Protocol(ph.Version.Block), App: version.Protocol(ph.Version.App)} + h.Version = ph.Version h.ChainID = ph.ChainID h.Height = ph.Height h.Time = ph.Time diff --git a/types/block_test.go b/types/block_test.go index 3bbf79883..a697bad3a 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -21,8 +21,8 @@ import ( "github.com/tendermint/tendermint/libs/bytes" tmrand "github.com/tendermint/tendermint/libs/rand" tmproto "github.com/tendermint/tendermint/proto/types" + "github.com/tendermint/tendermint/proto/version" tmtime "github.com/tendermint/tendermint/types/time" - "github.com/tendermint/tendermint/version" ) func TestMain(m *testing.M) { diff --git a/types/event_bus.go b/types/event_bus.go index 1c838d13b..082aa1c1a 100644 --- a/types/event_bus.go +++ b/types/event_bus.go @@ -175,7 +175,7 @@ func (b *EventBus) PublishEventTx(data EventDataTx) error { // add predefined compositeKeys events[EventTypeKey] = append(events[EventTypeKey], EventTx) - events[TxHashKey] = append(events[TxHashKey], fmt.Sprintf("%X", data.Tx.Hash())) + events[TxHashKey] = append(events[TxHashKey], fmt.Sprintf("%X", Tx(data.Tx).Hash())) events[TxHeightKey] = append(events[TxHeightKey], fmt.Sprintf("%d", data.Height)) return b.pubsub.PublishWithEvents(ctx, data, events) diff --git a/types/event_bus_test.go b/types/event_bus_test.go index 1a9b2d85b..f7ec04c50 100644 --- a/types/event_bus_test.go +++ b/types/event_bus_test.go @@ -41,12 +41,12 @@ func TestEventBusPublishEventTx(t *testing.T) { edt := msg.Data().(EventDataTx) assert.Equal(t, int64(1), edt.Height) assert.Equal(t, uint32(0), edt.Index) - assert.Equal(t, tx, edt.Tx) + assert.EqualValues(t, tx, edt.Tx) assert.Equal(t, result, edt.Result) close(done) }() - err = eventBus.PublishEventTx(EventDataTx{TxResult{ + err = eventBus.PublishEventTx(EventDataTx{abci.TxResult{ Height: 1, Index: 0, Tx: tx, @@ -183,7 +183,7 @@ func TestEventBusPublishEventTxDuplicateKeys(t *testing.T) { data := msg.Data().(EventDataTx) assert.Equal(t, int64(1), data.Height) assert.Equal(t, uint32(0), data.Index) - assert.Equal(t, tx, data.Tx) + assert.EqualValues(t, tx, data.Tx) assert.Equal(t, result, data.Result) close(done) case <-time.After(1 * time.Second): @@ -191,7 +191,7 @@ func TestEventBusPublishEventTxDuplicateKeys(t *testing.T) { } }() - err = eventBus.PublishEventTx(EventDataTx{TxResult{ + err = eventBus.PublishEventTx(EventDataTx{abci.TxResult{ Height: 1, Index: 0, Tx: tx, diff --git a/types/events.go b/types/events.go index be0ac04d0..25e11aee6 100644 --- a/types/events.go +++ b/types/events.go @@ -80,7 +80,7 @@ type EventDataNewBlockHeader struct { // All txs fire EventDataTx type EventDataTx struct { - TxResult + abci.TxResult } // NOTE: This goes into the replay WAL diff --git a/types/protobuf.go b/types/protobuf.go index 895a8bc45..8ba3f7b2d 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -10,6 +10,7 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/tendermint/tendermint/crypto/sr25519" + tmproto "github.com/tendermint/tendermint/proto/types" ) //------------------------------------------------------- @@ -42,17 +43,14 @@ var TM2PB = tm2pb{} type tm2pb struct{} -func (tm2pb) Header(header *Header) abci.Header { - return abci.Header{ - Version: abci.Version{ - Block: header.Version.Block.Uint64(), - App: header.Version.App.Uint64(), - }, +func (tm2pb) Header(header *Header) tmproto.Header { + return tmproto.Header{ + Version: header.Version, ChainID: header.ChainID, Height: header.Height, Time: header.Time, - LastBlockId: TM2PB.BlockID(header.LastBlockID), + LastBlockId: header.LastBlockID.ToProto(), LastCommitHash: header.LastCommitHash, DataHash: header.DataHash, diff --git a/types/protobuf_test.go b/types/protobuf_test.go index 67bd255a2..17ce94fcd 100644 --- a/types/protobuf_test.go +++ b/types/protobuf_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/golang/protobuf/proto" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -14,7 +14,7 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/tendermint/tendermint/version" + "github.com/tendermint/tendermint/proto/version" ) func TestABCIPubKey(t *testing.T) { @@ -105,8 +105,8 @@ func TestABCIHeader(t *testing.T) { cdc := amino.NewCodec() headerBz := cdc.MustMarshalBinaryBare(header) - pbHeader := TM2PB.Header(header) - pbHeaderBz, err := proto.Marshal(&pbHeader) + pbHeader := header.ToProto() + pbHeaderBz, err := proto.Marshal(pbHeader) assert.NoError(t, err) // assert some fields match diff --git a/types/tx.go b/types/tx.go index ffaa27f12..f9dec2c01 100644 --- a/types/tx.go +++ b/types/tx.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" - abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/merkle" "github.com/tendermint/tendermint/crypto/tmhash" tmbytes "github.com/tendermint/tendermint/libs/bytes" @@ -109,13 +108,3 @@ func (tp TxProof) Validate(dataHash []byte) error { } return nil } - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -type TxResult struct { - Height int64 `json:"height"` - Index uint32 `json:"index"` - Tx Tx `json:"tx"` - Result abci.ResponseDeliverTx `json:"result"` -} diff --git a/version/version.go b/version/version.go index bec7cda53..75bc0b7b1 100644 --- a/version/version.go +++ b/version/version.go @@ -28,40 +28,12 @@ const ( ABCIVersion = ABCISemVer ) -// Protocol is used for implementation agnostic versioning. -type Protocol uint64 - -// Uint64 returns the Protocol version as a uint64, -// eg. for compatibility with ABCI types. -func (p Protocol) Uint64() uint64 { - return uint64(p) -} - var ( // P2PProtocol versions all p2p behaviour and msgs. // This includes proposer selection. - P2PProtocol Protocol = 7 + P2PProtocol uint64 = 7 // BlockProtocol versions all block data structures and processing. // This includes validity of blocks and state updates. - BlockProtocol Protocol = 10 + BlockProtocol uint64 = 10 ) - -//------------------------------------------------------------------------ -// Version types - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -type App struct { - Protocol Protocol `json:"protocol"` - Software string `json:"software"` -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -type Consensus struct { - Block Protocol `json:"block"` - App Protocol `json:"app"` -}