From d7035abe73666e0ee16b456954654a7a71e6c6ad Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 31 Jul 2018 13:27:27 +0400 Subject: [PATCH] change ABCI header to match Tendermint exactly Now that Tendermint Amino will be compatible with proto3, the Header in ABCI should exactly match the Tendermint header - they will then be encoded identically in ABCI and in Tendermint Core. Refs #265 --- CHANGELOG_PENDING.md | 1 + Gopkg.lock | 1 - abci/types/types.pb.go | 1278 +++++++++++++++++++++++++++++------- abci/types/types.proto | 38 +- abci/types/typespb_test.go | 248 +++++++ types/block.go | 10 +- types/proto3/block.pb.go | 238 ++++--- types/proto3/block.proto | 5 +- types/protobuf.go | 34 +- 9 files changed, 1515 insertions(+), 338 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 776986d9a..84848754c 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -8,6 +8,7 @@ BREAKING CHANGES: - [rpc] `/commit` returns a `signed_header` field instead of everything being top-level - [abci] Added address of the original proposer of the block to Header. +- [abci] Change ABCI Header to match Tendermint exactly FEATURES: diff --git a/Gopkg.lock b/Gopkg.lock index df455e8d0..335808244 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -519,7 +519,6 @@ "github.com/gogo/protobuf/gogoproto", "github.com/gogo/protobuf/jsonpb", "github.com/gogo/protobuf/proto", - "github.com/gogo/protobuf/types", "github.com/golang/protobuf/proto", "github.com/golang/protobuf/ptypes/timestamp", "github.com/gorilla/websocket", diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index c74730757..e28b422ba 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -59,7 +59,7 @@ func (m *Request) Reset() { *m = Request{} } func (m *Request) String() string { return proto.CompactTextString(m) } func (*Request) ProtoMessage() {} func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{0} + return fileDescriptor_types_7077ff64ad2a8940, []int{0} } func (m *Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -481,7 +481,7 @@ func (m *RequestEcho) Reset() { *m = RequestEcho{} } func (m *RequestEcho) String() string { return proto.CompactTextString(m) } func (*RequestEcho) ProtoMessage() {} func (*RequestEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{1} + return fileDescriptor_types_7077ff64ad2a8940, []int{1} } func (m *RequestEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ func (m *RequestFlush) Reset() { *m = RequestFlush{} } func (m *RequestFlush) String() string { return proto.CompactTextString(m) } func (*RequestFlush) ProtoMessage() {} func (*RequestFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{2} + return fileDescriptor_types_7077ff64ad2a8940, []int{2} } func (m *RequestFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -567,7 +567,7 @@ func (m *RequestInfo) Reset() { *m = RequestInfo{} } func (m *RequestInfo) String() string { return proto.CompactTextString(m) } func (*RequestInfo) ProtoMessage() {} func (*RequestInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{3} + return fileDescriptor_types_7077ff64ad2a8940, []int{3} } func (m *RequestInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -616,7 +616,7 @@ func (m *RequestSetOption) Reset() { *m = RequestSetOption{} } func (m *RequestSetOption) String() string { return proto.CompactTextString(m) } func (*RequestSetOption) ProtoMessage() {} func (*RequestSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{4} + return fileDescriptor_types_7077ff64ad2a8940, []int{4} } func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -674,7 +674,7 @@ func (m *RequestInitChain) Reset() { *m = RequestInitChain{} } func (m *RequestInitChain) String() string { return proto.CompactTextString(m) } func (*RequestInitChain) ProtoMessage() {} func (*RequestInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{5} + return fileDescriptor_types_7077ff64ad2a8940, []int{5} } func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +752,7 @@ func (m *RequestQuery) Reset() { *m = RequestQuery{} } func (m *RequestQuery) String() string { return proto.CompactTextString(m) } func (*RequestQuery) ProtoMessage() {} func (*RequestQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{6} + return fileDescriptor_types_7077ff64ad2a8940, []int{6} } func (m *RequestQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -824,7 +824,7 @@ func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) } func (*RequestBeginBlock) ProtoMessage() {} func (*RequestBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{7} + return fileDescriptor_types_7077ff64ad2a8940, []int{7} } func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -892,7 +892,7 @@ func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} } func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) } func (*RequestCheckTx) ProtoMessage() {} func (*RequestCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{8} + return fileDescriptor_types_7077ff64ad2a8940, []int{8} } func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -939,7 +939,7 @@ func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} } func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) } func (*RequestDeliverTx) ProtoMessage() {} func (*RequestDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{9} + return fileDescriptor_types_7077ff64ad2a8940, []int{9} } func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -986,7 +986,7 @@ func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} } func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) } func (*RequestEndBlock) ProtoMessage() {} func (*RequestEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{10} + return fileDescriptor_types_7077ff64ad2a8940, []int{10} } func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1032,7 +1032,7 @@ func (m *RequestCommit) Reset() { *m = RequestCommit{} } func (m *RequestCommit) String() string { return proto.CompactTextString(m) } func (*RequestCommit) ProtoMessage() {} func (*RequestCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{11} + return fileDescriptor_types_7077ff64ad2a8940, []int{11} } func (m *RequestCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1085,7 +1085,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{12} + return fileDescriptor_types_7077ff64ad2a8940, []int{12} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1538,7 +1538,7 @@ func (m *ResponseException) Reset() { *m = ResponseException{} } func (m *ResponseException) String() string { return proto.CompactTextString(m) } func (*ResponseException) ProtoMessage() {} func (*ResponseException) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{13} + return fileDescriptor_types_7077ff64ad2a8940, []int{13} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1585,7 +1585,7 @@ func (m *ResponseEcho) Reset() { *m = ResponseEcho{} } func (m *ResponseEcho) String() string { return proto.CompactTextString(m) } func (*ResponseEcho) ProtoMessage() {} func (*ResponseEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{14} + return fileDescriptor_types_7077ff64ad2a8940, []int{14} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1631,7 +1631,7 @@ func (m *ResponseFlush) Reset() { *m = ResponseFlush{} } func (m *ResponseFlush) String() string { return proto.CompactTextString(m) } func (*ResponseFlush) ProtoMessage() {} func (*ResponseFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{15} + return fileDescriptor_types_7077ff64ad2a8940, []int{15} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1674,7 +1674,7 @@ func (m *ResponseInfo) Reset() { *m = ResponseInfo{} } func (m *ResponseInfo) String() string { return proto.CompactTextString(m) } func (*ResponseInfo) ProtoMessage() {} func (*ResponseInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{16} + return fileDescriptor_types_7077ff64ad2a8940, []int{16} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1746,7 +1746,7 @@ func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} } func (m *ResponseSetOption) String() string { return proto.CompactTextString(m) } func (*ResponseSetOption) ProtoMessage() {} func (*ResponseSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{17} + return fileDescriptor_types_7077ff64ad2a8940, []int{17} } func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1808,7 +1808,7 @@ func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} } func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) } func (*ResponseInitChain) ProtoMessage() {} func (*ResponseInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{18} + return fileDescriptor_types_7077ff64ad2a8940, []int{18} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1870,7 +1870,7 @@ func (m *ResponseQuery) Reset() { *m = ResponseQuery{} } func (m *ResponseQuery) String() string { return proto.CompactTextString(m) } func (*ResponseQuery) ProtoMessage() {} func (*ResponseQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{19} + return fileDescriptor_types_7077ff64ad2a8940, []int{19} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1966,7 +1966,7 @@ func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} } func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) } func (*ResponseBeginBlock) ProtoMessage() {} func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{20} + return fileDescriptor_types_7077ff64ad2a8940, []int{20} } func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2019,7 +2019,7 @@ func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) } func (*ResponseCheckTx) ProtoMessage() {} func (*ResponseCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{21} + return fileDescriptor_types_7077ff64ad2a8940, []int{21} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2114,7 +2114,7 @@ func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} } func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) } func (*ResponseDeliverTx) ProtoMessage() {} func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{22} + return fileDescriptor_types_7077ff64ad2a8940, []int{22} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2205,7 +2205,7 @@ func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} } func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) } func (*ResponseEndBlock) ProtoMessage() {} func (*ResponseEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{23} + return fileDescriptor_types_7077ff64ad2a8940, []int{23} } func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2267,7 +2267,7 @@ func (m *ResponseCommit) Reset() { *m = ResponseCommit{} } func (m *ResponseCommit) String() string { return proto.CompactTextString(m) } func (*ResponseCommit) ProtoMessage() {} func (*ResponseCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{24} + return fileDescriptor_types_7077ff64ad2a8940, []int{24} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2318,7 +2318,7 @@ func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } func (*ConsensusParams) ProtoMessage() {} func (*ConsensusParams) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{25} + return fileDescriptor_types_7077ff64ad2a8940, []int{25} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2382,7 +2382,7 @@ func (m *BlockSize) Reset() { *m = BlockSize{} } func (m *BlockSize) String() string { return proto.CompactTextString(m) } func (*BlockSize) ProtoMessage() {} func (*BlockSize) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{26} + return fileDescriptor_types_7077ff64ad2a8940, []int{26} } func (m *BlockSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2445,7 +2445,7 @@ func (m *TxSize) Reset() { *m = TxSize{} } func (m *TxSize) String() string { return proto.CompactTextString(m) } func (*TxSize) ProtoMessage() {} func (*TxSize) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{27} + return fileDescriptor_types_7077ff64ad2a8940, []int{27} } func (m *TxSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2502,7 +2502,7 @@ func (m *BlockGossip) Reset() { *m = BlockGossip{} } func (m *BlockGossip) String() string { return proto.CompactTextString(m) } func (*BlockGossip) ProtoMessage() {} func (*BlockGossip) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{28} + return fileDescriptor_types_7077ff64ad2a8940, []int{28} } func (m *BlockGossip) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2550,7 +2550,7 @@ func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} } func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) } func (*LastCommitInfo) ProtoMessage() {} func (*LastCommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{29} + return fileDescriptor_types_7077ff64ad2a8940, []int{29} } func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2593,21 +2593,26 @@ func (m *LastCommitInfo) GetValidators() []SigningValidator { return nil } -// just the minimum the app might need type Header struct { - // basics - ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Time time.Time `protobuf:"bytes,3,opt,name=time,stdtime" json:"time"` - // txs - NumTxs int32 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` - TotalTxs int64 `protobuf:"varint,5,opt,name=total_txs,json=totalTxs,proto3" json:"total_txs,omitempty"` - // hashes - LastBlockHash []byte `protobuf:"bytes,6,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"` - ValidatorsHash []byte `protobuf:"bytes,7,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - AppHash []byte `protobuf:"bytes,8,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - // consensus - ProposerAddress []byte `protobuf:"bytes,9,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + // basic block info + ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,3,opt,name=time,stdtime" json:"time"` + NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` + TotalTxs int64 `protobuf:"varint,5,opt,name=total_txs,json=totalTxs,proto3" json:"total_txs,omitempty"` + // prev block info + LastBlockId BlockID `protobuf:"bytes,6,opt,name=last_block_id,json=lastBlockId" json:"last_block_id"` + // hashes of block data + LastCommitHash []byte `protobuf:"bytes,7,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` + DataHash []byte `protobuf:"bytes,8,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + // hashes from the app output from the prev block + ValidatorsHash []byte `protobuf:"bytes,9,opt,name=validators_hash,json=validatorsHash,proto3" json:"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:"-"` @@ -2617,7 +2622,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{30} + return fileDescriptor_types_7077ff64ad2a8940, []int{30} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2667,7 +2672,7 @@ func (m *Header) GetTime() time.Time { return time.Time{} } -func (m *Header) GetNumTxs() int32 { +func (m *Header) GetNumTxs() int64 { if m != nil { return m.NumTxs } @@ -2681,9 +2686,23 @@ func (m *Header) GetTotalTxs() int64 { return 0 } -func (m *Header) GetLastBlockHash() []byte { +func (m *Header) GetLastBlockId() BlockID { if m != nil { - return m.LastBlockHash + return m.LastBlockId + } + return BlockID{} +} + +func (m *Header) GetLastCommitHash() []byte { + if m != nil { + return m.LastCommitHash + } + return nil +} + +func (m *Header) GetDataHash() []byte { + if m != nil { + return m.DataHash } return nil } @@ -2695,6 +2714,13 @@ func (m *Header) GetValidatorsHash() []byte { 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 @@ -2702,6 +2728,20 @@ func (m *Header) GetAppHash() []byte { 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 nil +} + func (m *Header) GetProposerAddress() []byte { if m != nil { return m.ProposerAddress @@ -2709,6 +2749,116 @@ func (m *Header) GetProposerAddress() []byte { return nil } +type BlockID struct { + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + PartsHeader PartSetHeader `protobuf:"bytes,2,opt,name=parts_header,json=partsHeader" json:"parts_header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_types_7077ff64ad2a8940, []int{31} +} +func (m *BlockID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BlockID) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockID.Merge(dst, src) +} +func (m *BlockID) XXX_Size() int { + return m.Size() +} +func (m *BlockID) XXX_DiscardUnknown() { + xxx_messageInfo_BlockID.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockID proto.InternalMessageInfo + +func (m *BlockID) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *BlockID) GetPartsHeader() PartSetHeader { + if m != nil { + return m.PartsHeader + } + return PartSetHeader{} +} + +type PartSetHeader struct { + Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_types_7077ff64ad2a8940, []int{32} +} +func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PartSetHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_PartSetHeader.Merge(dst, src) +} +func (m *PartSetHeader) XXX_Size() int { + return m.Size() +} +func (m *PartSetHeader) XXX_DiscardUnknown() { + xxx_messageInfo_PartSetHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo + +func (m *PartSetHeader) GetTotal() int32 { + if m != nil { + return m.Total + } + return 0 +} + +func (m *PartSetHeader) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + // Validator type Validator struct { Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` @@ -2723,7 +2873,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_types_2abffab37bc29540, []int{31} + return fileDescriptor_types_7077ff64ad2a8940, []int{33} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2786,7 +2936,7 @@ func (m *SigningValidator) Reset() { *m = SigningValidator{} } func (m *SigningValidator) String() string { return proto.CompactTextString(m) } func (*SigningValidator) ProtoMessage() {} func (*SigningValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2abffab37bc29540, []int{32} + return fileDescriptor_types_7077ff64ad2a8940, []int{34} } func (m *SigningValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2841,7 +2991,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_types_2abffab37bc29540, []int{33} + return fileDescriptor_types_7077ff64ad2a8940, []int{35} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2899,7 +3049,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_types_2abffab37bc29540, []int{34} + return fileDescriptor_types_7077ff64ad2a8940, []int{36} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3026,6 +3176,10 @@ func init() { golang_proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") proto.RegisterType((*Header)(nil), "types.Header") golang_proto.RegisterType((*Header)(nil), "types.Header") + proto.RegisterType((*BlockID)(nil), "types.BlockID") + golang_proto.RegisterType((*BlockID)(nil), "types.BlockID") + proto.RegisterType((*PartSetHeader)(nil), "types.PartSetHeader") + golang_proto.RegisterType((*PartSetHeader)(nil), "types.PartSetHeader") proto.RegisterType((*Validator)(nil), "types.Validator") golang_proto.RegisterType((*Validator)(nil), "types.Validator") proto.RegisterType((*SigningValidator)(nil), "types.SigningValidator") @@ -4611,15 +4765,30 @@ func (this *Header) Equal(that interface{}) bool { if this.TotalTxs != that1.TotalTxs { return false } - if !bytes.Equal(this.LastBlockHash, that1.LastBlockHash) { + if !this.LastBlockId.Equal(&that1.LastBlockId) { + return false + } + if !bytes.Equal(this.LastCommitHash, that1.LastCommitHash) { + return false + } + if !bytes.Equal(this.DataHash, that1.DataHash) { return false } if !bytes.Equal(this.ValidatorsHash, that1.ValidatorsHash) { return false } + if !bytes.Equal(this.ConsensusHash, that1.ConsensusHash) { + return false + } if !bytes.Equal(this.AppHash, that1.AppHash) { return false } + if !bytes.Equal(this.LastResultsHash, that1.LastResultsHash) { + return false + } + if !bytes.Equal(this.EvidenceHash, that1.EvidenceHash) { + return false + } if !bytes.Equal(this.ProposerAddress, that1.ProposerAddress) { return false } @@ -4628,6 +4797,66 @@ func (this *Header) Equal(that interface{}) bool { } return true } +func (this *BlockID) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BlockID) + if !ok { + that2, ok := that.(BlockID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Hash, that1.Hash) { + return false + } + if !this.PartsHeader.Equal(&that1.PartsHeader) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *PartSetHeader) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PartSetHeader) + if !ok { + that2, ok := that.(PartSetHeader) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Total != that1.Total { + return false + } + if !bytes.Equal(this.Hash, that1.Hash) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *Validator) Equal(that interface{}) bool { if that == nil { return this == nil @@ -6657,26 +6886,58 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.TotalTxs)) } - if len(m.LastBlockHash) > 0 { - dAtA[i] = 0x32 + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockId.Size())) + n36, err := m.LastBlockId.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + if len(m.LastCommitHash) > 0 { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) + i += copy(dAtA[i:], m.LastCommitHash) + } + if len(m.DataHash) > 0 { + dAtA[i] = 0x42 i++ - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockHash))) - i += copy(dAtA[i:], m.LastBlockHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) + i += copy(dAtA[i:], m.DataHash) } if len(m.ValidatorsHash) > 0 { - dAtA[i] = 0x3a + dAtA[i] = 0x4a i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) i += copy(dAtA[i:], m.ValidatorsHash) } + if len(m.ConsensusHash) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) + i += copy(dAtA[i:], m.ConsensusHash) + } if len(m.AppHash) > 0 { - dAtA[i] = 0x42 + dAtA[i] = 0x5a i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) i += copy(dAtA[i:], m.AppHash) } + if len(m.LastResultsHash) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) + i += copy(dAtA[i:], m.LastResultsHash) + } + if len(m.EvidenceHash) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) + i += copy(dAtA[i:], m.EvidenceHash) + } if len(m.ProposerAddress) > 0 { - dAtA[i] = 0x4a + dAtA[i] = 0x72 i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) i += copy(dAtA[i:], m.ProposerAddress) @@ -6687,6 +6948,73 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *BlockID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.PartsHeader.Size())) + n37, err := m.PartsHeader.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PartSetHeader) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Total != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Total)) + } + if len(m.Hash) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i += copy(dAtA[i:], m.Hash) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + func (m *Validator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6711,11 +7039,11 @@ func (m *Validator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.PubKey.Size())) - n36, err := m.PubKey.MarshalTo(dAtA[i:]) + n38, err := m.PubKey.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n38 if m.Power != 0 { dAtA[i] = 0x18 i++ @@ -6745,11 +7073,11 @@ func (m *SigningValidator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n37, err := m.Validator.MarshalTo(dAtA[i:]) + n39, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n39 if m.SignedLastBlock { dAtA[i] = 0x10 i++ @@ -6823,11 +7151,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n38, err := m.Validator.MarshalTo(dAtA[i:]) + n40, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n40 if m.Height != 0 { dAtA[i] = 0x18 i++ @@ -6836,11 +7164,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n39, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + n41, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n41 if m.TotalVotingPower != 0 { dAtA[i] = 0x28 i++ @@ -7520,7 +7848,7 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { } v34 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) this.Time = *v34 - this.NumTxs = int32(r.Int31()) + this.NumTxs = int64(r.Int63()) if r.Intn(2) == 0 { this.NumTxs *= -1 } @@ -7528,41 +7856,95 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { if r.Intn(2) == 0 { this.TotalTxs *= -1 } - v35 := r.Intn(100) - this.LastBlockHash = make([]byte, v35) - for i := 0; i < v35; i++ { - this.LastBlockHash[i] = byte(r.Intn(256)) - } + v35 := NewPopulatedBlockID(r, easy) + this.LastBlockId = *v35 v36 := r.Intn(100) - this.ValidatorsHash = make([]byte, v36) + this.LastCommitHash = make([]byte, v36) for i := 0; i < v36; i++ { - this.ValidatorsHash[i] = byte(r.Intn(256)) + this.LastCommitHash[i] = byte(r.Intn(256)) } v37 := r.Intn(100) - this.AppHash = make([]byte, v37) + this.DataHash = make([]byte, v37) for i := 0; i < v37; i++ { - this.AppHash[i] = byte(r.Intn(256)) + this.DataHash[i] = byte(r.Intn(256)) } v38 := r.Intn(100) - this.ProposerAddress = make([]byte, v38) + this.ValidatorsHash = make([]byte, v38) for i := 0; i < v38; i++ { + this.ValidatorsHash[i] = byte(r.Intn(256)) + } + v39 := r.Intn(100) + this.ConsensusHash = make([]byte, v39) + for i := 0; i < v39; i++ { + this.ConsensusHash[i] = byte(r.Intn(256)) + } + v40 := r.Intn(100) + this.AppHash = make([]byte, v40) + for i := 0; i < v40; i++ { + this.AppHash[i] = byte(r.Intn(256)) + } + v41 := r.Intn(100) + this.LastResultsHash = make([]byte, v41) + for i := 0; i < v41; i++ { + this.LastResultsHash[i] = byte(r.Intn(256)) + } + v42 := r.Intn(100) + this.EvidenceHash = make([]byte, v42) + for i := 0; i < v42; i++ { + this.EvidenceHash[i] = byte(r.Intn(256)) + } + v43 := r.Intn(100) + this.ProposerAddress = make([]byte, v43) + for i := 0; i < v43; i++ { this.ProposerAddress[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 10) + this.XXX_unrecognized = randUnrecognizedTypes(r, 15) } return this } -func NewPopulatedValidator(r randyTypes, easy bool) *Validator { +func NewPopulatedBlockID(r randyTypes, easy bool) *BlockID { + this := &BlockID{} + v44 := r.Intn(100) + this.Hash = make([]byte, v44) + for i := 0; i < v44; i++ { + this.Hash[i] = byte(r.Intn(256)) + } + v45 := NewPopulatedPartSetHeader(r, easy) + this.PartsHeader = *v45 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedPartSetHeader(r randyTypes, easy bool) *PartSetHeader { + this := &PartSetHeader{} + this.Total = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Total *= -1 + } + v46 := r.Intn(100) + this.Hash = make([]byte, v46) + for i := 0; i < v46; i++ { + this.Hash[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedValidator(r randyTypes, easy bool) *Validator { this := &Validator{} - v39 := r.Intn(100) - this.Address = make([]byte, v39) - for i := 0; i < v39; i++ { + v47 := r.Intn(100) + this.Address = make([]byte, v47) + for i := 0; i < v47; i++ { this.Address[i] = byte(r.Intn(256)) } - v40 := NewPopulatedPubKey(r, easy) - this.PubKey = *v40 + v48 := NewPopulatedPubKey(r, easy) + this.PubKey = *v48 this.Power = int64(r.Int63()) if r.Intn(2) == 0 { this.Power *= -1 @@ -7575,8 +7957,8 @@ func NewPopulatedValidator(r randyTypes, easy bool) *Validator { func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { this := &SigningValidator{} - v41 := NewPopulatedValidator(r, easy) - this.Validator = *v41 + v49 := NewPopulatedValidator(r, easy) + this.Validator = *v49 this.SignedLastBlock = bool(bool(r.Intn(2) == 0)) if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedTypes(r, 3) @@ -7587,9 +7969,9 @@ func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { this := &PubKey{} this.Type = string(randStringTypes(r)) - v42 := r.Intn(100) - this.Data = make([]byte, v42) - for i := 0; i < v42; i++ { + v50 := r.Intn(100) + this.Data = make([]byte, v50) + for i := 0; i < v50; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -7601,14 +7983,14 @@ func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { func NewPopulatedEvidence(r randyTypes, easy bool) *Evidence { this := &Evidence{} this.Type = string(randStringTypes(r)) - v43 := NewPopulatedValidator(r, easy) - this.Validator = *v43 + v51 := NewPopulatedValidator(r, easy) + this.Validator = *v51 this.Height = int64(r.Int63()) if r.Intn(2) == 0 { this.Height *= -1 } - v44 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) - this.Time = *v44 + v52 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v52 this.TotalVotingPower = int64(r.Int63()) if r.Intn(2) == 0 { this.TotalVotingPower *= -1 @@ -7638,9 +8020,9 @@ func randUTF8RuneTypes(r randyTypes) rune { return rune(ru + 61) } func randStringTypes(r randyTypes) string { - v45 := r.Intn(100) - tmps := make([]rune, v45) - for i := 0; i < v45; i++ { + v53 := r.Intn(100) + tmps := make([]rune, v53) + for i := 0; i < v53; i++ { tmps[i] = randUTF8RuneTypes(r) } return string(tmps) @@ -7662,11 +8044,11 @@ func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte switch wire { case 0: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v46 := r.Int63() + v54 := r.Int63() if r.Intn(2) == 0 { - v46 *= -1 + v54 *= -1 } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v46)) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v54)) case 1: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -8459,7 +8841,13 @@ func (m *Header) Size() (n int) { if m.TotalTxs != 0 { n += 1 + sovTypes(uint64(m.TotalTxs)) } - l = len(m.LastBlockHash) + 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)) } @@ -8467,10 +8855,22 @@ func (m *Header) Size() (n int) { 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)) @@ -8481,6 +8881,37 @@ func (m *Header) Size() (n int) { return n } +func (m *BlockID) Size() (n int) { + 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 *PartSetHeader) Size() (n int) { + 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 *Validator) Size() (n int) { var l int _ = l @@ -12814,7 +13245,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumTxs |= (int32(b) & 0x7F) << shift + m.NumTxs |= (int64(b) & 0x7F) << shift if b < 0x80 { break } @@ -12840,7 +13271,37 @@ func (m *Header) Unmarshal(dAtA []byte) error { } case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHash", wireType) + 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 > l { + return io.ErrUnexpectedEOF + } + if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -12864,12 +13325,43 @@ func (m *Header) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LastBlockHash = append(m.LastBlockHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastBlockHash == nil { - m.LastBlockHash = []byte{} + m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastCommitHash == nil { + m.LastCommitHash = []byte{} } iNdEx = postIndex - case 7: + case 8: + 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 > l { + return io.ErrUnexpectedEOF + } + m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) + if m.DataHash == nil { + m.DataHash = []byte{} + } + iNdEx = postIndex + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) } @@ -12900,7 +13392,38 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.ValidatorsHash = []byte{} } iNdEx = postIndex - case 8: + 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 > 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) } @@ -12931,7 +13454,69 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.AppHash = []byte{} } iNdEx = postIndex - case 9: + 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 > 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 > 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) } @@ -12984,6 +13569,219 @@ func (m *Header) Unmarshal(dAtA []byte) error { } 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 > 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 > 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) > 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 *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 |= (int32(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 > 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) > 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 *Validator) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -13610,134 +14408,142 @@ var ( ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_2abffab37bc29540) } +func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_7077ff64ad2a8940) } func init() { - golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_2abffab37bc29540) + golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_7077ff64ad2a8940) } -var fileDescriptor_types_2abffab37bc29540 = []byte{ - // 1964 bytes of a gzipped FileDescriptorProto +var fileDescriptor_types_7077ff64ad2a8940 = []byte{ + // 2090 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x73, 0x23, 0x47, - 0x15, 0xf7, 0xc8, 0xfa, 0x37, 0x4f, 0xb6, 0xa5, 0xb4, 0x77, 0x6d, 0xad, 0x02, 0xf6, 0x32, 0x45, - 0x6d, 0x6c, 0xe2, 0xc8, 0xe0, 0xb0, 0x29, 0x6f, 0x02, 0x29, 0x2c, 0x67, 0x89, 0x5c, 0x09, 0x60, - 0x66, 0x37, 0x4b, 0x15, 0x97, 0xa9, 0x96, 0xa6, 0x3d, 0x9a, 0x5a, 0x69, 0x66, 0x32, 0xdd, 0x72, - 0xe4, 0xfd, 0x08, 0x54, 0x8a, 0xe2, 0xc6, 0x99, 0x1b, 0x5f, 0x80, 0x2a, 0x8e, 0x9c, 0xa8, 0xdc, - 0xe0, 0x00, 0xc5, 0x6d, 0x01, 0xa7, 0xb8, 0xf0, 0x09, 0x38, 0x52, 0xaf, 0x7b, 0xfe, 0x7b, 0xb4, - 0xb5, 0x59, 0x6e, 0x5c, 0xa4, 0xee, 0x7e, 0xef, 0xf5, 0xf4, 0x7b, 0xfd, 0xde, 0xfb, 0xbd, 0xd7, - 0xb0, 0x45, 0x47, 0x63, 0xf7, 0x50, 0x5c, 0x05, 0x8c, 0xab, 0xdf, 0x7e, 0x10, 0xfa, 0xc2, 0x27, - 0x35, 0x39, 0xe9, 0xbd, 0xe5, 0xb8, 0x62, 0x32, 0x1f, 0xf5, 0xc7, 0xfe, 0xec, 0xd0, 0xf1, 0x1d, - 0xff, 0x50, 0x52, 0x47, 0xf3, 0x0b, 0x39, 0x93, 0x13, 0x39, 0x52, 0x52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x39, 0x04, 0x78, 0x50, 0x82, 0x00, 0xc5, 0xe3, 0x2f, 0x81, 0x80, 0x07, 0x25, - 0x10, 0xd0, 0xbd, 0xf1, 0xad, 0x52, 0x0c, 0x38, 0xc8, 0x63, 0x40, 0x51, 0x9d, 0x02, 0x08, 0x7c, - 0xaf, 0x0c, 0x04, 0xee, 0x14, 0x64, 0x96, 0xa2, 0xc0, 0xdb, 0x37, 0x50, 0x60, 0xab, 0x20, 0x5a, - 0x02, 0x03, 0x0f, 0x72, 0xf9, 0x19, 0x4a, 0x75, 0x2b, 0x4f, 0xd0, 0xe4, 0x9d, 0x9b, 0x08, 0xb2, - 0x5d, 0xbc, 0xda, 0x32, 0x08, 0x39, 0x2c, 0x40, 0xc8, 0xed, 0xe2, 0x29, 0x0b, 0x18, 0x92, 0x22, - 0xc1, 0x3e, 0xc6, 0x7d, 0xc1, 0xd3, 0x30, 0x47, 0xb0, 0x30, 0xf4, 0xc3, 0x28, 0x55, 0xab, 0x89, - 0xb1, 0x87, 0x99, 0x28, 0xf5, 0xaf, 0x17, 0xa0, 0x86, 0x74, 0xfa, 0x8c, 0x77, 0x19, 0xbf, 0xd6, - 0x52, 0x59, 0x19, 0xd1, 0xd9, 0x2c, 0xa6, 0x47, 0x59, 0x2c, 0x03, 0x26, 0x95, 0x1c, 0x98, 0x90, - 0x6f, 0xc1, 0x6b, 0x32, 0x8d, 0x48, 0xbb, 0x58, 0xb9, 0xb4, 0xd6, 0x46, 0x82, 0x32, 0x88, 0xca, - 0x6f, 0x6f, 0xc1, 0x66, 0x86, 0x17, 0x53, 0xac, 0x4c, 0x61, 0x55, 0x19, 0xbc, 0x9d, 0x84, 0xfb, - 0x24, 0x08, 0x86, 0x94, 0x4f, 0x8c, 0x1f, 0xa5, 0xfa, 0xa7, 0x40, 0x45, 0xa0, 0x3a, 0xf6, 0x6d, - 0xa5, 0xd6, 0xba, 0x29, 0xc7, 0x08, 0x5e, 0x53, 0xdf, 0x91, 0x5f, 0xd5, 0x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0x96, 0xcb, 0xaf, 0xa0, 0xe5, 0x37, 0x64, 0x49, 0x92, 0x4e, + 0xd3, 0x45, 0xf7, 0x64, 0xfd, 0xd6, 0x80, 0x56, 0xee, 0x30, 0x64, 0x1f, 0x40, 0x65, 0x39, 0xee, + 0x3e, 0x8b, 0x0a, 0xe3, 0xc8, 0x06, 0x68, 0xac, 0x47, 0xee, 0x33, 0x66, 0x9b, 0x83, 0xe8, 0x93, + 0xdc, 0x85, 0xaa, 0x98, 0x2b, 0xee, 0x6c, 0xf1, 0xf6, 0x78, 0x8e, 0xac, 0x15, 0x81, 0xff, 0xe4, + 0x1e, 0x34, 0xd4, 0xc2, 0x23, 0x9f, 0x73, 0x37, 0xd0, 0x85, 0x03, 0x49, 0x2f, 0xfd, 0x01, 0x52, + 0xec, 0xfa, 0x20, 0x19, 0x58, 0x3f, 0x03, 0x33, 0xde, 0x96, 0xbc, 0x06, 0xe6, 0x94, 0xce, 0x75, + 0x65, 0x2b, 0xcf, 0xb6, 0x62, 0xd7, 0xa6, 0x74, 0x8e, 0x45, 0x2d, 0xd9, 0x80, 0xaa, 0x24, 0x8a, + 0xb9, 0xb2, 0xf7, 0x8a, 0x5d, 0x99, 0xd2, 0xf9, 0xe3, 0x79, 0x4c, 0x18, 0x51, 0x1e, 0x95, 0xad, + 0x53, 0x3a, 0xff, 0x80, 0x72, 0xeb, 0x7d, 0xa8, 0xa8, 0x43, 0xbe, 0xd4, 0xc2, 0x52, 0xbe, 0x94, + 0x91, 0xff, 0x3e, 0xd4, 0x53, 0xe7, 0x26, 0xdf, 0x81, 0x5b, 0x4a, 0xc3, 0x80, 0x86, 0x02, 0x2d, + 0x92, 0x59, 0x90, 0x20, 0xf1, 0x8c, 0x86, 0x42, 0x6e, 0xa9, 0x0a, 0xf1, 0x10, 0x9a, 0xd9, 0x62, + 0x95, 0x7c, 0x0d, 0x1a, 0xba, 0xb0, 0x0d, 0xfd, 0x99, 0xe7, 0x68, 0xd9, 0xba, 0x9a, 0xb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0xe2, 0x27, 0xd4, 0xee, 0xa2, 0xc6, 0xb8, 0xf7, 0x95, 0xff, 0xfc, 0x73, 0xd3, 0xf8, 0xdd, + 0xd5, 0xa6, 0xf1, 0x87, 0xab, 0x4d, 0xe3, 0xf3, 0xab, 0x4d, 0xe3, 0xcf, 0x57, 0x9b, 0xc6, 0x3f, + 0xae, 0x36, 0x8d, 0x3f, 0x7e, 0xb1, 0x69, 0x0c, 0x2a, 0xe8, 0xfe, 0x6f, 0xfd, 0x37, 0x00, 0x00, + 0xff, 0xff, 0x85, 0x43, 0xc2, 0x26, 0xf5, 0x17, 0x00, 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index c64ece24f..45b62a779 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -232,24 +232,40 @@ message LastCommitInfo { //---------------------------------------- // Blockchain Types -// just the minimum the app might need message Header { - // basics + // basic block info string chain_id = 1 [(gogoproto.customname)="ChainID"]; int64 height = 2; google.protobuf.Timestamp time = 3 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; - - // txs - int32 num_txs = 4; + int64 num_txs = 4; int64 total_txs = 5; - // hashes - bytes last_block_hash = 6; - bytes validators_hash = 7; - bytes app_hash = 8; + // prev block info + BlockID last_block_id = 6 [(gogoproto.nullable)=false]; + + // hashes of block data + bytes last_commit_hash = 7; // commit from validators from the last block + bytes data_hash = 8; // transactions + + // hashes from the app output from the prev block + bytes validators_hash = 9; // validators for the current 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 all results from the txs from the previous block + + // consensus info + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block +} + +message BlockID { + bytes hash = 1; + PartSetHeader parts_header = 2 [(gogoproto.nullable)=false]; +} - // consensus - bytes proposer_address = 9; +message PartSetHeader { + int32 total = 1; + bytes hash = 2; } // Validator diff --git a/abci/types/typespb_test.go b/abci/types/typespb_test.go index 33a368af4..b32c827d1 100644 --- a/abci/types/typespb_test.go +++ b/abci/types/typespb_test.go @@ -1758,6 +1758,118 @@ func TestHeaderMarshalTo(t *testing.T) { } } +func TestBlockIDProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBlockID(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BlockID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBlockIDMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBlockID(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BlockID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestPartSetHeaderProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPartSetHeader(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &PartSetHeader{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestPartSetHeaderMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPartSetHeader(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &PartSetHeader{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + func TestValidatorProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -2540,6 +2652,42 @@ func TestHeaderJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestBlockIDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBlockID(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BlockID{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestPartSetHeaderJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPartSetHeader(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &PartSetHeader{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestValidatorJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -3480,6 +3628,62 @@ func TestHeaderProtoCompactText(t *testing.T) { } } +func TestBlockIDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBlockID(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &BlockID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBlockIDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBlockID(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &BlockID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestPartSetHeaderProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPartSetHeader(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &PartSetHeader{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestPartSetHeaderProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPartSetHeader(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &PartSetHeader{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + func TestValidatorProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -4274,6 +4478,50 @@ func TestHeaderSize(t *testing.T) { } } +func TestBlockIDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBlockID(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestPartSetHeaderSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPartSetHeader(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + func TestValidatorSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) diff --git a/types/block.go b/types/block.go index bb8169636..8588d5571 100644 --- a/types/block.go +++ b/types/block.go @@ -196,14 +196,14 @@ func (b *Block) StringShort() string { // NOTE: changes to the Header should be duplicated in the abci Header type Header struct { // basic block info - ChainID string `json:"chain_id"` - Height int64 `json:"height"` - Time time.Time `json:"time"` - NumTxs int64 `json:"num_txs"` + ChainID string `json:"chain_id"` + Height int64 `json:"height"` + Time time.Time `json:"time"` + NumTxs int64 `json:"num_txs"` + TotalTxs int64 `json:"total_txs"` // prev block info LastBlockID BlockID `json:"last_block_id"` - TotalTxs int64 `json:"total_txs"` // hashes of block data LastCommitHash cmn.HexBytes `json:"last_commit_hash"` // commit from validators from the last block diff --git a/types/proto3/block.pb.go b/types/proto3/block.pb.go index 805828f82..ab1c66cfb 100644 --- a/types/proto3/block.pb.go +++ b/types/proto3/block.pb.go @@ -1,18 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: block.proto +// source: types/proto3/block.proto -/* -Package proto3 is a generated protocol buffer package. - -It is generated from these files: - block.proto - -It has these top-level messages: - PartSetHeader - BlockID - Header - Timestamp -*/ +//nolint package proto3 import proto "github.com/golang/protobuf/proto" @@ -31,14 +20,36 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PartSetHeader struct { - Total int32 `protobuf:"zigzag32,1,opt,name=Total" json:"Total,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=Hash,proto3" json:"Hash,omitempty"` + Total int32 `protobuf:"zigzag32,1,opt,name=Total,proto3" json:"Total,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=Hash,proto3" json:"Hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_block_c8c1dcbe91697ccd, []int{0} +} +func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PartSetHeader.Unmarshal(m, b) +} +func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic) +} +func (dst *PartSetHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_PartSetHeader.Merge(dst, src) +} +func (m *PartSetHeader) XXX_Size() int { + return xxx_messageInfo_PartSetHeader.Size(m) +} +func (m *PartSetHeader) XXX_DiscardUnknown() { + xxx_messageInfo_PartSetHeader.DiscardUnknown(m) } -func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } -func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } -func (*PartSetHeader) ProtoMessage() {} -func (*PartSetHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo func (m *PartSetHeader) GetTotal() int32 { if m != nil { @@ -55,14 +66,36 @@ func (m *PartSetHeader) GetHash() []byte { } type BlockID struct { - Hash []byte `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"` - PartsHeader *PartSetHeader `protobuf:"bytes,2,opt,name=PartsHeader" json:"PartsHeader,omitempty"` + Hash []byte `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"` + PartsHeader *PartSetHeader `protobuf:"bytes,2,opt,name=PartsHeader,proto3" json:"PartsHeader,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_block_c8c1dcbe91697ccd, []int{1} +} +func (m *BlockID) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlockID.Unmarshal(m, b) +} +func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlockID.Marshal(b, m, deterministic) +} +func (dst *BlockID) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockID.Merge(dst, src) +} +func (m *BlockID) XXX_Size() int { + return xxx_messageInfo_BlockID.Size(m) +} +func (m *BlockID) XXX_DiscardUnknown() { + xxx_messageInfo_BlockID.DiscardUnknown(m) } -func (m *BlockID) Reset() { *m = BlockID{} } -func (m *BlockID) String() string { return proto.CompactTextString(m) } -func (*BlockID) ProtoMessage() {} -func (*BlockID) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +var xxx_messageInfo_BlockID proto.InternalMessageInfo func (m *BlockID) GetHash() []byte { if m != nil { @@ -80,13 +113,13 @@ func (m *BlockID) GetPartsHeader() *PartSetHeader { type Header struct { // basic block info - ChainID string `protobuf:"bytes,1,opt,name=ChainID" json:"ChainID,omitempty"` - Height int64 `protobuf:"zigzag64,2,opt,name=Height" json:"Height,omitempty"` - Time *Timestamp `protobuf:"bytes,3,opt,name=Time" json:"Time,omitempty"` - NumTxs int64 `protobuf:"zigzag64,4,opt,name=NumTxs" json:"NumTxs,omitempty"` + ChainID string `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"` + Height int64 `protobuf:"zigzag64,2,opt,name=Height,proto3" json:"Height,omitempty"` + Time *Timestamp `protobuf:"bytes,3,opt,name=Time,proto3" json:"Time,omitempty"` + NumTxs int64 `protobuf:"zigzag64,4,opt,name=NumTxs,proto3" json:"NumTxs,omitempty"` + TotalTxs int64 `protobuf:"zigzag64,5,opt,name=TotalTxs,proto3" json:"TotalTxs,omitempty"` // prev block info - LastBlockID *BlockID `protobuf:"bytes,5,opt,name=LastBlockID" json:"LastBlockID,omitempty"` - TotalTxs int64 `protobuf:"zigzag64,6,opt,name=TotalTxs" json:"TotalTxs,omitempty"` + LastBlockID *BlockID `protobuf:"bytes,6,opt,name=LastBlockID,proto3" json:"LastBlockID,omitempty"` // hashes of block data LastCommitHash []byte `protobuf:"bytes,7,opt,name=LastCommitHash,proto3" json:"LastCommitHash,omitempty"` DataHash []byte `protobuf:"bytes,8,opt,name=DataHash,proto3" json:"DataHash,omitempty"` @@ -96,13 +129,36 @@ type Header struct { AppHash []byte `protobuf:"bytes,11,opt,name=AppHash,proto3" json:"AppHash,omitempty"` LastResultsHash []byte `protobuf:"bytes,12,opt,name=LastResultsHash,proto3" json:"LastResultsHash,omitempty"` // consensus info - EvidenceHash []byte `protobuf:"bytes,13,opt,name=EvidenceHash,proto3" json:"EvidenceHash,omitempty"` + EvidenceHash []byte `protobuf:"bytes,13,opt,name=EvidenceHash,proto3" json:"EvidenceHash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,14,opt,name=ProposerAddress,proto3" json:"ProposerAddress,omitempty"` + 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) { + return fileDescriptor_block_c8c1dcbe91697ccd, []int{2} +} +func (m *Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Header.Unmarshal(m, b) +} +func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Header.Marshal(b, m, deterministic) +} +func (dst *Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header.Merge(dst, src) +} +func (m *Header) XXX_Size() int { + return xxx_messageInfo_Header.Size(m) +} +func (m *Header) XXX_DiscardUnknown() { + xxx_messageInfo_Header.DiscardUnknown(m) } -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +var xxx_messageInfo_Header proto.InternalMessageInfo func (m *Header) GetChainID() string { if m != nil { @@ -132,18 +188,18 @@ func (m *Header) GetNumTxs() int64 { return 0 } -func (m *Header) GetLastBlockID() *BlockID { +func (m *Header) GetTotalTxs() int64 { if m != nil { - return m.LastBlockID + return m.TotalTxs } - return nil + return 0 } -func (m *Header) GetTotalTxs() int64 { +func (m *Header) GetLastBlockID() *BlockID { if m != nil { - return m.TotalTxs + return m.LastBlockID } - return 0 + return nil } func (m *Header) GetLastCommitHash() []byte { @@ -195,19 +251,48 @@ func (m *Header) GetEvidenceHash() []byte { return nil } +func (m *Header) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + // Timestamp wraps how amino encodes time. Note that this is different from the protobuf well-known type // protobuf/timestamp.proto in the sense that there seconds and nanos are varint encoded. See: // https://github.com/google/protobuf/blob/d2980062c859649523d5fd51d6b55ab310e47482/src/google/protobuf/timestamp.proto#L123-L135 // Also nanos do not get skipped if they are zero in amino. type Timestamp struct { - Seconds int64 `protobuf:"fixed64,1,opt,name=seconds" json:"seconds,omitempty"` - Nanos int32 `protobuf:"fixed32,2,opt,name=nanos" json:"nanos,omitempty"` + Seconds int64 `protobuf:"fixed64,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + Nanos int32 `protobuf:"fixed32,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (m *Timestamp) String() string { return proto.CompactTextString(m) } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { + return fileDescriptor_block_c8c1dcbe91697ccd, []int{3} +} +func (m *Timestamp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Timestamp.Unmarshal(m, b) +} +func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic) +} +func (dst *Timestamp) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timestamp.Merge(dst, src) +} +func (m *Timestamp) XXX_Size() int { + return xxx_messageInfo_Timestamp.Size(m) +} +func (m *Timestamp) XXX_DiscardUnknown() { + xxx_messageInfo_Timestamp.DiscardUnknown(m) } -func (m *Timestamp) Reset() { *m = Timestamp{} } -func (m *Timestamp) String() string { return proto.CompactTextString(m) } -func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +var xxx_messageInfo_Timestamp proto.InternalMessageInfo func (m *Timestamp) GetSeconds() int64 { if m != nil { @@ -230,32 +315,33 @@ func init() { proto.RegisterType((*Timestamp)(nil), "proto3.Timestamp") } -func init() { proto.RegisterFile("block.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 372 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x4f, 0x6b, 0xe3, 0x30, - 0x10, 0xc5, 0xf1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, 0x3f, 0x1f, 0xd2, 0xf5, 0xa7, 0x0e, 0x9a, - 0xae, 0xdd, 0x29, 0xbc, 0x02, 0xff, 0x89, 0x6b, 0x53, 0x7c, 0x57, 0xd0, 0x22, 0xca, 0xb0, 0xa4, - 0x14, 0x36, 0x3b, 0xce, 0xe0, 0x19, 0x74, 0x69, 0x47, 0x16, 0xd6, 0x26, 0x58, 0xa5, 0xf1, 0x12, - 0x7e, 0xdb, 0xe8, 0x5c, 0xa5, 0x69, 0x6c, 0x68, 0x43, 0x1d, 0xda, 0xd0, 0x89, 0x6b, 0x19, 0x0b, - 0x6e, 0x38, 0x25, 0xba, 0x94, 0xa8, 0xb4, 0x65, 0x6c, 0x78, 0x12, 0x47, 0xdc, 0xa8, 0x5c, 0x53, - 0xa2, 0xe7, 0x18, 0x75, 0x17, 0xcf, 0x61, 0x30, 0x57, 0x52, 0x0b, 0xa9, 0x0f, 0x2e, 0x06, 0x14, - 0xab, 0x9b, 0x76, 0xa3, 0xf7, 0x59, 0x46, 0x75, 0x9f, 0xea, 0xa5, 0xc4, 0x09, 0x0c, 0xed, 0xa9, - 0x98, 0xd0, 0x87, 0xc4, 0x38, 0x42, 0x9f, 0x12, 0xa7, 0x36, 0x86, 0xd0, 0x7f, 0xfc, 0x88, 0x23, - 0x21, 0x77, 0x82, 0x62, 0x03, 0x8a, 0xd5, 0xbc, 0xf0, 0x0e, 0x7a, 0xd5, 0xce, 0xed, 0x50, 0x2d, - 0x76, 0x4a, 0x46, 0x9a, 0xae, 0xf1, 0x0f, 0x2b, 0xa5, 0x7d, 0x6d, 0x92, 0x4b, 0xa5, 0xe9, 0x16, - 0x87, 0xcc, 0x89, 0x6d, 0xf1, 0x38, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x74, 0x2f, 0xbd, - 0xb2, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("types/proto3/block.proto", fileDescriptor_block_c8c1dcbe91697ccd) } + +var fileDescriptor_block_c8c1dcbe91697ccd = []byte{ + // 395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x52, 0x4b, 0x8b, 0xdb, 0x30, + 0x10, 0xc6, 0xcd, 0x7b, 0x9c, 0x47, 0x23, 0xda, 0x22, 0x7a, 0x0a, 0xa6, 0x2d, 0x39, 0x25, 0xb4, + 0x39, 0x94, 0xd2, 0x53, 0x9a, 0x14, 0x12, 0x28, 0x25, 0x68, 0x43, 0xee, 0x4a, 0x2c, 0x36, 0x66, + 0x6d, 0xcb, 0x78, 0x94, 0x65, 0xf7, 0x3f, 0xef, 0x8f, 0x58, 0x34, 0xb2, 0xbd, 0x71, 0x6e, 0xfe, + 0x1e, 0xfa, 0x3e, 0x79, 0x46, 0xc0, 0xcd, 0x73, 0xa6, 0x70, 0x9e, 0xe5, 0xda, 0xe8, 0xc5, 0xfc, + 0x18, 0xeb, 0xd3, 0xc3, 0x8c, 0x00, 0x6b, 0x3b, 0x2e, 0xf8, 0x05, 0x83, 0x9d, 0xcc, 0xcd, 0x9d, + 0x32, 0x1b, 0x25, 0x43, 0x95, 0xb3, 0x0f, 0xd0, 0xda, 0x6b, 0x23, 0x63, 0xee, 0x4d, 0xbc, 0xe9, + 0x58, 0x38, 0xc0, 0x18, 0x34, 0x37, 0x12, 0xcf, 0xfc, 0xdd, 0xc4, 0x9b, 0xf6, 0x05, 0x7d, 0x07, + 0x07, 0xe8, 0xfc, 0xb1, 0x89, 0xdb, 0x75, 0x25, 0x7b, 0x6f, 0x32, 0xfb, 0x09, 0xbe, 0x4d, 0x46, + 0x97, 0x4b, 0x27, 0xfd, 0x1f, 0x1f, 0x5d, 0xfd, 0x62, 0x56, 0x2b, 0x15, 0xd7, 0xce, 0xe0, 0xa5, + 0x01, 0xed, 0xe2, 0x32, 0x1c, 0x3a, 0xab, 0xb3, 0x8c, 0xd2, 0xed, 0x9a, 0xa2, 0x7b, 0xa2, 0x84, + 0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 0xa1, 0x3a, 0xe9, 0x34, 0x44, 0x5a, 0xf8, 0x7b, 0x51, 0x42, + 0xfb, 0x2e, 0x53, 0x99, 0x6a, 0xa4, 0x7d, 0x8f, 0x84, 0x03, 0xc7, 0xe2, 0x19, 0xbf, 0x06, 0x00, + 0x00, 0xff, 0xff, 0xde, 0x29, 0x34, 0x75, 0xe9, 0x02, 0x00, 0x00, } diff --git a/types/proto3/block.proto b/types/proto3/block.proto index bc3cf8749..cefd180da 100644 --- a/types/proto3/block.proto +++ b/types/proto3/block.proto @@ -19,10 +19,10 @@ message Header { sint64 Height = 2; Timestamp Time = 3; sint64 NumTxs = 4; + sint64 TotalTxs = 5; // prev block info - BlockID LastBlockID = 5; - sint64 TotalTxs = 6; + BlockID LastBlockID = 6; // hashes of block data bytes LastCommitHash = 7; // commit from validators from the last block @@ -36,6 +36,7 @@ message Header { // consensus info bytes EvidenceHash = 13; // evidence included in the block + bytes ProposerAddress = 14; // original proposer of the block } // Timestamp wraps how amino encodes time. Note that this is different from the protobuf well-known type diff --git a/types/protobuf.go b/types/protobuf.go index 571619156..1681dd376 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -35,17 +35,23 @@ type tm2pb struct{} func (tm2pb) Header(header *Header) abci.Header { return abci.Header{ - ChainID: header.ChainID, - Height: header.Height, - + ChainID: header.ChainID, + Height: header.Height, Time: header.Time, - NumTxs: int32(header.NumTxs), // XXX: overflow + NumTxs: header.NumTxs, TotalTxs: header.TotalTxs, - LastBlockHash: header.LastBlockID.Hash, - ValidatorsHash: header.ValidatorsHash, - AppHash: header.AppHash, + LastBlockId: TM2PB.BlockID(header.LastBlockID), + + LastCommitHash: header.LastCommitHash, + DataHash: header.DataHash, + + ValidatorsHash: header.ValidatorsHash, + ConsensusHash: header.ConsensusHash, + AppHash: header.AppHash, + LastResultsHash: header.LastResultsHash, + EvidenceHash: header.EvidenceHash, ProposerAddress: header.ProposerAddress, } } @@ -57,6 +63,20 @@ func (tm2pb) ValidatorWithoutPubKey(val *Validator) abci.Validator { } } +func (tm2pb) BlockID(blockID BlockID) abci.BlockID { + return abci.BlockID{ + Hash: blockID.Hash, + PartsHeader: TM2PB.PartSetHeader(blockID.PartsHeader), + } +} + +func (tm2pb) PartSetHeader(header PartSetHeader) abci.PartSetHeader { + return abci.PartSetHeader{ + Total: int32(header.Total), + Hash: header.Hash, + } +} + // XXX: panics on unknown pubkey type func (tm2pb) Validator(val *Validator) abci.Validator { return abci.Validator{