From ed4ce5ff6cc455114d749bd2121096c81098a84f Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 18 Oct 2018 16:51:17 -0400 Subject: [PATCH] ADR-016: Update ABCI Info method for versions (#2662) * abci: update RequestInfo for versions * abci: update ResponseInfo for versions * compile fix * fix test * software_version -> version * comment fix * update spec * add test * comments and fix test --- CHANGELOG_PENDING.md | 3 + abci/example/kvstore/kvstore.go | 9 +- abci/types/types.pb.go | 484 ++++++++++++++++++++------------ abci/types/types.proto | 9 +- consensus/replay.go | 14 +- consensus/replay_test.go | 12 +- consensus/wal_generator.go | 4 +- docs/spec/abci/abci.md | 8 +- node/node.go | 20 +- node/node_test.go | 22 ++ p2p/node_info.go | 17 +- proxy/app_conn_test.go | 2 +- proxy/version.go | 15 + rpc/client/mock/abci.go | 4 +- rpc/core/abci.go | 4 +- state/state.go | 4 + version/version.go | 6 + 17 files changed, 425 insertions(+), 212 deletions(-) create mode 100644 proxy/version.go diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index f4858d953..99c389974 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -21,6 +21,8 @@ BREAKING CHANGES: * [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 + * [abci] \#2662 Bump the field numbers for some `ResponseInfo` fields to make room for + `AppVersion` * Go API * [node] Remove node.RunForever @@ -52,6 +54,7 @@ BREAKING CHANGES: FEATURES: - [crypto/merkle] \#2298 General Merkle Proof scheme for chaining various types of Merkle trees together - [abci] \#2557 Add `Codespace` field to `Response{CheckTx, DeliverTx, Query}` +- [abci] \#2662 Add `BlockVersion` and `P2PVersion` to `RequestInfo` IMPROVEMENTS: - Additional Metrics diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 9523bf746..955baefb4 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -10,11 +10,14 @@ import ( "github.com/tendermint/tendermint/abci/types" cmn "github.com/tendermint/tendermint/libs/common" dbm "github.com/tendermint/tendermint/libs/db" + "github.com/tendermint/tendermint/version" ) var ( stateKey = []byte("stateKey") kvPairPrefixKey = []byte("kvPairKey:") + + ProtocolVersion version.Protocol = 0x1 ) type State struct { @@ -65,7 +68,11 @@ func NewKVStoreApplication() *KVStoreApplication { } func (app *KVStoreApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo) { - return types.ResponseInfo{Data: fmt.Sprintf("{\"size\":%v}", app.state.Size)} + return types.ResponseInfo{ + Data: fmt.Sprintf("{\"size\":%v}", app.state.Size), + Version: version.ABCIVersion, + AppVersion: ProtocolVersion.Uint64(), + } } // tx is either "key=value" or just arbitrary bytes diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 81fb74b42..6a70bb979 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_07d64ea985a686e2, []int{0} + return fileDescriptor_types_4449c1011851ea19, []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_07d64ea985a686e2, []int{1} + return fileDescriptor_types_4449c1011851ea19, []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_07d64ea985a686e2, []int{2} + return fileDescriptor_types_4449c1011851ea19, []int{2} } func (m *RequestFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -560,6 +560,8 @@ var xxx_messageInfo_RequestFlush proto.InternalMessageInfo type RequestInfo struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"` + P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -569,7 +571,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_07d64ea985a686e2, []int{3} + return fileDescriptor_types_4449c1011851ea19, []int{3} } func (m *RequestInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -605,6 +607,20 @@ func (m *RequestInfo) GetVersion() string { return "" } +func (m *RequestInfo) GetBlockVersion() uint64 { + if m != nil { + return m.BlockVersion + } + return 0 +} + +func (m *RequestInfo) GetP2PVersion() uint64 { + if m != nil { + return m.P2PVersion + } + return 0 +} + // nondeterministic type RequestSetOption struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` @@ -618,7 +634,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_07d64ea985a686e2, []int{4} + return fileDescriptor_types_4449c1011851ea19, []int{4} } func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -676,7 +692,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_07d64ea985a686e2, []int{5} + return fileDescriptor_types_4449c1011851ea19, []int{5} } func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -754,7 +770,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_07d64ea985a686e2, []int{6} + return fileDescriptor_types_4449c1011851ea19, []int{6} } func (m *RequestQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -826,7 +842,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_07d64ea985a686e2, []int{7} + return fileDescriptor_types_4449c1011851ea19, []int{7} } func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,7 +910,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_07d64ea985a686e2, []int{8} + return fileDescriptor_types_4449c1011851ea19, []int{8} } func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -941,7 +957,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_07d64ea985a686e2, []int{9} + return fileDescriptor_types_4449c1011851ea19, []int{9} } func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -988,7 +1004,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_07d64ea985a686e2, []int{10} + return fileDescriptor_types_4449c1011851ea19, []int{10} } func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1034,7 +1050,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_07d64ea985a686e2, []int{11} + return fileDescriptor_types_4449c1011851ea19, []int{11} } func (m *RequestCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1087,7 +1103,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_07d64ea985a686e2, []int{12} + return fileDescriptor_types_4449c1011851ea19, []int{12} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1540,7 +1556,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_07d64ea985a686e2, []int{13} + return fileDescriptor_types_4449c1011851ea19, []int{13} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1587,7 +1603,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_07d64ea985a686e2, []int{14} + return fileDescriptor_types_4449c1011851ea19, []int{14} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1633,7 +1649,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_07d64ea985a686e2, []int{15} + return fileDescriptor_types_4449c1011851ea19, []int{15} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1665,8 +1681,9 @@ var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo type ResponseInfo struct { Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` - LastBlockAppHash []byte `protobuf:"bytes,4,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"` + AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` + LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` + LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1676,7 +1693,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_07d64ea985a686e2, []int{16} + return fileDescriptor_types_4449c1011851ea19, []int{16} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1719,6 +1736,13 @@ func (m *ResponseInfo) GetVersion() string { return "" } +func (m *ResponseInfo) GetAppVersion() uint64 { + if m != nil { + return m.AppVersion + } + return 0 +} + func (m *ResponseInfo) GetLastBlockHeight() int64 { if m != nil { return m.LastBlockHeight @@ -1748,7 +1772,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_07d64ea985a686e2, []int{17} + return fileDescriptor_types_4449c1011851ea19, []int{17} } func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1810,7 +1834,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_07d64ea985a686e2, []int{18} + return fileDescriptor_types_4449c1011851ea19, []int{18} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1873,7 +1897,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_07d64ea985a686e2, []int{19} + return fileDescriptor_types_4449c1011851ea19, []int{19} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1976,7 +2000,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_07d64ea985a686e2, []int{20} + return fileDescriptor_types_4449c1011851ea19, []int{20} } func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2030,7 +2054,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_07d64ea985a686e2, []int{21} + return fileDescriptor_types_4449c1011851ea19, []int{21} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2133,7 +2157,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_07d64ea985a686e2, []int{22} + return fileDescriptor_types_4449c1011851ea19, []int{22} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2231,7 +2255,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_07d64ea985a686e2, []int{23} + return fileDescriptor_types_4449c1011851ea19, []int{23} } func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2293,7 +2317,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_07d64ea985a686e2, []int{24} + return fileDescriptor_types_4449c1011851ea19, []int{24} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2343,7 +2367,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_07d64ea985a686e2, []int{25} + return fileDescriptor_types_4449c1011851ea19, []int{25} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2401,7 +2425,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_07d64ea985a686e2, []int{26} + return fileDescriptor_types_4449c1011851ea19, []int{26} } func (m *BlockSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2457,7 +2481,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_07d64ea985a686e2, []int{27} + return fileDescriptor_types_4449c1011851ea19, []int{27} } func (m *EvidenceParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2505,7 +2529,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_07d64ea985a686e2, []int{28} + return fileDescriptor_types_4449c1011851ea19, []int{28} } func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2579,7 +2603,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_07d64ea985a686e2, []int{29} + return fileDescriptor_types_4449c1011851ea19, []int{29} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2732,7 +2756,7 @@ 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} + return fileDescriptor_types_4449c1011851ea19, []int{30} } func (m *Version) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2787,7 +2811,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_07d64ea985a686e2, []int{31} + return fileDescriptor_types_4449c1011851ea19, []int{31} } func (m *BlockID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2842,7 +2866,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_07d64ea985a686e2, []int{32} + return fileDescriptor_types_4449c1011851ea19, []int{32} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2899,7 +2923,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_07d64ea985a686e2, []int{33} + return fileDescriptor_types_4449c1011851ea19, []int{33} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2955,7 +2979,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_07d64ea985a686e2, []int{34} + return fileDescriptor_types_4449c1011851ea19, []int{34} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3011,7 +3035,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_07d64ea985a686e2, []int{35} + return fileDescriptor_types_4449c1011851ea19, []int{35} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3066,7 +3090,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_07d64ea985a686e2, []int{36} + return fileDescriptor_types_4449c1011851ea19, []int{36} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3124,7 +3148,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_07d64ea985a686e2, []int{37} + return fileDescriptor_types_4449c1011851ea19, []int{37} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3636,6 +3660,12 @@ func (this *RequestInfo) Equal(that interface{}) bool { if this.Version != that1.Version { return false } + if this.BlockVersion != that1.BlockVersion { + return false + } + if this.P2PVersion != that1.P2PVersion { + return false + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -4321,6 +4351,9 @@ func (this *ResponseInfo) Equal(that interface{}) bool { if this.Version != that1.Version { return false } + if this.AppVersion != that1.AppVersion { + return false + } if this.LastBlockHeight != that1.LastBlockHeight { return false } @@ -5758,6 +5791,16 @@ func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Version))) i += copy(dAtA[i:], m.Version) } + if m.BlockVersion != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion)) + } + if m.P2PVersion != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion)) + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -6362,13 +6405,18 @@ func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Version))) i += copy(dAtA[i:], m.Version) } - if m.LastBlockHeight != 0 { + if m.AppVersion != 0 { dAtA[i] = 0x18 i++ + i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion)) + } + if m.LastBlockHeight != 0 { + dAtA[i] = 0x20 + i++ i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight)) } if len(m.LastBlockAppHash) > 0 { - dAtA[i] = 0x22 + dAtA[i] = 0x2a i++ i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash))) i += copy(dAtA[i:], m.LastBlockAppHash) @@ -7459,8 +7507,10 @@ func NewPopulatedRequestFlush(r randyTypes, easy bool) *RequestFlush { func NewPopulatedRequestInfo(r randyTypes, easy bool) *RequestInfo { this := &RequestInfo{} this.Version = string(randStringTypes(r)) + this.BlockVersion = uint64(uint64(r.Uint32())) + this.P2PVersion = uint64(uint64(r.Uint32())) if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 2) + this.XXX_unrecognized = randUnrecognizedTypes(r, 4) } return this } @@ -7717,6 +7767,7 @@ func NewPopulatedResponseInfo(r randyTypes, easy bool) *ResponseInfo { this := &ResponseInfo{} this.Data = string(randStringTypes(r)) this.Version = string(randStringTypes(r)) + this.AppVersion = uint64(uint64(r.Uint32())) this.LastBlockHeight = int64(r.Int63()) if r.Intn(2) == 0 { this.LastBlockHeight *= -1 @@ -7727,7 +7778,7 @@ func NewPopulatedResponseInfo(r randyTypes, easy bool) *ResponseInfo { this.LastBlockAppHash[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + this.XXX_unrecognized = randUnrecognizedTypes(r, 6) } return this } @@ -8382,6 +8433,12 @@ func (m *RequestInfo) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.BlockVersion != 0 { + n += 1 + sovTypes(uint64(m.BlockVersion)) + } + if m.P2PVersion != 0 { + n += 1 + sovTypes(uint64(m.P2PVersion)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -8693,6 +8750,9 @@ func (m *ResponseInfo) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.AppVersion != 0 { + n += 1 + sovTypes(uint64(m.AppVersion)) + } if m.LastBlockHeight != 0 { n += 1 + sovTypes(uint64(m.LastBlockHeight)) } @@ -9781,6 +9841,44 @@ func (m *RequestInfo) Unmarshal(dAtA []byte) error { } m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType) + } + m.BlockVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockVersion |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType) + } + m.P2PVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.P2PVersion |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -11459,6 +11557,25 @@ func (m *ResponseInfo) Unmarshal(dAtA []byte) error { m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) + } + m.AppVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AppVersion |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType) } @@ -11477,7 +11594,7 @@ func (m *ResponseInfo) Unmarshal(dAtA []byte) error { break } } - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType) } @@ -14768,145 +14885,148 @@ var ( ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_07d64ea985a686e2) } +func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_4449c1011851ea19) } func init() { - golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_07d64ea985a686e2) + golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_4449c1011851ea19) } -var fileDescriptor_types_07d64ea985a686e2 = []byte{ - // 2133 bytes of a gzipped FileDescriptorProto +var fileDescriptor_types_4449c1011851ea19 = []byte{ + // 2177 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, 0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x7d, 0x82, 0x5c, 0xbb, 0x33, 0xce, 0x13, 0xc8, 0x07, 0x00, 0x67, 0x74, 0xe6, + 0xb9, 0x94, 0x07, 0x51, 0xdc, 0xab, 0xde, 0x5c, 0xcf, 0x28, 0x9f, 0x6a, 0xc6, 0x93, 0xd0, 0xa5, + 0x9c, 0x0d, 0xab, 0xe2, 0x64, 0x76, 0x46, 0x9e, 0xbc, 0x01, 0x1d, 0x1a, 0x86, 0x4e, 0xcc, 0x29, + 0x67, 0xce, 0xe8, 0x9c, 0xb3, 0x18, 0xe3, 0x71, 0xd3, 0x6e, 0xd1, 0x30, 0x7c, 0x24, 0xa8, 0x43, + 0x41, 0xb4, 0xdc, 0xe4, 0x6b, 0x62, 0xa8, 0x10, 0x02, 0x55, 0x97, 0x72, 0x8a, 0xd6, 0xd8, 0xb4, + 0x71, 0x2c, 0x68, 0x21, 0xe5, 0x53, 0x75, 0x47, 0x1c, 0x93, 0x6b, 0x50, 0x9b, 0x32, 0x6f, 0x32, + 0xe5, 0x78, 0xad, 0x75, 0x5b, 0xcd, 0x84, 0xe1, 0xc3, 0x28, 0x38, 0x63, 0x98, 0x2d, 0x1a, 0xb6, + 0x9c, 0x58, 0x7f, 0x35, 0xe0, 0xb5, 0x4b, 0xe1, 0x25, 0xd6, 0x9d, 0xd2, 0x78, 0xaa, 0xf7, 0x12, + 0x63, 0xf2, 0x96, 0x58, 0x97, 0xba, 0x2c, 0x52, 0x59, 0xac, 0xa5, 0x6e, 0x7c, 0x84, 0x44, 0x75, + 0x51, 0x25, 0x42, 0x1e, 0x42, 0x77, 0x46, 0x63, 0xee, 0xc8, 0x28, 0x70, 0x30, 0x4b, 0xad, 0xe7, + 0x22, 0xf3, 0x63, 0xaa, 0xa3, 0x45, 0x38, 0xa7, 0x52, 0x6f, 0xcf, 0x72, 0x54, 0x72, 0x04, 0x5b, + 0xa3, 0xf3, 0xe7, 0xd4, 0xe7, 0x9e, 0xcf, 0x9c, 0x4b, 0x36, 0xef, 0xa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5e, 0xbc, 0xd8, 0xa9, 0x23, 0xae, 0x1c, 0x3f, 0x48, + 0x1b, 0x9e, 0x55, 0xfd, 0x80, 0xee, 0xae, 0xaa, 0xaf, 0xdc, 0x5d, 0x5d, 0x87, 0xba, 0xbf, 0x98, + 0x3b, 0x7c, 0x19, 0xab, 0xf8, 0xac, 0xf9, 0x8b, 0xf9, 0xe3, 0x65, 0x2c, 0xbe, 0x01, 0x0f, 0x38, + 0x9d, 0x21, 0x4b, 0x46, 0x67, 0x03, 0x09, 0x82, 0x79, 0x00, 0xad, 0x0c, 0xfc, 0x7a, 0xae, 0x2a, + 0xe3, 0xda, 0x59, 0x0f, 0x39, 0x7e, 0xa0, 0x6e, 0xd9, 0x4c, 0xe0, 0xf8, 0xd8, 0x25, 0xb7, 0xf3, + 0xcd, 0x04, 0xa2, 0x76, 0x03, 0x9d, 0x31, 0xd3, 0x2f, 0x08, 0xcc, 0x16, 0x07, 0x10, 0xee, 0x29, + 0x45, 0x4c, 0x14, 0x69, 0x08, 0x02, 0x32, 0xdf, 0x84, 0x4e, 0x0a, 0x7c, 0x52, 0x04, 0xe4, 0x2a, + 0x29, 0x19, 0x05, 0xdf, 0x81, 0x2d, 0x9f, 0x2d, 0xb9, 0x53, 0x94, 0x6e, 0xa2, 0x34, 0x11, 0xbc, + 0xd3, 0xbc, 0xc6, 0x77, 0xa1, 0x9d, 0x06, 0x30, 0xca, 0x6e, 0xca, 0x96, 0x2e, 0xa1, 0xa2, 0xd8, + 0x0d, 0x68, 0x24, 0x65, 0x47, 0x0b, 0x05, 0xea, 0x54, 0x56, 0x1b, 0x49, 0x21, 0x13, 0xb1, 0x78, + 0x31, 0xe3, 0x6a, 0x91, 0x36, 0xca, 0x60, 0x21, 0x63, 0x4b, 0x3a, 0xca, 0xde, 0x82, 0x56, 0x12, + 0x37, 0x28, 0xd7, 0x41, 0xb9, 0x4d, 0x4d, 0x44, 0xa1, 0x5d, 0xe8, 0x86, 0x51, 0x10, 0x06, 0x31, + 0x8b, 0x1c, 0xea, 0xba, 0x11, 0x8b, 0xe3, 0x5e, 0x57, 0xae, 0xa7, 0xe9, 0x87, 0x92, 0x6c, 0x7d, + 0x1f, 0xea, 0xba, 0x9e, 0xda, 0x82, 0x0d, 0xb4, 0x3a, 0xba, 0x60, 0xd5, 0x96, 0x13, 0x91, 0xb9, + 0x0f, 0xc3, 0x50, 0xbd, 0x0a, 0x88, 0xa1, 0xf5, 0x2b, 0xa8, 0xab, 0x0f, 0x56, 0xda, 0x2b, 0xfe, + 0x08, 0x36, 0x43, 0x1a, 0x89, 0x6b, 0x64, 0x3b, 0x46, 0x5d, 0xb1, 0x9f, 0xd0, 0x88, 0x3f, 0x62, + 0x3c, 0xd7, 0x38, 0x36, 0x51, 0x5e, 0x92, 0xac, 0xbb, 0xd0, 0xca, 0xc9, 0x88, 0x63, 0xa1, 0x1f, + 0xe9, 0x48, 0xc3, 0x49, 0xb2, 0x73, 0x25, 0xdd, 0xd9, 0xba, 0x07, 0x66, 0xf2, 0x6d, 0x44, 0x61, + 0xa9, 0xaf, 0x6e, 0x28, 0x73, 0xcb, 0x29, 0x36, 0xc3, 0xc1, 0xa7, 0x2c, 0x52, 0x31, 0x21, 0x27, + 0xd6, 0x13, 0xe8, 0x14, 0x52, 0x36, 0xb9, 0x03, 0xf5, 0x70, 0x31, 0x72, 0xf4, 0x23, 0x46, 0xda, + 0xf6, 0x9e, 0x2c, 0x46, 0x1f, 0xb1, 0x73, 0xdd, 0xf6, 0x86, 0x38, 0x4b, 0x97, 0xad, 0x64, 0x97, + 0x9d, 0x41, 0x43, 0x47, 0x3f, 0xf9, 0x01, 0x98, 0x89, 0x5b, 0x15, 0x72, 0x64, 0xb2, 0xb5, 0x5a, + 0x34, 0x15, 0x14, 0xde, 0x11, 0x7b, 0x13, 0x9f, 0xb9, 0x4e, 0x1a, 0x42, 0xb8, 0x47, 0xc3, 0xee, + 0x48, 0xc6, 0xc7, 0x3a, 0x5e, 0xac, 0x77, 0xa0, 0x26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 0xfe, 0xea, + 0x37, 0x02, 0x72, 0x0f, 0x1a, 0xe9, 0xbb, 0x4f, 0xf9, 0x63, 0x71, 0x7f, 0x55, 0xdb, 0x3e, 0x7c, + 0xfd, 0x5f, 0x7f, 0xde, 0x36, 0x7e, 0x73, 0xb1, 0x6d, 0x7c, 0x79, 0xb1, 0x6d, 0x7c, 0x75, 0xb1, + 0x6d, 0xfc, 0xfe, 0x62, 0xdb, 0xf8, 0xd3, 0xc5, 0xb6, 0xf1, 0xdb, 0xbf, 0x6c, 0x1b, 0xa3, 0x1a, + 0xba, 0xff, 0xbb, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x7c, 0xbd, 0x95, 0x1c, 0x19, 0x00, + 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index 517369b13..ffa321836 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -49,6 +49,8 @@ message RequestFlush { message RequestInfo { string version = 1; + uint64 block_version = 2; + uint64 p2p_version = 3; } // nondeterministic @@ -129,9 +131,12 @@ message ResponseFlush { message ResponseInfo { string data = 1; + string version = 2; - int64 last_block_height = 3; - bytes last_block_app_hash = 4; + uint64 app_version = 3; + + int64 last_block_height = 4; + bytes last_block_app_hash = 5; } // nondeterministic diff --git a/consensus/replay.go b/consensus/replay.go index af6369c3b..bffab8d28 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -11,6 +11,7 @@ import ( "time" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/version" //auto "github.com/tendermint/tendermint/libs/autofile" cmn "github.com/tendermint/tendermint/libs/common" dbm "github.com/tendermint/tendermint/libs/db" @@ -19,7 +20,6 @@ import ( "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - "github.com/tendermint/tendermint/version" ) var crc32c = crc32.MakeTable(crc32.Castagnoli) @@ -227,7 +227,7 @@ func (h *Handshaker) NBlocks() int { func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error { // Handshake is done via ABCI Info on the query conn. - res, err := proxyApp.Query().InfoSync(abci.RequestInfo{Version: version.Version}) + res, err := proxyApp.Query().InfoSync(proxy.RequestInfo) if err != nil { return fmt.Errorf("Error calling Info: %v", err) } @@ -238,9 +238,15 @@ func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error { } appHash := res.LastBlockAppHash - h.logger.Info("ABCI Handshake", "appHeight", blockHeight, "appHash", fmt.Sprintf("%X", appHash)) + h.logger.Info("ABCI Handshake App Info", + "height", blockHeight, + "hash", fmt.Sprintf("%X", appHash), + "software-version", res.Version, + "protocol-version", res.AppVersion, + ) - // TODO: check app version. + // Set AppVersion on the state. + h.initialState.Version.Consensus.App = version.Protocol(res.AppVersion) // Replay blocks up to the latest in the blockstore. _, err = h.ReplayBlocks(h.initialState, appHash, blockHeight, proxyApp) diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 160e777c3..4e1fa2b77 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -20,6 +20,7 @@ import ( crypto "github.com/tendermint/tendermint/crypto" auto "github.com/tendermint/tendermint/libs/autofile" dbm "github.com/tendermint/tendermint/libs/db" + "github.com/tendermint/tendermint/version" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" @@ -337,7 +338,7 @@ func testHandshakeReplay(t *testing.T, nBlocks int, mode uint) { t.Fatalf(err.Error()) } - stateDB, state, store := stateAndStore(config, privVal.GetPubKey()) + stateDB, state, store := stateAndStore(config, privVal.GetPubKey(), kvstore.ProtocolVersion) store.chain = chain store.commits = commits @@ -352,7 +353,7 @@ func testHandshakeReplay(t *testing.T, nBlocks int, mode uint) { // run nBlocks against a new client to build up the app state. // use a throwaway tendermint state proxyApp := proxy.NewAppConns(clientCreator2) - stateDB, state, _ := stateAndStore(config, privVal.GetPubKey()) + stateDB, state, _ := stateAndStore(config, privVal.GetPubKey(), kvstore.ProtocolVersion) buildAppStateFromChain(proxyApp, stateDB, state, chain, nBlocks, mode) } @@ -442,7 +443,7 @@ func buildAppStateFromChain(proxyApp proxy.AppConns, stateDB dbm.DB, func buildTMStateFromChain(config *cfg.Config, stateDB dbm.DB, state sm.State, chain []*types.Block, mode uint) sm.State { // run the whole chain against this client to build up the tendermint state clientCreator := proxy.NewLocalClientCreator(kvstore.NewPersistentKVStoreApplication(path.Join(config.DBDir(), "1"))) - proxyApp := proxy.NewAppConns(clientCreator) // sm.NewHandshaker(config, state, store, ReplayLastBlock)) + proxyApp := proxy.NewAppConns(clientCreator) if err := proxyApp.Start(); err != nil { panic(err) } @@ -588,9 +589,10 @@ func readPieceFromWAL(msg *TimedWALMessage) interface{} { } // fresh state and mock store -func stateAndStore(config *cfg.Config, pubKey crypto.PubKey) (dbm.DB, sm.State, *mockBlockStore) { +func stateAndStore(config *cfg.Config, pubKey crypto.PubKey, appVersion version.Protocol) (dbm.DB, sm.State, *mockBlockStore) { stateDB := dbm.NewMemDB() state, _ := sm.MakeGenesisStateFromFile(config.GenesisFile()) + state.Version.Consensus.App = appVersion store := NewMockBlockStore(config, state.ConsensusParams) return stateDB, state, store } @@ -639,7 +641,7 @@ func TestInitChainUpdateValidators(t *testing.T) { config := ResetConfig("proxy_test_") privVal := privval.LoadFilePV(config.PrivValidatorFile()) - stateDB, state, store := stateAndStore(config, privVal.GetPubKey()) + stateDB, state, store := stateAndStore(config, privVal.GetPubKey(), 0x0) oldValAddr := state.Validators.Validators[0].Address diff --git a/consensus/wal_generator.go b/consensus/wal_generator.go index 980a44892..5ff597a52 100644 --- a/consensus/wal_generator.go +++ b/consensus/wal_generator.go @@ -38,7 +38,8 @@ func WALGenerateNBlocks(wr io.Writer, numBlocks int) (err error) { ///////////////////////////////////////////////////////////////////////////// // COPY PASTE FROM node.go WITH A FEW MODIFICATIONS - // NOTE: we can't import node package because of circular dependency + // NOTE: we can't import node package because of circular dependency. + // NOTE: we don't do handshake so need to set state.Version.Consensus.App directly. privValidatorFile := config.PrivValidatorFile() privValidator := privval.LoadOrGenFilePV(privValidatorFile) genDoc, err := types.GenesisDocFromFile(config.GenesisFile()) @@ -51,6 +52,7 @@ func WALGenerateNBlocks(wr io.Writer, numBlocks int) (err error) { if err != nil { return errors.Wrap(err, "failed to make genesis state") } + state.Version.Consensus.App = kvstore.ProtocolVersion blockStore := bc.NewBlockStore(blockStoreDB) proxyApp := proxy.NewAppConns(proxy.NewLocalClientCreator(app)) proxyApp.SetLogger(logger.With("module", "proxy")) diff --git a/docs/spec/abci/abci.md b/docs/spec/abci/abci.md index 54b7c899d..afd726174 100644 --- a/docs/spec/abci/abci.md +++ b/docs/spec/abci/abci.md @@ -134,10 +134,13 @@ Commit are included in the header of the next block. ### Info - **Request**: - - `Version (string)`: The Tendermint version + - `Version (string)`: The Tendermint software semantic version + - `BlockVersion (uint64)`: The Tendermint Block Protocol version + - `P2PVersion (uint64)`: The Tendermint P2P Protocol version - **Response**: - `Data (string)`: Some arbitrary information - - `Version (Version)`: Version information + - `Version (string)`: The application software semantic version + - `AppVersion (uint64)`: The application protocol version - `LastBlockHeight (int64)`: Latest block for which the app has called Commit - `LastBlockAppHash ([]byte)`: Latest result of Commit @@ -145,6 +148,7 @@ Commit are included in the header of the next block. - Return information about the application state. - Used to sync Tendermint with the application during a handshake that happens on startup. + - The returned `AppVersion` will be included in the Header of every block. - Tendermint expects `LastBlockAppHash` and `LastBlockHeight` to be updated during `Commit`, ensuring that `Commit` is never called twice for the same block height. diff --git a/node/node.go b/node/node.go index 97de24736..522f18e91 100644 --- a/node/node.go +++ b/node/node.go @@ -195,8 +195,8 @@ func NewNode(config *cfg.Config, return nil, fmt.Errorf("Error starting proxy app connections: %v", err) } - // Create the handshaker, which calls RequestInfo and replays any blocks - // as necessary to sync tendermint with the app. + // Create the handshaker, which calls RequestInfo, sets the AppVersion on the state, + // and replays any blocks as necessary to sync tendermint with the app. consensusLogger := logger.With("module", "consensus") handshaker := cs.NewHandshaker(stateDB, state, blockStore, genDoc) handshaker.SetLogger(consensusLogger) @@ -204,9 +204,12 @@ func NewNode(config *cfg.Config, return nil, fmt.Errorf("Error during handshake: %v", err) } - // reload the state (it may have been updated by the handshake) + // Reload the state. It will have the Version.Consensus.App set by the + // Handshake, and may have other modifications as well (ie. depending on + // what happened during block replay). state = sm.LoadState(stateDB) + // Ensure the state's block version matches that of the software. if state.Version.Consensus.Block != version.BlockProtocol { return nil, fmt.Errorf( "Block version of the software does not match that of the state.\n"+ @@ -359,7 +362,13 @@ func NewNode(config *cfg.Config, var ( p2pLogger = logger.With("module", "p2p") - nodeInfo = makeNodeInfo(config, nodeKey.ID(), txIndexer, genDoc.ChainID) + nodeInfo = makeNodeInfo( + config, + nodeKey.ID(), + txIndexer, + genDoc.ChainID, + p2p.ProtocolVersionWithApp(state.Version.Consensus.App), + ) ) // Setup Transport. @@ -764,13 +773,14 @@ func makeNodeInfo( nodeID p2p.ID, txIndexer txindex.TxIndexer, chainID string, + protocolVersion p2p.ProtocolVersion, ) p2p.NodeInfo { txIndexerStatus := "on" if _, ok := txIndexer.(*null.TxIndex); ok { txIndexerStatus = "off" } nodeInfo := p2p.DefaultNodeInfo{ - ProtocolVersion: p2p.InitProtocolVersion, + ProtocolVersion: protocolVersion, ID_: nodeID, Network: chainID, Version: version.TMCoreSemVer, diff --git a/node/node_test.go b/node/node_test.go index f4c1f6a16..3a33e6bbb 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -10,7 +10,11 @@ import ( "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/libs/log" + "github.com/tendermint/tendermint/p2p" + sm "github.com/tendermint/tendermint/state" + "github.com/tendermint/tendermint/version" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/types" @@ -91,3 +95,21 @@ func TestNodeDelayedStop(t *testing.T) { startTime := tmtime.Now() assert.Equal(t, true, startTime.After(n.GenesisDoc().GenesisTime)) } + +func TestNodeSetAppVersion(t *testing.T) { + config := cfg.ResetTestRoot("node_app_version_test") + + // create & start node + n, err := DefaultNewNode(config, log.TestingLogger()) + assert.NoError(t, err, "expected no err on DefaultNewNode") + + // default config uses the kvstore app + var appVersion version.Protocol = kvstore.ProtocolVersion + + // check version is set in state + state := sm.LoadState(n.stateDB) + assert.Equal(t, state.Version.Consensus.App, appVersion) + + // check version is set in node info + assert.Equal(t, n.nodeInfo.(p2p.DefaultNodeInfo).ProtocolVersion.App, appVersion) +} diff --git a/p2p/node_info.go b/p2p/node_info.go index 5874dc857..1d408eb68 100644 --- a/p2p/node_info.go +++ b/p2p/node_info.go @@ -49,10 +49,17 @@ type ProtocolVersion struct { App version.Protocol `json:"app"` } -var InitProtocolVersion = ProtocolVersion{ - P2P: version.P2PProtocol, - Block: version.BlockProtocol, - App: 0, +// InitProtocolVersion populates the Block and P2P versions, but not the App. +var InitProtocolVersion = ProtocolVersionWithApp(0) + +// ProtocolVersionWithApp returns a fully populated ProtocolVersion +// using the provided App version and the Block and P2P versions defined in the `version` package. +func ProtocolVersionWithApp(appVersion version.Protocol) ProtocolVersion { + return ProtocolVersion{ + P2P: version.P2PProtocol, + Block: version.BlockProtocol, + App: appVersion, + } } //------------------------------------------------------------- @@ -148,7 +155,7 @@ func (info DefaultNodeInfo) ValidateBasic() error { switch txIndex { case "", "on", "off": default: - return fmt.Errorf("info.Other.TxIndex should be either 'on' or 'off', got '%v'", txIndex) + return fmt.Errorf("info.Other.TxIndex should be either 'on', 'off', or empty string, got '%v'", txIndex) } // XXX: Should we be more strict about address formats? rpcAddr := other.RPCAddress diff --git a/proxy/app_conn_test.go b/proxy/app_conn_test.go index 5eadb032f..ca98f1be4 100644 --- a/proxy/app_conn_test.go +++ b/proxy/app_conn_test.go @@ -143,7 +143,7 @@ func TestInfo(t *testing.T) { proxy := NewAppConnTest(cli) t.Log("Connected") - resInfo, err := proxy.InfoSync(types.RequestInfo{Version: ""}) + resInfo, err := proxy.InfoSync(RequestInfo) if err != nil { t.Errorf("Unexpected error: %v", err) } diff --git a/proxy/version.go b/proxy/version.go new file mode 100644 index 000000000..fb506e659 --- /dev/null +++ b/proxy/version.go @@ -0,0 +1,15 @@ +package proxy + +import ( + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/version" +) + +// RequestInfo contains all the information for sending +// the abci.RequestInfo message during handshake with the app. +// It contains only compile-time version information. +var RequestInfo = abci.RequestInfo{ + Version: version.Version, + BlockVersion: version.BlockProtocol.Uint64(), + P2PVersion: version.P2PProtocol.Uint64(), +} diff --git a/rpc/client/mock/abci.go b/rpc/client/mock/abci.go index 3a0ed79cd..e63d22e0c 100644 --- a/rpc/client/mock/abci.go +++ b/rpc/client/mock/abci.go @@ -3,10 +3,10 @@ package mock import ( abci "github.com/tendermint/tendermint/abci/types" cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/rpc/client" ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/tendermint/tendermint/types" - "github.com/tendermint/tendermint/version" ) // ABCIApp will send all abci related request to the named app, @@ -23,7 +23,7 @@ var ( ) func (a ABCIApp) ABCIInfo() (*ctypes.ResultABCIInfo, error) { - return &ctypes.ResultABCIInfo{a.App.Info(abci.RequestInfo{Version: version.Version})}, nil + return &ctypes.ResultABCIInfo{a.App.Info(proxy.RequestInfo)}, nil } func (a ABCIApp) ABCIQuery(path string, data cmn.HexBytes) (*ctypes.ResultABCIQuery, error) { diff --git a/rpc/core/abci.go b/rpc/core/abci.go index 47219563c..2468a5f05 100644 --- a/rpc/core/abci.go +++ b/rpc/core/abci.go @@ -3,8 +3,8 @@ package core import ( abci "github.com/tendermint/tendermint/abci/types" cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/proxy" ctypes "github.com/tendermint/tendermint/rpc/core/types" - "github.com/tendermint/tendermint/version" ) // Query the application for some information. @@ -87,7 +87,7 @@ func ABCIQuery(path string, data cmn.HexBytes, height int64, prove bool) (*ctype // } // ``` func ABCIInfo() (*ctypes.ResultABCIInfo, error) { - resInfo, err := proxyAppQuery.InfoSync(abci.RequestInfo{Version: version.Version}) + resInfo, err := proxyAppQuery.InfoSync(proxy.RequestInfo) if err != nil { return nil, err } diff --git a/state/state.go b/state/state.go index aedb2b001..5c1b68a26 100644 --- a/state/state.go +++ b/state/state.go @@ -27,6 +27,10 @@ type Version struct { Software string } +// initStateVersion sets the Consensus.Block and Software versions, +// but leaves the Consensus.App version blank. +// The Consensus.App version will be set during the Handshake, once +// we hear from the app what protocol version it is running. var initStateVersion = Version{ Consensus: version.Consensus{ Block: version.BlockProtocol, diff --git a/version/version.go b/version/version.go index 5a089141f..19b3f3da7 100644 --- a/version/version.go +++ b/version/version.go @@ -28,6 +28,12 @@ const ( // Protocol is used for implementation agnostic versioning. type Protocol uint64 +// Uint64 returns the Protocol version as a uint64, +// eg. for compatibility with ABCI types. +func (p Protocol) Uint64() uint64 { + return uint64(p) +} + var ( // P2PProtocol versions all p2p behaviour and msgs. P2PProtocol Protocol = 4