diff --git a/abci/cmd/abci-cli/abci-cli.go b/abci/cmd/abci-cli/abci-cli.go index e5c9c7fec..20cf9a808 100644 --- a/abci/cmd/abci-cli/abci-cli.go +++ b/abci/cmd/abci-cli/abci-cli.go @@ -103,7 +103,7 @@ type response struct { type queryResponse struct { Key []byte Value []byte - Height int64 + Height uint64 ProofOps *crypto.ProofOps } diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 8b851ca9a..2bb8e165c 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -23,7 +23,7 @@ var ( type State struct { db dbm.DB Size int64 `json:"size"` - Height int64 `json:"height"` + Height uint64 `json:"height"` AppHash []byte `json:"app_hash"` } @@ -67,7 +67,7 @@ type Application struct { types.BaseApplication state State - RetainBlocks int64 // blocks to retain after commit (via ResponseCommit.RetainHeight) + RetainBlocks uint64 // blocks to retain after commit (via ResponseCommit.RetainHeight) } func NewApplication() *Application { diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index a52312a00..95c4ff3ee 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -96,7 +96,7 @@ func TestPersistentKVStoreInfo(t *testing.T) { } kvstore := NewPersistentKVStoreApplication(dir) InitKVStore(kvstore) - height := int64(0) + height := uint64(0) resInfo := kvstore.Info(types.RequestInfo{}) if resInfo.LastBlockHeight != height { @@ -104,7 +104,7 @@ func TestPersistentKVStoreInfo(t *testing.T) { } // make and apply block - height = int64(1) + height = uint64(1) hash := []byte("foo") header := tmproto.Header{ Height: height, @@ -194,7 +194,7 @@ func makeApplyBlock( diff []types.ValidatorUpdate, txs ...[]byte) { // make and apply block - height := int64(heightInt) + height := uint64(heightInt) hash := []byte("foo") header := tmproto.Header{ Height: height, diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 92e26de6b..e220f23e6 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -866,7 +866,7 @@ func (m *RequestDeliverTx) GetTx() []byte { } type RequestEndBlock struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` } func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} } @@ -902,7 +902,7 @@ func (m *RequestEndBlock) XXX_DiscardUnknown() { var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo -func (m *RequestEndBlock) GetHeight() int64 { +func (m *RequestEndBlock) GetHeight() uint64 { if m != nil { return m.Height } @@ -1541,7 +1541,7 @@ type ResponseInfo struct { // this is the software version of the application. TODO: remove? Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,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"` + LastBlockHeight uint64 `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"` } @@ -1599,7 +1599,7 @@ func (m *ResponseInfo) GetAppVersion() uint64 { return 0 } -func (m *ResponseInfo) GetLastBlockHeight() int64 { +func (m *ResponseInfo) GetLastBlockHeight() uint64 { if m != nil { return m.LastBlockHeight } @@ -1682,7 +1682,7 @@ type ResponseQuery struct { Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"` - Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"` } @@ -1768,7 +1768,7 @@ func (m *ResponseQuery) GetProofOps() *crypto.ProofOps { return nil } -func (m *ResponseQuery) GetHeight() int64 { +func (m *ResponseQuery) GetHeight() uint64 { if m != nil { return m.Height } @@ -2089,7 +2089,7 @@ func (m *ResponseEndBlock) GetEvents() []Event { type ResponseCommit struct { // reserve 1 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"` + RetainHeight uint64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"` } func (m *ResponseCommit) Reset() { *m = ResponseCommit{} } @@ -2132,7 +2132,7 @@ func (m *ResponseCommit) GetData() []byte { return nil } -func (m *ResponseCommit) GetRetainHeight() int64 { +func (m *ResponseCommit) GetRetainHeight() uint64 { if m != nil { return m.RetainHeight } @@ -2503,7 +2503,7 @@ func (m *EventAttribute) GetIndex() bool { // // One usage is indexing transaction results. type TxResult struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"` @@ -2542,7 +2542,7 @@ func (m *TxResult) XXX_DiscardUnknown() { var xxx_messageInfo_TxResult proto.InternalMessageInfo -func (m *TxResult) GetHeight() int64 { +func (m *TxResult) GetHeight() uint64 { if m != nil { return m.Height } @@ -2735,7 +2735,7 @@ type Evidence struct { // The offending validator Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"` // The height when the offense occurred - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` // The corresponding time where the offense occurred Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` // Total voting power of the validator set in case the ABCI application does @@ -2791,7 +2791,7 @@ func (m *Evidence) GetValidator() Validator { return Validator{} } -func (m *Evidence) GetHeight() int64 { +func (m *Evidence) GetHeight() uint64 { if m != nil { return m.Height } @@ -2938,169 +2938,169 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 2583 bytes of a gzipped FileDescriptorProto + // 2584 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0x1b, 0xc7, - 0x11, 0xc6, 0x1b, 0xd8, 0x26, 0x01, 0x82, 0x23, 0x5a, 0x86, 0x60, 0x89, 0x94, 0x57, 0x25, 0xc7, - 0x92, 0x6d, 0x32, 0xa6, 0x4a, 0x8a, 0x5c, 0xce, 0xc3, 0x04, 0x04, 0x05, 0xb4, 0x18, 0x92, 0x19, - 0x42, 0x72, 0x39, 0x89, 0xb5, 0x5e, 0x60, 0x87, 0xc0, 0x5a, 0xc0, 0xee, 0x1a, 0x3b, 0xa0, 0x48, - 0x1f, 0xf3, 0xb8, 0xa8, 0x72, 0xd0, 0x31, 0x17, 0x57, 0xe5, 0x1f, 0xe4, 0x9a, 0x53, 0x4e, 0x39, - 0xf8, 0x90, 0x54, 0xf9, 0x98, 0x93, 0x93, 0x92, 0x6e, 0xf9, 0x03, 0x39, 0xa5, 0x2a, 0x35, 0x8f, - 0x7d, 0x01, 0x58, 0x00, 0x8c, 0x73, 0xcb, 0x6d, 0xa6, 0xb7, 0xbb, 0x31, 0xd3, 0x33, 0xdd, 0xfd, - 0x75, 0x0f, 0xe0, 0x35, 0x4a, 0x2c, 0x83, 0x0c, 0x07, 0xa6, 0x45,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58, 0x60, 0x24, 0x94, 0x4c, 0x01, - 0x67, 0xf5, 0x08, 0x38, 0x53, 0xe6, 0xd8, 0x20, 0x06, 0x9d, 0x7d, 0x10, 0x46, 0x67, 0x10, 0x0b, - 0xf0, 0xe4, 0x79, 0x4f, 0x83, 0x67, 0xef, 0xf9, 0xf0, 0x6c, 0x29, 0x16, 0x5f, 0xca, 0x3d, 0x8c, - 0xe3, 0xb3, 0x83, 0x09, 0x7c, 0x26, 0xf0, 0xd4, 0x1b, 0xb1, 0x2a, 0xe6, 0x00, 0xb4, 0x83, 0x09, - 0x80, 0x56, 0x9c, 0xa3, 0x70, 0x0e, 0x42, 0xfb, 0xc5, 0x74, 0x84, 0x16, 0x8f, 0xa1, 0xe4, 0x32, - 0x17, 0x83, 0x68, 0x5a, 0x0c, 0x44, 0x5b, 0xe1, 0xea, 0xdf, 0x8a, 0x55, 0x7f, 0x7e, 0x8c, 0x76, - 0x83, 0x65, 0xc8, 0x31, 0x9f, 0x67, 0x51, 0x86, 0x0c, 0x87, 0xf6, 0x50, 0xa2, 0x2d, 0x31, 0x51, - 0xdf, 0x64, 0x39, 0x3b, 0xf0, 0xef, 0x19, 0x78, 0x8e, 0x47, 0xf3, 0x90, 0x4f, 0xab, 0x7f, 0x4c, - 0x06, 0xb2, 0x3c, 0xcd, 0x85, 0xf3, 0xbd, 0x22, 0xf3, 0x7d, 0x08, 0xe5, 0xa5, 0xa2, 0x28, 0x6f, - 0x03, 0x96, 0x58, 0x94, 0x1e, 0x03, 0x70, 0xba, 0xe3, 0x03, 0xb8, 0x9b, 0xb0, 0xca, 0xd3, 0xb0, - 0xc0, 0x82, 0x32, 0x34, 0x67, 0x78, 0x86, 0x59, 0x61, 0x1f, 0xc4, 0xe5, 0x14, 0x31, 0xfa, 0x1d, - 0xb8, 0x10, 0xe2, 0xf5, 0xa3, 0xbf, 0x40, 0x33, 0x65, 0x9f, 0x7b, 0x47, 0xa6, 0x81, 0x3f, 0x27, - 0x03, 0x0b, 0x05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x94, 0x4e, + 0xc4, 0x66, 0x3f, 0x88, 0x60, 0xb3, 0x62, 0x22, 0x30, 0x12, 0x4a, 0xa6, 0x80, 0xb3, 0x46, 0x0c, + 0x9c, 0x29, 0x33, 0x6c, 0x90, 0x80, 0xce, 0x3e, 0x88, 0xa2, 0x33, 0x48, 0x04, 0x78, 0xf2, 0xbc, + 0xa7, 0xc1, 0xb3, 0xf7, 0x02, 0x78, 0xb6, 0x98, 0x88, 0x2f, 0xe5, 0x1e, 0xc6, 0xf1, 0xd9, 0xfe, + 0x04, 0x3e, 0x13, 0x78, 0xea, 0x8d, 0x44, 0x15, 0x33, 0x00, 0xda, 0xfe, 0x04, 0x40, 0x2b, 0xcd, + 0x50, 0x38, 0x03, 0xa1, 0xfd, 0x62, 0x3a, 0x42, 0x4b, 0xc6, 0x50, 0x72, 0x99, 0xf3, 0x41, 0x34, + 0x2d, 0x01, 0xa2, 0x2d, 0x73, 0xf5, 0x6f, 0x25, 0xaa, 0x3f, 0x3f, 0x46, 0xbb, 0xc1, 0x32, 0xe4, + 0x98, 0xcf, 0xb3, 0x28, 0x43, 0x5c, 0xd7, 0x76, 0x25, 0xda, 0x12, 0x13, 0xf5, 0x4d, 0x96, 0xb3, + 0x43, 0xff, 0x3e, 0x03, 0xcf, 0xf1, 0x68, 0x1e, 0xf1, 0x69, 0xf5, 0x8f, 0xe9, 0x50, 0x96, 0xa7, + 0xb9, 0x68, 0xbe, 0x57, 0x64, 0xbe, 0x8f, 0xa0, 0xbc, 0x4c, 0x1c, 0xe5, 0xad, 0xc3, 0x22, 0x8b, + 0xd2, 0x63, 0x00, 0x4e, 0x77, 0x02, 0x00, 0x77, 0x13, 0x56, 0x78, 0x1a, 0x16, 0x58, 0x50, 0x86, + 0xe6, 0x1c, 0x67, 0x5b, 0x66, 0x1f, 0xc4, 0xe5, 0x14, 0x31, 0xfa, 0x1d, 0xb8, 0x10, 0xe1, 0x0d, + 0xa2, 0xbf, 0x40, 0x33, 0x95, 0x80, 0x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eb, 0x5f, 0xf9, 0x4c, + 0x04, 0xe2, 0xce, 0x67, 0xef, 0x35, 0x80, 0x9e, 0xee, 0x69, 0x4f, 0x75, 0x8b, 0x12, 0x43, 0x1a, + 0x3d, 0x42, 0x41, 0x35, 0x28, 0xb2, 0xd9, 0xc8, 0x23, 0x86, 0x44, 0xdb, 0xc1, 0x3c, 0xb2, 0xcf, + 0xc2, 0xb7, 0xdb, 0x67, 0xdc, 0xca, 0xc5, 0x71, 0x2b, 0xff, 0x26, 0x13, 0xba, 0x49, 0x88, 0x08, + 0xff, 0xff, 0xec, 0xf0, 0x5b, 0x5e, 0x27, 0xc6, 0xb3, 0x22, 0x3a, 0x84, 0x95, 0xc0, 0x4b, 0xb5, + 0x11, 0xf7, 0x5e, 0xff, 0xde, 0xcd, 0xeb, 0xe6, 0x95, 0xe3, 0x38, 0xd9, 0x43, 0x1f, 0xc3, 0xab, + 0x63, 0x21, 0x28, 0x50, 0x9d, 0x99, 0x37, 0x12, 0xbd, 0x12, 0x8f, 0x44, 0xbe, 0xea, 0xd0, 0x58, + 0xd9, 0x6f, 0xe9, 0x1c, 0x3b, 0xac, 0xf4, 0x88, 0x26, 0xf9, 0xa9, 0xc7, 0x7f, 0x0d, 0x4a, 0x2e, + 0xa1, 0xac, 0x1c, 0x8e, 0x14, 0x77, 0x39, 0xbc, 0x24, 0x88, 0xb2, 0x64, 0x3c, 0x80, 0x57, 0xa6, + 0x26, 0x7b, 0xf4, 0x3d, 0x50, 0x42, 0x9c, 0x90, 0x4e, 0xa8, 0x93, 0x02, 0xec, 0x1f, 0xf2, 0xaa, + 0x7f, 0x4a, 0x87, 0x2a, 0xe3, 0xd5, 0x44, 0x13, 0x16, 0x5c, 0xe2, 0x8d, 0x06, 0x02, 0xdf, 0x97, + 0xb7, 0xde, 0x99, 0x0f, 0x26, 0x30, 0xea, 0x68, 0x40, 0xb1, 0x14, 0x56, 0x1f, 0xc3, 0x82, 0xa0, + 0xa0, 0x45, 0x28, 0x3c, 0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 0x05, 0xb0, 0x36, 0x67, 0x23, + 0x8a, 0xe9, 0x8f, 0x23, 0xcb, 0xf9, 0x5e, 0x04, 0x6b, 0x73, 0xf6, 0xa5, 0xd0, 0x67, 0xb0, 0x32, + 0x89, 0xfc, 0xe6, 0x7f, 0x20, 0xac, 0x9d, 0xa3, 0x53, 0x85, 0x86, 0x80, 0xa6, 0x20, 0xc6, 0x73, + 0xbc, 0x17, 0xd6, 0xce, 0xd3, 0xb8, 0xaa, 0x37, 0xbf, 0x7a, 0xb1, 0x96, 0xfe, 0xfa, 0xc5, 0x5a, + 0xfa, 0x1f, 0x2f, 0xd6, 0xd2, 0xcf, 0x5f, 0xae, 0xa5, 0xbe, 0x7e, 0xb9, 0x96, 0xfa, 0xdb, 0xcb, + 0xb5, 0xd4, 0xcf, 0xde, 0xea, 0x99, 0xb4, 0x3f, 0xea, 0x6c, 0x74, 0xed, 0xe1, 0x66, 0xf4, 0x8f, + 0x08, 0xd3, 0xfe, 0x1c, 0xd1, 0x59, 0xe0, 0x49, 0xe5, 0xd6, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x11, 0xc8, 0x63, 0xb7, 0x3c, 0x21, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -8762,7 +8762,7 @@ func (m *RequestEndBlock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -10165,7 +10165,7 @@ func (m *ResponseInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastBlockHeight |= int64(b&0x7F) << shift + m.LastBlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -10628,7 +10628,7 @@ func (m *ResponseQuery) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -11543,7 +11543,7 @@ func (m *ResponseCommit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RetainHeight |= int64(b&0x7F) << shift + m.RetainHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -12383,7 +12383,7 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -12898,7 +12898,7 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/blockchain/v0/pool.go b/blockchain/v0/pool.go index bbb5bbf80..23be7dc20 100644 --- a/blockchain/v0/pool.go +++ b/blockchain/v0/pool.go @@ -62,7 +62,7 @@ var peerTimeout = 15 * time.Second // not const so we can override with tests // BlockRequest stores a block request identified by the block Height and the // PeerID responsible for delivering the block. type BlockRequest struct { - Height int64 + Height uint64 PeerID p2p.NodeID } @@ -73,11 +73,11 @@ type BlockPool struct { mtx tmsync.RWMutex // block requests - requesters map[int64]*bpRequester - height int64 // the lowest key in requesters. + requesters map[uint64]*bpRequester + height uint64 // the lowest key in requesters. // peers peers map[p2p.NodeID]*bpPeer - maxPeerHeight int64 // the biggest reported height + maxPeerHeight uint64 // the biggest reported height // atomic numPending int32 // number of requests pending assignment or block response @@ -88,11 +88,11 @@ type BlockPool struct { // NewBlockPool returns a new BlockPool with the height equal to start. Block // requests and errors will be sent to requestsCh and errorsCh accordingly. -func NewBlockPool(start int64, requestsCh chan<- BlockRequest, errorsCh chan<- peerError) *BlockPool { +func NewBlockPool(start uint64, requestsCh chan<- BlockRequest, errorsCh chan<- peerError) *BlockPool { bp := &BlockPool{ peers: make(map[p2p.NodeID]*bpPeer), - requesters: make(map[int64]*bpRequester), + requesters: make(map[uint64]*bpRequester), height: start, numPending: 0, @@ -165,7 +165,7 @@ func (pool *BlockPool) removeTimedoutPeers() { // GetStatus returns pool's height, numPending requests and the number of // requesters. -func (pool *BlockPool) GetStatus() (height int64, numPending int32, lenRequesters int) { +func (pool *BlockPool) GetStatus() (height uint64, numPending int32, lenRequesters int) { pool.mtx.RLock() defer pool.mtx.RUnlock() @@ -225,7 +225,7 @@ func (pool *BlockPool) PopRequest() { // RedoRequest invalidates the block at pool.height, // Remove the peer and redo request from others. // Returns the ID of the removed peer. -func (pool *BlockPool) RedoRequest(height int64) p2p.NodeID { +func (pool *BlockPool) RedoRequest(height uint64) p2p.NodeID { pool.mtx.Lock() defer pool.mtx.Unlock() @@ -250,7 +250,7 @@ func (pool *BlockPool) AddBlock(peerID p2p.NodeID, block *types.Block, blockSize "peer", peerID, "curHeight", pool.height, "blockHeight", block.Height) diff := pool.height - block.Height if diff < 0 { - diff *= -1 + // diff *= -1 //todo: what? } if diff > maxDiffBetweenCurrentAndReceivedBlockHeight { pool.sendError(errors.New("peer sent us a block we didn't expect with a height too far ahead/behind"), peerID) @@ -272,7 +272,7 @@ func (pool *BlockPool) AddBlock(peerID p2p.NodeID, block *types.Block, blockSize } // MaxPeerHeight returns the highest reported height. -func (pool *BlockPool) MaxPeerHeight() int64 { +func (pool *BlockPool) MaxPeerHeight() uint64 { pool.mtx.RLock() defer pool.mtx.RUnlock() return pool.maxPeerHeight @@ -287,7 +287,7 @@ func (pool *BlockPool) LastAdvance() time.Time { } // SetPeerRange sets the peer's alleged blockchain base and height. -func (pool *BlockPool) SetPeerRange(peerID p2p.NodeID, base int64, height int64) { +func (pool *BlockPool) SetPeerRange(peerID p2p.NodeID, base, height uint64) { pool.mtx.Lock() defer pool.mtx.Unlock() @@ -340,7 +340,7 @@ func (pool *BlockPool) removePeer(peerID p2p.NodeID) { // If no peers are left, maxPeerHeight is set to 0. func (pool *BlockPool) updateMaxPeerHeight() { - var max int64 + var max uint64 for _, peer := range pool.peers { if peer.height > max { max = peer.height @@ -351,7 +351,7 @@ func (pool *BlockPool) updateMaxPeerHeight() { // Pick an available peer with the given height available. // If no peers are available, returns nil. -func (pool *BlockPool) pickIncrAvailablePeer(height int64) *bpPeer { +func (pool *BlockPool) pickIncrAvailablePeer(height uint64) *bpPeer { pool.mtx.Lock() defer pool.mtx.Unlock() @@ -392,11 +392,11 @@ func (pool *BlockPool) makeNextRequester() { } } -func (pool *BlockPool) requestersLen() int64 { - return int64(len(pool.requesters)) +func (pool *BlockPool) requestersLen() uint64 { + return uint64(len(pool.requesters)) } -func (pool *BlockPool) sendRequest(height int64, peerID p2p.NodeID) { +func (pool *BlockPool) sendRequest(height uint64, peerID p2p.NodeID) { if !pool.IsRunning() { return } @@ -434,8 +434,8 @@ func (pool *BlockPool) debug() string { type bpPeer struct { didTimeout bool numPending int32 - height int64 - base int64 + height uint64 + base uint64 pool *BlockPool id p2p.NodeID recvMonitor *flow.Monitor @@ -445,7 +445,7 @@ type bpPeer struct { logger log.Logger } -func newBPPeer(pool *BlockPool, peerID p2p.NodeID, base int64, height int64) *bpPeer { +func newBPPeer(pool *BlockPool, peerID p2p.NodeID, base, height uint64) *bpPeer { peer := &bpPeer{ pool: pool, id: peerID, @@ -508,7 +508,7 @@ func (peer *bpPeer) onTimeout() { type bpRequester struct { service.BaseService pool *BlockPool - height int64 + height uint64 gotBlockCh chan struct{} redoCh chan p2p.NodeID // redo may send multitime, add peerId to identify repeat @@ -517,7 +517,7 @@ type bpRequester struct { block *types.Block } -func newBPRequester(pool *BlockPool, height int64) *bpRequester { +func newBPRequester(pool *BlockPool, height uint64) *bpRequester { bpr := &bpRequester{ pool: pool, height: height, diff --git a/blockchain/v0/pool_test.go b/blockchain/v0/pool_test.go index d02df0326..3be210025 100644 --- a/blockchain/v0/pool_test.go +++ b/blockchain/v0/pool_test.go @@ -20,8 +20,8 @@ func init() { type testPeer struct { id p2p.NodeID - base int64 - height int64 + base uint64 + height uint64 inputChan chan inputData // make sure each peer's data is sequential } @@ -72,14 +72,14 @@ func makePeers(numPeers int, minHeight, maxHeight int64) testPeers { if base > height { base = height } - peers[peerID] = testPeer{peerID, base, height, make(chan inputData, 10)} + peers[peerID] = testPeer{peerID, uint64(base), uint64(height), make(chan inputData, 10)} } return peers } func TestBlockPoolBasic(t *testing.T) { - start := int64(42) - peers := makePeers(10, start+1, 1000) + start := uint64(42) + peers := makePeers(10, int64(start+1), 1000) errorsCh := make(chan peerError, 1000) requestsCh := make(chan BlockRequest, 1000) pool := NewBlockPool(start, requestsCh, errorsCh) @@ -138,8 +138,8 @@ func TestBlockPoolBasic(t *testing.T) { } func TestBlockPoolTimeout(t *testing.T) { - start := int64(42) - peers := makePeers(10, start+1, 1000) + start := uint64(42) + peers := makePeers(10, int64(start+1), 1000) errorsCh := make(chan peerError, 1000) requestsCh := make(chan BlockRequest, 1000) pool := NewBlockPool(start, requestsCh, errorsCh) @@ -204,7 +204,7 @@ func TestBlockPoolRemovePeer(t *testing.T) { peers := make(testPeers, 10) for i := 0; i < 10; i++ { peerID := p2p.NodeID(fmt.Sprintf("%d", i+1)) - height := int64(i + 1) + height := uint64(i + 1) peers[peerID] = testPeer{peerID, 0, height, make(chan inputData)} } requestsCh := make(chan BlockRequest) diff --git a/blockchain/v0/reactor_test.go b/blockchain/v0/reactor_test.go index 372c689fb..1969f9228 100644 --- a/blockchain/v0/reactor_test.go +++ b/blockchain/v0/reactor_test.go @@ -43,7 +43,7 @@ func setup( t *testing.T, genDoc *types.GenesisDoc, privVals []types.PrivValidator, - maxBlockHeight int64, + maxBlockHeight uint64, chBuf uint, ) *reactorTestSuite { t.Helper() @@ -77,7 +77,7 @@ func setup( ) require.NoError(t, stateStore.Save(state)) - for blockHeight := int64(1); blockHeight <= maxBlockHeight; blockHeight++ { + for blockHeight := uint64(1); blockHeight <= maxBlockHeight; blockHeight++ { lastCommit := types.NewCommit(blockHeight-1, 0, types.BlockID{}, nil) if blockHeight > 1 { diff --git a/libs/math/math.go b/libs/math/math.go index cf567a97a..6fe720d68 100644 --- a/libs/math/math.go +++ b/libs/math/math.go @@ -7,6 +7,13 @@ func MaxInt64(a, b int64) int64 { return b } +func MaxUint64(a, b uint64) uint64 { + if a > b { + return a + } + return b +} + func MaxInt(a, b int) int { if a > b { return a @@ -23,6 +30,13 @@ func MinInt64(a, b int64) int64 { return b } +func MinUint64(a, b uint64) uint64 { + if a < b { + return a + } + return b +} + func MinInt(a, b int) int { if a < b { return a diff --git a/libs/math/safemath.go b/libs/math/safemath.go index ff7f0908f..030551c28 100644 --- a/libs/math/safemath.go +++ b/libs/math/safemath.go @@ -33,11 +33,9 @@ func SafeSubInt32(a, b int32) int32 { // SafeConvertInt32 takes a int and checks if it overflows // If there is an overflow this will panic -func SafeConvertInt32(a int64) int32 { +func SafeConvertInt32(a uint64) int32 { if a > math.MaxInt32 { panic(ErrOverflowInt32) - } else if a < math.MinInt32 { - panic(ErrOverflowInt32) } return int32(a) } diff --git a/light/rpc/client.go b/light/rpc/client.go index b6a5c929c..2f28afda7 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -198,7 +198,7 @@ func (c *Client) ConsensusState(ctx context.Context) (*ctypes.ResultConsensusSta return c.next.ConsensusState(ctx) } -func (c *Client) ConsensusParams(ctx context.Context, height *int64) (*ctypes.ResultConsensusParams, error) { +func (c *Client) ConsensusParams(ctx context.Context, height *uint64) (*ctypes.ResultConsensusParams, error) { res, err := c.next.ConsensusParams(ctx, height) if err != nil { return nil, err diff --git a/privval/file.go b/privval/file.go index 4482e05f2..c65591ed0 100644 --- a/privval/file.go +++ b/privval/file.go @@ -75,7 +75,7 @@ func (pvKey FilePVKey) Save() { // FilePVLastSignState stores the mutable part of PrivValidator. type FilePVLastSignState struct { - Height int64 `json:"height"` + Height uint64 `json:"height"` Round int32 `json:"round"` Step int8 `json:"step"` Signature []byte `json:"signature,omitempty"` @@ -91,7 +91,7 @@ type FilePVLastSignState struct { // it returns true if the HRS matches the arguments and the SignBytes are not empty (indicating // we have already signed for this HRS, and can reuse the existing signature). // It panics if the HRS matches the arguments, there's a SignBytes, but no Signature. -func (lss *FilePVLastSignState) CheckHRS(height int64, round int32, step int8) (bool, error) { +func (lss *FilePVLastSignState) CheckHRS(height uint64, round int32, step int8) (bool, error) { if lss.Height > height { return false, fmt.Errorf("height regression. Got %v, last height %v", height, lss.Height) @@ -395,7 +395,7 @@ func (pv *FilePV) signProposal(chainID string, proposal *tmproto.Proposal) error } // Persist height/round/step and signature -func (pv *FilePV) saveSigned(height int64, round int32, step int8, +func (pv *FilePV) saveSigned(height uint64, round int32, step int8, signBytes []byte, sig []byte) { pv.LastSignState.Height = height diff --git a/privval/file_test.go b/privval/file_test.go index 1d9c65fa3..590c42320 100644 --- a/privval/file_test.go +++ b/privval/file_test.go @@ -31,7 +31,7 @@ func TestGenLoadValidator(t *testing.T) { privVal, err := GenFilePV(tempKeyFile.Name(), tempStateFile.Name(), "") require.NoError(t, err) - height := int64(100) + height := uint64(100) privVal.LastSignState.Height = height privVal.Save() addr := privVal.GetAddress() @@ -55,7 +55,7 @@ func TestResetValidator(t *testing.T) { assert.Equal(t, privVal.LastSignState, emptyState) // test vote - height, round := int64(10), int32(1) + height, round := uint64(10), int32(1) voteType := tmproto.PrevoteType randBytes := tmrand.Bytes(tmhash.Size) blockID := types.BlockID{Hash: randBytes, PartSetHeader: types.PartSetHeader{}} @@ -179,7 +179,7 @@ func TestSignVote(t *testing.T) { block2 := types.BlockID{Hash: randbytes2, PartSetHeader: types.PartSetHeader{Total: 10, Hash: randbytes2}} - height, round := int64(10), int32(1) + height, round := uint64(10), int32(1) voteType := tmproto.PrevoteType // sign a vote for first time @@ -232,7 +232,7 @@ func TestSignProposal(t *testing.T) { PartSetHeader: types.PartSetHeader{Total: 5, Hash: randbytes}} block2 := types.BlockID{Hash: randbytes2, PartSetHeader: types.PartSetHeader{Total: 10, Hash: randbytes2}} - height, round := int64(10), int32(1) + height, round := uint64(10), int32(1) // sign a proposal for first time proposal := newProposal(height, round, block1) @@ -275,7 +275,7 @@ func TestDifferByTimestamp(t *testing.T) { require.NoError(t, err) randbytes := tmrand.Bytes(tmhash.Size) block1 := types.BlockID{Hash: randbytes, PartSetHeader: types.PartSetHeader{Total: 5, Hash: randbytes}} - height, round := int64(10), int32(1) + height, round := uint64(10), int32(1) chainID := "mychainid" // test proposal @@ -327,7 +327,7 @@ func TestDifferByTimestamp(t *testing.T) { } } -func newVote(addr types.Address, idx int32, height int64, round int32, +func newVote(addr types.Address, idx int32, height uint64, round int32, typ tmproto.SignedMsgType, blockID types.BlockID) *types.Vote { return &types.Vote{ ValidatorAddress: addr, @@ -340,7 +340,7 @@ func newVote(addr types.Address, idx int32, height int64, round int32, } } -func newProposal(height int64, round int32, blockID types.BlockID) *types.Proposal { +func newProposal(height uint64, round int32, blockID types.BlockID) *types.Proposal { return &types.Proposal{ Height: height, Round: round, diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 4e9c2820d..26f04abd6 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -90,7 +90,7 @@ message RequestDeliverTx { } message RequestEndBlock { - int64 height = 1; + uint64 height = 1; } message RequestCommit {} @@ -160,8 +160,8 @@ message ResponseInfo { string version = 2; uint64 app_version = 3; - int64 last_block_height = 4; - bytes last_block_app_hash = 5; + uint64 last_block_height = 4; + bytes last_block_app_hash = 5; } message ResponseInitChain { @@ -179,7 +179,7 @@ message ResponseQuery { bytes key = 6; bytes value = 7; tendermint.crypto.ProofOps proof_ops = 8; - int64 height = 9; + uint64 height = 9; string codespace = 10; } @@ -222,8 +222,8 @@ message ResponseEndBlock { message ResponseCommit { // reserve 1 - bytes data = 2; - int64 retain_height = 3; + bytes data = 2; + uint64 retain_height = 3; } message ResponseListSnapshots { @@ -292,7 +292,7 @@ message EventAttribute { // // One usage is indexing transaction results. message TxResult { - int64 height = 1; + uint64 height = 1; uint32 index = 2; bytes tx = 3; ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; @@ -331,7 +331,7 @@ message Evidence { // The offending validator Validator validator = 2 [(gogoproto.nullable) = false]; // The height when the offense occurred - int64 height = 3; + uint64 height = 3; // The corresponding time where the offense occurred google.protobuf.Timestamp time = 4 [ (gogoproto.nullable) = false, diff --git a/proto/tendermint/blockchain/message_test.go b/proto/tendermint/blockchain/message_test.go index 37a0df217..7f1542d0a 100644 --- a/proto/tendermint/blockchain/message_test.go +++ b/proto/tendermint/blockchain/message_test.go @@ -15,12 +15,11 @@ import ( func TestBlockRequest_Validate(t *testing.T) { testCases := []struct { testName string - requestHeight int64 + requestHeight uint64 expectErr bool }{ {"Valid Request Message", 0, false}, {"Valid Request Message", 1, false}, - {"Invalid Request Message", -1, true}, } for _, tc := range testCases { @@ -37,12 +36,11 @@ func TestBlockRequest_Validate(t *testing.T) { func TestNoBlockResponse_Validate(t *testing.T) { testCases := []struct { testName string - nonResponseHeight int64 + nonResponseHeight uint64 expectErr bool }{ {"Valid Non-Response Message", 0, false}, {"Valid Non-Response Message", 1, false}, - {"Invalid Non-Response Message", -1, true}, } for _, tc := range testCases { @@ -65,12 +63,11 @@ func TestStatusRequest_Validate(t *testing.T) { func TestStatusResponse_Validate(t *testing.T) { testCases := []struct { testName string - responseHeight int64 + responseHeight uint64 expectErr bool }{ {"Valid Response Message", 0, false}, {"Valid Response Message", 1, false}, - {"Invalid Response Message", -1, true}, } for _, tc := range testCases { @@ -86,7 +83,7 @@ func TestStatusResponse_Validate(t *testing.T) { // nolint:lll func TestBlockchainMessageVectors(t *testing.T) { - block := types.MakeBlock(int64(3), []types.Tx{types.Tx("Hello World")}, nil, nil) + block := types.MakeBlock(uint64(3), []types.Tx{types.Tx("Hello World")}, nil, nil) block.Version.Block = 11 // overwrite updated protocol version bpb, err := block.ToProto() diff --git a/proto/tendermint/blockchain/types.pb.go b/proto/tendermint/blockchain/types.pb.go index bc160b230..70ad44624 100644 --- a/proto/tendermint/blockchain/types.pb.go +++ b/proto/tendermint/blockchain/types.pb.go @@ -25,7 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // BlockRequest requests a block for a specific height type BlockRequest struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` } func (m *BlockRequest) Reset() { *m = BlockRequest{} } @@ -61,7 +61,7 @@ func (m *BlockRequest) XXX_DiscardUnknown() { var xxx_messageInfo_BlockRequest proto.InternalMessageInfo -func (m *BlockRequest) GetHeight() int64 { +func (m *BlockRequest) GetHeight() uint64 { if m != nil { return m.Height } @@ -70,7 +70,7 @@ func (m *BlockRequest) GetHeight() int64 { // NoBlockResponse informs the node that the peer does not have block at the requested height type NoBlockResponse struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` } func (m *NoBlockResponse) Reset() { *m = NoBlockResponse{} } @@ -106,7 +106,7 @@ func (m *NoBlockResponse) XXX_DiscardUnknown() { var xxx_messageInfo_NoBlockResponse proto.InternalMessageInfo -func (m *NoBlockResponse) GetHeight() int64 { +func (m *NoBlockResponse) GetHeight() uint64 { if m != nil { return m.Height } @@ -197,8 +197,8 @@ var xxx_messageInfo_StatusRequest proto.InternalMessageInfo // StatusResponse is a peer response to inform their status. type StatusResponse struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Base int64 `protobuf:"varint,2,opt,name=base,proto3" json:"base,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Base uint64 `protobuf:"varint,2,opt,name=base,proto3" json:"base,omitempty"` } func (m *StatusResponse) Reset() { *m = StatusResponse{} } @@ -234,14 +234,14 @@ func (m *StatusResponse) XXX_DiscardUnknown() { var xxx_messageInfo_StatusResponse proto.InternalMessageInfo -func (m *StatusResponse) GetHeight() int64 { +func (m *StatusResponse) GetHeight() uint64 { if m != nil { return m.Height } return 0 } -func (m *StatusResponse) GetBase() int64 { +func (m *StatusResponse) GetBase() uint64 { if m != nil { return m.Base } @@ -385,29 +385,29 @@ func init() { proto.RegisterFile("tendermint/blockchain/types.proto", fileDescri var fileDescriptor_2927480384e78499 = []byte{ // 370 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xc1, 0x4e, 0xfa, 0x40, - 0x10, 0xc6, 0xdb, 0x7f, 0x81, 0x7f, 0x32, 0x50, 0x1a, 0x9b, 0xa8, 0xc4, 0x98, 0x46, 0xab, 0x12, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4f, 0x4f, 0xf2, 0x40, + 0x10, 0xc6, 0xdb, 0x97, 0x3f, 0x6f, 0x32, 0x50, 0x1a, 0x9b, 0xa8, 0xc4, 0x98, 0x46, 0xab, 0x12, 0x3d, 0xd8, 0x26, 0x78, 0x25, 0x1e, 0x38, 0x11, 0x13, 0x8c, 0xa9, 0xc6, 0x83, 0x17, 0xd2, 0xe2, - 0x86, 0x36, 0x4a, 0x17, 0xd9, 0xed, 0xc1, 0xb7, 0xf0, 0x19, 0x7c, 0x1a, 0x8f, 0x1c, 0x3d, 0x1a, - 0x78, 0x11, 0xc3, 0x6c, 0x29, 0x4b, 0x03, 0xf5, 0xb6, 0x3b, 0xfd, 0xe6, 0x37, 0xdf, 0x7e, 0x99, - 0xc2, 0x31, 0x27, 0xf1, 0x33, 0x99, 0x8c, 0xa2, 0x98, 0xbb, 0xc1, 0x2b, 0x1d, 0xbc, 0x0c, 0x42, - 0x3f, 0x8a, 0x5d, 0xfe, 0x3e, 0x26, 0xcc, 0x19, 0x4f, 0x28, 0xa7, 0xe6, 0xee, 0x4a, 0xe2, 0xac, - 0x24, 0x07, 0x87, 0x52, 0x27, 0xca, 0x45, 0xbf, 0x68, 0xb2, 0x9b, 0x50, 0xeb, 0x2c, 0xae, 0x1e, - 0x79, 0x4b, 0x08, 0xe3, 0x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d, 0x06, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x14, 0x6c, 0xf6, 0x3f, 0x03, 0x00, 0x00, } @@ -889,7 +889,7 @@ func (m *BlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -958,7 +958,7 @@ func (m *NoBlockResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1163,7 +1163,7 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1182,7 +1182,7 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Base |= int64(b&0x7F) << shift + m.Base |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/proto/tendermint/blockchain/types.proto b/proto/tendermint/blockchain/types.proto index f5c143cf5..5da642887 100644 --- a/proto/tendermint/blockchain/types.proto +++ b/proto/tendermint/blockchain/types.proto @@ -7,12 +7,12 @@ import "tendermint/types/block.proto"; // BlockRequest requests a block for a specific height message BlockRequest { - int64 height = 1; + uint64 height = 1; } // NoBlockResponse informs the node that the peer does not have block at the requested height message NoBlockResponse { - int64 height = 1; + uint64 height = 1; } // BlockResponse returns block to the requested @@ -26,8 +26,8 @@ message StatusRequest { // StatusResponse is a peer response to inform their status. message StatusResponse { - int64 height = 1; - int64 base = 2; + uint64 height = 1; + uint64 base = 2; } message Message { diff --git a/proto/tendermint/state/types.pb.go b/proto/tendermint/state/types.pb.go index 85f38cada..50703788f 100644 --- a/proto/tendermint/state/types.pb.go +++ b/proto/tendermint/state/types.pb.go @@ -96,7 +96,7 @@ func (m *ABCIResponses) GetBeginBlock() *types.ResponseBeginBlock { // ValidatorsInfo represents the latest validator set, or the last height it changed type ValidatorsInfo struct { ValidatorSet *types1.ValidatorSet `protobuf:"bytes,1,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` - LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` + LastHeightChanged uint64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` } func (m *ValidatorsInfo) Reset() { *m = ValidatorsInfo{} } @@ -139,7 +139,7 @@ func (m *ValidatorsInfo) GetValidatorSet() *types1.ValidatorSet { return nil } -func (m *ValidatorsInfo) GetLastHeightChanged() int64 { +func (m *ValidatorsInfo) GetLastHeightChanged() uint64 { if m != nil { return m.LastHeightChanged } @@ -149,7 +149,7 @@ func (m *ValidatorsInfo) GetLastHeightChanged() int64 { // ConsensusParamsInfo represents the latest consensus params, or the last height it changed type ConsensusParamsInfo struct { ConsensusParams types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` - LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` + LastHeightChanged uint64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` } func (m *ConsensusParamsInfo) Reset() { *m = ConsensusParamsInfo{} } @@ -192,7 +192,7 @@ func (m *ConsensusParamsInfo) GetConsensusParams() types1.ConsensusParams { return types1.ConsensusParams{} } -func (m *ConsensusParamsInfo) GetLastHeightChanged() int64 { +func (m *ConsensusParamsInfo) GetLastHeightChanged() uint64 { if m != nil { return m.LastHeightChanged } @@ -255,9 +255,9 @@ type State struct { Version Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` // immutable ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - InitialHeight int64 `protobuf:"varint,14,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` + InitialHeight uint64 `protobuf:"varint,14,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` + LastBlockHeight uint64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` LastBlockID types1.BlockID `protobuf:"bytes,4,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` LastBlockTime time.Time `protobuf:"bytes,5,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"` // LastValidators is used to validate block.LastCommit. @@ -269,11 +269,11 @@ type State struct { NextValidators *types1.ValidatorSet `protobuf:"bytes,6,opt,name=next_validators,json=nextValidators,proto3" json:"next_validators,omitempty"` Validators *types1.ValidatorSet `protobuf:"bytes,7,opt,name=validators,proto3" json:"validators,omitempty"` LastValidators *types1.ValidatorSet `protobuf:"bytes,8,opt,name=last_validators,json=lastValidators,proto3" json:"last_validators,omitempty"` - LastHeightValidatorsChanged int64 `protobuf:"varint,9,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"` + LastHeightValidatorsChanged uint64 `protobuf:"varint,9,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"` // Consensus parameters used for validating blocks. // Changes returned by EndBlock and updated after Commit. ConsensusParams types1.ConsensusParams `protobuf:"bytes,10,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` - LastHeightConsensusParamsChanged int64 `protobuf:"varint,11,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"` + LastHeightConsensusParamsChanged uint64 `protobuf:"varint,11,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"` // Merkle root of the results from executing prev block LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` // the latest AppHash we've received from calling abci.Commit() @@ -327,14 +327,14 @@ func (m *State) GetChainID() string { return "" } -func (m *State) GetInitialHeight() int64 { +func (m *State) GetInitialHeight() uint64 { if m != nil { return m.InitialHeight } return 0 } -func (m *State) GetLastBlockHeight() int64 { +func (m *State) GetLastBlockHeight() uint64 { if m != nil { return m.LastBlockHeight } @@ -376,7 +376,7 @@ func (m *State) GetLastValidators() *types1.ValidatorSet { return nil } -func (m *State) GetLastHeightValidatorsChanged() int64 { +func (m *State) GetLastHeightValidatorsChanged() uint64 { if m != nil { return m.LastHeightValidatorsChanged } @@ -390,7 +390,7 @@ func (m *State) GetConsensusParams() types1.ConsensusParams { return types1.ConsensusParams{} } -func (m *State) GetLastHeightConsensusParamsChanged() int64 { +func (m *State) GetLastHeightConsensusParamsChanged() uint64 { if m != nil { return m.LastHeightConsensusParamsChanged } @@ -422,55 +422,55 @@ func init() { func init() { proto.RegisterFile("tendermint/state/types.proto", fileDescriptor_ccfacf933f22bf93) } var fileDescriptor_ccfacf933f22bf93 = []byte{ - // 763 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0x6e, 0xe8, 0xb6, 0xb6, 0xce, 0xda, 0x0e, 0x8f, 0x43, 0xd6, 0xb1, 0xb4, 0x2b, 0x3f, 0x34, - 0x71, 0x48, 0xa5, 0x71, 0x40, 0x5c, 0x26, 0x2d, 0x2d, 0x62, 0x95, 0x26, 0x04, 0xd9, 0xb4, 0x03, - 0x97, 0xc8, 0x6d, 0xbc, 0x24, 0xa2, 0x4d, 0xa2, 0xd8, 0x2d, 0xe3, 0x0f, 0xe0, 0xbe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 0xe1, 0xd7, 0x92, 0x44, 0xca, 0xf7, 0x33, 0xc2, 0xd2, 0x24, 0x23, 0x5d, 0xa0, 0xcb, 0xdd, - 0x9c, 0xeb, 0x65, 0x8d, 0x5d, 0xe1, 0x8f, 0xb5, 0x9d, 0x37, 0x76, 0x9e, 0x9d, 0xb4, 0xf8, 0x5f, - 0xc7, 0x0c, 0xfc, 0xe7, 0x98, 0xbd, 0x03, 0x4f, 0xe7, 0xc6, 0x6c, 0x41, 0x3f, 0xb3, 0xa7, 0x72, - 0x7b, 0x2d, 0x69, 0xee, 0xe6, 0x85, 0x52, 0x8f, 0x69, 0x23, 0xc6, 0x98, 0x4c, 0x46, 0x94, 0xd8, - 0x1e, 0x22, 0x9e, 0xb6, 0xde, 0x52, 0xf6, 0xd6, 0x45, 0x23, 0x5a, 0x22, 0x7e, 0x84, 0x88, 0x07, - 0xb7, 0x40, 0x19, 0x45, 0x91, 0xa0, 0x54, 0x39, 0xa5, 0x84, 0xa2, 0x88, 0x41, 0xe6, 0x87, 0xab, - 0x99, 0xae, 0x5c, 0xcf, 0x74, 0xe5, 0xd7, 0x4c, 0x57, 0x2e, 0x6f, 0xf5, 0xc2, 0xf5, 0xad, 0x5e, - 0xf8, 0x7e, 0xab, 0x17, 0x3e, 0xbe, 0x72, 0x7d, 0xea, 0x4d, 0x06, 0xc6, 0x30, 0x1c, 0x77, 0xe4, - 0x3f, 0x25, 0x5f, 0x8a, 0x8f, 0x6d, 0xf1, 0x4b, 0x1c, 0xac, 0xf1, 0xf8, 0xcb, 0x3f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xa5, 0x17, 0xac, 0x23, 0x2d, 0x07, 0x00, 0x00, + // 766 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcb, 0x6e, 0xdb, 0x38, + 0x14, 0xb5, 0x26, 0x0f, 0xdb, 0x54, 0x6c, 0x67, 0x98, 0x59, 0x28, 0xce, 0x44, 0x76, 0x3c, 0x0f, + 0x04, 0xb3, 0x90, 0x81, 0xcc, 0x62, 0x30, 0x9b, 0x00, 0x91, 0x5d, 0x34, 0x06, 0x82, 0xa2, 0x55, + 0x82, 0x2c, 0xba, 0x11, 0x68, 0x8b, 0x91, 0x84, 0xda, 0x92, 0x20, 0xd2, 0x6e, 0xfa, 0x01, 0xdd, + 0x67, 0xdb, 0x3f, 0xca, 0x32, 0xcb, 0xa2, 0x8b, 0xb4, 0x75, 0x7e, 0xa4, 0xe0, 0x43, 0x12, 0x6d, + 0x37, 0x40, 0x8a, 0xee, 0xc8, 0x7b, 0xce, 0x3d, 0x3c, 0xbc, 0xbc, 0x17, 0x04, 0xbf, 0x53, 0x1c, + 0x79, 0x38, 0x9d, 0x84, 0x11, 0xed, 0x12, 0x8a, 0x28, 0xee, 0xd2, 0x77, 0x09, 0x26, 0x56, 0x92, + 0xc6, 0x34, 0x86, 0xdb, 0x05, 0x6a, 0x71, 0xb4, 0xf9, 0x9b, 0x1f, 0xfb, 0x31, 0x07, 0xbb, 0x6c, + 0x25, 0x78, 0xcd, 0x3d, 0x45, 0x05, 0x0d, 0x47, 0xa1, 0x2a, 0xd2, 0x54, 0x8f, 0xe0, 0xf1, 0x05, + 0xb4, 0xbd, 0x82, 0xce, 0xd0, 0x38, 0xf4, 0x10, 0x8d, 0x53, 0xc9, 0xd8, 0x5f, 0x61, 0x24, 0x28, + 0x45, 0x93, 0x4c, 0xc0, 0x54, 0xe0, 0x19, 0x4e, 0x49, 0x18, 0x47, 0x0b, 0x07, 0xb4, 0xfc, 0x38, + 0xf6, 0xc7, 0xb8, 0xcb, 0x77, 0xc3, 0xe9, 0x55, 0x97, 0x86, 0x13, 0x4c, 0x28, 0x9a, 0x24, 0x82, + 0xd0, 0xf9, 0xa4, 0x81, 0xda, 0x89, 0xdd, 0x1b, 0x38, 0x98, 0x24, 0x71, 0x44, 0x30, 0x81, 0x3d, + 0xa0, 0x7b,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x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x0b, 0x1f, 0xd0, 0x2d, 0x07, 0x00, 0x00, } func (m *ABCIResponses) Marshal() (dAtA []byte, err error) { @@ -1163,7 +1163,7 @@ func (m *ValidatorsInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastHeightChanged |= int64(b&0x7F) << shift + m.LastHeightChanged |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1265,7 +1265,7 @@ func (m *ConsensusParamsInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastHeightChanged |= int64(b&0x7F) << shift + m.LastHeightChanged |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1514,7 +1514,7 @@ func (m *State) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastBlockHeight |= int64(b&0x7F) << shift + m.LastBlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1707,7 +1707,7 @@ func (m *State) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastHeightValidatorsChanged |= int64(b&0x7F) << shift + m.LastHeightValidatorsChanged |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1759,7 +1759,7 @@ func (m *State) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastHeightConsensusParamsChanged |= int64(b&0x7F) << shift + m.LastHeightConsensusParamsChanged |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1846,7 +1846,7 @@ func (m *State) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.InitialHeight |= int64(b&0x7F) << shift + m.InitialHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/proto/tendermint/state/types.proto b/proto/tendermint/state/types.proto index 919da91e5..3b63e690b 100644 --- a/proto/tendermint/state/types.proto +++ b/proto/tendermint/state/types.proto @@ -23,13 +23,13 @@ message ABCIResponses { // ValidatorsInfo represents the latest validator set, or the last height it changed message ValidatorsInfo { tendermint.types.ValidatorSet validator_set = 1; - int64 last_height_changed = 2; + uint64 last_height_changed = 2; } // ConsensusParamsInfo represents the latest consensus params, or the last height it changed message ConsensusParamsInfo { tendermint.types.ConsensusParams consensus_params = 1 [(gogoproto.nullable) = false]; - int64 last_height_changed = 2; + uint64 last_height_changed = 2; } message Version { @@ -42,10 +42,10 @@ message State { // immutable string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 initial_height = 14; + uint64 initial_height = 14; // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - int64 last_block_height = 3; + uint64 last_block_height = 3; tendermint.types.BlockID last_block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; google.protobuf.Timestamp last_block_time = 5 @@ -60,12 +60,12 @@ message State { tendermint.types.ValidatorSet next_validators = 6; tendermint.types.ValidatorSet validators = 7; tendermint.types.ValidatorSet last_validators = 8; - int64 last_height_validators_changed = 9; + uint64 last_height_validators_changed = 9; // Consensus parameters used for validating blocks. // Changes returned by EndBlock and updated after Commit. tendermint.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false]; - int64 last_height_consensus_params_changed = 11; + uint64 last_height_consensus_params_changed = 11; // Merkle root of the results from executing prev block bytes last_results_hash = 12; diff --git a/proto/tendermint/types/canonical.pb.go b/proto/tendermint/types/canonical.pb.go index 709831043..716583875 100644 --- a/proto/tendermint/types/canonical.pb.go +++ b/proto/tendermint/types/canonical.pb.go @@ -134,7 +134,7 @@ func (m *CanonicalPartSetHeader) GetHash() []byte { type CanonicalProposal struct { Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` Round int64 `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"` POLRound int64 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` BlockID *CanonicalBlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` @@ -182,7 +182,7 @@ func (m *CanonicalProposal) GetType() SignedMsgType { return UnknownType } -func (m *CanonicalProposal) GetHeight() int64 { +func (m *CanonicalProposal) GetHeight() uint64 { if m != nil { return m.Height } @@ -226,7 +226,7 @@ func (m *CanonicalProposal) GetChainID() string { type CanonicalVote struct { Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` Round int64 `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"` BlockID *CanonicalBlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` @@ -273,7 +273,7 @@ func (m *CanonicalVote) GetType() SignedMsgType { return UnknownType } -func (m *CanonicalVote) GetHeight() int64 { +func (m *CanonicalVote) GetHeight() uint64 { if m != nil { return m.Height } @@ -318,38 +318,38 @@ func init() { func init() { proto.RegisterFile("tendermint/types/canonical.proto", fileDescriptor_8d1a1a84ff7267ed) } var fileDescriptor_8d1a1a84ff7267ed = []byte{ - // 487 bytes of a gzipped FileDescriptorProto + // 489 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xce, 0xa5, 0x4e, 0xe2, 0x5c, 0x1b, 0x08, 0xa7, 0xaa, 0xb2, 0x22, 0x64, 0x5b, 0x1e, 0x90, + 0x18, 0xce, 0xa5, 0x8e, 0xe3, 0x5c, 0x1b, 0x08, 0x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0x26, 0xed, 0x9d, 0x66, 0xb1, 0xd9, + 0x53, 0xc6, 0xb9, 0x7f, 0x30, 0x6e, 0xbd, 0x89, 0xf0, 0xb0, 0x5e, 0xda, 0xfd, 0x75, 0x82, 0xfb, + 0x8a, 0x60, 0x12, 0xa3, 0x10, 0x0e, 0xb6, 0x6b, 0x34, 0x75, 0x45, 0x36, 0xf6, 0x9b, 0x45, 0xfb, + 0x9b, 0x45, 0xfb, 0x57, 0x1b, 0x44, 0x68, 0x48, 0xdf, 0x6f, 0xbf, 0xdb, 0x00, 0xb7, 0xdf, 0xd0, + 0x33, 0x68, 0x44, 0x29, 0xc9, 0x0a, 0xa9, 0xa7, 0xef, 0x00, 0x6f, 0xd0, 0xcc, 0x3a, 0x97, 0x35, + 0x39, 0x4b, 0x35, 0x27, 0xb1, 0xfb, 0xa5, 0x0b, 0x87, 0x5b, 0x59, 0xd7, 0x4c, 0xd0, 0xff, 0xe1, + 0xeb, 0xae, 0x59, 0xda, 0xbf, 0x34, 0xab, 0xf7, 0xf7, 0x66, 0xe9, 0xbf, 0x37, 0x2b, 0x7c, 0x7f, + 0x57, 0x5b, 0xe0, 0xbe, 0xb6, 0xc0, 0x8f, 0xda, 0x02, 0xb7, 0x2b, 0xab, 0x73, 0xbf, 0xb2, 0x3a, + 0x5f, 0x57, 0x56, 0xe7, 0xc3, 0x8b, 0x24, 0x13, 0xe9, 0x62, 0xe6, 0x47, 0x6c, 0x1e, 0xec, 0x1e, + 0x6c, 0x1b, 0x36, 0x87, 0xfd, 0xf0, 0x98, 0x67, 0xba, 0xaa, 0x9f, 0xfd, 0x0c, 0x00, 0x00, 0xff, + 0xff, 0xa3, 0x25, 0x8a, 0xd0, 0x31, 0x04, 0x00, 0x00, } func (m *CanonicalBlockID) Marshal() (dAtA []byte, err error) { @@ -949,7 +949,7 @@ func (m *CanonicalProposal) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.Height = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + m.Height = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 case 3: if wireType != 1 { @@ -1158,7 +1158,7 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.Height = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + m.Height = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 case 3: if wireType != 1 { diff --git a/proto/tendermint/types/canonical.proto b/proto/tendermint/types/canonical.proto index e88fd6ffe..ca993f8d7 100644 --- a/proto/tendermint/types/canonical.proto +++ b/proto/tendermint/types/canonical.proto @@ -19,7 +19,7 @@ message CanonicalPartSetHeader { message CanonicalProposal { SignedMsgType type = 1; // type alias for byte - sfixed64 height = 2; // canonicalization requires fixed size encoding here + fixed64 height = 2; // canonicalization requires fixed size encoding here sfixed64 round = 3; // canonicalization requires fixed size encoding here int64 pol_round = 4 [(gogoproto.customname) = "POLRound"]; CanonicalBlockID block_id = 5 [(gogoproto.customname) = "BlockID"]; @@ -29,7 +29,7 @@ message CanonicalProposal { message CanonicalVote { SignedMsgType type = 1; // type alias for byte - sfixed64 height = 2; // canonicalization requires fixed size encoding here + fixed64 height = 2; // canonicalization requires fixed size encoding here sfixed64 round = 3; // canonicalization requires fixed size encoding here CanonicalBlockID block_id = 4 [(gogoproto.customname) = "BlockID"]; google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; diff --git a/proto/tendermint/types/evidence.pb.go b/proto/tendermint/types/evidence.pb.go index daab3dc34..463790368 100644 --- a/proto/tendermint/types/evidence.pb.go +++ b/proto/tendermint/types/evidence.pb.go @@ -192,7 +192,7 @@ func (m *DuplicateVoteEvidence) GetTimestamp() time.Time { // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. type LightClientAttackEvidence struct { ConflictingBlock *LightBlock `protobuf:"bytes,1,opt,name=conflicting_block,json=conflictingBlock,proto3" json:"conflicting_block,omitempty"` - CommonHeight int64 `protobuf:"varint,2,opt,name=common_height,json=commonHeight,proto3" json:"common_height,omitempty"` + CommonHeight uint64 `protobuf:"varint,2,opt,name=common_height,json=commonHeight,proto3" json:"common_height,omitempty"` ByzantineValidators []*Validator `protobuf:"bytes,3,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators,omitempty"` TotalVotingPower int64 `protobuf:"varint,4,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` @@ -238,7 +238,7 @@ func (m *LightClientAttackEvidence) GetConflictingBlock() *LightBlock { return nil } -func (m *LightClientAttackEvidence) GetCommonHeight() int64 { +func (m *LightClientAttackEvidence) GetCommonHeight() uint64 { if m != nil { return m.CommonHeight } @@ -346,14 +346,14 @@ var fileDescriptor_6825fabc78e0a168 = []byte{ 0x96, 0x0d, 0xbf, 0xef, 0xa0, 0xa3, 0x5a, 0x53, 0xf1, 0x7b, 0xf4, 0xc0, 0x13, 0xfc, 0x22, 0x64, 0x9e, 0xec, 0xdb, 0x0d, 0x85, 0x77, 0x99, 0x3b, 0xd4, 0xab, 0x79, 0x39, 0x56, 0xca, 0xd8, 0xed, 0x0d, 0x99, 0x8c, 0xe0, 0xa7, 0xe8, 0xae, 0x27, 0xa2, 0x48, 0x70, 0x67, 0x42, 0x53, 0x4e, 0x3a, - 0xa7, 0xd9, 0xfb, 0x59, 0xf0, 0x4c, 0xc6, 0xf0, 0x07, 0x74, 0xe0, 0x5e, 0x7d, 0x23, 0x1c, 0x18, - 0xa7, 0x4e, 0x39, 0x6d, 0xd2, 0xd1, 0x06, 0xda, 0x68, 0xef, 0xe4, 0xc9, 0x16, 0x97, 0x0b, 0xc6, - 0x7e, 0x58, 0x0a, 0xcb, 0x58, 0x52, 0x63, 0x7c, 0xa3, 0xc6, 0xf8, 0x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0xc0, 0x60, 0x32, 0x73, 0x0d, 0x4f, 0x44, 0xe6, 0xe6, 0xf5, 0x5e, 0x3f, 0x66, 0x5f, 0x91, 0xdb, + 0x57, 0xdf, 0xdd, 0x95, 0xf1, 0x97, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x2e, 0xb9, 0x43, 0x9d, 0x04, 0x00, 0x00, } @@ -1112,7 +1112,7 @@ func (m *LightClientAttackEvidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CommonHeight |= int64(b&0x7F) << shift + m.CommonHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto index 451b8dca3..800591e32 100644 --- a/proto/tendermint/types/evidence.proto +++ b/proto/tendermint/types/evidence.proto @@ -27,7 +27,7 @@ message DuplicateVoteEvidence { // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. message LightClientAttackEvidence { tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; + uint64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; int64 total_voting_power = 4; google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index 73090558e..6dce10923 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -266,7 +266,7 @@ type Header struct { // basic block info Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` // prev block info LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` @@ -331,7 +331,7 @@ func (m *Header) GetChainID() string { return "" } -func (m *Header) GetHeight() int64 { +func (m *Header) GetHeight() uint64 { if m != nil { return m.Height } @@ -467,7 +467,7 @@ func (m *Data) GetTxs() [][]byte { // consensus. type Vote struct { Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` @@ -516,7 +516,7 @@ func (m *Vote) GetType() SignedMsgType { return UnknownType } -func (m *Vote) GetHeight() int64 { +func (m *Vote) GetHeight() uint64 { if m != nil { return m.Height } @@ -567,7 +567,7 @@ func (m *Vote) GetSignature() []byte { // Commit contains the evidence that a block was committed by a set of validators. type Commit struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"` @@ -606,7 +606,7 @@ func (m *Commit) XXX_DiscardUnknown() { var xxx_messageInfo_Commit proto.InternalMessageInfo -func (m *Commit) GetHeight() int64 { +func (m *Commit) GetHeight() uint64 { if m != nil { return m.Height } @@ -705,7 +705,7 @@ func (m *CommitSig) GetSignature() []byte { type Proposal struct { Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"` @@ -753,7 +753,7 @@ func (m *Proposal) GetType() SignedMsgType { return UnknownType } -func (m *Proposal) GetHeight() int64 { +func (m *Proposal) GetHeight() uint64 { if m != nil { return m.Height } @@ -1049,90 +1049,90 @@ func init() { func init() { proto.RegisterFile("tendermint/types/types.proto", fileDescriptor_d3a6e55e2345de56) } var fileDescriptor_d3a6e55e2345de56 = []byte{ - // 1314 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x9b, 0xd8, 0x7e, 0xb6, 0x13, 0x67, 0x95, 0xb6, 0xae, 0xdb, 0x38, 0x2b, 0x23, - 0x20, 0x2d, 0x68, 0x53, 0x52, 0xc4, 0x9f, 0x03, 0x07, 0xdb, 0x49, 0x5b, 0xab, 0x89, 0x63, 0xd6, - 0x6e, 0x11, 0x5c, 0x56, 0x6b, 0xef, 0xd4, 0x5e, 0xba, 0xde, 0x59, 0xed, 0x8c, 0x43, 0xd2, 0x4f, - 0x80, 0x72, 0xea, 0x89, 0x5b, 0x4e, 0x70, 0xe0, 0xce, 0x17, 0x40, 0x9c, 0x7a, 0xec, 0x0d, 0x2e, - 0x14, 0x94, 0x4a, 0x88, 0x8f, 0x81, 0xe6, 0x8f, 0xd7, 0xeb, 0x38, 0x86, 0xaa, 0xaa, 0xb8, 0x58, - 0x3b, 0xef, 0xfd, 0xde, 0xcc, 0x7b, 0xbf, 0xf7, 0x9b, 0x3f, 0x86, 0x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, 0x6e, 0xbe, 0xc7, 0x3a, 0x70, 0x0d, - 0x32, 0x8e, 0x4d, 0x6d, 0x01, 0x49, 0x71, 0x48, 0x9a, 0x19, 0xb8, 0xf3, 0x5d, 0x58, 0x89, 0x54, - 0x47, 0x04, 0x24, 0x2d, 0x66, 0x99, 0x98, 0x39, 0xf0, 0x16, 0xac, 0xf9, 0xe8, 0x88, 0x5a, 0xe7, - 0xd1, 0x19, 0x8e, 0xd6, 0x98, 0xef, 0xe1, 0x74, 0xc4, 0xdb, 0xb0, 0xdc, 0x1b, 0x93, 0x2f, 0xb0, - 0xc0, 0xb1, 0xf9, 0xc8, 0xca, 0x61, 0x57, 0x21, 0x6d, 0x07, 0x81, 0x00, 0x64, 0x39, 0x20, 0x65, - 0x07, 0x01, 0x77, 0xdd, 0x84, 0x55, 0x5e, 0x63, 0x88, 0xc8, 0xc8, 0xa3, 0x72, 0x92, 0x1c, 0xc7, - 0xac, 0x30, 0x87, 0x29, 0xec, 0x1c, 0xfb, 0x16, 0xe4, 0xd1, 0xa1, 0xeb, 0x20, 0xbf, 0x87, 0x04, - 0x2e, 0xcf, 0x71, 0xb9, 0xb1, 0x91, 0x83, 0x6e, 0x40, 0x21, 0x08, 0x71, 0x80, 0x09, 0x0a, 0x2d, - 0xdb, 0x71, 0x42, 0x44, 0x48, 0x71, 0x59, 0xcc, 0x37, 0xb6, 0x57, 0x85, 0xb9, 0x52, 0x04, 0x75, - 0xc7, 0xa6, 0xb6, 0x56, 0x80, 0x24, 0x3d, 0x22, 0x45, 0x45, 0x4f, 0x6e, 0xe6, 0x4c, 0xf6, 0x59, - 0xf9, 0x3b, 0x01, 0xea, 0x43, 0x4c, 0x91, 0x76, 0x1b, 0x54, 0xd6, 0x26, 0xae, 0xbe, 0xe5, 0x8b, - 0xf4, 0xdc, 0x76, 0xfb, 0x3e, 0x72, 0xf6, 0x49, 0xbf, 0x73, 0x1c, 0x20, 0x93, 0x83, 0x63, 0x72, - 0x4a, 0x4c, 0xc9,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c4, 0xd1, 0xb7, 0xe0, 0xea, 0x05, 0xe8, 0xa8, 0xb0, 0xd5, 0x93, 0x53, - 0x3d, 0xdf, 0x0a, 0x91, 0xd8, 0x3f, 0x3c, 0xc2, 0x80, 0xe2, 0x6c, 0xc4, 0x41, 0xeb, 0xa0, 0x5d, - 0xdd, 0x2b, 0xe8, 0xa5, 0xc2, 0xc9, 0xa9, 0x9e, 0x1b, 0x1f, 0x86, 0x0c, 0x3f, 0xa9, 0xac, 0xf6, - 0xf9, 0xb3, 0xb3, 0xb2, 0xf2, 0xfc, 0xac, 0xac, 0xfc, 0x79, 0x56, 0x56, 0x9e, 0xbe, 0x2c, 0x2f, - 0x3c, 0x7f, 0x59, 0x5e, 0xf8, 0xed, 0x65, 0x79, 0xe1, 0xab, 0x8f, 0xfb, 0x2e, 0x1d, 0x8c, 0xba, - 0x46, 0x0f, 0x0f, 0xb7, 0xe2, 0x7f, 0x09, 0x26, 0x9f, 0xe2, 0xaf, 0xc9, 0xf9, 0xbf, 0x0b, 0xdd, - 0x25, 0x6e, 0xbf, 0xfd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x78, 0x43, 0xdf, 0xef, 0x0c, - 0x00, 0x00, + // 1316 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x36, 0x25, 0x5a, 0x3f, 0x23, 0xc9, 0x96, 0x09, 0x27, 0x51, 0x94, 0x58, 0x26, 0x54, 0xb4, + 0x75, 0xd2, 0x82, 0x4e, 0x9d, 0xa2, 0x3f, 0x87, 0x1e, 0x24, 0xd9, 0x49, 0x84, 0xd8, 0xb2, 0x4a, + 0x29, 0x29, 0xda, 0x0b, 0x41, 0x89, 0x1b, 0x89, 0x0d, 0x45, 0x12, 0xe4, 0xca, 0xb5, 0xf3, 0x04, + 0x85, 0x4f, 0x39, 0xf5, 0xe6, 0x53, 0x7b, 0xe8, 0xbd, 0x2f, 0x50, 0xf4, 0x94, 0x63, 0x6e, 0xed, + 0xa5, 0x69, 0xe1, 0x00, 0x45, 0x1f, 0xa3, 0xd8, 0xd9, 0x15, 0x45, 0x59, 0x76, 0x1b, 0x04, 0x41, + 0x2f, 0x02, 0x77, 0xe6, 0x9b, 0xd9, 0x99, 0x6f, 0x3e, 0xee, 0x52, 0x70, 0x9d, 0x12, 0xd7, 0x22, + 0xc1, 0xc8, 0x76, 0xe9, 0x26, 0x3d, 0xf2, 0x49, 0xc8, 0x7f, 0x35, 0x3f, 0xf0, 0xa8, 0xa7, 0x14, + 0xa7, 0x5e, 0x0d, 0xed, 0xe5, 0xd5, 0x81, 0x37, 0xf0, 0xd0, 0xb9, 0xc9, 0x9e, 0x38, 0xae, 0xbc, + 0x3e, 0xf0, 0xbc, 0x81, 0x43, 0x36, 0x71, 0xd5, 0x1b, 0x3f, 0xda, 0xa4, 0xf6, 0x88, 0x84, 0xd4, + 0x1c, 0xf9, 0x02, 0xb0, 0x16, 0xdb, 0xa6, 0x1f, 0x1c, 0xf9, 0xd4, 0x63, 0x58, 0xef, 0x91, 0x70, + 0x57, 0x62, 0xee, 0x03, 0x12, 0x84, 0xb6, 0xe7, 0xc6, 0xeb, 0x28, 0xab, 0x73, 0x55, 0x1e, 0x98, + 0x8e, 0x6d, 0x99, 0xd4, 0x0b, 0x38, 0xa2, 0xfa, 0x29, 0x14, 0xda, 0x66, 0x40, 0x3b, 0x84, 0xde, + 0x23, 0xa6, 0x45, 0x02, 0x65, 0x15, 0x16, 0xa9, 0x47, 0x4d, 0xa7, 0x24, 0xa9, 0xd2, 0x46, 0x41, + 0xe7, 0x0b, 0x45, 0x01, 0x79, 0x68, 0x86, 0xc3, 0x52, 0x42, 0x95, 0x36, 0xf2, 0x3a, 0x3e, 0x57, + 0x87, 0x20, 0xb3, 0x50, 0x16, 0x61, 0xbb, 0x16, 0x39, 0x9c, 0x44, 0xe0,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21, 0x35, 0x7a, 0x8c, 0x36, 0xb6, 0xfd, 0x22, 0xa6, 0xb8, 0x3a, 0x4f, 0x88, + 0x20, 0x56, 0x94, 0x9e, 0x63, 0x51, 0xdc, 0x64, 0x29, 0x1b, 0x50, 0xc4, 0x24, 0x7d, 0x6f, 0x34, + 0xb2, 0xa9, 0x81, 0xbc, 0xa7, 0x90, 0xf7, 0x25, 0x66, 0x6f, 0xa0, 0xf9, 0x1e, 0x9b, 0xc0, 0x35, + 0xc8, 0x5a, 0x26, 0x35, 0x39, 0x24, 0x8d, 0x90, 0x0c, 0x33, 0xa0, 0xf3, 0x5d, 0x58, 0x8e, 0x54, + 0x17, 0x72, 0x48, 0x86, 0x67, 0x99, 0x9a, 0x11, 0x78, 0x0b, 0x56, 0x5d, 0x72, 0x48, 0x8d, 0xb3, + 0xe8, 0x2c, 0xa2, 0x15, 0xe6, 0x7b, 0x38, 0x1b, 0xf1, 0x36, 0x2c, 0xf5, 0x27, 0xe4, 0x73, 0x2c, + 0x20, 0xb6, 0x10, 0x59, 0x11, 0x76, 0x15, 0x32, 0xa6, 0xef, 0x73, 0x40, 0x0e, 0x01, 0x69, 0xd3, + 0xf7, 0xd1, 0x75, 0x13, 0x56, 0xb0, 0xc7, 0x80, 0x84, 0x63, 0x87, 0x8a, 0x24, 0x79, 0xc4, 0x2c, + 0x33, 0x87, 0xce, 0xed, 0x88, 0x7d, 0x0b, 0x0a, 0xe4, 0xc0, 0xb6, 0x88, 0xdb, 0x27, 0x1c, 0x57, + 0x40, 0x5c, 0x7e, 0x62, 0x44, 0xd0, 0x0d, 0x28, 0xfa, 0x81, 0xe7, 0x7b, 0x21, 0x09, 0x0c, 0xd3, + 0xb2, 0x02, 0x12, 0x86, 0xa5, 0x25, 0x9e, 0x6f, 0x62, 0xaf, 0x71, 0x73, 0xb5, 0x04, 0xf2, 0xb6, + 0x49, 0x4d, 0xa5, 0x08, 0x49, 0x7a, 0x18, 0x96, 0x24, 0x35, 0xb9, 0x91, 0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0x5c, 0xe9, + 0x34, 0xef, 0xb6, 0x76, 0xb6, 0x8d, 0xbd, 0xce, 0x5d, 0xa3, 0xfb, 0x65, 0x7b, 0x27, 0xd6, 0xdd, + 0xf2, 0xf1, 0x89, 0x9a, 0x13, 0x2d, 0x5d, 0x84, 0x6e, 0xeb, 0x3b, 0x0f, 0xf7, 0xbb, 0x3b, 0x45, + 0x89, 0xa3, 0xdb, 0x01, 0x39, 0xf0, 0x28, 0x41, 0xf4, 0x2d, 0xb8, 0x7a, 0x0e, 0x3a, 0x6a, 0x6c, + 0xe5, 0xf8, 0x44, 0x2d, 0xb4, 0x03, 0xc2, 0xdf, 0x1f, 0x8c, 0xd0, 0xa0, 0x34, 0x1f, 0xb1, 0xdf, + 0xde, 0xef, 0xd4, 0x76, 0x8b, 0x6a, 0xb9, 0x78, 0x7c, 0xa2, 0xe6, 0x27, 0x87, 0x21, 0xc3, 0x4f, + 0x3b, 0xab, 0x7f, 0xfe, 0xec, 0xb4, 0x22, 0x3d, 0x3f, 0xad, 0x48, 0x7f, 0x9e, 0x56, 0xa4, 0xa7, + 0x2f, 0x2b, 0x0b, 0xcf, 0x5f, 0x56, 0x16, 0x7e, 0x7b, 0x59, 0x59, 0xf8, 0xea, 0xe3, 0x81, 0x4d, + 0x87, 0xe3, 0x9e, 0xd6, 0xf7, 0x46, 0x9b, 0xf1, 0xbf, 0x04, 0xd3, 0x47, 0xfe, 0xd7, 0xe4, 0xec, + 0xdf, 0x85, 0x5e, 0x0a, 0xed, 0xb7, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xff, 0x38, 0xe4, + 0xef, 0x0c, 0x00, 0x00, } func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { @@ -2643,7 +2643,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3185,7 +3185,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3426,7 +3426,7 @@ func (m *Commit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3770,7 +3770,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.Height |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 8d4f00972..9322bf9d6 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -59,7 +59,7 @@ message Header { // basic block info tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; + uint64 height = 3; google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // prev block info @@ -93,7 +93,7 @@ message Data { // consensus. message Vote { SignedMsgType type = 1; - int64 height = 2; + uint64 height = 2; int32 round = 3; BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. @@ -106,7 +106,7 @@ message Vote { // Commit contains the evidence that a block was committed by a set of validators. message Commit { - int64 height = 1; + uint64 height = 1; int32 round = 2; BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; @@ -123,7 +123,7 @@ message CommitSig { message Proposal { SignedMsgType type = 1; - int64 height = 2; + uint64 height = 2; int32 round = 3; int32 pol_round = 4; BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; diff --git a/rpc/client/http/http.go b/rpc/client/http/http.go index 8fc0c7a91..87fa24898 100644 --- a/rpc/client/http/http.go +++ b/rpc/client/http/http.go @@ -348,7 +348,7 @@ func (c *baseRPCClient) ConsensusState(ctx context.Context) (*ctypes.ResultConse func (c *baseRPCClient) ConsensusParams( ctx context.Context, - height *int64, + height *uint64, ) (*ctypes.ResultConsensusParams, error) { result := new(ctypes.ResultConsensusParams) params := make(map[string]interface{}) diff --git a/rpc/client/interface.go b/rpc/client/interface.go index c6ff0fee2..0a59debcc 100644 --- a/rpc/client/interface.go +++ b/rpc/client/interface.go @@ -91,7 +91,7 @@ type NetworkClient interface { NetInfo(context.Context) (*ctypes.ResultNetInfo, error) DumpConsensusState(context.Context) (*ctypes.ResultDumpConsensusState, error) ConsensusState(context.Context) (*ctypes.ResultConsensusState, error) - ConsensusParams(ctx context.Context, height *int64) (*ctypes.ResultConsensusParams, error) + ConsensusParams(ctx context.Context, height *uint64) (*ctypes.ResultConsensusParams, error) Health(context.Context) (*ctypes.ResultHealth, error) } diff --git a/rpc/core/blocks.go b/rpc/core/blocks.go index c5b2d4928..5c937404d 100644 --- a/rpc/core/blocks.go +++ b/rpc/core/blocks.go @@ -19,8 +19,8 @@ import ( // order (highest first). // // More: https://docs.tendermint.com/master/rpc/#/Info/blockchain -func BlockchainInfo(ctx *rpctypes.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error) { - const limit int64 = 20 +func BlockchainInfo(ctx *rpctypes.Context, minHeight, maxHeight uint64) (*ctypes.ResultBlockchainInfo, error) { + const limit uint64 = 20 var err error minHeight, maxHeight, err = filterMinMax( @@ -50,7 +50,7 @@ func BlockchainInfo(ctx *rpctypes.Context, minHeight, maxHeight int64) (*ctypes. // error if either min or max are negative or min > max // if 0, use blockstore base for min, latest block height for max // enforce limit. -func filterMinMax(base, height, min, max, limit int64) (int64, int64, error) { +func filterMinMax(base, height, min, max, limit uint64) (uint64, uint64, error) { // filter negatives if min < 0 || max < 0 { return min, max, fmt.Errorf("heights must be non-negative") @@ -65,14 +65,14 @@ func filterMinMax(base, height, min, max, limit int64) (int64, int64, error) { } // limit max to the height - max = tmmath.MinInt64(height, max) + max = tmmath.MinUint64(height, max) // limit min to the base - min = tmmath.MaxInt64(base, min) + min = tmmath.MaxUint64(base, min) // limit min to within `limit` of max // so the total number of blocks returned will be `limit` - min = tmmath.MaxInt64(min, max-limit+1) + min = tmmath.MaxUint64(min, max-limit+1) if min > max { return min, max, fmt.Errorf("min height %d can't be greater than max height %d", min, max) @@ -83,7 +83,7 @@ func filterMinMax(base, height, min, max, limit int64) (int64, int64, error) { // Block gets block at a given height. // If no height is provided, it will fetch the latest block. // More: https://docs.tendermint.com/master/rpc/#/Info/block -func Block(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlock, error) { +func Block(ctx *rpctypes.Context, heightPtr *uint64) (*ctypes.ResultBlock, error) { height, err := getHeight(env.BlockStore.Height(), heightPtr) if err != nil { return nil, err @@ -112,7 +112,7 @@ func BlockByHash(ctx *rpctypes.Context, hash []byte) (*ctypes.ResultBlock, error // Commit gets block commit at a given height. // If no height is provided, it will fetch the commit for the latest block. // More: https://docs.tendermint.com/master/rpc/#/Info/commit -func Commit(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultCommit, error) { +func Commit(ctx *rpctypes.Context, heightPtr *uint64) (*ctypes.ResultCommit, error) { height, err := getHeight(env.BlockStore.Height(), heightPtr) if err != nil { return nil, err @@ -143,7 +143,7 @@ func Commit(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultCommit, erro // Thus response.results.deliver_tx[5] is the results of executing // getBlock(h).Txs[5] // More: https://docs.tendermint.com/master/rpc/#/Info/block_results -func BlockResults(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlockResults, error) { +func BlockResults(ctx *rpctypes.Context, heightPtr *uint64) (*ctypes.ResultBlockResults, error) { height, err := getHeight(env.BlockStore.Height(), heightPtr) if err != nil { return nil, err diff --git a/rpc/core/blocks_test.go b/rpc/core/blocks_test.go index 161978d7b..ac5807c5d 100644 --- a/rpc/core/blocks_test.go +++ b/rpc/core/blocks_test.go @@ -19,9 +19,9 @@ import ( func TestBlockchainInfo(t *testing.T) { cases := []struct { - min, max int64 - base, height int64 - limit int64 + min, max uint64 + base, height uint64 + limit uint64 resultLength int64 wantErr bool }{ @@ -35,9 +35,6 @@ func TestBlockchainInfo(t *testing.T) { // negative {1, 10, 0, 14, 10, 10, false}, // control - {-1, 10, 0, 14, 10, 0, true}, - {1, -10, 0, 14, 10, 0, true}, - {-9223372036854775808, -9223372036854775788, 0, 100, 20, 0, true}, // check base {1, 1, 1, 1, 1, 1, false}, @@ -87,11 +84,10 @@ func TestBlockResults(t *testing.T) { env.BlockStore = mockBlockStore{height: 100} testCases := []struct { - height int64 + height uint64 wantErr bool wantRes *ctypes.ResultBlockResults }{ - {-1, true, nil}, {0, true, nil}, {101, true, nil}, {100, false, &ctypes.ResultBlockResults{ @@ -116,19 +112,19 @@ func TestBlockResults(t *testing.T) { } type mockBlockStore struct { - height int64 + height uint64 } -func (mockBlockStore) Base() int64 { return 1 } -func (store mockBlockStore) Height() int64 { return store.height } -func (store mockBlockStore) Size() int64 { return store.height } -func (mockBlockStore) LoadBaseMeta() *types.BlockMeta { return nil } -func (mockBlockStore) LoadBlockMeta(height int64) *types.BlockMeta { return nil } -func (mockBlockStore) LoadBlock(height int64) *types.Block { return nil } -func (mockBlockStore) LoadBlockByHash(hash []byte) *types.Block { return nil } -func (mockBlockStore) LoadBlockPart(height int64, index int) *types.Part { return nil } -func (mockBlockStore) LoadBlockCommit(height int64) *types.Commit { return nil } -func (mockBlockStore) LoadSeenCommit(height int64) *types.Commit { return nil } -func (mockBlockStore) PruneBlocks(height int64) (uint64, error) { return 0, nil } +func (mockBlockStore) Base() uint64 { return 1 } +func (store mockBlockStore) Height() uint64 { return store.height } +func (store mockBlockStore) Size() int64 { return int64(store.height) } +func (mockBlockStore) LoadBaseMeta() *types.BlockMeta { return nil } +func (mockBlockStore) LoadBlockMeta(height uint64) *types.BlockMeta { return nil } +func (mockBlockStore) LoadBlock(height uint64) *types.Block { return nil } +func (mockBlockStore) LoadBlockByHash(hash []byte) *types.Block { return nil } +func (mockBlockStore) LoadBlockPart(height uint64, index int) *types.Part { return nil } +func (mockBlockStore) LoadBlockCommit(height uint64) *types.Commit { return nil } +func (mockBlockStore) LoadSeenCommit(height uint64) *types.Commit { return nil } +func (mockBlockStore) PruneBlocks(height uint64) (uint64, error) { return 0, nil } func (mockBlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) { } diff --git a/rpc/core/consensus.go b/rpc/core/consensus.go index 3fd51fcd1..68398e5aa 100644 --- a/rpc/core/consensus.go +++ b/rpc/core/consensus.go @@ -15,7 +15,7 @@ import ( // for the validators in the set as used in computing their Merkle root. // // More: https://docs.tendermint.com/master/rpc/#/Info/validators -func Validators(ctx *rpctypes.Context, heightPtr *int64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error) { +func Validators(ctx *rpctypes.Context, heightPtr *uint64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error) { // The latest validator that we know is the NextValidator of the last block. height, err := getHeight(latestUncommittedHeight(), heightPtr) if err != nil { @@ -90,7 +90,7 @@ func ConsensusState(ctx *rpctypes.Context) (*ctypes.ResultConsensusState, error) // ConsensusParams gets the consensus parameters at the given block height. // If no height is provided, it will fetch the latest consensus params. // More: https://docs.tendermint.com/master/rpc/#/Info/consensus_params -func ConsensusParams(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultConsensusParams, error) { +func ConsensusParams(ctx *rpctypes.Context, heightPtr *uint64) (*ctypes.ResultConsensusParams, error) { // The latest consensus params that we know is the consensus params after the // last block. height, err := getHeight(latestUncommittedHeight(), heightPtr) diff --git a/rpc/core/env.go b/rpc/core/env.go index ccc46d5a3..93beb21e3 100644 --- a/rpc/core/env.go +++ b/rpc/core/env.go @@ -138,7 +138,7 @@ func validateSkipCount(page, perPage int) int { } // latestHeight can be either latest committed or uncommitted (+1) height. -func getHeight(latestHeight int64, heightPtr *int64) (int64, error) { +func getHeight(latestHeight uint64, heightPtr *uint64) (uint64, error) { if heightPtr != nil { height := *heightPtr if height <= 0 { @@ -158,7 +158,7 @@ func getHeight(latestHeight int64, heightPtr *int64) (int64, error) { return latestHeight, nil } -func latestUncommittedHeight() int64 { +func latestUncommittedHeight() uint64 { nodeIsSyncing := env.ConsensusReactor.WaitSync() if nodeIsSyncing { return env.BlockStore.Height() diff --git a/rpc/core/status.go b/rpc/core/status.go index 8052ed97b..9b4a25dd3 100644 --- a/rpc/core/status.go +++ b/rpc/core/status.go @@ -14,7 +14,7 @@ import ( // More: https://docs.tendermint.com/master/rpc/#/Info/status func Status(ctx *rpctypes.Context) (*ctypes.ResultStatus, error) { var ( - earliestBlockHeight int64 + earliestBlockHeight uint64 earliestBlockHash tmbytes.HexBytes earliestAppHash tmbytes.HexBytes earliestBlockTimeNano int64 diff --git a/rpc/core/types/responses.go b/rpc/core/types/responses.go index e819cd330..4c45aa459 100644 --- a/rpc/core/types/responses.go +++ b/rpc/core/types/responses.go @@ -14,7 +14,7 @@ import ( // List of blocks type ResultBlockchainInfo struct { - LastHeight int64 `json:"last_height"` + LastHeight uint64 `json:"last_height"` BlockMetas []*types.BlockMeta `json:"block_metas"` } @@ -37,7 +37,7 @@ type ResultCommit struct { // ABCI results from a block type ResultBlockResults struct { - Height int64 `json:"height"` + Height uint64 `json:"height"` TxsResults []*abci.ResponseDeliverTx `json:"txs_results"` BeginBlockEvents []abci.Event `json:"begin_block_events"` EndBlockEvents []abci.Event `json:"end_block_events"` @@ -63,12 +63,12 @@ func NewResultCommit(header *types.Header, commit *types.Commit, type SyncInfo struct { LatestBlockHash bytes.HexBytes `json:"latest_block_hash"` LatestAppHash bytes.HexBytes `json:"latest_app_hash"` - LatestBlockHeight int64 `json:"latest_block_height"` + LatestBlockHeight uint64 `json:"latest_block_height"` LatestBlockTime time.Time `json:"latest_block_time"` EarliestBlockHash bytes.HexBytes `json:"earliest_block_hash"` EarliestAppHash bytes.HexBytes `json:"earliest_app_hash"` - EarliestBlockHeight int64 `json:"earliest_block_height"` + EarliestBlockHeight uint64 `json:"earliest_block_height"` EarliestBlockTime time.Time `json:"earliest_block_time"` CatchingUp bool `json:"catching_up"` @@ -124,7 +124,7 @@ type Peer struct { // Validators for a height. type ResultValidators struct { - BlockHeight int64 `json:"block_height"` + BlockHeight uint64 `json:"block_height"` Validators []*types.Validator `json:"validators"` // Count of actual validators in this result Count int `json:"count"` @@ -134,7 +134,7 @@ type ResultValidators struct { // ConsensusParams for given height type ResultConsensusParams struct { - BlockHeight int64 `json:"block_height"` + BlockHeight uint64 `json:"block_height"` ConsensusParams types.ConsensusParams `json:"consensus_params"` } @@ -171,7 +171,7 @@ type ResultBroadcastTxCommit struct { CheckTx abci.ResponseCheckTx `json:"check_tx"` DeliverTx abci.ResponseDeliverTx `json:"deliver_tx"` Hash bytes.HexBytes `json:"hash"` - Height int64 `json:"height"` + Height uint64 `json:"height"` } // ResultCheckTx wraps abci.ResponseCheckTx. @@ -182,7 +182,7 @@ type ResultCheckTx struct { // Result of querying for a tx type ResultTx struct { Hash bytes.HexBytes `json:"hash"` - Height int64 `json:"height"` + Height uint64 `json:"height"` Index uint32 `json:"index"` TxResult abci.ResponseDeliverTx `json:"tx_result"` Tx types.Tx `json:"tx"` diff --git a/state/errors.go b/state/errors.go index 6e0cdfa47..7d361af0c 100644 --- a/state/errors.go +++ b/state/errors.go @@ -7,27 +7,27 @@ type ( ErrProxyAppConn error ErrUnknownBlock struct { - Height int64 + Height uint64 } ErrBlockHashMismatch struct { CoreHash []byte AppHash []byte - Height int64 + Height uint64 } ErrAppBlockHeightTooHigh struct { - CoreHeight int64 - AppHeight int64 + CoreHeight uint64 + AppHeight uint64 } ErrAppBlockHeightTooLow struct { - AppHeight int64 - StoreBase int64 + AppHeight uint64 + StoreBase uint64 } ErrLastStateMismatch struct { - Height int64 + Height uint64 Core []byte App []byte } @@ -38,7 +38,7 @@ type ( } ErrNoValSetForHeight struct { - Height int64 + Height uint64 } ErrNoConsensusParamsForHeight struct { @@ -46,7 +46,7 @@ type ( } ErrNoABCIResponsesForHeight struct { - Height int64 + Height uint64 } ) diff --git a/state/execution.go b/state/execution.go index 192708790..f14455606 100644 --- a/state/execution.go +++ b/state/execution.go @@ -92,7 +92,7 @@ func (blockExec *BlockExecutor) SetEventBus(eventBus types.BlockEventPublisher) // Up to 1/10th of the block space is allcoated for maximum sized evidence. // The rest is given to txs, up to the max gas. func (blockExec *BlockExecutor) CreateProposalBlock( - height int64, + height uint64, state State, commit *types.Commit, proposerAddr []byte, ) (*types.Block, *types.PartSet) { @@ -130,7 +130,7 @@ func (blockExec *BlockExecutor) ValidateBlock(state State, block *types.Block) e // It takes a blockID to avoid recomputing the parts hash. func (blockExec *BlockExecutor) ApplyBlock( state State, blockID types.BlockID, block *types.Block, -) (State, int64, error) { +) (State, uint64, error) { if err := validateBlock(state, block); err != nil { return state, 0, ErrInvalidBlock(err) @@ -210,7 +210,7 @@ func (blockExec *BlockExecutor) Commit( state State, block *types.Block, deliverTxResponses []*abci.ResponseDeliverTx, -) ([]byte, int64, error) { +) ([]byte, uint64, error) { blockExec.mempool.Lock() defer blockExec.mempool.Unlock() @@ -262,7 +262,7 @@ func execBlockOnProxyApp( proxyAppConn proxy.AppConnConsensus, block *types.Block, store Store, - initialHeight int64, + initialHeight uint64, ) (*tmstate.ABCIResponses, error) { var validTxs, invalidTxs = 0, 0 @@ -339,7 +339,7 @@ func execBlockOnProxyApp( } func getBeginBlockValidatorInfo(block *types.Block, store Store, - initialHeight int64) abci.LastCommitInfo { + initialHeight uint64) abci.LastCommitInfo { voteInfos := make([]abci.VoteInfo, block.LastCommit.Size()) // Initial block -> LastCommitInfo.Votes are empty. // Remember that the first LastCommit is intentionally empty, so it makes @@ -533,7 +533,7 @@ func ExecCommitBlock( block *types.Block, logger log.Logger, store Store, - initialHeight int64, + initialHeight uint64, ) ([]byte, error) { _, err := execBlockOnProxyApp(logger, appConnConsensus, block, store, initialHeight) if err != nil { diff --git a/state/helpers_test.go b/state/helpers_test.go index e9c4a8275..29a922cb7 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -20,7 +20,7 @@ import ( ) type paramsChangeTestCase struct { - height int64 + height uint64 params types.ConsensusParams } @@ -32,7 +32,7 @@ func newTestApp() proxy.AppConns { func makeAndCommitGoodBlock( state sm.State, - height int64, + height uint64, lastCommit *types.Commit, proposerAddr []byte, blockExec *sm.BlockExecutor, @@ -52,7 +52,7 @@ func makeAndCommitGoodBlock( return state, blockID, commit, nil } -func makeAndApplyGoodBlock(state sm.State, height int64, lastCommit *types.Commit, proposerAddr []byte, +func makeAndApplyGoodBlock(state sm.State, height uint64, lastCommit *types.Commit, proposerAddr []byte, blockExec *sm.BlockExecutor, evidence []types.Evidence) (sm.State, types.BlockID, error) { block, _ := state.MakeBlock(height, makeTxs(height), lastCommit, evidence, proposerAddr) if err := blockExec.ValidateBlock(state, block); err != nil { @@ -68,7 +68,7 @@ func makeAndApplyGoodBlock(state sm.State, height int64, lastCommit *types.Commi } func makeValidCommit( - height int64, + height uint64, blockID types.BlockID, vals *types.ValidatorSet, privVals map[string]types.PrivValidator, @@ -86,7 +86,7 @@ func makeValidCommit( } // make some bogus txs -func makeTxs(height int64) (txs []types.Tx) { +func makeTxs(height uint64) (txs []types.Tx) { for i := 0; i < nTxsPerBlock; i++ { txs = append(txs, types.Tx([]byte{byte(height), byte(i)})) } @@ -131,7 +131,7 @@ func makeState(nVals, height int) (sm.State, dbm.DB, map[string]types.PrivValida return s, stateDB, privVals } -func makeBlock(state sm.State, height int64) *types.Block { +func makeBlock(state sm.State, height uint64) *types.Block { block, _ := state.MakeBlock( height, makeTxs(state.LastBlockHeight), @@ -232,7 +232,7 @@ func randomGenesisDoc() *types.GenesisDoc { // used for testing by state store func makeRandomStateFromValidatorSet( lastValSet *types.ValidatorSet, - height, lastHeightValidatorsChanged int64, + height, lastHeightValidatorsChanged uint64, ) sm.State { return sm.State{ LastBlockHeight: height - 1, @@ -247,7 +247,7 @@ func makeRandomStateFromValidatorSet( } func makeRandomStateFromConsensusParams(consensusParams *types.ConsensusParams, - height, lastHeightConsensusParamsChanged int64) sm.State { + height, lastHeightConsensusParamsChanged uint64) sm.State { val, _ := types.RandValidator(true, 10) valSet := types.NewValidatorSet([]*types.Validator{val}) return sm.State{ diff --git a/state/services.go b/state/services.go index a46863904..8acb1d58a 100644 --- a/state/services.go +++ b/state/services.go @@ -14,23 +14,23 @@ import ( // BlockStore defines the interface used by the ConsensusState. type BlockStore interface { - Base() int64 - Height() int64 + Base() uint64 + Height() uint64 Size() int64 LoadBaseMeta() *types.BlockMeta - LoadBlockMeta(height int64) *types.BlockMeta - LoadBlock(height int64) *types.Block + LoadBlockMeta(height uint64) *types.BlockMeta + LoadBlock(height uint64) *types.Block SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) - PruneBlocks(height int64) (uint64, error) + PruneBlocks(height uint64) (uint64, error) LoadBlockByHash(hash []byte) *types.Block - LoadBlockPart(height int64, index int) *types.Part + LoadBlockPart(height uint64, index int) *types.Part - LoadBlockCommit(height int64) *types.Commit - LoadSeenCommit(height int64) *types.Commit + LoadBlockCommit(height uint64) *types.Commit + LoadSeenCommit(height uint64) *types.Commit } //----------------------------------------------------------------------------- diff --git a/state/state.go b/state/state.go index ffebaf3b4..f84ab84f4 100644 --- a/state/state.go +++ b/state/state.go @@ -74,10 +74,10 @@ type State struct { // immutable ChainID string - InitialHeight int64 // should be 1, not 0, when starting from height 1 + InitialHeight uint64 // should be 1, not 0, when starting from height 1 // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - LastBlockHeight int64 + LastBlockHeight uint64 LastBlockID types.BlockID LastBlockTime time.Time @@ -90,12 +90,12 @@ type State struct { NextValidators *types.ValidatorSet Validators *types.ValidatorSet LastValidators *types.ValidatorSet - LastHeightValidatorsChanged int64 + LastHeightValidatorsChanged uint64 // Consensus parameters used for validating blocks. // Changes returned by EndBlock and updated after Commit. ConsensusParams types.ConsensusParams - LastHeightConsensusParamsChanged int64 + LastHeightConsensusParamsChanged uint64 // Merkle root of the results from executing prev block LastResultsHash []byte @@ -257,7 +257,7 @@ func StateFromProto(pb *tmstate.State) (*State, error) { //nolint:golint // and evidence. Note it also takes a proposerAddress because the state does not // track rounds, and hence does not know the correct proposer. TODO: fix this! func (state State) MakeBlock( - height int64, + height uint64, txs []types.Tx, commit *types.Commit, evidence []types.Evidence, diff --git a/state/state_test.go b/state/state_test.go index 9e403eafb..a8e119c30 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -176,14 +176,14 @@ func TestABCIResponsesSaveLoad2(t *testing.T) { // Query all before, this should return error. for i := range cases { - h := int64(i + 1) + h := uint64(i + 1) res, err := stateStore.LoadABCIResponses(h) assert.Error(err, "%d: %#v", i, res) } // Add all cases. for i, tc := range cases { - h := int64(i + 1) // last block height, one below what we save + h := uint64(i + 1) // last block height, one below what we save responses := &tmstate.ABCIResponses{ BeginBlock: &abci.ResponseBeginBlock{}, DeliverTxs: tc.added, @@ -195,7 +195,7 @@ func TestABCIResponsesSaveLoad2(t *testing.T) { // Query all before, should return expected value. for i, tc := range cases { - h := int64(i + 1) + h := uint64(i + 1) res, err := stateStore.LoadABCIResponses(h) if assert.NoError(err, "%d", i) { t.Log(res) @@ -292,7 +292,7 @@ func TestOneValidatorChangesSaveLoad(t *testing.T) { } for i, power := range testCases { - v, err := stateStore.LoadValidators(int64(i + 1 + 1)) // +1 because vset changes delayed by 1 block. + v, err := stateStore.LoadValidators(uint64(i + 1 + 1)) // +1 because vset changes delayed by 1 block. assert.Nil(t, err, fmt.Sprintf("expected no err at height %d", i)) assert.Equal(t, v.Size(), 1, "validator set size is greater than 1: %d", v.Size()) _, val := v.GetByIndex(0) @@ -992,7 +992,7 @@ func TestConsensusParamsChangesSaveLoad(t *testing.T) { stateStore := sm.NewStore(stateDB) // Change vals at these heights. - changeHeights := []int64{1, 2, 4, 5, 10, 15, 16, 17, 20} + changeHeights := []uint64{1, 2, 4, 5, 10, 15, 16, 17, 20} N := len(changeHeights) // Each valset is just one validator. @@ -1011,7 +1011,7 @@ func TestConsensusParamsChangesSaveLoad(t *testing.T) { cp := params[changeIndex] var err error var validatorUpdates []*types.Validator - for i := int64(1); i < highestHeight; i++ { + for i := uint64(1); i < highestHeight; i++ { // When we get to a change height, use the next params. if changeIndex < len(changeHeights) && i == changeHeights[changeIndex] { changeIndex++ @@ -1031,7 +1031,7 @@ func TestConsensusParamsChangesSaveLoad(t *testing.T) { testCases := make([]paramsChangeTestCase, highestHeight) changeIndex = 0 cp = params[changeIndex] - for i := int64(1); i < highestHeight+1; i++ { + for i := uint64(1); i < highestHeight+1; i++ { // We get to the height after a change height use the next pubkey (note // our counter starts at 0 this time). if changeIndex < len(changeHeights) && i == changeHeights[changeIndex]+1 { diff --git a/state/store.go b/state/store.go index 19ac01daa..58b722231 100644 --- a/state/store.go +++ b/state/store.go @@ -34,7 +34,7 @@ const ( prefixABCIResponses = int64(7) ) -func encodeKey(prefix int64, height int64) []byte { +func encodeKey(prefix int64, height uint64) []byte { res, err := orderedcode.Append(nil, prefix, height) if err != nil { panic(err) @@ -42,15 +42,15 @@ func encodeKey(prefix int64, height int64) []byte { return res } -func validatorsKey(height int64) []byte { +func validatorsKey(height uint64) []byte { return encodeKey(prefixValidators, height) } -func consensusParamsKey(height int64) []byte { +func consensusParamsKey(height uint64) []byte { return encodeKey(prefixConsensusParams, height) } -func abciResponsesKey(height int64) []byte { +func abciResponsesKey(height uint64) []byte { return encodeKey(prefixABCIResponses, height) } @@ -72,19 +72,19 @@ type Store interface { // Load loads the current state of the blockchain Load() (State, error) // LoadValidators loads the validator set at a given height - LoadValidators(int64) (*types.ValidatorSet, error) + LoadValidators(uint64) (*types.ValidatorSet, error) // LoadABCIResponses loads the abciResponse for a given height - LoadABCIResponses(int64) (*tmstate.ABCIResponses, error) + LoadABCIResponses(uint64) (*tmstate.ABCIResponses, error) // LoadConsensusParams loads the consensus params for a given height - LoadConsensusParams(int64) (types.ConsensusParams, error) + LoadConsensusParams(uint64) (types.ConsensusParams, error) // Save overwrites the previous state with the updated one Save(State) error // SaveABCIResponses saves ABCIResponses for a given height - SaveABCIResponses(int64, *tmstate.ABCIResponses) error + SaveABCIResponses(uint64, *tmstate.ABCIResponses) error // Bootstrap is used for bootstrapping state when not starting from a initial height. Bootstrap(State) error // PruneStates takes the height from which to prune up to (exclusive) - PruneStates(int64) error + PruneStates(uint64) error } // dbStore wraps a db (github.com/tendermint/tm-db) @@ -234,7 +234,7 @@ func (store dbStore) Bootstrap(state State) error { // guaranteed to delete all states, since the last checkpointed state and states being pointed to by // e.g. `LastHeightChanged` must remain. The state at retain height must also exist. // Pruning is done in descending order. -func (store dbStore) PruneStates(retainHeight int64) error { +func (store dbStore) PruneStates(retainHeight uint64) error { if retainHeight <= 0 { return fmt.Errorf("height %v must be greater than 0", retainHeight) } @@ -257,7 +257,7 @@ func (store dbStore) PruneStates(retainHeight int64) error { // pruneValidatorSets calls a reverse iterator from base height to retain height (exclusive), deleting // all validator sets in between. Due to the fact that most validator sets stored reference an earlier // validator set, it is likely that there will remain one validator set left after pruning. -func (store dbStore) pruneValidatorSets(height int64) error { +func (store dbStore) pruneValidatorSets(height uint64) error { valInfo, err := loadValidatorsInfo(store.db, height) if err != nil { return fmt.Errorf("validators at height %v not found: %w", height, err) @@ -288,7 +288,7 @@ func (store dbStore) pruneValidatorSets(height int64) error { // pruneConsensusParams calls a reverse iterator from base height to retain height batch deleting // all consensus params in between. If the consensus params at the new base height is dependent // on a prior height then this will keep that lower height to. -func (store dbStore) pruneConsensusParams(retainHeight int64) error { +func (store dbStore) pruneConsensusParams(retainHeight uint64) error { paramsInfo, err := store.loadConsensusParamsInfo(retainHeight) if err != nil { return fmt.Errorf("consensus params at height %v not found: %w", retainHeight, err) @@ -319,7 +319,7 @@ func (store dbStore) pruneConsensusParams(retainHeight int64) error { // pruneABCIResponses calls a reverse iterator from base height to retain height batch deleting // all abci responses in between -func (store dbStore) pruneABCIResponses(height int64) error { +func (store dbStore) pruneABCIResponses(height uint64) error { return store.batchDelete(abciResponsesKey(1), abciResponsesKey(height), nil) } @@ -404,7 +404,7 @@ func ABCIResponsesResultsHash(ar *tmstate.ABCIResponses) []byte { // This is useful for recovering from crashes where we called app.Commit and // before we called s.Save(). It can also be used to produce Merkle proofs of // the result of txs. -func (store dbStore) LoadABCIResponses(height int64) (*tmstate.ABCIResponses, error) { +func (store dbStore) LoadABCIResponses(height uint64) (*tmstate.ABCIResponses, error) { buf, err := store.db.Get(abciResponsesKey(height)) if err != nil { return nil, err @@ -432,7 +432,7 @@ func (store dbStore) LoadABCIResponses(height int64) (*tmstate.ABCIResponses, er // Merkle proofs. // // Exposed for testing. -func (store dbStore) SaveABCIResponses(height int64, abciResponses *tmstate.ABCIResponses) error { +func (store dbStore) SaveABCIResponses(height uint64, abciResponses *tmstate.ABCIResponses) error { var dtxs []*abci.ResponseDeliverTx // strip nil values, for _, tx := range abciResponses.DeliverTxs { @@ -458,8 +458,8 @@ func (store dbStore) SaveABCIResponses(height int64, abciResponses *tmstate.ABCI //----------------------------------------------------------------------------- // LoadValidators loads the ValidatorSet for a given height. -// Returns ErrNoValSetForHeight if the validator set can't be found for this height. -func (store dbStore) LoadValidators(height int64) (*types.ValidatorSet, error) { +// Returns ErrNoValSetForHeight if the validatoxwr set can't be found for this height. +func (store dbStore) LoadValidators(height uint64) (*types.ValidatorSet, error) { valInfo, err := loadValidatorsInfo(store.db, height) if err != nil { @@ -500,13 +500,13 @@ func (store dbStore) LoadValidators(height int64) (*types.ValidatorSet, error) { return vip, nil } -func lastStoredHeightFor(height, lastHeightChanged int64) int64 { +func lastStoredHeightFor(height, lastHeightChanged uint64) uint64 { checkpointHeight := height - height%valSetCheckpointInterval - return tmmath.MaxInt64(checkpointHeight, lastHeightChanged) + return tmmath.MaxUint64(checkpointHeight, lastHeightChanged) } // CONTRACT: Returned ValidatorsInfo can be mutated. -func loadValidatorsInfo(db dbm.DB, height int64) (*tmstate.ValidatorsInfo, error) { +func loadValidatorsInfo(db dbm.DB, height uint64) (*tmstate.ValidatorsInfo, error) { buf, err := db.Get(validatorsKey(height)) if err != nil { return nil, err @@ -533,7 +533,7 @@ func loadValidatorsInfo(db dbm.DB, height int64) (*tmstate.ValidatorsInfo, error // `height` is the effective height for which the validator is responsible for // signing. It should be called from s.Save(), right before the state itself is // persisted. -func (store dbStore) saveValidatorsInfo(height, lastHeightChanged int64, valSet *types.ValidatorSet) error { +func (store dbStore) saveValidatorsInfo(height, lastHeightChanged uint64, valSet *types.ValidatorSet) error { if lastHeightChanged > height { return errors.New("lastHeightChanged cannot be greater than ValidatorsInfo height") } @@ -574,7 +574,7 @@ var ( ) // LoadConsensusParams loads the ConsensusParams for a given height. -func (store dbStore) LoadConsensusParams(height int64) (types.ConsensusParams, error) { +func (store dbStore) LoadConsensusParams(height uint64) (types.ConsensusParams, error) { paramsInfo, err := store.loadConsensusParamsInfo(height) if err != nil { return empty, fmt.Errorf("could not find consensus params for height #%d: %w", height, err) @@ -597,7 +597,7 @@ func (store dbStore) LoadConsensusParams(height int64) (types.ConsensusParams, e return types.ConsensusParamsFromProto(paramsInfo.ConsensusParams), nil } -func (store dbStore) loadConsensusParamsInfo(height int64) (*tmstate.ConsensusParamsInfo, error) { +func (store dbStore) loadConsensusParamsInfo(height uint64) (*tmstate.ConsensusParamsInfo, error) { buf, err := store.db.Get(consensusParamsKey(height)) if err != nil { return nil, err @@ -621,7 +621,7 @@ func (store dbStore) loadConsensusParamsInfo(height int64) (*tmstate.ConsensusPa // It should be called from s.Save(), right before the state itself is persisted. // If the consensus params did not change after processing the latest block, // only the last height for which they changed is persisted. -func (store dbStore) saveConsensusParamsInfo(nextHeight, changeHeight int64, params types.ConsensusParams) error { +func (store dbStore) saveConsensusParamsInfo(nextHeight, changeHeight uint64, params types.ConsensusParams) error { paramsInfo := &tmstate.ConsensusParamsInfo{ LastHeightChanged: changeHeight, } diff --git a/state/store_test.go b/state/store_test.go index b51a25739..b29bf8be9 100644 --- a/state/store_test.go +++ b/state/store_test.go @@ -120,14 +120,14 @@ func BenchmarkLoadValidators(b *testing.B) { for i := 10; i < 10000000000; i *= 10 { // 10, 100, 1000, ... i := i err = stateStore.Save(makeRandomStateFromValidatorSet(state.NextValidators, - int64(i)-1, state.LastHeightValidatorsChanged)) + uint64(i)-1, state.LastHeightValidatorsChanged)) if err != nil { b.Fatalf("error saving store: %v", err) } b.Run(fmt.Sprintf("height=%d", i), func(b *testing.B) { for n := 0; n < b.N; n++ { - _, err := stateStore.LoadValidators(int64(i)) + _, err := stateStore.LoadValidators(uint64(i)) if err != nil { b.Fatal(err) } @@ -159,15 +159,14 @@ func TestStoreLoadConsensusParams(t *testing.T) { func TestPruneStates(t *testing.T) { testcases := map[string]struct { - makeHeights int64 - pruneHeight int64 + makeHeights uint64 + pruneHeight uint64 expectErr bool expectVals []int64 expectParams []int64 expectABCI []int64 }{ "error when prune height is 0": {100, 0, true, nil, nil, nil}, - "error when prune height is negative": {100, -10, true, nil, nil, nil}, "error when prune height does not exist": {100, 101, true, nil, nil, nil}, "prune all": {100, 100, false, []int64{93, 100}, []int64{95, 100}, []int64{100}}, "prune some": {10, 8, false, []int64{3, 8, 9, 10}, @@ -189,10 +188,10 @@ func TestPruneStates(t *testing.T) { Validators: []*types.Validator{validator}, Proposer: validator, } - valsChanged := int64(0) - paramsChanged := int64(0) + valsChanged := uint64(0) + paramsChanged := uint64(0) - for h := int64(1); h <= tc.makeHeights; h++ { + for h := uint64(1); h <= tc.makeHeights; h++ { if valsChanged == 0 || h%10 == 2 { valsChanged = h + 1 // Have to add 1, since NextValidators is what's stored } @@ -241,9 +240,9 @@ func TestPruneStates(t *testing.T) { expectParams := sliceToMap(tc.expectParams) expectABCI := sliceToMap(tc.expectABCI) - for h := int64(1); h <= tc.makeHeights; h++ { + for h := uint64(1); h <= tc.makeHeights; h++ { vals, err := stateStore.LoadValidators(h) - if expectVals[h] { + if expectVals[int64(h)] { require.NoError(t, err, "validators height %v", h) require.NotNil(t, vals) } else { @@ -252,7 +251,7 @@ func TestPruneStates(t *testing.T) { } params, err := stateStore.LoadConsensusParams(h) - if expectParams[h] { + if expectParams[int64(h)] { require.NoError(t, err, "params height %v", h) require.False(t, params.Equals(&types.ConsensusParams{}), "params should not be empty") } else { @@ -260,7 +259,7 @@ func TestPruneStates(t *testing.T) { } abci, err := stateStore.LoadABCIResponses(h) - if expectABCI[h] { + if expectABCI[int64(h)] { require.NoError(t, err, "abci height %v", h) require.NotNil(t, abci) } else { diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index bef0a2f87..b999a7ad3 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -644,7 +644,7 @@ func primaryKey(hash []byte) []byte { } // The event/secondary key -func secondaryKey(compositeKey, value string, height int64, index uint32) []byte { +func secondaryKey(compositeKey, value string, height uint64, index uint32) []byte { key, err := orderedcode.Append( nil, compositeKey, diff --git a/state/txindex/kv/kv_bench_test.go b/state/txindex/kv/kv_bench_test.go index fdfe550f3..3a4244f38 100644 --- a/state/txindex/kv/kv_bench_test.go +++ b/state/txindex/kv/kv_bench_test.go @@ -44,7 +44,7 @@ func BenchmarkTxSearch(b *testing.B) { } txResult := &abci.TxResult{ - Height: int64(i), + Height: uint64(i), Index: 0, Tx: types.Tx(string(txBz)), Result: abci.ResponseDeliverTx{ diff --git a/state/validation_test.go b/state/validation_test.go index 0c9376581..dcebcd765 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -20,7 +20,7 @@ import ( tmtime "github.com/tendermint/tendermint/types/time" ) -const validationTestsStopHeight int64 = 10 +const validationTestsStopHeight uint64 = 10 func TestValidateBlockHeader(t *testing.T) { proxyApp := newTestApp() @@ -78,7 +78,7 @@ func TestValidateBlockHeader(t *testing.T) { } // Build up state for multiple heights - for height := int64(1); height < validationTestsStopHeight; height++ { + for height := uint64(1); height < validationTestsStopHeight; height++ { proposerAddr := state.Validators.GetProposer().Address /* Invalid blocks don't pass @@ -131,7 +131,7 @@ func TestValidateBlockCommit(t *testing.T) { wrongSigsCommit := types.NewCommit(1, 0, types.BlockID{}, nil) badPrivVal := types.NewMockPV() - for height := int64(1); height < validationTestsStopHeight; height++ { + for height := uint64(1); height < validationTestsStopHeight; height++ { proposerAddr := state.Validators.GetProposer().Address if height > 1 { /* @@ -252,7 +252,7 @@ func TestValidateBlockEvidence(t *testing.T) { ) lastCommit := types.NewCommit(0, 0, types.BlockID{}, nil) - for height := int64(1); height < validationTestsStopHeight; height++ { + for height := uint64(1); height < validationTestsStopHeight; height++ { proposerAddr := state.Validators.GetProposer().Address maxBytesEvidence := state.ConsensusParams.Evidence.MaxBytes if height > 1 { diff --git a/statesync/stateprovider.go b/statesync/stateprovider.go index 5ecbeb166..eb680902e 100644 --- a/statesync/stateprovider.go +++ b/statesync/stateprovider.go @@ -38,7 +38,7 @@ type lightClientStateProvider struct { tmsync.Mutex // light.Client is not concurrency-safe lc *light.Client version sm.Version - initialHeight int64 + initialHeight uint64 providers map[lightprovider.Provider]string } @@ -47,7 +47,7 @@ func NewLightClientStateProvider( ctx context.Context, chainID string, version sm.Version, - initialHeight int64, + initialHeight uint64, servers []string, trustOptions light.TrustOptions, logger log.Logger, diff --git a/store/store.go b/store/store.go index 6d1ac870f..b75365646 100644 --- a/store/store.go +++ b/store/store.go @@ -40,7 +40,7 @@ func NewBlockStore(db dbm.DB) *BlockStore { } // Base returns the first known contiguous block height, or 0 for empty block stores. -func (bs *BlockStore) Base() int64 { +func (bs *BlockStore) Base() uint64 { iter, err := bs.db.Iterator( blockMetaKey(1), blockMetaKey(1<<63-1), @@ -64,7 +64,7 @@ func (bs *BlockStore) Base() int64 { } // Height returns the last known contiguous block height, or 0 for empty block stores. -func (bs *BlockStore) Height() int64 { +func (bs *BlockStore) Height() uint64 { iter, err := bs.db.ReverseIterator( blockMetaKey(1), blockMetaKey(1<<63-1), @@ -88,7 +88,7 @@ func (bs *BlockStore) Height() int64 { } // Size returns the number of blocks in the block store. -func (bs *BlockStore) Size() int64 { +func (bs *BlockStore) Size() uint64 { height := bs.Height() if height == 0 { return 0 @@ -127,7 +127,7 @@ func (bs *BlockStore) LoadBaseMeta() *types.BlockMeta { // LoadBlock returns the block with the given height. // If no block is found for that height, it returns nil. -func (bs *BlockStore) LoadBlock(height int64) *types.Block { +func (bs *BlockStore) LoadBlock(height uint64) *types.Block { var blockMeta = bs.LoadBlockMeta(height) if blockMeta == nil { return nil @@ -172,7 +172,7 @@ func (bs *BlockStore) LoadBlockByHash(hash []byte) *types.Block { } s := string(bz) - height, err := strconv.ParseInt(s, 10, 64) + height, err := strconv.ParseUint(s, 10, 64) if err != nil { panic(fmt.Sprintf("failed to extract height from %s: %v", s, err)) @@ -183,7 +183,7 @@ func (bs *BlockStore) LoadBlockByHash(hash []byte) *types.Block { // LoadBlockPart returns the Part at the given index // from the block at the given height. // If no part is found for the given height and index, it returns nil. -func (bs *BlockStore) LoadBlockPart(height int64, index int) *types.Part { +func (bs *BlockStore) LoadBlockPart(height uint64, index int) *types.Part { var pbpart = new(tmproto.Part) bz, err := bs.db.Get(blockPartKey(height, index)) @@ -208,7 +208,7 @@ func (bs *BlockStore) LoadBlockPart(height int64, index int) *types.Part { // LoadBlockMeta returns the BlockMeta for the given height. // If no block is found for the given height, it returns nil. -func (bs *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { +func (bs *BlockStore) LoadBlockMeta(height uint64) *types.BlockMeta { var pbbm = new(tmproto.BlockMeta) bz, err := bs.db.Get(blockMetaKey(height)) @@ -237,7 +237,7 @@ func (bs *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { // This commit consists of the +2/3 and other Precommit-votes for block at `height`, // and it comes from the block.LastCommit for `height+1`. // If no commit is found for the given height, it returns nil. -func (bs *BlockStore) LoadBlockCommit(height int64) *types.Commit { +func (bs *BlockStore) LoadBlockCommit(height uint64) *types.Commit { var pbc = new(tmproto.Commit) bz, err := bs.db.Get(blockCommitKey(height)) if err != nil { @@ -260,7 +260,7 @@ func (bs *BlockStore) LoadBlockCommit(height int64) *types.Commit { // LoadSeenCommit returns the locally seen Commit for the given height. // This is useful when we've seen a commit, but there has not yet been // a new block at `height + 1` that includes this commit in its block.LastCommit. -func (bs *BlockStore) LoadSeenCommit(height int64) *types.Commit { +func (bs *BlockStore) LoadSeenCommit(height uint64) *types.Commit { var pbc = new(tmproto.Commit) bz, err := bs.db.Get(seenCommitKey(height)) if err != nil { @@ -282,7 +282,7 @@ func (bs *BlockStore) LoadSeenCommit(height int64) *types.Commit { } // PruneBlocks removes block up to (but not including) a height. It returns the number of blocks pruned. -func (bs *BlockStore) PruneBlocks(height int64) (uint64, error) { +func (bs *BlockStore) PruneBlocks(height uint64) (uint64, error) { if height <= 0 { return 0, fmt.Errorf("height must be greater than 0") } @@ -471,7 +471,7 @@ func (bs *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, s } -func (bs *BlockStore) saveBlockPart(height int64, index int, part *types.Part) { +func (bs *BlockStore) saveBlockPart(height uint64, index int, part *types.Part) { pbp, err := part.ToProto() if err != nil { panic(fmt.Errorf("unable to make part into proto: %w", err)) @@ -483,7 +483,7 @@ func (bs *BlockStore) saveBlockPart(height int64, index int, part *types.Part) { } // SaveSeenCommit saves a seen commit, used by e.g. the state sync reactor when bootstrapping node. -func (bs *BlockStore) SaveSeenCommit(height int64, seenCommit *types.Commit) error { +func (bs *BlockStore) SaveSeenCommit(height uint64, seenCommit *types.Commit) error { pbc := seenCommit.ToProto() seenCommitBytes, err := proto.Marshal(pbc) if err != nil { @@ -504,7 +504,7 @@ const ( prefixBlockHash = int64(4) ) -func blockMetaKey(height int64) []byte { +func blockMetaKey(height uint64) []byte { key, err := orderedcode.Append(nil, prefixBlockMeta, height) if err != nil { panic(err) @@ -512,22 +512,22 @@ func blockMetaKey(height int64) []byte { return key } -func decodeBlockMetaKey(key []byte) (height int64, err error) { +func decodeBlockMetaKey(key []byte) (height uint64, err error) { var prefix int64 remaining, err := orderedcode.Parse(string(key), &prefix, &height) if err != nil { return } if len(remaining) != 0 { - return -1, fmt.Errorf("expected complete key but got remainder: %s", remaining) + return 0, fmt.Errorf("expected complete key but got remainder: %s", remaining) } if prefix != prefixBlockMeta { - return -1, fmt.Errorf("incorrect prefix. Expected %v, got %v", prefixBlockMeta, prefix) + return 0, fmt.Errorf("incorrect prefix. Expected %v, got %v", prefixBlockMeta, prefix) } return } -func blockPartKey(height int64, partIndex int) []byte { +func blockPartKey(height uint64, partIndex int) []byte { key, err := orderedcode.Append(nil, prefixBlockPart, height, int64(partIndex)) if err != nil { panic(err) @@ -535,7 +535,7 @@ func blockPartKey(height int64, partIndex int) []byte { return key } -func blockCommitKey(height int64) []byte { +func blockCommitKey(height uint64) []byte { key, err := orderedcode.Append(nil, prefixBlockCommit, height) if err != nil { panic(err) @@ -543,7 +543,7 @@ func blockCommitKey(height int64) []byte { return key } -func seenCommitKey(height int64) []byte { +func seenCommitKey(height uint64) []byte { key, err := orderedcode.Append(nil, prefixSeenCommit, height) if err != nil { panic(err) diff --git a/store/store_test.go b/store/store_test.go index 58b841335..ad762eefc 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -28,7 +28,7 @@ import ( type cleanupFunc func() // make a Commit with a single vote containing just the height and a timestamp -func makeTestCommit(height int64, timestamp time.Time) *types.Commit { +func makeTestCommit(height uint64, timestamp time.Time) *types.Commit { commitSigs := []types.CommitSig{{ BlockIDFlag: types.BlockIDFlagCommit, ValidatorAddress: tmrand.Bytes(crypto.AddressSize), @@ -39,14 +39,14 @@ func makeTestCommit(height int64, timestamp time.Time) *types.Commit { types.BlockID{Hash: []byte(""), PartSetHeader: types.PartSetHeader{Hash: []byte(""), Total: 2}}, commitSigs) } -func makeTxs(height int64) (txs []types.Tx) { +func makeTxs(height uint64) (txs []types.Tx) { for i := 0; i < 10; i++ { txs = append(txs, types.Tx([]byte{byte(height), byte(i)})) } return txs } -func makeBlock(height int64, state sm.State, lastCommit *types.Commit) *types.Block { +func makeBlock(height uint64, state sm.State, lastCommit *types.Commit) *types.Block { block, _ := state.MakeBlock(height, makeTxs(height), lastCommit, nil, state.Validators.GetProposer().Address) return block } @@ -100,7 +100,7 @@ func TestBlockStoreSaveLoadBlock(t *testing.T) { require.Equal(t, bs.Height(), int64(0), "initially the height should be zero") // check there are no blocks at various heights - noBlockHeights := []int64{0, -1, 100, 1000, 2} + noBlockHeights := []uint64{0, 100, 1000, 2} for i, height := range noBlockHeights { if g := bs.LoadBlock(height); g != nil { t.Errorf("#%d: height(%d) got a block; want nil", i, height) @@ -309,7 +309,7 @@ func TestLoadBaseMeta(t *testing.T) { require.NoError(t, err) bs := NewBlockStore(dbm.NewMemDB()) - for h := int64(1); h <= 10; h++ { + for h := uint64(1); h <= 10; h++ { block := makeBlock(h, state, new(types.Commit)) partSet := block.MakePartSet(2) seenCommit := makeTestCommit(h, tmtime.Now()) @@ -327,7 +327,7 @@ func TestLoadBaseMeta(t *testing.T) { func TestLoadBlockPart(t *testing.T) { bs, db := freshBlockStore() - height, index := int64(10), 1 + height, index := uint64(10), 1 loadPart := func() (interface{}, error) { part := bs.LoadBlockPart(height, index) return part, nil @@ -374,7 +374,7 @@ func TestPruneBlocks(t *testing.T) { require.Error(t, err) // make more than 1000 blocks, to test batch deletions - for h := int64(1); h <= 1500; h++ { + for h := uint64(1); h <= 1500; h++ { block := makeBlock(h, state, new(types.Commit)) partSet := block.MakePartSet(2) seenCommit := makeTestCommit(h, tmtime.Now()) @@ -402,10 +402,10 @@ func TestPruneBlocks(t *testing.T) { require.Nil(t, bs.LoadBlockMeta(1199)) require.Nil(t, bs.LoadBlockPart(1199, 1)) - for i := int64(1); i < 1200; i++ { + for i := uint64(1); i < 1200; i++ { require.Nil(t, bs.LoadBlock(i)) } - for i := int64(1200); i <= 1500; i++ { + for i := uint64(1200); i <= 1500; i++ { require.NotNil(t, bs.LoadBlock(i)) } @@ -439,7 +439,7 @@ func TestPruneBlocks(t *testing.T) { func TestLoadBlockMeta(t *testing.T) { bs, db := freshBlockStore() - height := int64(10) + height := uint64(10) loadMeta := func() (interface{}, error) { meta := bs.LoadBlockMeta(height) return meta, nil diff --git a/types/block.go b/types/block.go index bab082dc5..40cba44c8 100644 --- a/types/block.go +++ b/types/block.go @@ -307,7 +307,7 @@ func MaxDataBytesNoEvidence(maxBytes int64, valsCount int) int64 { // MakeBlock returns a new block with an empty header, except what can be // computed from itself. // It populates the same set of fields validated by ValidateBasic. -func MakeBlock(height int64, txs []Tx, lastCommit *Commit, evidence []Evidence) *Block { +func MakeBlock(height uint64, txs []Tx, lastCommit *Commit, evidence []Evidence) *Block { block := &Block{ Header: Header{ Version: version.Consensus{Block: version.BlockProtocol, App: 0}, @@ -334,7 +334,7 @@ type Header struct { // basic block info Version version.Consensus `json:"version"` ChainID string `json:"chain_id"` - Height int64 `json:"height"` + Height uint64 `json:"height"` Time time.Time `json:"time"` // prev block info @@ -747,7 +747,7 @@ type Commit struct { // ValidatorSet order. // Any peer with a block can gossip signatures by index with a peer without // recalculating the active ValidatorSet. - Height int64 `json:"height"` + Height uint64 `json:"height"` Round int32 `json:"round"` BlockID BlockID `json:"block_id"` Signatures []CommitSig `json:"signatures"` @@ -760,7 +760,7 @@ type Commit struct { } // NewCommit returns a new Commit. -func NewCommit(height int64, round int32, blockID BlockID, commitSigs []CommitSig) *Commit { +func NewCommit(height uint64, round int32, blockID BlockID, commitSigs []CommitSig) *Commit { return &Commit{ Height: height, Round: round, @@ -825,7 +825,7 @@ func (commit *Commit) Type() byte { // GetHeight returns height of the commit. // Implements VoteSetReader. -func (commit *Commit) GetHeight() int64 { +func (commit *Commit) GetHeight() uint64 { return commit.Height } diff --git a/types/block_test.go b/types/block_test.go index 8259dd2ef..3bbef311c 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -35,7 +35,7 @@ func TestMain(m *testing.M) { func TestBlockAddEvidence(t *testing.T) { txs := []Tx{Tx("foo"), Tx("bar")} lastID := makeBlockIDRandom() - h := int64(3) + h := uint64(3) voteSet, _, vals := randVoteSet(h-1, 1, tmproto.PrecommitType, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals, time.Now()) @@ -55,7 +55,7 @@ func TestBlockValidateBasic(t *testing.T) { txs := []Tx{Tx("foo"), Tx("bar")} lastID := makeBlockIDRandom() - h := int64(3) + h := uint64(3) voteSet, valSet, vals := randVoteSet(h-1, 1, tmproto.PrecommitType, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals, time.Now()) @@ -71,7 +71,6 @@ func TestBlockValidateBasic(t *testing.T) { }{ {"Make Block", func(blk *Block) {}, false}, {"Make Block w/ proposer Addr", func(blk *Block) { blk.ProposerAddress = valSet.GetProposer().Address }, false}, - {"Negative Height", func(blk *Block) { blk.Height = -1 }, true}, {"Remove 1/2 the commits", func(blk *Block) { blk.LastCommit.Signatures = commit.Signatures[:commit.Size()/2] blk.LastCommit.hash = nil // clear hash or change wont be noticed @@ -93,9 +92,6 @@ func TestBlockValidateBasic(t *testing.T) { {"Missing LastCommit", func(blk *Block) { blk.LastCommit = nil }, true}, - {"Invalid LastCommit", func(blk *Block) { - blk.LastCommit = NewCommit(-1, 0, *voteSet.maj23, nil) - }, true}, {"Invalid Evidence", func(blk *Block) { emptyEv := &DuplicateVoteEvidence{} blk.Evidence = EvidenceData{Evidence: []Evidence{emptyEv}} @@ -117,13 +113,13 @@ func TestBlockValidateBasic(t *testing.T) { func TestBlockHash(t *testing.T) { assert.Nil(t, (*Block)(nil).Hash()) - assert.Nil(t, MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).Hash()) + assert.Nil(t, MakeBlock(uint64(3), []Tx{Tx("Hello World")}, nil, nil).Hash()) } func TestBlockMakePartSet(t *testing.T) { assert.Nil(t, (*Block)(nil).MakePartSet(2)) - partSet := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).MakePartSet(1024) + partSet := MakeBlock(uint64(3), []Tx{Tx("Hello World")}, nil, nil).MakePartSet(1024) assert.NotNil(t, partSet) assert.EqualValues(t, 1, partSet.Total()) } @@ -132,7 +128,7 @@ func TestBlockMakePartSetWithEvidence(t *testing.T) { assert.Nil(t, (*Block)(nil).MakePartSet(2)) lastID := makeBlockIDRandom() - h := int64(3) + h := uint64(3) voteSet, _, vals := randVoteSet(h-1, 1, tmproto.PrecommitType, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals, time.Now()) @@ -150,7 +146,7 @@ func TestBlockHashesTo(t *testing.T) { assert.False(t, (*Block)(nil).HashesTo(nil)) lastID := makeBlockIDRandom() - h := int64(3) + h := uint64(3) voteSet, valSet, vals := randVoteSet(h-1, 1, tmproto.PrecommitType, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals, time.Now()) require.NoError(t, err) @@ -166,7 +162,7 @@ func TestBlockHashesTo(t *testing.T) { } func TestBlockSize(t *testing.T) { - size := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).Size() + size := MakeBlock(uint64(3), []Tx{Tx("Hello World")}, nil, nil).Size() if size <= 0 { t.Fatal("Size of the block is zero or negative") } @@ -177,7 +173,7 @@ func TestBlockString(t *testing.T) { assert.Equal(t, "nil-Block", (*Block)(nil).StringIndented("")) assert.Equal(t, "nil-Block", (*Block)(nil).StringShort()) - block := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil) + block := MakeBlock(uint64(3), []Tx{Tx("Hello World")}, nil, nil) assert.NotEqual(t, "nil-Block", block.String()) assert.NotEqual(t, "nil-Block", block.StringIndented("")) assert.NotEqual(t, "nil-Block", block.StringShort()) @@ -228,7 +224,7 @@ func TestNilDataHashDoesntCrash(t *testing.T) { func TestCommit(t *testing.T) { lastID := makeBlockIDRandom() - h := int64(3) + h := uint64(3) voteSet, _, vals := randVoteSet(h-1, 1, tmproto.PrecommitType, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals, time.Now()) require.NoError(t, err) @@ -255,7 +251,6 @@ func TestCommitValidateBasic(t *testing.T) { }{ {"Random Commit", func(com *Commit) {}, false}, {"Incorrect signature", func(com *Commit) { com.Signatures[0].Signature = []byte{0} }, false}, - {"Incorrect height", func(com *Commit) { com.Height = int64(-100) }, true}, {"Incorrect round", func(com *Commit) { com.Round = -100 }, true}, } for _, tc := range testCases { @@ -440,7 +435,7 @@ func TestMaxHeaderBytes(t *testing.T) { func randCommit(now time.Time) *Commit { lastID := makeBlockIDRandom() - h := int64(3) + h := uint64(3) voteSet, _, vals := randVoteSet(h-1, 1, tmproto.PrecommitType, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals, now) if err != nil { @@ -520,7 +515,7 @@ func TestBlockMaxDataBytesNoEvidence(t *testing.T) { func TestCommitToVoteSet(t *testing.T) { lastID := makeBlockIDRandom() - h := int64(3) + h := uint64(3) voteSet, valSet, vals := randVoteSet(h-1, 1, tmproto.PrecommitType, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals, time.Now()) @@ -549,7 +544,7 @@ func TestCommitToVoteSetWithVotesForNilBlock(t *testing.T) { blockID := makeBlockID([]byte("blockhash"), 1000, []byte("partshash")) const ( - height = int64(3) + height = uint64(3) round = 0 ) @@ -642,7 +637,7 @@ func TestBlockIDValidateBasic(t *testing.T) { } func TestBlockProtoBuf(t *testing.T) { - h := tmrand.Int63() + h := uint64(tmrand.Int63()) c1 := randCommit(time.Now()) b1 := MakeBlock(h, []Tx{Tx([]byte{1})}, &Commit{Signatures: []CommitSig{}}, []Evidence{}) b1.ProposerAddress = tmrand.Bytes(crypto.AddressSize) @@ -750,7 +745,7 @@ func TestEvidenceDataProtoBuf(t *testing.T) { func makeRandHeader() Header { chainID := "test" t := time.Now() - height := tmrand.Int63() + height := uint64(tmrand.Int63()) randBytes := tmrand.Bytes(tmhash.Size) randAddress := tmrand.Bytes(crypto.AddressSize) h := Header{ @@ -971,15 +966,6 @@ func TestHeader_ValidateBasic(t *testing.T) { }, true, "chainID is too long", }, - { - "invalid height (negative)", - Header{ - Version: version.Consensus{Block: version.BlockProtocol}, - ChainID: string(make([]byte, MaxChainIDLen)), - Height: -1, - }, - true, "negative Height", - }, { "invalid height (zero)", Header{ @@ -1219,11 +1205,6 @@ func TestCommit_ValidateBasic(t *testing.T) { expectErr bool errString string }{ - { - "invalid height", - &Commit{Height: -1}, - true, "negative Height", - }, { "invalid round", &Commit{Height: 1, Round: -1}, diff --git a/types/errors.go b/types/errors.go index d828f6387..c8c6e151f 100644 --- a/types/errors.go +++ b/types/errors.go @@ -6,8 +6,8 @@ type ( // ErrInvalidCommitHeight is returned when we encounter a commit with an // unexpected height. ErrInvalidCommitHeight struct { - Expected int64 - Actual int64 + Expected uint64 + Actual uint64 } // ErrInvalidCommitSignatures is returned when we encounter a commit where @@ -18,7 +18,7 @@ type ( } ) -func NewErrInvalidCommitHeight(expected, actual int64) ErrInvalidCommitHeight { +func NewErrInvalidCommitHeight(expected, actual uint64) ErrInvalidCommitHeight { return ErrInvalidCommitHeight{ Expected: expected, Actual: actual, diff --git a/types/events.go b/types/events.go index 38b356983..37a559451 100644 --- a/types/events.go +++ b/types/events.go @@ -79,7 +79,7 @@ type EventDataNewBlockHeader struct { type EventDataNewEvidence struct { Evidence Evidence `json:"evidence"` - Height int64 `json:"height"` + Height uint64 `json:"height"` } // All txs fire EventDataTx diff --git a/types/evidence.go b/types/evidence.go index 8007763b7..bc5cdca63 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -23,7 +23,7 @@ type Evidence interface { ABCI() []abci.Evidence // forms individual evidence to be sent to the application Bytes() []byte // bytes which comprise the evidence Hash() []byte // hash of the evidence - Height() int64 // height of the infraction + Height() uint64 // height of the infraction String() string // string format of the evidence Time() time.Time // time of the infraction ValidateBasic() error // basic consistency check @@ -103,7 +103,7 @@ func (dve *DuplicateVoteEvidence) Hash() []byte { } // Height returns the height of the infraction -func (dve *DuplicateVoteEvidence) Height() int64 { +func (dve *DuplicateVoteEvidence) Height() uint64 { return dve.VoteA.Height } @@ -189,7 +189,7 @@ func DuplicateVoteEvidenceFromProto(pb *tmproto.DuplicateVoteEvidence) (*Duplica // tendermint/docs/architecture/adr-047-handling-evidence-from-light-client.md type LightClientAttackEvidence struct { ConflictingBlock *LightBlock - CommonHeight int64 + CommonHeight uint64 // abci specific information ByzantineValidators []*Validator // validators in the validator set that misbehaved in creating the conflicting block @@ -298,7 +298,7 @@ func (l *LightClientAttackEvidence) ConflictingHeaderIsInvalid(trustedHeader *He // most commit signatures (captures the most byzantine validators) but anything greater than 1/3 is sufficient. func (l *LightClientAttackEvidence) Hash() []byte { buf := make([]byte, binary.MaxVarintLen64) - n := binary.PutVarint(buf, l.CommonHeight) + n := binary.PutUvarint(buf, l.CommonHeight) bz := make([]byte, tmhash.Size+n) copy(bz[:tmhash.Size-1], l.ConflictingBlock.Hash().Bytes()) copy(bz[tmhash.Size:], buf) @@ -308,7 +308,7 @@ func (l *LightClientAttackEvidence) Hash() []byte { // Height returns the last height at which the primary provider and witness provider had the same header. // We use this as the height of the infraction rather than the actual conflicting header because we know // that the malicious validators were bonded at this height which is important for evidence expiry -func (l *LightClientAttackEvidence) Height() int64 { +func (l *LightClientAttackEvidence) Height() uint64 { return l.CommonHeight } @@ -539,13 +539,13 @@ func (err *ErrEvidenceOverflow) Error() string { // unstable - use only for testing // assumes the round to be 0 and the validator index to be 0 -func NewMockDuplicateVoteEvidence(height int64, time time.Time, chainID string) *DuplicateVoteEvidence { +func NewMockDuplicateVoteEvidence(height uint64, time time.Time, chainID string) *DuplicateVoteEvidence { val := NewMockPV() return NewMockDuplicateVoteEvidenceWithValidator(height, time, val, chainID) } // assumes voting power to be 10 and validator to be the only one in the set -func NewMockDuplicateVoteEvidenceWithValidator(height int64, time time.Time, +func NewMockDuplicateVoteEvidenceWithValidator(height uint64, time time.Time, pv PrivValidator, chainID string) *DuplicateVoteEvidence { pubKey, _ := pv.GetPubKey() val := NewValidator(pubKey, 10) @@ -560,7 +560,7 @@ func NewMockDuplicateVoteEvidenceWithValidator(height int64, time time.Time, return NewDuplicateVoteEvidence(voteA, voteB, time, NewValidatorSet([]*Validator{val})) } -func makeMockVote(height int64, round, index int32, addr Address, +func makeMockVote(height uint64, round, index int32, addr Address, blockID BlockID, time time.Time) *Vote { return &Vote{ Type: tmproto.SignedMsgType(2), diff --git a/types/evidence_test.go b/types/evidence_test.go index 4c6626df2..f3b74aa2c 100644 --- a/types/evidence_test.go +++ b/types/evidence_test.go @@ -41,7 +41,7 @@ func randomDuplicateVoteEvidence(t *testing.T) *DuplicateVoteEvidence { } func TestDuplicateVoteEvidence(t *testing.T) { - const height = int64(13) + const height = uint64(13) ev := NewMockDuplicateVoteEvidence(height, time.Now(), "mock-chain-id") assert.Equal(t, ev.Hash(), tmhash.Sum(ev.Bytes())) assert.NotNil(t, ev.String()) @@ -89,7 +89,7 @@ func TestDuplicateVoteEvidenceValidation(t *testing.T) { } func TestLightClientAttackEvidence(t *testing.T) { - height := int64(5) + height := uint64(5) voteSet, valSet, privVals := randVoteSet(height, 1, tmproto.PrecommitType, 10, 1) header := makeHeaderRandom() header.Height = height @@ -152,7 +152,7 @@ func TestLightClientAttackEvidence(t *testing.T) { } func TestLightClientAttackEvidenceValidation(t *testing.T) { - height := int64(5) + height := uint64(5) voteSet, valSet, privVals := randVoteSet(height, 1, tmproto.PrecommitType, 10, 1) header := makeHeaderRandom() header.Height = height @@ -178,7 +178,6 @@ func TestLightClientAttackEvidenceValidation(t *testing.T) { expectErr bool }{ {"Good DuplicateVoteEvidence", func(ev *LightClientAttackEvidence) {}, false}, - {"Negative height", func(ev *LightClientAttackEvidence) { ev.CommonHeight = -10 }, true}, {"Height is greater than divergent block", func(ev *LightClientAttackEvidence) { ev.CommonHeight = height + 1 }, true}, @@ -213,12 +212,12 @@ func TestLightClientAttackEvidenceValidation(t *testing.T) { } func TestMockEvidenceValidateBasic(t *testing.T) { - goodEvidence := NewMockDuplicateVoteEvidence(int64(1), time.Now(), "mock-chain-id") + goodEvidence := NewMockDuplicateVoteEvidence(uint64(1), time.Now(), "mock-chain-id") assert.Nil(t, goodEvidence.ValidateBasic()) } func makeVote( - t *testing.T, val PrivValidator, chainID string, valIndex int32, height int64, round int32, step int, blockID BlockID, + t *testing.T, val PrivValidator, chainID string, valIndex int32, height uint64, round int32, step int, blockID BlockID, time time.Time) *Vote { pubKey, err := val.GetPubKey() require.NoError(t, err) @@ -245,7 +244,7 @@ func makeHeaderRandom() *Header { return &Header{ Version: version.Consensus{Block: version.BlockProtocol, App: 1}, ChainID: tmrand.Str(12), - Height: int64(tmrand.Uint16()) + 1, + Height: uint64(tmrand.Uint16()) + 1, Time: time.Now(), LastBlockID: makeBlockIDRandom(), LastCommitHash: crypto.CRandBytes(tmhash.Size), @@ -270,7 +269,7 @@ func TestEvidenceProto(t *testing.T) { v2 := makeVote(t, val, chainID, math.MaxInt32, math.MaxInt64, 2, 0x01, blockID2, defaultVoteTime) // -------- SignedHeaders -------- - const height int64 = 37 + const height uint64 = 37 var ( header1 = makeHeaderRandom() diff --git a/types/genesis.go b/types/genesis.go index 40e0cf11e..3f72a5fda 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -37,7 +37,7 @@ type GenesisValidator struct { type GenesisDoc struct { GenesisTime time.Time `json:"genesis_time"` ChainID string `json:"chain_id"` - InitialHeight int64 `json:"initial_height"` + InitialHeight uint64 `json:"initial_height"` ConsensusParams *ConsensusParams `json:"consensus_params,omitempty"` Validators []GenesisValidator `json:"validators,omitempty"` AppHash tmbytes.HexBytes `json:"app_hash"` diff --git a/types/proposal.go b/types/proposal.go index 20f9e5fbe..605e19310 100644 --- a/types/proposal.go +++ b/types/proposal.go @@ -24,7 +24,7 @@ var ( // If POLRound >= 0, then BlockID corresponds to the block that is locked in POLRound. type Proposal struct { Type tmproto.SignedMsgType - Height int64 `json:"height"` + Height uint64 `json:"height"` Round int32 `json:"round"` // there can not be greater than 2_147_483_647 rounds POLRound int32 `json:"pol_round"` // -1 if null. BlockID BlockID `json:"block_id"` @@ -34,7 +34,7 @@ type Proposal struct { // NewProposal returns a new Proposal. // If there is no POLRound, polRound should be -1. -func NewProposal(height int64, round int32, polRound int32, blockID BlockID) *Proposal { +func NewProposal(height uint64, round int32, polRound int32, blockID BlockID) *Proposal { return &Proposal{ Type: tmproto.ProposalType, Height: height, diff --git a/types/proposal_test.go b/types/proposal_test.go index 71d4d62cc..06b278afd 100644 --- a/types/proposal_test.go +++ b/types/proposal_test.go @@ -132,7 +132,6 @@ func TestProposalValidateBasic(t *testing.T) { }{ {"Good Proposal", func(p *Proposal) {}, false}, {"Invalid Type", func(p *Proposal) { p.Type = tmproto.PrecommitType }, true}, - {"Invalid Height", func(p *Proposal) { p.Height = -1 }, true}, {"Invalid Round", func(p *Proposal) { p.Round = -1 }, true}, {"Invalid POLRound", func(p *Proposal) { p.POLRound = -2 }, true}, {"Invalid BlockId", func(p *Proposal) { diff --git a/types/test_util.go b/types/test_util.go index 367fd0631..a32cd707b 100644 --- a/types/test_util.go +++ b/types/test_util.go @@ -7,7 +7,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) -func MakeCommit(blockID BlockID, height int64, round int32, +func MakeCommit(blockID BlockID, height uint64, round int32, voteSet *VoteSet, validators []PrivValidator, now time.Time) (*Commit, error) { // all sign @@ -46,7 +46,7 @@ func signAddVote(privVal PrivValidator, vote *Vote, voteSet *VoteSet) (signed bo } func MakeVote( - height int64, + height uint64, blockID BlockID, valSet *ValidatorSet, privVal PrivValidator, diff --git a/types/validator_set.go b/types/validator_set.go index 7cff0405d..195357d82 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -660,7 +660,7 @@ func (vals *ValidatorSet) UpdateWithChangeSet(changes []*Validator) error { // includes which validators signed. For instance, Gaia incentivizes proposers // with a bonus for including more than +2/3 of the signatures. func (vals *ValidatorSet) VerifyCommit(chainID string, blockID BlockID, - height int64, commit *Commit) error { + height uint64, commit *Commit) error { if commit == nil { return errors.New("nil commit") } @@ -718,7 +718,7 @@ func (vals *ValidatorSet) VerifyCommit(chainID string, blockID BlockID, // This method is primarily used by the light client and does not check all the // signatures. func (vals *ValidatorSet) VerifyCommitLight(chainID string, blockID BlockID, - height int64, commit *Commit) error { + height uint64, commit *Commit) error { if commit == nil { return errors.New("nil commit") } diff --git a/types/validator_set_test.go b/types/validator_set_test.go index 84fdcdf48..0ea88ef73 100644 --- a/types/validator_set_test.go +++ b/types/validator_set_test.go @@ -693,7 +693,7 @@ func TestValidatorSet_VerifyCommit_All(t *testing.T) { description string chainID string blockID BlockID - height int64 + height uint64 commit *Commit expErr bool }{ @@ -744,7 +744,7 @@ func TestValidatorSet_VerifyCommit_All(t *testing.T) { func TestValidatorSet_VerifyCommit_CheckAllSignatures(t *testing.T) { var ( chainID = "test_chain_id" - h = int64(3) + h = uint64(3) blockID = makeBlockIDRandom() ) @@ -769,7 +769,7 @@ func TestValidatorSet_VerifyCommit_CheckAllSignatures(t *testing.T) { func TestValidatorSet_VerifyCommitLight_ReturnsAsSoonAsMajorityOfVotingPowerSigned(t *testing.T) { var ( chainID = "test_chain_id" - h = int64(3) + h = uint64(3) blockID = makeBlockIDRandom() ) @@ -792,7 +792,7 @@ func TestValidatorSet_VerifyCommitLight_ReturnsAsSoonAsMajorityOfVotingPowerSign func TestValidatorSet_VerifyCommitLightTrusting_ReturnsAsSoonAsTrustLevelOfVotingPowerSigned(t *testing.T) { var ( chainID = "test_chain_id" - h = int64(3) + h = uint64(3) blockID = makeBlockIDRandom() ) diff --git a/types/vote.go b/types/vote.go index 7b841c28a..c41aa5b79 100644 --- a/types/vote.go +++ b/types/vote.go @@ -49,7 +49,7 @@ type Address = crypto.Address // consensus. type Vote struct { Type tmproto.SignedMsgType `json:"type"` - Height int64 `json:"height"` + Height uint64 `json:"height"` Round int32 `json:"round"` // assume there will not be greater than 2_147_483_647 rounds BlockID BlockID `json:"block_id"` // zero if vote is nil. Timestamp time.Time `json:"timestamp"` @@ -161,10 +161,6 @@ func (vote *Vote) ValidateBasic() error { return errors.New("invalid Type") } - if vote.Height < 0 { - return errors.New("negative Height") - } - if vote.Round < 0 { return errors.New("negative Round") } diff --git a/types/vote_set.go b/types/vote_set.go index 42bde9856..b27b6f9b4 100644 --- a/types/vote_set.go +++ b/types/vote_set.go @@ -60,7 +60,7 @@ type P2PID string */ type VoteSet struct { chainID string - height int64 + height uint64 round int32 signedMsgType tmproto.SignedMsgType valSet *ValidatorSet @@ -75,7 +75,7 @@ type VoteSet struct { } // Constructs a new VoteSet struct used to accumulate votes for given height/round. -func NewVoteSet(chainID string, height int64, round int32, +func NewVoteSet(chainID string, height uint64, round int32, signedMsgType tmproto.SignedMsgType, valSet *ValidatorSet) *VoteSet { if height == 0 { panic("Cannot make VoteSet for height == 0, doesn't make sense.") @@ -100,7 +100,7 @@ func (voteSet *VoteSet) ChainID() string { } // Implements VoteSetReader. -func (voteSet *VoteSet) GetHeight() int64 { +func (voteSet *VoteSet) GetHeight() uint64 { if voteSet == nil { return 0 } diff --git a/types/vote_set_test.go b/types/vote_set_test.go index 4899b04b2..f8c980246 100644 --- a/types/vote_set_test.go +++ b/types/vote_set_test.go @@ -14,7 +14,7 @@ import ( ) func TestVoteSet_AddVote_Good(t *testing.T) { - height, round := int64(1), int32(0) + height, round := uint64(1), int32(0) voteSet, _, privValidators := randVoteSet(height, round, tmproto.PrevoteType, 10, 1) val0 := privValidators[0] @@ -46,7 +46,7 @@ func TestVoteSet_AddVote_Good(t *testing.T) { } func TestVoteSet_AddVote_Bad(t *testing.T) { - height, round := int64(1), int32(0) + height, round := uint64(1), int32(0) voteSet, _, privValidators := randVoteSet(height, round, tmproto.PrevoteType, 10, 1) voteProto := &Vote{ @@ -121,7 +121,7 @@ func TestVoteSet_AddVote_Bad(t *testing.T) { } func TestVoteSet_2_3Majority(t *testing.T) { - height, round := int64(1), int32(0) + height, round := uint64(1), int32(0) voteSet, _, privValidators := randVoteSet(height, round, tmproto.PrevoteType, 10, 1) voteProto := &Vote{ @@ -171,7 +171,7 @@ func TestVoteSet_2_3Majority(t *testing.T) { } func TestVoteSet_2_3MajorityRedux(t *testing.T) { - height, round := int64(1), int32(0) + height, round := uint64(1), int32(0) voteSet, _, privValidators := randVoteSet(height, round, tmproto.PrevoteType, 100, 1) blockHash := crypto.CRandBytes(32) @@ -270,7 +270,7 @@ func TestVoteSet_2_3MajorityRedux(t *testing.T) { } func TestVoteSet_Conflicts(t *testing.T) { - height, round := int64(1), int32(0) + height, round := uint64(1), int32(0) voteSet, _, privValidators := randVoteSet(height, round, tmproto.PrevoteType, 4, 1) blockHash1 := tmrand.Bytes(32) blockHash2 := tmrand.Bytes(32) @@ -399,7 +399,7 @@ func TestVoteSet_Conflicts(t *testing.T) { } func TestVoteSet_MakeCommit(t *testing.T) { - height, round := int64(1), int32(0) + height, round := uint64(1), int32(0) voteSet, _, privValidators := randVoteSet(height, round, tmproto.PrecommitType, 10, 1) blockHash, blockPartSetHeader := crypto.CRandBytes(32), PartSetHeader{123, crypto.CRandBytes(32)} @@ -476,7 +476,7 @@ func TestVoteSet_MakeCommit(t *testing.T) { // NOTE: privValidators are in order func randVoteSet( - height int64, + height uint64, round int32, signedMsgType tmproto.SignedMsgType, numValidators int, @@ -495,7 +495,7 @@ func withValidator(vote *Vote, addr []byte, idx int32) *Vote { } // Convenience: Return new vote with different height -func withHeight(vote *Vote, height int64) *Vote { +func withHeight(vote *Vote, height uint64) *Vote { vote = vote.Copy() vote.Height = height return vote diff --git a/types/vote_test.go b/types/vote_test.go index 51e20cd7a..ce766a28e 100644 --- a/types/vote_test.go +++ b/types/vote_test.go @@ -240,7 +240,6 @@ func TestVoteValidateBasic(t *testing.T) { expectErr bool }{ {"Good Vote", func(v *Vote) {}, false}, - {"Negative Height", func(v *Vote) { v.Height = -1 }, true}, {"Negative Round", func(v *Vote) { v.Round = -1 }, true}, {"Invalid BlockID", func(v *Vote) { v.BlockID = BlockID{[]byte{1, 2, 3}, PartSetHeader{111, []byte("blockparts")}} diff --git a/uint64 b/uint64 new file mode 100644 index 000000000..e69de29bb