diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 05369ea6..5fcbbb7b 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -12,10 +12,13 @@ BREAKING CHANGES: * [rpc] \#2298 `/abci_query` takes `prove` argument instead of `trusted` and switches the default behaviour to `prove=false` * [privval] \#2459 Split `SocketPVMsg`s implementations into Request and Response, where the Response may contain a error message (returned by the remote signer) + * [state] \#2644 Add Version field to State, breaking the format of State as + encoded on disk. * Apps * [abci] \#2298 ResponseQuery.Proof is now a structured merkle.Proof, not just arbitrary bytes + * [abci] \#2644 Add Version to Header and shift all fields by one * Go API * [node] Remove node.RunForever @@ -25,7 +28,8 @@ BREAKING CHANGES: * [crypto/merkle & lite] \#2298 Various changes to accomodate General Merkle trees * [crypto/merkle] \#2595 Remove all Hasher objects in favor of byte slices * [crypto/merkle] \#2635 merkle.SimpleHashFromTwoHashes is no longer exported - * [types] \#2598 `VoteTypeXxx` are now + * [types] \#2598 `VoteTypeXxx` are now of type `SignedMsgType byte` and named `XxxType`, eg. `PrevoteType`, + `PrecommitType`. * Blockchain Protocol * [types] Update SignBytes for `Vote`/`Proposal`/`Heartbeat`: @@ -34,7 +38,9 @@ BREAKING CHANGES: * \#2598 Change `Type` field fromt `string` to `byte` and use new `SignedMsgType` to enumerate. * [types] \#2512 Remove the pubkey field from the validator hash + * [types] \#2644 Add Version struct to Header * [state] \#2587 Require block.Time of the fist block to be genesis time + * [state] \#2644 Require block.Version to match state.Version * P2P Protocol diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 1ec51602..81fb74b4 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -61,7 +61,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_4a7ab597ee120b05, []int{0} + return fileDescriptor_types_07d64ea985a686e2, []int{0} } func (m *Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -483,7 +483,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_4a7ab597ee120b05, []int{1} + return fileDescriptor_types_07d64ea985a686e2, []int{1} } func (m *RequestEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -529,7 +529,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_4a7ab597ee120b05, []int{2} + return fileDescriptor_types_07d64ea985a686e2, []int{2} } func (m *RequestFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -569,7 +569,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_4a7ab597ee120b05, []int{3} + return fileDescriptor_types_07d64ea985a686e2, []int{3} } func (m *RequestInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -618,7 +618,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_4a7ab597ee120b05, []int{4} + return fileDescriptor_types_07d64ea985a686e2, []int{4} } func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -676,7 +676,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_4a7ab597ee120b05, []int{5} + return fileDescriptor_types_07d64ea985a686e2, []int{5} } func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -754,7 +754,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_4a7ab597ee120b05, []int{6} + return fileDescriptor_types_07d64ea985a686e2, []int{6} } func (m *RequestQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -826,7 +826,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_4a7ab597ee120b05, []int{7} + return fileDescriptor_types_07d64ea985a686e2, []int{7} } func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,7 +894,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_4a7ab597ee120b05, []int{8} + return fileDescriptor_types_07d64ea985a686e2, []int{8} } func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -941,7 +941,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_4a7ab597ee120b05, []int{9} + return fileDescriptor_types_07d64ea985a686e2, []int{9} } func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -988,7 +988,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_4a7ab597ee120b05, []int{10} + return fileDescriptor_types_07d64ea985a686e2, []int{10} } func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1034,7 +1034,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_4a7ab597ee120b05, []int{11} + return fileDescriptor_types_07d64ea985a686e2, []int{11} } func (m *RequestCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1087,7 +1087,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_4a7ab597ee120b05, []int{12} + return fileDescriptor_types_07d64ea985a686e2, []int{12} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1540,7 +1540,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_4a7ab597ee120b05, []int{13} + return fileDescriptor_types_07d64ea985a686e2, []int{13} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1587,7 +1587,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_4a7ab597ee120b05, []int{14} + return fileDescriptor_types_07d64ea985a686e2, []int{14} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1633,7 +1633,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_4a7ab597ee120b05, []int{15} + return fileDescriptor_types_07d64ea985a686e2, []int{15} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1676,7 +1676,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_4a7ab597ee120b05, []int{16} + return fileDescriptor_types_07d64ea985a686e2, []int{16} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1748,7 +1748,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_4a7ab597ee120b05, []int{17} + return fileDescriptor_types_07d64ea985a686e2, []int{17} } func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1810,7 +1810,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_4a7ab597ee120b05, []int{18} + return fileDescriptor_types_07d64ea985a686e2, []int{18} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1873,7 +1873,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_4a7ab597ee120b05, []int{19} + return fileDescriptor_types_07d64ea985a686e2, []int{19} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1976,7 +1976,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_4a7ab597ee120b05, []int{20} + return fileDescriptor_types_07d64ea985a686e2, []int{20} } func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2030,7 +2030,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_4a7ab597ee120b05, []int{21} + return fileDescriptor_types_07d64ea985a686e2, []int{21} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2133,7 +2133,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_4a7ab597ee120b05, []int{22} + return fileDescriptor_types_07d64ea985a686e2, []int{22} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2231,7 +2231,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_4a7ab597ee120b05, []int{23} + return fileDescriptor_types_07d64ea985a686e2, []int{23} } func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2293,7 +2293,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_4a7ab597ee120b05, []int{24} + return fileDescriptor_types_07d64ea985a686e2, []int{24} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2343,7 +2343,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_4a7ab597ee120b05, []int{25} + return fileDescriptor_types_07d64ea985a686e2, []int{25} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2401,7 +2401,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_4a7ab597ee120b05, []int{26} + return fileDescriptor_types_07d64ea985a686e2, []int{26} } func (m *BlockSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2457,7 +2457,7 @@ func (m *EvidenceParams) Reset() { *m = EvidenceParams{} } func (m *EvidenceParams) String() string { return proto.CompactTextString(m) } func (*EvidenceParams) ProtoMessage() {} func (*EvidenceParams) Descriptor() ([]byte, []int) { - return fileDescriptor_types_4a7ab597ee120b05, []int{27} + return fileDescriptor_types_07d64ea985a686e2, []int{27} } func (m *EvidenceParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2505,7 +2505,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_4a7ab597ee120b05, []int{28} + return fileDescriptor_types_07d64ea985a686e2, []int{28} } func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2550,25 +2550,26 @@ func (m *LastCommitInfo) GetVotes() []VoteInfo { type Header struct { // 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"` + Version Version `protobuf:"bytes,1,opt,name=version" 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,stdtime" json:"time"` + NumTxs int64 `protobuf:"varint,5,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` + TotalTxs int64 `protobuf:"varint,6,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"` + LastBlockId BlockID `protobuf:"bytes,7,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"` + LastCommitHash []byte `protobuf:"bytes,8,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` + DataHash []byte `protobuf:"bytes,9,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"` - NextValidatorsHash []byte `protobuf:"bytes,10,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` - ConsensusHash []byte `protobuf:"bytes,11,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` - AppHash []byte `protobuf:"bytes,12,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - LastResultsHash []byte `protobuf:"bytes,13,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,10,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + NextValidatorsHash []byte `protobuf:"bytes,11,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + ConsensusHash []byte `protobuf:"bytes,12,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` + AppHash []byte `protobuf:"bytes,13,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + LastResultsHash []byte `protobuf:"bytes,14,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` // consensus info - EvidenceHash []byte `protobuf:"bytes,14,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` - ProposerAddress []byte `protobuf:"bytes,15,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + EvidenceHash []byte `protobuf:"bytes,15,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,16,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2578,7 +2579,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_4a7ab597ee120b05, []int{29} + return fileDescriptor_types_07d64ea985a686e2, []int{29} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2607,6 +2608,13 @@ func (m *Header) XXX_DiscardUnknown() { var xxx_messageInfo_Header proto.InternalMessageInfo +func (m *Header) GetVersion() Version { + if m != nil { + return m.Version + } + return Version{} +} + func (m *Header) GetChainID() string { if m != nil { return m.ChainID @@ -2712,6 +2720,61 @@ func (m *Header) GetProposerAddress() []byte { 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_types_07d64ea985a686e2, []int{30} +} +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.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(dst, 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 { + if m != nil { + return m.App + } + return 0 +} + 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"` @@ -2724,7 +2787,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_types_4a7ab597ee120b05, []int{30} + return fileDescriptor_types_07d64ea985a686e2, []int{31} } func (m *BlockID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2779,7 +2842,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_types_4a7ab597ee120b05, []int{31} + return fileDescriptor_types_07d64ea985a686e2, []int{32} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2836,7 +2899,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_4a7ab597ee120b05, []int{32} + return fileDescriptor_types_07d64ea985a686e2, []int{33} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2892,7 +2955,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_types_4a7ab597ee120b05, []int{33} + return fileDescriptor_types_07d64ea985a686e2, []int{34} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2948,7 +3011,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_types_4a7ab597ee120b05, []int{34} + return fileDescriptor_types_07d64ea985a686e2, []int{35} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3003,7 +3066,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_4a7ab597ee120b05, []int{35} + return fileDescriptor_types_07d64ea985a686e2, []int{36} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3061,7 +3124,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_4a7ab597ee120b05, []int{36} + return fileDescriptor_types_07d64ea985a686e2, []int{37} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3186,6 +3249,8 @@ func init() { golang_proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") proto.RegisterType((*Header)(nil), "types.Header") golang_proto.RegisterType((*Header)(nil), "types.Header") + proto.RegisterType((*Version)(nil), "types.Version") + golang_proto.RegisterType((*Version)(nil), "types.Version") proto.RegisterType((*BlockID)(nil), "types.BlockID") golang_proto.RegisterType((*BlockID)(nil), "types.BlockID") proto.RegisterType((*PartSetHeader)(nil), "types.PartSetHeader") @@ -4735,6 +4800,9 @@ func (this *Header) Equal(that interface{}) bool { } else if this == nil { return false } + if !this.Version.Equal(&that1.Version) { + return false + } if this.ChainID != that1.ChainID { return false } @@ -4785,6 +4853,36 @@ func (this *Header) Equal(that interface{}) bool { } return true } +func (this *Version) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Version) + if !ok { + that2, ok := that.(Version) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Block != that1.Block { + return false + } + if this.App != that1.App { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *BlockID) Equal(that interface{}) bool { if that == nil { return this == nil @@ -6848,93 +6946,103 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Version.Size())) + n35, err := m.Version.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n35 if len(m.ChainID) > 0 { - dAtA[i] = 0xa + dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) i += copy(dAtA[i:], m.ChainID) } if m.Height != 0 { - dAtA[i] = 0x10 + dAtA[i] = 0x18 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Height)) } - dAtA[i] = 0x1a + dAtA[i] = 0x22 i++ i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n35, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) - if err != nil { - return 0, err - } - i += n35 - if m.NumTxs != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) - } - if m.TotalTxs != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.TotalTxs)) - } - dAtA[i] = 0x32 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockId.Size())) - n36, err := m.LastBlockId.MarshalTo(dAtA[i:]) + n36, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } i += n36 + if m.NumTxs != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) + } + if m.TotalTxs != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.TotalTxs)) + } + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockId.Size())) + n37, err := m.LastBlockId.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 if len(m.LastCommitHash) > 0 { - dAtA[i] = 0x3a + dAtA[i] = 0x42 i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) i += copy(dAtA[i:], m.LastCommitHash) } if len(m.DataHash) > 0 { - dAtA[i] = 0x42 + dAtA[i] = 0x4a i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) i += copy(dAtA[i:], m.DataHash) } if len(m.ValidatorsHash) > 0 { - dAtA[i] = 0x4a + dAtA[i] = 0x52 i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) i += copy(dAtA[i:], m.ValidatorsHash) } if len(m.NextValidatorsHash) > 0 { - dAtA[i] = 0x52 + dAtA[i] = 0x5a i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) i += copy(dAtA[i:], m.NextValidatorsHash) } if len(m.ConsensusHash) > 0 { - dAtA[i] = 0x5a + dAtA[i] = 0x62 i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) i += copy(dAtA[i:], m.ConsensusHash) } if len(m.AppHash) > 0 { - dAtA[i] = 0x62 + dAtA[i] = 0x6a i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) i += copy(dAtA[i:], m.AppHash) } if len(m.LastResultsHash) > 0 { - dAtA[i] = 0x6a + dAtA[i] = 0x72 i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) i += copy(dAtA[i:], m.LastResultsHash) } if len(m.EvidenceHash) > 0 { - dAtA[i] = 0x72 + dAtA[i] = 0x7a i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) i += copy(dAtA[i:], m.EvidenceHash) } if len(m.ProposerAddress) > 0 { - dAtA[i] = 0x7a + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) i += copy(dAtA[i:], m.ProposerAddress) @@ -6945,6 +7053,37 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *Version) 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 *Version) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Block != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Block)) + } + if m.App != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.App)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + func (m *BlockID) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6969,11 +7108,11 @@ func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.PartsHeader.Size())) - n37, err := m.PartsHeader.MarshalTo(dAtA[i:]) + n38, err := m.PartsHeader.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n38 if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -7062,11 +7201,11 @@ func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.PubKey.Size())) - n38, err := m.PubKey.MarshalTo(dAtA[i:]) + n39, err := m.PubKey.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n39 if m.Power != 0 { dAtA[i] = 0x10 i++ @@ -7096,11 +7235,11 @@ func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n39, err := m.Validator.MarshalTo(dAtA[i:]) + n40, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n40 if m.SignedLastBlock { dAtA[i] = 0x10 i++ @@ -7174,11 +7313,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n40, err := m.Validator.MarshalTo(dAtA[i:]) + n41, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n40 + i += n41 if m.Height != 0 { dAtA[i] = 0x18 i++ @@ -7187,11 +7326,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))) - n41, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + n42, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } - i += n41 + i += n42 if m.TotalVotingPower != 0 { dAtA[i] = 0x28 i++ @@ -7842,13 +7981,15 @@ func NewPopulatedLastCommitInfo(r randyTypes, easy bool) *LastCommitInfo { func NewPopulatedHeader(r randyTypes, easy bool) *Header { this := &Header{} + v33 := NewPopulatedVersion(r, easy) + this.Version = *v33 this.ChainID = string(randStringTypes(r)) this.Height = int64(r.Int63()) if r.Intn(2) == 0 { this.Height *= -1 } - v33 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) - this.Time = *v33 + v34 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v34 this.NumTxs = int64(r.Int63()) if r.Intn(2) == 0 { this.NumTxs *= -1 @@ -7857,68 +7998,78 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { if r.Intn(2) == 0 { this.TotalTxs *= -1 } - v34 := NewPopulatedBlockID(r, easy) - this.LastBlockId = *v34 - v35 := r.Intn(100) - this.LastCommitHash = make([]byte, v35) - for i := 0; i < v35; i++ { + v35 := NewPopulatedBlockID(r, easy) + this.LastBlockId = *v35 + v36 := r.Intn(100) + this.LastCommitHash = make([]byte, v36) + for i := 0; i < v36; i++ { this.LastCommitHash[i] = byte(r.Intn(256)) } - v36 := r.Intn(100) - this.DataHash = make([]byte, v36) - for i := 0; i < v36; i++ { + v37 := r.Intn(100) + this.DataHash = make([]byte, v37) + for i := 0; i < v37; i++ { this.DataHash[i] = byte(r.Intn(256)) } - v37 := r.Intn(100) - this.ValidatorsHash = make([]byte, v37) - for i := 0; i < v37; i++ { + v38 := r.Intn(100) + this.ValidatorsHash = make([]byte, v38) + for i := 0; i < v38; i++ { this.ValidatorsHash[i] = byte(r.Intn(256)) } - v38 := r.Intn(100) - this.NextValidatorsHash = make([]byte, v38) - for i := 0; i < v38; i++ { + v39 := r.Intn(100) + this.NextValidatorsHash = make([]byte, v39) + for i := 0; i < v39; i++ { this.NextValidatorsHash[i] = byte(r.Intn(256)) } - v39 := r.Intn(100) - this.ConsensusHash = make([]byte, v39) - for i := 0; i < v39; i++ { + v40 := r.Intn(100) + this.ConsensusHash = make([]byte, v40) + for i := 0; i < v40; i++ { this.ConsensusHash[i] = byte(r.Intn(256)) } - v40 := r.Intn(100) - this.AppHash = make([]byte, v40) - for i := 0; i < v40; i++ { + v41 := r.Intn(100) + this.AppHash = make([]byte, v41) + for i := 0; i < v41; i++ { this.AppHash[i] = byte(r.Intn(256)) } - v41 := r.Intn(100) - this.LastResultsHash = make([]byte, v41) - for i := 0; i < v41; i++ { + v42 := r.Intn(100) + this.LastResultsHash = make([]byte, v42) + for i := 0; i < v42; i++ { this.LastResultsHash[i] = byte(r.Intn(256)) } - v42 := r.Intn(100) - this.EvidenceHash = make([]byte, v42) - for i := 0; i < v42; i++ { + v43 := r.Intn(100) + this.EvidenceHash = make([]byte, v43) + for i := 0; i < v43; i++ { this.EvidenceHash[i] = byte(r.Intn(256)) } - v43 := r.Intn(100) - this.ProposerAddress = make([]byte, v43) - for i := 0; i < v43; i++ { + v44 := r.Intn(100) + this.ProposerAddress = make([]byte, v44) + for i := 0; i < v44; i++ { this.ProposerAddress[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 16) + this.XXX_unrecognized = randUnrecognizedTypes(r, 17) + } + return this +} + +func NewPopulatedVersion(r randyTypes, easy bool) *Version { + this := &Version{} + this.Block = uint64(uint64(r.Uint32())) + this.App = uint64(uint64(r.Uint32())) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } func NewPopulatedBlockID(r randyTypes, easy bool) *BlockID { this := &BlockID{} - v44 := r.Intn(100) - this.Hash = make([]byte, v44) - for i := 0; i < v44; i++ { + v45 := r.Intn(100) + this.Hash = make([]byte, v45) + for i := 0; i < v45; i++ { this.Hash[i] = byte(r.Intn(256)) } - v45 := NewPopulatedPartSetHeader(r, easy) - this.PartsHeader = *v45 + v46 := NewPopulatedPartSetHeader(r, easy) + this.PartsHeader = *v46 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } @@ -7931,9 +8082,9 @@ func NewPopulatedPartSetHeader(r randyTypes, easy bool) *PartSetHeader { if r.Intn(2) == 0 { this.Total *= -1 } - v46 := r.Intn(100) - this.Hash = make([]byte, v46) - for i := 0; i < v46; i++ { + v47 := r.Intn(100) + this.Hash = make([]byte, v47) + for i := 0; i < v47; i++ { this.Hash[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -7944,9 +8095,9 @@ func NewPopulatedPartSetHeader(r randyTypes, easy bool) *PartSetHeader { func NewPopulatedValidator(r randyTypes, easy bool) *Validator { this := &Validator{} - v47 := r.Intn(100) - this.Address = make([]byte, v47) - for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Address = make([]byte, v48) + for i := 0; i < v48; i++ { this.Address[i] = byte(r.Intn(256)) } this.Power = int64(r.Int63()) @@ -7961,8 +8112,8 @@ func NewPopulatedValidator(r randyTypes, easy bool) *Validator { func NewPopulatedValidatorUpdate(r randyTypes, easy bool) *ValidatorUpdate { this := &ValidatorUpdate{} - v48 := NewPopulatedPubKey(r, easy) - this.PubKey = *v48 + v49 := NewPopulatedPubKey(r, easy) + this.PubKey = *v49 this.Power = int64(r.Int63()) if r.Intn(2) == 0 { this.Power *= -1 @@ -7975,8 +8126,8 @@ func NewPopulatedValidatorUpdate(r randyTypes, easy bool) *ValidatorUpdate { func NewPopulatedVoteInfo(r randyTypes, easy bool) *VoteInfo { this := &VoteInfo{} - v49 := NewPopulatedValidator(r, easy) - this.Validator = *v49 + v50 := NewPopulatedValidator(r, easy) + this.Validator = *v50 this.SignedLastBlock = bool(bool(r.Intn(2) == 0)) if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedTypes(r, 3) @@ -7987,9 +8138,9 @@ func NewPopulatedVoteInfo(r randyTypes, easy bool) *VoteInfo { func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { this := &PubKey{} this.Type = string(randStringTypes(r)) - v50 := r.Intn(100) - this.Data = make([]byte, v50) - for i := 0; i < v50; i++ { + v51 := r.Intn(100) + this.Data = make([]byte, v51) + for i := 0; i < v51; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -8001,14 +8152,14 @@ func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { func NewPopulatedEvidence(r randyTypes, easy bool) *Evidence { this := &Evidence{} this.Type = string(randStringTypes(r)) - v51 := NewPopulatedValidator(r, easy) - this.Validator = *v51 + v52 := NewPopulatedValidator(r, easy) + this.Validator = *v52 this.Height = int64(r.Int63()) if r.Intn(2) == 0 { this.Height *= -1 } - v52 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) - this.Time = *v52 + v53 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v53 this.TotalVotingPower = int64(r.Int63()) if r.Intn(2) == 0 { this.TotalVotingPower *= -1 @@ -8038,9 +8189,9 @@ func randUTF8RuneTypes(r randyTypes) rune { return rune(ru + 61) } func randStringTypes(r randyTypes) string { - v53 := r.Intn(100) - tmps := make([]rune, v53) - for i := 0; i < v53; i++ { + v54 := r.Intn(100) + tmps := make([]rune, v54) + for i := 0; i < v54; i++ { tmps[i] = randUTF8RuneTypes(r) } return string(tmps) @@ -8062,11 +8213,11 @@ func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte switch wire { case 0: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v54 := r.Int63() + v55 := r.Int63() if r.Intn(2) == 0 { - v54 *= -1 + v55 *= -1 } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v54)) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v55)) 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))) @@ -8834,6 +8985,8 @@ func (m *LastCommitInfo) Size() (n int) { func (m *Header) Size() (n int) { 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)) @@ -8885,7 +9038,22 @@ func (m *Header) Size() (n int) { } l = len(m.ProposerAddress) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 2 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Version) Size() (n int) { + var l int + _ = l + if m.Block != 0 { + n += 1 + sovTypes(uint64(m.Block)) + } + if m.App != 0 { + n += 1 + sovTypes(uint64(m.App)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -13126,6 +13294,36 @@ func (m *Header) Unmarshal(dAtA []byte) error { } 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 > 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) } @@ -13154,7 +13352,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { } m.ChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } @@ -13173,7 +13371,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { break } } - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } @@ -13203,7 +13401,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) } @@ -13222,7 +13420,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { break } } - case 5: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TotalTxs", wireType) } @@ -13241,7 +13439,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { break } } - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) } @@ -13271,7 +13469,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) } @@ -13302,7 +13500,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.LastCommitHash = []byte{} } iNdEx = postIndex - case 8: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) } @@ -13333,7 +13531,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.DataHash = []byte{} } iNdEx = postIndex - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) } @@ -13364,7 +13562,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.ValidatorsHash = []byte{} } iNdEx = postIndex - case 10: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) } @@ -13395,7 +13593,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.NextValidatorsHash = []byte{} } iNdEx = postIndex - case 11: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) } @@ -13426,7 +13624,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.ConsensusHash = []byte{} } iNdEx = postIndex - case 12: + case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) } @@ -13457,7 +13655,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.AppHash = []byte{} } iNdEx = postIndex - case 13: + case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) } @@ -13488,7 +13686,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.LastResultsHash = []byte{} } iNdEx = postIndex - case 14: + case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) } @@ -13519,7 +13717,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.EvidenceHash = []byte{} } iNdEx = postIndex - case 15: + case 16: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } @@ -13572,6 +13770,95 @@ func (m *Header) Unmarshal(dAtA []byte) error { } 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:]) + 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 *BlockID) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -14481,143 +14768,145 @@ var ( ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_4a7ab597ee120b05) } +func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_07d64ea985a686e2) } func init() { - golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_4a7ab597ee120b05) + golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_07d64ea985a686e2) } -var fileDescriptor_types_4a7ab597ee120b05 = []byte{ - // 2107 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x73, 0x23, 0x47, - 0x15, 0xf7, 0x48, 0xb2, 0xa4, 0x79, 0xb6, 0x25, 0xa7, 0xd7, 0x6b, 0x6b, 0x45, 0xb0, 0xb7, 0x26, - 0x90, 0xd8, 0xc4, 0x91, 0x53, 0x0e, 0xa1, 0xbc, 0xd9, 0x90, 0x2a, 0x6b, 0x77, 0xc1, 0xae, 0x04, - 0x30, 0xb3, 0xbb, 0xe6, 0x42, 0xd5, 0x54, 0x4b, 0xd3, 0x96, 0xa6, 0x56, 0x9a, 0x99, 0xcc, 0xb4, - 0x1c, 0x79, 0x8f, 0x9c, 0x73, 0xc8, 0x81, 0x2a, 0xfe, 0x05, 0xfe, 0x04, 0x8e, 0x9c, 0xa8, 0x1c, - 0x29, 0x8a, 0xf3, 0x02, 0xa6, 0x38, 0xc0, 0x95, 0xa2, 0x8a, 0x23, 0xd5, 0xaf, 0xbb, 0xe7, 0xcb, - 0xa3, 0x25, 0x1b, 0x6e, 0x5c, 0xa4, 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x0f, 0x4c, 0x42, - 0xe9, 0x86, 0xcc, 0x1e, 0xb4, 0x0b, 0x61, 0x9d, 0x31, 0xb7, 0x91, 0x35, 0xb7, 0xd5, 0x86, 0xb5, - 0x5c, 0x34, 0x5b, 0x9f, 0x2f, 0x43, 0xd3, 0x66, 0x71, 0x28, 0x9c, 0x89, 0x1c, 0x81, 0xc9, 0xe6, - 0x43, 0x26, 0x13, 0xa9, 0x51, 0x48, 0x53, 0x52, 0xe6, 0x91, 0xe6, 0x8b, 0x80, 0x4e, 0x84, 0xc9, - 0x5e, 0x0e, 0x04, 0x6e, 0x15, 0x95, 0xb2, 0x28, 0xb0, 0x9f, 0x47, 0x81, 0x8d, 0x82, 0x6c, 0x01, - 0x06, 0xf6, 0x72, 0x30, 0x50, 0x5c, 0x38, 0x87, 0x03, 0xf7, 0x4a, 0x70, 0xa0, 0x78, 0xfc, 0x05, - 0x40, 0x70, 0xaf, 0x04, 0x08, 0x3a, 0x37, 0xf6, 0x2a, 0x45, 0x82, 0xfd, 0x3c, 0x12, 0x14, 0xaf, - 0x53, 0x80, 0x82, 0x0f, 0xcb, 0xa0, 0xe0, 0x4e, 0x41, 0x67, 0x21, 0x16, 0xbc, 0x77, 0x03, 0x0b, - 0x36, 0x0b, 0xaa, 0x25, 0x60, 0x70, 0x2f, 0x97, 0xa5, 0xa1, 0xf4, 0x6e, 0xe5, 0x69, 0x9a, 0x7c, - 0xef, 0x26, 0x8e, 0x6c, 0x15, 0x3f, 0x6d, 0x19, 0x90, 0x1c, 0x14, 0x80, 0xe4, 0x76, 0xf1, 0x94, - 0x05, 0x24, 0x49, 0xf1, 0x60, 0x4f, 0xc4, 0x7d, 0xc1, 0xd3, 0x44, 0x8e, 0x60, 0x51, 0x14, 0x44, - 0x2a, 0x61, 0xcb, 0x89, 0xb5, 0x2b, 0x32, 0x51, 0xea, 0x5f, 0x2f, 0xc1, 0x0e, 0x74, 0xfa, 0x8c, - 0x77, 0x59, 0xbf, 0x32, 0x52, 0x5d, 0x8c, 0xe8, 0x6c, 0x16, 0x33, 0x55, 0x16, 0xcb, 0x40, 0x4a, - 0x25, 0x07, 0x29, 0xe4, 0x3b, 0xf0, 0x1a, 0xa6, 0x11, 0xb4, 0x8b, 0x93, 0x4b, 0x6b, 0x6d, 0xc1, - 0x90, 0x06, 0x91, 0xf9, 0xed, 0x1d, 0xb8, 0x95, 0x91, 0x15, 0x29, 0x16, 0x53, 0x58, 0x0d, 0x83, - 0x77, 0x3d, 0x91, 0x3e, 0x0e, 0xc3, 0x13, 0x1a, 0x8f, 0xad, 0x1f, 0xa5, 0xf7, 0x4f, 0xe1, 0x8a, - 0x40, 0x6d, 0x18, 0xb8, 0xf2, 0x5a, 0x6b, 0x36, 0x8e, 0x05, 0x84, 0x4d, 0x82, 0x11, 0xee, 0x6a, - 0xda, 0x62, 0x28, 0xa4, 0x92, 0x48, 0x31, 0x65, 0x48, 0x58, 0xbf, 0x34, 0xd2, 0xf5, 0x52, 0x04, - 0x2b, 0x03, 0x1b, 0xe3, 0x7f, 0x01, 0x9b, 0xca, 0xab, 0x81, 0x8d, 0x75, 0x6d, 0xa4, 0x5f, 0x24, - 0x81, 0x91, 0xaf, 0x77, 0x45, 0xe1, 0x1c, 0x9e, 0xef, 0xb2, 0x39, 0x06, 0x7c, 0xd5, 0x96, 0x13, - 0x8d, 0xf0, 0x75, 0x34, 0x73, 0x1e, 0xe1, 0x1b, 0x48, 0x93, 0x13, 0xf2, 0x06, 0xc2, 0x4f, 0x70, - 0xa1, 0x22, 0x71, 0xad, 0xa7, 0xca, 0xdc, 0x33, 0x41, 0xb4, 0x25, 0x2f, 0x93, 0x4c, 0xcd, 0x1c, - 0x76, 0xbd, 0x0e, 0xa6, 0x38, 0x68, 0x1c, 0xd2, 0x21, 0xc3, 0xc0, 0x32, 0xed, 0x94, 0x60, 0x9d, - 0x01, 0xb9, 0x19, 0xd0, 0xe4, 0x03, 0xa8, 0x71, 0x3a, 0x12, 0xf6, 0x16, 0x26, 0x6b,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 0x64, 0x8f, 0xbd, 0xe7, 0xcc, 0x36, 0x07, 0x7a, 0x48, 0x3e, 0x82, 0x36, 0x53, - 0x95, 0x99, 0xce, 0x7d, 0x95, 0x1c, 0x48, 0xe9, 0xba, 0x4d, 0xdd, 0xb6, 0xc5, 0x72, 0x73, 0xeb, - 0x18, 0xcc, 0x64, 0x5d, 0xf2, 0x0d, 0x30, 0xa7, 0x74, 0xae, 0xea, 0x65, 0x59, 0x69, 0x35, 0xa7, - 0x74, 0x8e, 0xa5, 0x32, 0xd9, 0x82, 0x86, 0x60, 0x8e, 0xa8, 0xdc, 0xa1, 0x6a, 0xd7, 0xa7, 0x74, - 0xfe, 0x43, 0x1a, 0x5b, 0x7b, 0xd0, 0xca, 0x6f, 0xa2, 0x45, 0x35, 0x76, 0x49, 0xd1, 0xe3, 0x11, - 0xb3, 0x1e, 0x43, 0x2b, 0x5f, 0x92, 0x8a, 0x3c, 0x16, 0x05, 0x33, 0xdf, 0x45, 0xc1, 0x65, 0x5b, - 0x4e, 0x44, 0x3f, 0x7a, 0x19, 0xc8, 0x4f, 0x97, 0xad, 0x41, 0xcf, 0x03, 0xce, 0x32, 0x85, 0xac, - 0x94, 0xb1, 0xfe, 0x50, 0x83, 0xba, 0xac, 0x8f, 0xc9, 0x9b, 0x99, 0x96, 0x04, 0xc1, 0xaf, 0xbf, - 0x72, 0xfd, 0x62, 0xa7, 0x81, 0x38, 0x71, 0xfa, 0x30, 0xed, 0x4f, 0xd2, 0x14, 0x58, 0xc9, 0xa5, - 0x40, 0xdd, 0x0c, 0x55, 0x5f, 0xb9, 0x19, 0xda, 0x82, 0x86, 0x3f, 0x9b, 0x3a, 0x7c, 0x1e, 0x63, - 0x24, 0x56, 0xed, 0xba, 0x3f, 0x9b, 0x3e, 0x99, 0xc7, 0xc2, 0xa6, 0x3c, 0xe0, 0x74, 0x82, 0x2c, - 0x19, 0x8a, 0x4d, 0x24, 0x08, 0xe6, 0x11, 0xac, 0x65, 0xe0, 0xd4, 0x73, 0x55, 0xad, 0xd6, 0xca, - 0x7e, 0xf1, 0xd3, 0x87, 0xea, 0xba, 0x2b, 0x09, 0xbc, 0x9e, 0xba, 0x64, 0x37, 0x5f, 0xfb, 0x23, - 0x0a, 0x4b, 0x28, 0xc8, 0x94, 0xf7, 0x02, 0x83, 0xc5, 0x01, 0x84, 0xbb, 0x49, 0x91, 0x26, 0x8a, - 0x34, 0x05, 0x01, 0x99, 0x6f, 0x41, 0x3b, 0x05, 0x32, 0x29, 0x62, 0xca, 0x55, 0x52, 0x32, 0x0a, - 0xbe, 0x0b, 0x1b, 0x3e, 0x9b, 0x73, 0xa7, 0x28, 0x0d, 0x28, 0x4d, 0x04, 0xef, 0x3c, 0xaf, 0xf1, - 0x6d, 0x68, 0xa5, 0x01, 0x89, 0xb2, 0x2b, 0xb2, 0x03, 0x4b, 0xa8, 0x28, 0x76, 0x07, 0x9a, 0x49, - 0x19, 0xb1, 0x8a, 0x02, 0x0d, 0x2a, 0xab, 0x87, 0xa4, 0x30, 0x89, 0x58, 0x3c, 0x9b, 0x70, 0xb5, - 0xc8, 0x1a, 0xca, 0x60, 0x61, 0x62, 0x4b, 0x3a, 0xca, 0xbe, 0x01, 0x6b, 0x49, 0x1c, 0xa0, 0x5c, - 0x0b, 0xe5, 0x56, 0x35, 0x11, 0x85, 0xf6, 0x60, 0x3d, 0x8c, 0x82, 0x30, 0x88, 0x59, 0xe4, 0x50, - 0xd7, 0x8d, 0x58, 0x1c, 0x77, 0xda, 0x72, 0x3d, 0x4d, 0x3f, 0x96, 0x64, 0xeb, 0xe7, 0xd0, 0x50, - 0xd6, 0x2f, 0xed, 0xd3, 0xbe, 0x0f, 0xab, 0x21, 0x8d, 0xc4, 0x99, 0xb2, 0xdd, 0x9a, 0xae, 0x96, - 0xcf, 0x68, 0x24, 0xda, 0xf3, 0x5c, 0xd3, 0xb6, 0x82, 0xf2, 0x92, 0x64, 0xdd, 0x83, 0xb5, 0x9c, - 0x8c, 0x08, 0x03, 0x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0xd8, 0x3e, 0x94, 0x3c, 0x5c, 0x76, 0xcb, - 0xfa, 0x58, 0x72, 0x08, 0xcb, 0xd8, 0x45, 0x90, 0xb2, 0xf7, 0xcb, 0x6e, 0x69, 0x3b, 0x2b, 0x36, - 0x91, 0x7d, 0xc6, 0xcd, 0x67, 0xcc, 0x6e, 0x59, 0x4f, 0x4b, 0x3e, 0x02, 0x33, 0xad, 0xff, 0x17, - 0x3d, 0x66, 0x76, 0x17, 0x76, 0xb7, 0x42, 0x3f, 0xad, 0x95, 0x16, 0xbd, 0xc9, 0x75, 0x17, 0xb6, - 0x81, 0xe4, 0x08, 0x1a, 0xba, 0xc2, 0x2c, 0x7f, 0x6e, 0xec, 0x2e, 0xe8, 0x3c, 0x85, 0x79, 0x64, - 0x49, 0x5f, 0xf6, 0x26, 0xda, 0x2d, 0x6d, 0x8f, 0xc9, 0xfb, 0x50, 0x57, 0xb0, 0x5f, 0xfa, 0xe4, - 0xd8, 0x2d, 0xef, 0x1f, 0xc5, 0x25, 0xd3, 0xa6, 0x66, 0xd1, 0xbb, 0x6d, 0x77, 0x61, 0x1f, 0x4f, - 0x8e, 0x01, 0x32, 0x95, 0xf9, 0xc2, 0x07, 0xd9, 0xee, 0xe2, 0xfe, 0x9c, 0xdc, 0x87, 0x66, 0xfa, - 0xe6, 0x52, 0xfe, 0xc4, 0xda, 0x5d, 0xd4, 0x32, 0xf7, 0x5f, 0xff, 0xf7, 0x5f, 0xb6, 0x8d, 0x5f, - 0x5f, 0x6f, 0x1b, 0xbf, 0xb9, 0xde, 0x36, 0xbe, 0xbc, 0xde, 0x36, 0x7e, 0x7f, 0xbd, 0x6d, 0xfc, - 0xf9, 0x7a, 0xdb, 0xf8, 0xed, 0x5f, 0xb7, 0x8d, 0x41, 0x1d, 0xdd, 0xff, 0xbd, 0xff, 0x04, 0x00, - 0x00, 0xff, 0xff, 0x2c, 0x0a, 0x65, 0x88, 0x52, 0x18, 0x00, 0x00, +var fileDescriptor_types_07d64ea985a686e2 = []byte{ + // 2133 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x93, 0x1b, 0x47, + 0x15, 0xdf, 0xd1, 0x6a, 0x25, 0xcd, 0xdb, 0x5d, 0x49, 0x6e, 0x7f, 0xc9, 0x22, 0xac, 0x5d, 0x13, + 0x48, 0xbc, 0xc4, 0xd1, 0x06, 0x87, 0x50, 0xeb, 0x38, 0xa4, 0x6a, 0x65, 0x1b, 0x76, 0x2b, 0x01, + 0x96, 0xf1, 0x07, 0x17, 0xaa, 0xa6, 0x5a, 0x9a, 0xb6, 0x34, 0x65, 0x69, 0x66, 0x32, 0xd3, 0xda, + 0x68, 0x7d, 0xcc, 0x39, 0x87, 0x1c, 0xa8, 0xe2, 0x5f, 0xe0, 0x4f, 0xe0, 0xc8, 0x89, 0xca, 0x91, + 0x03, 0x67, 0x03, 0x4b, 0x71, 0x80, 0x2b, 0x45, 0x15, 0x47, 0xea, 0xbd, 0xee, 0xf9, 0xdc, 0x91, + 0x89, 0x03, 0x27, 0x2e, 0xd2, 0xf4, 0xfb, 0xe8, 0x8f, 0xd7, 0xef, 0xbd, 0xdf, 0x7b, 0x0d, 0x57, + 0xf8, 0x68, 0xec, 0xed, 0xc9, 0xd3, 0x50, 0xc4, 0xea, 0x77, 0x10, 0x46, 0x81, 0x0c, 0xd8, 0x06, + 0x0d, 0xfa, 0x6f, 0x4f, 0x3c, 0x39, 0x5d, 0x8c, 0x06, 0xe3, 0x60, 0xbe, 0x37, 0x09, 0x26, 0xc1, + 0x1e, 0x71, 0x47, 0x8b, 0xa7, 0x34, 0xa2, 0x01, 0x7d, 0x29, 0xad, 0xfe, 0xf5, 0x49, 0x10, 0x4c, + 0x66, 0x22, 0x93, 0x92, 0xde, 0x5c, 0xc4, 0x92, 0xcf, 0x43, 0x2d, 0xb0, 0x9f, 0x9b, 0x4f, 0x0a, + 0xdf, 0x15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, 0x1b, 0x68, + 0xd4, 0xcf, 0xca, 0xb1, 0x55, 0xcf, 0x7e, 0xfd, 0x95, 0x9d, 0x26, 0xdb, 0x87, 0x66, 0x52, 0xc4, + 0x56, 0xbf, 0x68, 0xf6, 0x57, 0x34, 0xb7, 0x68, 0x1e, 0xd5, 0x35, 0x54, 0x3d, 0xbb, 0xf6, 0x2b, + 0x3b, 0x70, 0xf6, 0x1e, 0x34, 0x74, 0x65, 0x51, 0xf9, 0xaa, 0xd9, 0xaf, 0x6e, 0x51, 0xf1, 0x90, + 0x59, 0xdf, 0xb4, 0xea, 0x69, 0xb8, 0xbf, 0xf2, 0xa9, 0x80, 0x1d, 0x00, 0xe4, 0x8a, 0xff, 0x95, + 0x6f, 0xbe, 0xfd, 0xd5, 0x4f, 0x00, 0xec, 0x2e, 0xb4, 0xb2, 0x67, 0x9d, 0xea, 0x57, 0xdc, 0xfe, + 0xaa, 0xae, 0x7c, 0xf8, 0xda, 0xbf, 0xfe, 0xbc, 0x63, 0xfc, 0xfa, 0x6c, 0xc7, 0xf8, 0xcd, 0xd9, + 0x8e, 0xf1, 0xe5, 0xd9, 0x8e, 0xf1, 0xfb, 0xb3, 0x1d, 0xe3, 0x4f, 0x67, 0x3b, 0xc6, 0x6f, 0xff, + 0xb2, 0x63, 0x8c, 0x1a, 0xe4, 0xfe, 0xef, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x43, 0x2c, + 0xa9, 0xb5, 0x18, 0x00, 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index 39c96e0e..517369b1 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -231,31 +231,38 @@ message LastCommitInfo { message Header { // basic block info - string chain_id = 1 [(gogoproto.customname)="ChainID"]; - int64 height = 2; - google.protobuf.Timestamp time = 3 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; - int64 num_txs = 4; - int64 total_txs = 5; + 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]; + int64 num_txs = 5; + int64 total_txs = 6; // prev block info - BlockID last_block_id = 6 [(gogoproto.nullable)=false]; + BlockID last_block_id = 7 [(gogoproto.nullable)=false]; // hashes of block data - bytes last_commit_hash = 7; // commit from validators from the last block - bytes data_hash = 8; // transactions + bytes last_commit_hash = 8; // commit from validators from the last block + bytes data_hash = 9; // transactions // hashes from the app output from the prev block - bytes validators_hash = 9; // validators for the current block - bytes next_validators_hash = 10; // validators for the next block - bytes consensus_hash = 11; // consensus params for current block - bytes app_hash = 12; // state after txs from the previous block - bytes last_results_hash = 13;// root hash of all results from the txs from the previous block + bytes validators_hash = 10; // validators for the current block + bytes next_validators_hash = 11; // validators for the next block + bytes consensus_hash = 12; // consensus params for current block + bytes app_hash = 13; // state after txs from the previous block + bytes last_results_hash = 14;// root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 14; // evidence included in the block - bytes proposer_address = 15; // original proposer of the block + bytes evidence_hash = 15; // evidence included in the block + bytes proposer_address = 16; // original proposer of the block } +message Version { + uint64 Block = 1; + uint64 App = 2; +} + + message BlockID { bytes hash = 1; PartSetHeader parts_header = 2 [(gogoproto.nullable)=false]; diff --git a/abci/types/typespb_test.go b/abci/types/typespb_test.go index 0ae0fea0..53c5cd94 100644 --- a/abci/types/typespb_test.go +++ b/abci/types/typespb_test.go @@ -1703,6 +1703,62 @@ func TestHeaderMarshalTo(t *testing.T) { } } +func TestVersionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVersion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Version{} + 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 TestVersionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVersion(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 := &Version{} + 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 TestBlockIDProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -2635,6 +2691,24 @@ func TestHeaderJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestVersionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVersion(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 := &Version{} + 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 TestBlockIDJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -3601,6 +3675,34 @@ func TestHeaderProtoCompactText(t *testing.T) { } } +func TestVersionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVersion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Version{} + 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 TestVersionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVersion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Version{} + 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 TestBlockIDProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -4457,6 +4559,28 @@ func TestHeaderSize(t *testing.T) { } } +func TestVersionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVersion(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 TestBlockIDSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) diff --git a/docs/spec/abci/abci.md b/docs/spec/abci/abci.md index 15e24624..54b7c899 100644 --- a/docs/spec/abci/abci.md +++ b/docs/spec/abci/abci.md @@ -338,6 +338,7 @@ Commit are included in the header of the next block. ### Header - **Fields**: + - `Version (Version)`: Version of the blockchain and the application - `ChainID (string)`: ID of the blockchain - `Height (int64)`: Height of the block in the chain - `Time (google.protobuf.Timestamp)`: Time of the block. It is the proposer's @@ -363,6 +364,15 @@ Commit are included in the header of the next block. - Provides the proposer of the current block, for use in proposer-based reward mechanisms. +### Version + +- **Fields**: + - `Block (uint64)`: Protocol version of the blockchain data structures. + - `App (uint64)`: Protocol version of the application. +- **Usage**: + - Block version should be static in the life of a blockchain. + - App version may be updated over time by the application. + ### Validator - **Fields**: diff --git a/docs/spec/blockchain/blockchain.md b/docs/spec/blockchain/blockchain.md index 029b64fa..c5291ed4 100644 --- a/docs/spec/blockchain/blockchain.md +++ b/docs/spec/blockchain/blockchain.md @@ -8,6 +8,7 @@ The Tendermint blockchains consists of a short list of basic data types: - `Block` - `Header` +- `Version` - `BlockID` - `Time` - `Data` (for transactions) @@ -38,6 +39,7 @@ the data in the current block, the previous block, and the results returned by t ```go type Header struct { // basic block info + Version Version ChainID string Height int64 Time Time @@ -65,6 +67,19 @@ type Header struct { Further details on each of these fields is described below. +## Version + +The `Version` contains the protocol version for the blockchain and the +application as two `uint64` values: + +```go +type Version struct { + Block uint64 + App uint64 +} +``` + + ## BlockID The `BlockID` contains two distinct Merkle roots of the block. @@ -200,6 +215,15 @@ See [here](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockc A Header is valid if its corresponding fields are valid. +### Version + +``` +block.Version.Block == state.Version.Block +block.Version.App == state.Version.App +``` + +The block version must match the state version. + ### ChainID ``` diff --git a/docs/spec/blockchain/state.md b/docs/spec/blockchain/state.md index e904bb33..a0badd71 100644 --- a/docs/spec/blockchain/state.md +++ b/docs/spec/blockchain/state.md @@ -15,6 +15,7 @@ validation. ```go type State struct { + Version Version LastResults []Result AppHash []byte diff --git a/node/node.go b/node/node.go index 9939f1c6..12e0b8e6 100644 --- a/node/node.go +++ b/node/node.go @@ -208,6 +208,15 @@ func NewNode(config *cfg.Config, // reload the state (it may have been updated by the handshake) state = sm.LoadState(stateDB) + if state.Version.Consensus.Block != version.BlockProtocol { + return nil, fmt.Errorf( + "Block version of the software does not match that of the state.\n"+ + "Got version.BlockProtocol=%v, state.Version.Consensus.Block=%v", + version.BlockProtocol, + state.Version.Consensus.Block, + ) + } + // If an address is provided, listen on the socket for a // connection from an external signing process. if config.PrivValidatorListenAddr != "" { diff --git a/state/execution.go b/state/execution.go index 611efa51..68298a8d 100644 --- a/state/execution.go +++ b/state/execution.go @@ -398,9 +398,13 @@ func updateState( lastHeightParamsChanged = header.Height + 1 } + // TODO: allow app to upgrade version + nextVersion := state.Version + // NOTE: the AppHash has not been populated. // It will be filled on state.Save. return State{ + Version: nextVersion, ChainID: state.ChainID, LastBlockHeight: header.Height, LastBlockTotalTx: state.LastBlockTotalTx + header.NumTxs, diff --git a/state/state.go b/state/state.go index 23c0d632..aedb2b00 100644 --- a/state/state.go +++ b/state/state.go @@ -8,6 +8,7 @@ import ( "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" + "github.com/tendermint/tendermint/version" ) // database keys @@ -17,6 +18,25 @@ var ( //----------------------------------------------------------------------------- +// Version is for versioning the State. +// It holds the Block and App version needed for making blocks, +// and the software version to support upgrades to the format of +// the State as stored on disk. +type Version struct { + Consensus version.Consensus + Software string +} + +var initStateVersion = Version{ + Consensus: version.Consensus{ + Block: version.BlockProtocol, + App: 0, + }, + Software: version.TMCoreSemVer, +} + +//----------------------------------------------------------------------------- + // State is a short description of the latest committed block of the Tendermint consensus. // It keeps all information necessary to validate new blocks, // including the last validator set and the consensus params. @@ -25,6 +45,8 @@ var ( // Instead, use state.Copy() or state.NextState(...). // NOTE: not goroutine-safe. type State struct { + Version Version + // immutable ChainID string @@ -59,6 +81,7 @@ type State struct { // Copy makes a copy of the State for mutating. func (state State) Copy() State { return State{ + Version: state.Version, ChainID: state.ChainID, LastBlockHeight: state.LastBlockHeight, @@ -114,6 +137,7 @@ func (state State) MakeBlock( block := types.MakeBlock(height, txs, commit, evidence) // Fill rest of header with state data. + block.Version = state.Version.Consensus block.ChainID = state.ChainID // Set time @@ -217,7 +241,7 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) { } return State{ - + Version: initStateVersion, ChainID: genDoc.ChainID, LastBlockHeight: 0, diff --git a/state/state_test.go b/state/state_test.go index 2c777307..b1f24d30 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -319,9 +319,11 @@ func TestStateMakeBlock(t *testing.T) { defer tearDown(t) proposerAddress := state.Validators.GetProposer().Address + stateVersion := state.Version.Consensus block := makeBlock(state, 2) - // test we set proposer address + // test we set some fields + assert.Equal(t, stateVersion, block.Version) assert.Equal(t, proposerAddress, block.ProposerAddress) } diff --git a/state/validation.go b/state/validation.go index a308870e..ff1791e2 100644 --- a/state/validation.go +++ b/state/validation.go @@ -20,6 +20,13 @@ func validateBlock(stateDB dbm.DB, state State, block *types.Block) error { } // Validate basic info. + if block.Version != state.Version.Consensus { + return fmt.Errorf( + "Wrong Block.Header.Version. Expected %v, got %v", + state.Version.Consensus, + block.Version, + ) + } if block.ChainID != state.ChainID { return fmt.Errorf( "Wrong Block.Header.ChainID. Expected %v, got %v", diff --git a/state/validation_test.go b/state/validation_test.go index 3c58c713..f89fbdea 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -5,6 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/log" @@ -26,13 +27,20 @@ func TestValidateBlockHeader(t *testing.T) { err := blockExec.ValidateBlock(state, block) require.NoError(t, err) + // some bad values wrongHash := tmhash.Sum([]byte("this hash is wrong")) + wrongVersion1 := state.Version.Consensus + wrongVersion1.Block += 1 + wrongVersion2 := state.Version.Consensus + wrongVersion2.App += 1 // Manipulation of any header field causes failure. testCases := []struct { name string malleateBlock func(block *types.Block) }{ + {"Version wrong1", func(block *types.Block) { block.Version = wrongVersion1 }}, + {"Version wrong2", func(block *types.Block) { block.Version = wrongVersion2 }}, {"ChainID wrong", func(block *types.Block) { block.ChainID = "not-the-real-one" }}, {"Height wrong", func(block *types.Block) { block.Height += 10 }}, {"Time wrong", func(block *types.Block) { block.Time = block.Time.Add(-time.Second * 3600 * 24) }}, diff --git a/types/block.go b/types/block.go index 45a5b8c3..06ad55fc 100644 --- a/types/block.go +++ b/types/block.go @@ -10,11 +10,12 @@ import ( "github.com/tendermint/tendermint/crypto/merkle" cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/version" ) const ( // MaxHeaderBytes is a maximum header size (including amino overhead). - MaxHeaderBytes int64 = 511 + MaxHeaderBytes int64 = 534 // MaxAminoOverheadForBlock - maximum amino overhead to encode a block (up to // MaxBlockSizeBytes in size) not including it's parts except Data. @@ -27,7 +28,6 @@ const ( ) // Block defines the atomic unit of a Tendermint blockchain. -// TODO: add Version byte type Block struct { mtx sync.Mutex Header `json:"header"` @@ -258,16 +258,16 @@ func MaxDataBytesUnknownEvidence(maxBytes int64, valsCount int) int64 { //----------------------------------------------------------------------------- // Header defines the structure of a Tendermint block header -// TODO: limit header size // NOTE: changes to the Header should be duplicated in the abci Header // and in /docs/spec/blockchain/blockchain.md 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"` - TotalTxs int64 `json:"total_txs"` + Version version.Consensus `json:"version"` + 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"` @@ -297,6 +297,7 @@ func (h *Header) Hash() cmn.HexBytes { return nil } return merkle.SimpleHashFromMap(map[string][]byte{ + "Version": cdcEncode(h.Version), "ChainID": cdcEncode(h.ChainID), "Height": cdcEncode(h.Height), "Time": cdcEncode(h.Time), @@ -321,6 +322,7 @@ func (h *Header) StringIndented(indent string) string { return "nil-Header" } return fmt.Sprintf(`Header{ +%s Version: %v %s ChainID: %v %s Height: %v %s Time: %v @@ -337,6 +339,7 @@ func (h *Header) StringIndented(indent string) string { %s Evidence: %v %s Proposer: %v %s}#%v`, + indent, h.Version, indent, h.ChainID, indent, h.Height, indent, h.Time, @@ -538,6 +541,7 @@ func (sh SignedHeader) ValidateBasic(chainID string) error { if sh.Commit == nil { return errors.New("SignedHeader missing commit (precommit votes).") } + // Check ChainID. if sh.ChainID != chainID { return fmt.Errorf("Header belongs to another chain '%s' not '%s'", diff --git a/types/block_test.go b/types/block_test.go index 7abd79d7..d268e411 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -12,6 +12,7 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/version" ) func TestMain(m *testing.M) { @@ -242,6 +243,7 @@ func TestMaxHeaderBytes(t *testing.T) { } h := Header{ + Version: version.Consensus{math.MaxInt64, math.MaxInt64}, ChainID: maxChainID, Height: math.MaxInt64, Time: time.Now().UTC(), @@ -286,9 +288,9 @@ func TestBlockMaxDataBytes(t *testing.T) { }{ 0: {-10, 1, 0, true, 0}, 1: {10, 1, 0, true, 0}, - 2: {721, 1, 0, true, 0}, - 3: {722, 1, 0, false, 0}, - 4: {723, 1, 0, false, 1}, + 2: {744, 1, 0, true, 0}, + 3: {745, 1, 0, false, 0}, + 4: {746, 1, 0, false, 1}, } for i, tc := range testCases { @@ -314,9 +316,9 @@ func TestBlockMaxDataBytesUnknownEvidence(t *testing.T) { }{ 0: {-10, 1, true, 0}, 1: {10, 1, true, 0}, - 2: {801, 1, true, 0}, - 3: {802, 1, false, 0}, - 4: {803, 1, false, 1}, + 2: {826, 1, true, 0}, + 3: {827, 1, false, 0}, + 4: {828, 1, false, 1}, } for i, tc := range testCases { diff --git a/types/proto3/block.pb.go b/types/proto3/block.pb.go index ab1c66cf..446b3919 100644 --- a/types/proto3/block.pb.go +++ b/types/proto3/block.pb.go @@ -1,7 +1,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: types/proto3/block.proto +// source: block.proto -//nolint +/* +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 + Version + Timestamp +*/ package proto3 import proto "github.com/golang/protobuf/proto" @@ -20,36 +32,14 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PartSetHeader struct { - 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:"-"` + Total int32 `protobuf:"zigzag32,1,opt,name=Total" json:"Total,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=Hash,proto3" json:"Hash,omitempty"` } -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) -} - -var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo +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} } func (m *PartSetHeader) GetTotal() int32 { if m != nil { @@ -66,36 +56,14 @@ 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,proto3" json:"PartsHeader,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Hash []byte `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"` + PartsHeader *PartSetHeader `protobuf:"bytes,2,opt,name=PartsHeader" json:"PartsHeader,omitempty"` } -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) -} - -var xxx_messageInfo_BlockID proto.InternalMessageInfo +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} } func (m *BlockID) GetHash() []byte { if m != nil { @@ -113,52 +81,39 @@ func (m *BlockID) GetPartsHeader() *PartSetHeader { type Header struct { // basic block info - 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"` + Version *Version `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"` + ChainID string `protobuf:"bytes,2,opt,name=ChainID" json:"ChainID,omitempty"` + Height int64 `protobuf:"zigzag64,3,opt,name=Height" json:"Height,omitempty"` + Time *Timestamp `protobuf:"bytes,4,opt,name=Time" json:"Time,omitempty"` + NumTxs int64 `protobuf:"zigzag64,5,opt,name=NumTxs" json:"NumTxs,omitempty"` + TotalTxs int64 `protobuf:"zigzag64,6,opt,name=TotalTxs" json:"TotalTxs,omitempty"` // prev block info - LastBlockID *BlockID `protobuf:"bytes,6,opt,name=LastBlockID,proto3" json:"LastBlockID,omitempty"` + LastBlockID *BlockID `protobuf:"bytes,7,opt,name=LastBlockID" 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"` + LastCommitHash []byte `protobuf:"bytes,8,opt,name=LastCommitHash,proto3" json:"LastCommitHash,omitempty"` + DataHash []byte `protobuf:"bytes,9,opt,name=DataHash,proto3" json:"DataHash,omitempty"` // hashes from the app output from the prev block - ValidatorsHash []byte `protobuf:"bytes,9,opt,name=ValidatorsHash,proto3" json:"ValidatorsHash,omitempty"` - ConsensusHash []byte `protobuf:"bytes,10,opt,name=ConsensusHash,proto3" json:"ConsensusHash,omitempty"` - AppHash []byte `protobuf:"bytes,11,opt,name=AppHash,proto3" json:"AppHash,omitempty"` - LastResultsHash []byte `protobuf:"bytes,12,opt,name=LastResultsHash,proto3" json:"LastResultsHash,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,10,opt,name=ValidatorsHash,proto3" json:"ValidatorsHash,omitempty"` + NextValidatorsHash []byte `protobuf:"bytes,11,opt,name=NextValidatorsHash,proto3" json:"NextValidatorsHash,omitempty"` + ConsensusHash []byte `protobuf:"bytes,12,opt,name=ConsensusHash,proto3" json:"ConsensusHash,omitempty"` + AppHash []byte `protobuf:"bytes,13,opt,name=AppHash,proto3" json:"AppHash,omitempty"` + LastResultsHash []byte `protobuf:"bytes,14,opt,name=LastResultsHash,proto3" json:"LastResultsHash,omitempty"` // consensus info - 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:"-"` + EvidenceHash []byte `protobuf:"bytes,15,opt,name=EvidenceHash,proto3" json:"EvidenceHash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,16,opt,name=ProposerAddress,proto3" json:"ProposerAddress,omitempty"` } -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) GetVersion() *Version { + if m != nil { + return m.Version + } + return nil +} func (m *Header) GetChainID() string { if m != nil { @@ -223,6 +178,13 @@ func (m *Header) GetValidatorsHash() []byte { 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 @@ -258,41 +220,43 @@ func (m *Header) GetProposerAddress() []byte { return nil } +type Version struct { + Block uint64 `protobuf:"varint,1,opt,name=Block" json:"Block,omitempty"` + App uint64 `protobuf:"varint,2,opt,name=App" json:"App,omitempty"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Version) GetBlock() uint64 { + if m != nil { + return m.Block + } + return 0 +} + +func (m *Version) GetApp() uint64 { + if m != nil { + return m.App + } + return 0 +} + // 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,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:"-"` + Seconds int64 `protobuf:"fixed64,1,opt,name=seconds" json:"seconds,omitempty"` + Nanos int32 `protobuf:"fixed32,2,opt,name=nanos" json:"nanos,omitempty"` } -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) -} - -var xxx_messageInfo_Timestamp proto.InternalMessageInfo +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{4} } func (m *Timestamp) GetSeconds() int64 { if m != nil { @@ -312,36 +276,40 @@ func init() { proto.RegisterType((*PartSetHeader)(nil), "proto3.PartSetHeader") proto.RegisterType((*BlockID)(nil), "proto3.BlockID") proto.RegisterType((*Header)(nil), "proto3.Header") + proto.RegisterType((*Version)(nil), "proto3.Version") proto.RegisterType((*Timestamp)(nil), "proto3.Timestamp") } -func init() { proto.RegisterFile("types/proto3/block.proto", fileDescriptor_block_c8c1dcbe91697ccd) } +func init() { proto.RegisterFile("block.proto", fileDescriptor0) } -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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6c, 0xda, - 0x2e, 0xd7, 0x99, 0x46, 0x95, 0x2f, 0xc3, 0x30, 0x57, 0x88, 0x7c, 0xe8, 0xd2, 0x6e, 0xe8, 0xe0, - 0x37, 0xf4, 0xaa, 0xed, 0xd8, 0xeb, 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, +var fileDescriptor0 = []byte{ + // 443 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0xcd, 0x6a, 0xdb, 0x40, + 0x10, 0x46, 0x8d, 0x62, 0xc7, 0x23, 0x3b, 0x76, 0x86, 0xb6, 0x88, 0x9e, 0x8c, 0x68, 0x8b, 0x7b, + 0x31, 0x24, 0x39, 0x94, 0xd2, 0x93, 0x6b, 0x17, 0x12, 0x28, 0x21, 0x6c, 0x8d, 0xef, 0x1b, 0x6b, + 0xa9, 0x45, 0x2d, 0xad, 0xd0, 0xac, 0x4b, 0xde, 0xb0, 0xaf, 0x55, 0x66, 0x56, 0x52, 0x2d, 0x93, + 0x93, 0xf7, 0xfb, 0x99, 0x6f, 0x76, 0xc7, 0x23, 0x88, 0x9e, 0xf6, 0x76, 0xfb, 0x7b, 0x5e, 0x56, + 0xd6, 0x59, 0xec, 0xc9, 0xcf, 0x6d, 0xf2, 0x05, 0x46, 0x8f, 0xba, 0x72, 0x3f, 0x8d, 0xbb, 0x33, + 0x3a, 0x35, 0x15, 0xbe, 0x86, 0xf3, 0xb5, 0x75, 0x7a, 0x1f, 0x07, 0xd3, 0x60, 0x76, 0xa5, 0x3c, + 0x40, 0x84, 0xf0, 0x4e, 0x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cb, 0xe2, 0x1c, 0xf0, 0xc1, 0x3c, 0xbb, 0x13, + 0x6f, 0x24, 0xde, 0x17, 0x14, 0x7c, 0x0f, 0xa3, 0xa5, 0x2d, 0xc8, 0x14, 0x74, 0xf0, 0xd6, 0xa1, + 0x58, 0xbb, 0x24, 0xff, 0x03, 0x8b, 0xb2, 0x14, 0x7d, 0x24, 0x7a, 0x03, 0x71, 0x06, 0x63, 0x7e, + 0x85, 0x32, 0x74, 0xd8, 0x3b, 0x9f, 0x70, 0x29, 0x8e, 0x53, 0x1a, 0x13, 0x18, 0x7e, 0xff, 0x93, + 0xa5, 0xa6, 0xd8, 0x1a, 0xb1, 0x8d, 0xc5, 0xd6, 0xe1, 0x38, 0xed, 0xb1, 0xb2, 0xa5, 0x25, 0x53, + 0x2d, 0xd2, 0xb4, 0x32, 0x44, 0xf1, 0xc4, 0xa7, 0x9d, 0xd0, 0xc9, 0x75, 0xbb, 0x3e, 0xbc, 0xd6, + 0x32, 0x69, 0xd9, 0xa3, 0x50, 0x79, 0x80, 0x13, 0x38, 0x5b, 0x94, 0xa5, 0x2c, 0x4c, 0xa8, 0xf8, + 0x98, 0x7c, 0x85, 0x41, 0xbb, 0x00, 0xfc, 0x22, 0x32, 0x5b, 0x5b, 0xa4, 0x24, 0x65, 0x13, 0xd5, + 0x40, 0x8e, 0x2b, 0x74, 0x61, 0x49, 0x4a, 0xc7, 0xca, 0x83, 0xa7, 0xfa, 0xa3, 0xfa, 0x17, 0x00, + 0x00, 0xff, 0xff, 0xd5, 0x8b, 0x28, 0x26, 0x6a, 0x03, 0x00, 0x00, } diff --git a/types/proto3/block.proto b/types/proto3/block.proto index 835d6b74..dd64a9e9 100644 --- a/types/proto3/block.proto +++ b/types/proto3/block.proto @@ -15,29 +15,35 @@ message BlockID { message Header { // basic block info - string ChainID = 1; - sint64 Height = 2; - Timestamp Time = 3; - sint64 NumTxs = 4; - sint64 TotalTxs = 5; + Version Version = 1; + string ChainID = 2; + sint64 Height = 3; + Timestamp Time = 4; + sint64 NumTxs = 5; + sint64 TotalTxs = 6; // prev block info - BlockID LastBlockID = 6; + BlockID LastBlockID = 7; // hashes of block data - bytes LastCommitHash = 7; // commit from validators from the last block - bytes DataHash = 8; // transactions + bytes LastCommitHash = 8; // commit from validators from the last block + bytes DataHash = 9; // transactions // hashes from the app output from the prev block - bytes ValidatorsHash = 9; // validators for the current block - bytes NextValidatorsHash = 10; // validators for the next block - bytes ConsensusHash = 11; // consensus params for current block - bytes AppHash = 12; // state after txs from the previous block - bytes LastResultsHash = 13; // root hash of all results from the txs from the previous block + bytes ValidatorsHash = 10; // validators for the current block + bytes NextValidatorsHash = 11; // validators for the next block + bytes ConsensusHash = 12; // consensus params for current block + bytes AppHash = 13; // state after txs from the previous block + bytes LastResultsHash = 14; // root hash of all results from the txs from the previous block // consensus info - bytes EvidenceHash = 14; // evidence included in the block - bytes ProposerAddress = 15; // original proposer of the block + bytes EvidenceHash = 15; // evidence included in the block + bytes ProposerAddress = 16; // original proposer of the block +} + +message Version { + uint64 Block = 1; + uint64 App = 2; } // Timestamp wraps how amino encodes time. Note that this is different from the protobuf well-known type