diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 7873f0975..e94bd93ae 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -60,7 +60,7 @@ func (m *Request) Reset() { *m = Request{} } func (m *Request) String() string { return proto.CompactTextString(m) } func (*Request) ProtoMessage() {} func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{0} + return fileDescriptor_types_bfbaec40016cbadd, []int{0} } func (m *Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -482,7 +482,7 @@ func (m *RequestEcho) Reset() { *m = RequestEcho{} } func (m *RequestEcho) String() string { return proto.CompactTextString(m) } func (*RequestEcho) ProtoMessage() {} func (*RequestEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{1} + return fileDescriptor_types_bfbaec40016cbadd, []int{1} } func (m *RequestEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ func (m *RequestFlush) Reset() { *m = RequestFlush{} } func (m *RequestFlush) String() string { return proto.CompactTextString(m) } func (*RequestFlush) ProtoMessage() {} func (*RequestFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{2} + return fileDescriptor_types_bfbaec40016cbadd, []int{2} } func (m *RequestFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -568,7 +568,7 @@ func (m *RequestInfo) Reset() { *m = RequestInfo{} } func (m *RequestInfo) String() string { return proto.CompactTextString(m) } func (*RequestInfo) ProtoMessage() {} func (*RequestInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{3} + return fileDescriptor_types_bfbaec40016cbadd, []int{3} } func (m *RequestInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -617,7 +617,7 @@ func (m *RequestSetOption) Reset() { *m = RequestSetOption{} } func (m *RequestSetOption) String() string { return proto.CompactTextString(m) } func (*RequestSetOption) ProtoMessage() {} func (*RequestSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{4} + return fileDescriptor_types_bfbaec40016cbadd, []int{4} } func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -675,7 +675,7 @@ func (m *RequestInitChain) Reset() { *m = RequestInitChain{} } func (m *RequestInitChain) String() string { return proto.CompactTextString(m) } func (*RequestInitChain) ProtoMessage() {} func (*RequestInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{5} + return fileDescriptor_types_bfbaec40016cbadd, []int{5} } func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -753,7 +753,7 @@ func (m *RequestQuery) Reset() { *m = RequestQuery{} } func (m *RequestQuery) String() string { return proto.CompactTextString(m) } func (*RequestQuery) ProtoMessage() {} func (*RequestQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{6} + return fileDescriptor_types_bfbaec40016cbadd, []int{6} } func (m *RequestQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -825,7 +825,7 @@ func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) } func (*RequestBeginBlock) ProtoMessage() {} func (*RequestBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{7} + return fileDescriptor_types_bfbaec40016cbadd, []int{7} } func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -893,7 +893,7 @@ func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} } func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) } func (*RequestCheckTx) ProtoMessage() {} func (*RequestCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{8} + return fileDescriptor_types_bfbaec40016cbadd, []int{8} } func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -940,7 +940,7 @@ func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} } func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) } func (*RequestDeliverTx) ProtoMessage() {} func (*RequestDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{9} + return fileDescriptor_types_bfbaec40016cbadd, []int{9} } func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -987,7 +987,7 @@ func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} } func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) } func (*RequestEndBlock) ProtoMessage() {} func (*RequestEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{10} + return fileDescriptor_types_bfbaec40016cbadd, []int{10} } func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1033,7 +1033,7 @@ func (m *RequestCommit) Reset() { *m = RequestCommit{} } func (m *RequestCommit) String() string { return proto.CompactTextString(m) } func (*RequestCommit) ProtoMessage() {} func (*RequestCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{11} + return fileDescriptor_types_bfbaec40016cbadd, []int{11} } func (m *RequestCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1086,7 +1086,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{12} + return fileDescriptor_types_bfbaec40016cbadd, []int{12} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1539,7 +1539,7 @@ func (m *ResponseException) Reset() { *m = ResponseException{} } func (m *ResponseException) String() string { return proto.CompactTextString(m) } func (*ResponseException) ProtoMessage() {} func (*ResponseException) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{13} + return fileDescriptor_types_bfbaec40016cbadd, []int{13} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1586,7 +1586,7 @@ func (m *ResponseEcho) Reset() { *m = ResponseEcho{} } func (m *ResponseEcho) String() string { return proto.CompactTextString(m) } func (*ResponseEcho) ProtoMessage() {} func (*ResponseEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{14} + return fileDescriptor_types_bfbaec40016cbadd, []int{14} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1632,7 +1632,7 @@ func (m *ResponseFlush) Reset() { *m = ResponseFlush{} } func (m *ResponseFlush) String() string { return proto.CompactTextString(m) } func (*ResponseFlush) ProtoMessage() {} func (*ResponseFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{15} + return fileDescriptor_types_bfbaec40016cbadd, []int{15} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1675,7 +1675,7 @@ func (m *ResponseInfo) Reset() { *m = ResponseInfo{} } func (m *ResponseInfo) String() string { return proto.CompactTextString(m) } func (*ResponseInfo) ProtoMessage() {} func (*ResponseInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{16} + return fileDescriptor_types_bfbaec40016cbadd, []int{16} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1747,7 +1747,7 @@ func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} } func (m *ResponseSetOption) String() string { return proto.CompactTextString(m) } func (*ResponseSetOption) ProtoMessage() {} func (*ResponseSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{17} + return fileDescriptor_types_bfbaec40016cbadd, []int{17} } func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1809,7 +1809,7 @@ func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} } func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) } func (*ResponseInitChain) ProtoMessage() {} func (*ResponseInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{18} + return fileDescriptor_types_bfbaec40016cbadd, []int{18} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1871,7 +1871,7 @@ func (m *ResponseQuery) Reset() { *m = ResponseQuery{} } func (m *ResponseQuery) String() string { return proto.CompactTextString(m) } func (*ResponseQuery) ProtoMessage() {} func (*ResponseQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{19} + return fileDescriptor_types_bfbaec40016cbadd, []int{19} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1967,7 +1967,7 @@ func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} } func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) } func (*ResponseBeginBlock) ProtoMessage() {} func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{20} + return fileDescriptor_types_bfbaec40016cbadd, []int{20} } func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2020,7 +2020,7 @@ func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) } func (*ResponseCheckTx) ProtoMessage() {} func (*ResponseCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{21} + return fileDescriptor_types_bfbaec40016cbadd, []int{21} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2115,7 +2115,7 @@ func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} } func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) } func (*ResponseDeliverTx) ProtoMessage() {} func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{22} + return fileDescriptor_types_bfbaec40016cbadd, []int{22} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2206,7 +2206,7 @@ func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} } func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) } func (*ResponseEndBlock) ProtoMessage() {} func (*ResponseEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{23} + return fileDescriptor_types_bfbaec40016cbadd, []int{23} } func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2268,7 +2268,7 @@ func (m *ResponseCommit) Reset() { *m = ResponseCommit{} } func (m *ResponseCommit) String() string { return proto.CompactTextString(m) } func (*ResponseCommit) ProtoMessage() {} func (*ResponseCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{24} + return fileDescriptor_types_bfbaec40016cbadd, []int{24} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2307,19 +2307,18 @@ func (m *ResponseCommit) GetData() []byte { // ConsensusParams contains all consensus-relevant parameters // that can be adjusted by the abci app type ConsensusParams struct { - BlockSize *BlockSize `protobuf:"bytes,1,opt,name=block_size,json=blockSize" json:"block_size,omitempty"` - TxSize *TxSize `protobuf:"bytes,2,opt,name=tx_size,json=txSize" json:"tx_size,omitempty"` - BlockGossip *BlockGossip `protobuf:"bytes,3,opt,name=block_gossip,json=blockGossip" json:"block_gossip,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + BlockSize *BlockSize `protobuf:"bytes,1,opt,name=block_size,json=blockSize" json:"block_size,omitempty"` + EvidenceParams *EvidenceParams `protobuf:"bytes,2,opt,name=evidence_params,json=evidenceParams" json:"evidence_params,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } func (*ConsensusParams) ProtoMessage() {} func (*ConsensusParams) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{25} + return fileDescriptor_types_bfbaec40016cbadd, []int{25} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2355,23 +2354,18 @@ func (m *ConsensusParams) GetBlockSize() *BlockSize { return nil } -func (m *ConsensusParams) GetTxSize() *TxSize { +func (m *ConsensusParams) GetEvidenceParams() *EvidenceParams { if m != nil { - return m.TxSize - } - return nil -} - -func (m *ConsensusParams) GetBlockGossip() *BlockGossip { - if m != nil { - return m.BlockGossip + return m.EvidenceParams } return nil } // BlockSize contains limits on the block size. type BlockSize struct { - MaxBytes int32 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` + // Note: must be greater than 0 + MaxBytes int32 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` + // Note: must be greater or equal to -1 MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2382,7 +2376,7 @@ func (m *BlockSize) Reset() { *m = BlockSize{} } func (m *BlockSize) String() string { return proto.CompactTextString(m) } func (*BlockSize) ProtoMessage() {} func (*BlockSize) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{26} + return fileDescriptor_types_bfbaec40016cbadd, []int{26} } func (m *BlockSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2425,27 +2419,27 @@ func (m *BlockSize) GetMaxGas() int64 { return 0 } -// TxSize contains limits on the tx size. -type TxSize struct { - MaxBytes int32 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` - MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` +// EvidenceParams contains limits on the evidence. +type EvidenceParams struct { + // Note: must be greater than 0 + MaxAge int64 `protobuf:"varint,1,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *TxSize) Reset() { *m = TxSize{} } -func (m *TxSize) String() string { return proto.CompactTextString(m) } -func (*TxSize) ProtoMessage() {} -func (*TxSize) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{27} +func (m *EvidenceParams) Reset() { *m = EvidenceParams{} } +func (m *EvidenceParams) String() string { return proto.CompactTextString(m) } +func (*EvidenceParams) ProtoMessage() {} +func (*EvidenceParams) Descriptor() ([]byte, []int) { + return fileDescriptor_types_bfbaec40016cbadd, []int{27} } -func (m *TxSize) XXX_Unmarshal(b []byte) error { +func (m *EvidenceParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TxSize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TxSize.Marshal(b, m, deterministic) + return xxx_messageInfo_EvidenceParams.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -2455,78 +2449,21 @@ func (m *TxSize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *TxSize) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxSize.Merge(dst, src) +func (dst *EvidenceParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_EvidenceParams.Merge(dst, src) } -func (m *TxSize) XXX_Size() int { +func (m *EvidenceParams) XXX_Size() int { return m.Size() } -func (m *TxSize) XXX_DiscardUnknown() { - xxx_messageInfo_TxSize.DiscardUnknown(m) +func (m *EvidenceParams) XXX_DiscardUnknown() { + xxx_messageInfo_EvidenceParams.DiscardUnknown(m) } -var xxx_messageInfo_TxSize proto.InternalMessageInfo +var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo -func (m *TxSize) GetMaxBytes() int32 { +func (m *EvidenceParams) GetMaxAge() int64 { if m != nil { - return m.MaxBytes - } - return 0 -} - -func (m *TxSize) GetMaxGas() int64 { - if m != nil { - return m.MaxGas - } - return 0 -} - -// BlockGossip determine consensus critical -// elements of how blocks are gossiped -type BlockGossip struct { - // Note: must not be 0 - BlockPartSizeBytes int32 `protobuf:"varint,1,opt,name=block_part_size_bytes,json=blockPartSizeBytes,proto3" json:"block_part_size_bytes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlockGossip) Reset() { *m = BlockGossip{} } -func (m *BlockGossip) String() string { return proto.CompactTextString(m) } -func (*BlockGossip) ProtoMessage() {} -func (*BlockGossip) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{28} -} -func (m *BlockGossip) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockGossip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockGossip.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *BlockGossip) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockGossip.Merge(dst, src) -} -func (m *BlockGossip) XXX_Size() int { - return m.Size() -} -func (m *BlockGossip) XXX_DiscardUnknown() { - xxx_messageInfo_BlockGossip.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockGossip proto.InternalMessageInfo - -func (m *BlockGossip) GetBlockPartSizeBytes() int32 { - if m != nil { - return m.BlockPartSizeBytes + return m.MaxAge } return 0 } @@ -2543,7 +2480,7 @@ func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} } func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) } func (*LastCommitInfo) ProtoMessage() {} func (*LastCommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{29} + return fileDescriptor_types_bfbaec40016cbadd, []int{28} } func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2616,7 +2553,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{30} + return fileDescriptor_types_bfbaec40016cbadd, []int{29} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2762,7 +2699,7 @@ func (m *BlockID) Reset() { *m = BlockID{} } func (m *BlockID) String() string { return proto.CompactTextString(m) } func (*BlockID) ProtoMessage() {} func (*BlockID) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{31} + return fileDescriptor_types_bfbaec40016cbadd, []int{30} } func (m *BlockID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2817,7 +2754,7 @@ func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } func (*PartSetHeader) ProtoMessage() {} func (*PartSetHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{32} + return fileDescriptor_types_bfbaec40016cbadd, []int{31} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2874,7 +2811,7 @@ func (m *Validator) Reset() { *m = Validator{} } func (m *Validator) String() string { return proto.CompactTextString(m) } func (*Validator) ProtoMessage() {} func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{33} + return fileDescriptor_types_bfbaec40016cbadd, []int{32} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2930,7 +2867,7 @@ func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} } func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) } func (*ValidatorUpdate) ProtoMessage() {} func (*ValidatorUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{34} + return fileDescriptor_types_bfbaec40016cbadd, []int{33} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2986,7 +2923,7 @@ func (m *VoteInfo) Reset() { *m = VoteInfo{} } func (m *VoteInfo) String() string { return proto.CompactTextString(m) } func (*VoteInfo) ProtoMessage() {} func (*VoteInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{35} + return fileDescriptor_types_bfbaec40016cbadd, []int{34} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3041,7 +2978,7 @@ func (m *PubKey) Reset() { *m = PubKey{} } func (m *PubKey) String() string { return proto.CompactTextString(m) } func (*PubKey) ProtoMessage() {} func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{36} + return fileDescriptor_types_bfbaec40016cbadd, []int{35} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3099,7 +3036,7 @@ func (m *Evidence) Reset() { *m = Evidence{} } func (m *Evidence) String() string { return proto.CompactTextString(m) } func (*Evidence) ProtoMessage() {} func (*Evidence) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{37} + return fileDescriptor_types_bfbaec40016cbadd, []int{36} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3218,10 +3155,8 @@ func init() { golang_proto.RegisterType((*ConsensusParams)(nil), "types.ConsensusParams") proto.RegisterType((*BlockSize)(nil), "types.BlockSize") golang_proto.RegisterType((*BlockSize)(nil), "types.BlockSize") - proto.RegisterType((*TxSize)(nil), "types.TxSize") - golang_proto.RegisterType((*TxSize)(nil), "types.TxSize") - proto.RegisterType((*BlockGossip)(nil), "types.BlockGossip") - golang_proto.RegisterType((*BlockGossip)(nil), "types.BlockGossip") + proto.RegisterType((*EvidenceParams)(nil), "types.EvidenceParams") + golang_proto.RegisterType((*EvidenceParams)(nil), "types.EvidenceParams") proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") golang_proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") proto.RegisterType((*Header)(nil), "types.Header") @@ -4647,10 +4582,7 @@ func (this *ConsensusParams) Equal(that interface{}) bool { if !this.BlockSize.Equal(that1.BlockSize) { return false } - if !this.TxSize.Equal(that1.TxSize) { - return false - } - if !this.BlockGossip.Equal(that1.BlockGossip) { + if !this.EvidenceParams.Equal(that1.EvidenceParams) { return false } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { @@ -4688,14 +4620,14 @@ func (this *BlockSize) Equal(that interface{}) bool { } return true } -func (this *TxSize) Equal(that interface{}) bool { +func (this *EvidenceParams) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*TxSize) + that1, ok := that.(*EvidenceParams) if !ok { - that2, ok := that.(TxSize) + that2, ok := that.(EvidenceParams) if ok { that1 = &that2 } else { @@ -4707,37 +4639,7 @@ func (this *TxSize) Equal(that interface{}) bool { } else if this == nil { return false } - if this.MaxBytes != that1.MaxBytes { - return false - } - if this.MaxGas != that1.MaxGas { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BlockGossip) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BlockGossip) - if !ok { - that2, ok := that.(BlockGossip) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.BlockPartSizeBytes != that1.BlockPartSizeBytes { + if this.MaxAge != that1.MaxAge { return false } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { @@ -5201,8 +5103,7 @@ func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBloc return out, nil } -// Server API for ABCIApplication service - +// ABCIApplicationServer is the server API for ABCIApplication service. type ABCIApplicationServer interface { Echo(context.Context, *RequestEcho) (*ResponseEcho, error) Flush(context.Context, *RequestFlush) (*ResponseFlush, error) @@ -6765,26 +6666,16 @@ func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { } i += n32 } - if m.TxSize != nil { + if m.EvidenceParams != nil { dAtA[i] = 0x12 i++ - i = encodeVarintTypes(dAtA, i, uint64(m.TxSize.Size())) - n33, err := m.TxSize.MarshalTo(dAtA[i:]) + i = encodeVarintTypes(dAtA, i, uint64(m.EvidenceParams.Size())) + n33, err := m.EvidenceParams.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n33 } - if m.BlockGossip != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.BlockGossip.Size())) - n34, err := m.BlockGossip.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n34 - } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -6822,38 +6713,7 @@ func (m *BlockSize) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *TxSize) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TxSize) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MaxBytes != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.MaxBytes)) - } - if m.MaxGas != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BlockGossip) Marshal() (dAtA []byte, err error) { +func (m *EvidenceParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -6863,15 +6723,15 @@ func (m *BlockGossip) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BlockGossip) MarshalTo(dAtA []byte) (int, error) { +func (m *EvidenceParams) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if m.BlockPartSizeBytes != 0 { + if m.MaxAge != 0 { dAtA[i] = 0x8 i++ - i = encodeVarintTypes(dAtA, i, uint64(m.BlockPartSizeBytes)) + i = encodeVarintTypes(dAtA, i, uint64(m.MaxAge)) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -6946,11 +6806,11 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n35, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + n34, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n34 if m.NumTxs != 0 { dAtA[i] = 0x20 i++ @@ -6964,11 +6824,11 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockId.Size())) - n36, err := m.LastBlockId.MarshalTo(dAtA[i:]) + n35, err := m.LastBlockId.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n35 if len(m.LastCommitHash) > 0 { dAtA[i] = 0x3a i++ @@ -7053,11 +6913,11 @@ func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.PartsHeader.Size())) - n37, err := m.PartsHeader.MarshalTo(dAtA[i:]) + n36, err := m.PartsHeader.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n36 if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -7146,11 +7006,11 @@ func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.PubKey.Size())) - n38, err := m.PubKey.MarshalTo(dAtA[i:]) + n37, err := m.PubKey.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n37 if m.Power != 0 { dAtA[i] = 0x10 i++ @@ -7180,11 +7040,11 @@ func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n39, err := m.Validator.MarshalTo(dAtA[i:]) + n38, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n38 if m.SignedLastBlock { dAtA[i] = 0x10 i++ @@ -7258,11 +7118,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n40, err := m.Validator.MarshalTo(dAtA[i:]) + n39, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n40 + i += n39 if m.Height != 0 { dAtA[i] = 0x18 i++ @@ -7271,11 +7131,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n41, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + n40, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } - i += n41 + i += n40 if m.TotalVotingPower != 0 { dAtA[i] = 0x28 i++ @@ -7867,13 +7727,10 @@ func NewPopulatedConsensusParams(r randyTypes, easy bool) *ConsensusParams { this.BlockSize = NewPopulatedBlockSize(r, easy) } if r.Intn(10) != 0 { - this.TxSize = NewPopulatedTxSize(r, easy) - } - if r.Intn(10) != 0 { - this.BlockGossip = NewPopulatedBlockGossip(r, easy) + this.EvidenceParams = NewPopulatedEvidenceParams(r, easy) } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 4) + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } @@ -7894,27 +7751,11 @@ func NewPopulatedBlockSize(r randyTypes, easy bool) *BlockSize { return this } -func NewPopulatedTxSize(r randyTypes, easy bool) *TxSize { - this := &TxSize{} - this.MaxBytes = int32(r.Int31()) +func NewPopulatedEvidenceParams(r randyTypes, easy bool) *EvidenceParams { + this := &EvidenceParams{} + this.MaxAge = int64(r.Int63()) if r.Intn(2) == 0 { - this.MaxBytes *= -1 - } - this.MaxGas = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MaxGas *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 3) - } - return this -} - -func NewPopulatedBlockGossip(r randyTypes, easy bool) *BlockGossip { - this := &BlockGossip{} - this.BlockPartSizeBytes = int32(r.Int31()) - if r.Intn(2) == 0 { - this.BlockPartSizeBytes *= -1 + this.MaxAge *= -1 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedTypes(r, 2) @@ -8194,6 +8035,9 @@ func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { return dAtA } func (m *Request) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != nil { @@ -8206,6 +8050,9 @@ func (m *Request) Size() (n int) { } func (m *Request_Echo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Echo != nil { @@ -8215,6 +8062,9 @@ func (m *Request_Echo) Size() (n int) { return n } func (m *Request_Flush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Flush != nil { @@ -8224,6 +8074,9 @@ func (m *Request_Flush) Size() (n int) { return n } func (m *Request_Info) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Info != nil { @@ -8233,6 +8086,9 @@ func (m *Request_Info) Size() (n int) { return n } func (m *Request_SetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.SetOption != nil { @@ -8242,6 +8098,9 @@ func (m *Request_SetOption) Size() (n int) { return n } func (m *Request_InitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.InitChain != nil { @@ -8251,6 +8110,9 @@ func (m *Request_InitChain) Size() (n int) { return n } func (m *Request_Query) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Query != nil { @@ -8260,6 +8122,9 @@ func (m *Request_Query) Size() (n int) { return n } func (m *Request_BeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.BeginBlock != nil { @@ -8269,6 +8134,9 @@ func (m *Request_BeginBlock) Size() (n int) { return n } func (m *Request_CheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.CheckTx != nil { @@ -8278,6 +8146,9 @@ func (m *Request_CheckTx) Size() (n int) { return n } func (m *Request_EndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.EndBlock != nil { @@ -8287,6 +8158,9 @@ func (m *Request_EndBlock) Size() (n int) { return n } func (m *Request_Commit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Commit != nil { @@ -8296,6 +8170,9 @@ func (m *Request_Commit) Size() (n int) { return n } func (m *Request_DeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.DeliverTx != nil { @@ -8305,6 +8182,9 @@ func (m *Request_DeliverTx) Size() (n int) { return n } func (m *RequestEcho) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Message) @@ -8318,6 +8198,9 @@ func (m *RequestEcho) Size() (n int) { } func (m *RequestFlush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.XXX_unrecognized != nil { @@ -8327,6 +8210,9 @@ func (m *RequestFlush) Size() (n int) { } func (m *RequestInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Version) @@ -8340,6 +8226,9 @@ func (m *RequestInfo) Size() (n int) { } func (m *RequestSetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Key) @@ -8357,6 +8246,9 @@ func (m *RequestSetOption) Size() (n int) { } func (m *RequestInitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) @@ -8386,6 +8278,9 @@ func (m *RequestInitChain) Size() (n int) { } func (m *RequestQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Data) @@ -8409,6 +8304,9 @@ func (m *RequestQuery) Size() (n int) { } func (m *RequestBeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Hash) @@ -8432,6 +8330,9 @@ func (m *RequestBeginBlock) Size() (n int) { } func (m *RequestCheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Tx) @@ -8445,6 +8346,9 @@ func (m *RequestCheckTx) Size() (n int) { } func (m *RequestDeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Tx) @@ -8458,6 +8362,9 @@ func (m *RequestDeliverTx) Size() (n int) { } func (m *RequestEndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Height != 0 { @@ -8470,6 +8377,9 @@ func (m *RequestEndBlock) Size() (n int) { } func (m *RequestCommit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.XXX_unrecognized != nil { @@ -8479,6 +8389,9 @@ func (m *RequestCommit) Size() (n int) { } func (m *Response) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != nil { @@ -8491,6 +8404,9 @@ func (m *Response) Size() (n int) { } func (m *Response_Exception) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Exception != nil { @@ -8500,6 +8416,9 @@ func (m *Response_Exception) Size() (n int) { return n } func (m *Response_Echo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Echo != nil { @@ -8509,6 +8428,9 @@ func (m *Response_Echo) Size() (n int) { return n } func (m *Response_Flush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Flush != nil { @@ -8518,6 +8440,9 @@ func (m *Response_Flush) Size() (n int) { return n } func (m *Response_Info) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Info != nil { @@ -8527,6 +8452,9 @@ func (m *Response_Info) Size() (n int) { return n } func (m *Response_SetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.SetOption != nil { @@ -8536,6 +8464,9 @@ func (m *Response_SetOption) Size() (n int) { return n } func (m *Response_InitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.InitChain != nil { @@ -8545,6 +8476,9 @@ func (m *Response_InitChain) Size() (n int) { return n } func (m *Response_Query) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Query != nil { @@ -8554,6 +8488,9 @@ func (m *Response_Query) Size() (n int) { return n } func (m *Response_BeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.BeginBlock != nil { @@ -8563,6 +8500,9 @@ func (m *Response_BeginBlock) Size() (n int) { return n } func (m *Response_CheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.CheckTx != nil { @@ -8572,6 +8512,9 @@ func (m *Response_CheckTx) Size() (n int) { return n } func (m *Response_DeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.DeliverTx != nil { @@ -8581,6 +8524,9 @@ func (m *Response_DeliverTx) Size() (n int) { return n } func (m *Response_EndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.EndBlock != nil { @@ -8590,6 +8536,9 @@ func (m *Response_EndBlock) Size() (n int) { return n } func (m *Response_Commit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Commit != nil { @@ -8599,6 +8548,9 @@ func (m *Response_Commit) Size() (n int) { return n } func (m *ResponseException) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Error) @@ -8612,6 +8564,9 @@ func (m *ResponseException) Size() (n int) { } func (m *ResponseEcho) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Message) @@ -8625,6 +8580,9 @@ func (m *ResponseEcho) Size() (n int) { } func (m *ResponseFlush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.XXX_unrecognized != nil { @@ -8634,6 +8592,9 @@ func (m *ResponseFlush) Size() (n int) { } func (m *ResponseInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Data) @@ -8658,6 +8619,9 @@ func (m *ResponseInfo) Size() (n int) { } func (m *ResponseSetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8678,6 +8642,9 @@ func (m *ResponseSetOption) Size() (n int) { } func (m *ResponseInitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ConsensusParams != nil { @@ -8697,6 +8664,9 @@ func (m *ResponseInitChain) Size() (n int) { } func (m *ResponseQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8735,6 +8705,9 @@ func (m *ResponseQuery) Size() (n int) { } func (m *ResponseBeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Tags) > 0 { @@ -8750,6 +8723,9 @@ func (m *ResponseBeginBlock) Size() (n int) { } func (m *ResponseCheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8786,6 +8762,9 @@ func (m *ResponseCheckTx) Size() (n int) { } func (m *ResponseDeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8822,6 +8801,9 @@ func (m *ResponseDeliverTx) Size() (n int) { } func (m *ResponseEndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.ValidatorUpdates) > 0 { @@ -8847,6 +8829,9 @@ func (m *ResponseEndBlock) Size() (n int) { } func (m *ResponseCommit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Data) @@ -8860,18 +8845,17 @@ func (m *ResponseCommit) Size() (n int) { } func (m *ConsensusParams) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.BlockSize != nil { l = m.BlockSize.Size() n += 1 + l + sovTypes(uint64(l)) } - if m.TxSize != nil { - l = m.TxSize.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.BlockGossip != nil { - l = m.BlockGossip.Size() + if m.EvidenceParams != nil { + l = m.EvidenceParams.Size() n += 1 + l + sovTypes(uint64(l)) } if m.XXX_unrecognized != nil { @@ -8881,21 +8865,9 @@ func (m *ConsensusParams) Size() (n int) { } func (m *BlockSize) Size() (n int) { - var l int - _ = l - if m.MaxBytes != 0 { - n += 1 + sovTypes(uint64(m.MaxBytes)) + if m == nil { + return 0 } - if m.MaxGas != 0 { - n += 1 + sovTypes(uint64(m.MaxGas)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TxSize) Size() (n int) { var l int _ = l if m.MaxBytes != 0 { @@ -8910,11 +8882,14 @@ func (m *TxSize) Size() (n int) { return n } -func (m *BlockGossip) Size() (n int) { +func (m *EvidenceParams) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.BlockPartSizeBytes != 0 { - n += 1 + sovTypes(uint64(m.BlockPartSizeBytes)) + if m.MaxAge != 0 { + n += 1 + sovTypes(uint64(m.MaxAge)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -8923,6 +8898,9 @@ func (m *BlockGossip) Size() (n int) { } func (m *LastCommitInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Round != 0 { @@ -8941,6 +8919,9 @@ func (m *LastCommitInfo) Size() (n int) { } func (m *Header) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ChainID) @@ -9003,6 +8984,9 @@ func (m *Header) Size() (n int) { } func (m *BlockID) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Hash) @@ -9018,6 +9002,9 @@ func (m *BlockID) Size() (n int) { } func (m *PartSetHeader) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Total != 0 { @@ -9034,6 +9021,9 @@ func (m *PartSetHeader) Size() (n int) { } func (m *Validator) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Address) @@ -9050,6 +9040,9 @@ func (m *Validator) Size() (n int) { } func (m *ValidatorUpdate) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.PubKey.Size() @@ -9064,6 +9057,9 @@ func (m *ValidatorUpdate) Size() (n int) { } func (m *VoteInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Validator.Size() @@ -9078,6 +9074,9 @@ func (m *VoteInfo) Size() (n int) { } func (m *PubKey) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Type) @@ -9095,6 +9094,9 @@ func (m *PubKey) Size() (n int) { } func (m *Evidence) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Type) @@ -12803,7 +12805,7 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceParams", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12827,43 +12829,10 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TxSize == nil { - m.TxSize = &TxSize{} + if m.EvidenceParams == nil { + m.EvidenceParams = &EvidenceParams{} } - if err := m.TxSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockGossip", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockGossip == nil { - m.BlockGossip = &BlockGossip{} - } - if err := m.BlockGossip.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.EvidenceParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12978,96 +12947,7 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { } return nil } -func (m *TxSize) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxSize: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxSize: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - m.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxBytes |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) - } - m.MaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxGas |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockGossip) Unmarshal(dAtA []byte) error { +func (m *EvidenceParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13090,17 +12970,17 @@ func (m *BlockGossip) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BlockGossip: wiretype end group for non-group") + return fmt.Errorf("proto: EvidenceParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BlockGossip: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockPartSizeBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxAge", wireType) } - m.BlockPartSizeBytes = 0 + m.MaxAge = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13110,7 +12990,7 @@ func (m *BlockGossip) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockPartSizeBytes |= (int32(b) & 0x7F) << shift + m.MaxAge |= (int64(b) & 0x7F) << shift if b < 0x80 { break } @@ -14623,143 +14503,140 @@ var ( ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_c68d3007ea320b94) } +func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_bfbaec40016cbadd) } func init() { - golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_c68d3007ea320b94) -} - -var fileDescriptor_types_c68d3007ea320b94 = []byte{ - // 2099 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x73, 0x1b, 0x49, - 0x15, 0xf7, 0x48, 0xb2, 0xfe, 0x3c, 0xd9, 0x92, 0xd3, 0x76, 0x6c, 0x45, 0x80, 0x9d, 0x1a, 0x20, - 0x6b, 0xb3, 0x5e, 0x7b, 0xf1, 0x12, 0xca, 0xd9, 0x2c, 0x5b, 0x58, 0x49, 0x58, 0xbb, 0x76, 0x01, - 0x33, 0x49, 0xcc, 0x85, 0xaa, 0xa9, 0x96, 0xa6, 0x2d, 0x4d, 0x45, 0x9a, 0x99, 0x9d, 0x6e, 0x79, - 0xe5, 0x7c, 0x86, 0x3d, 0xec, 0x81, 0x2a, 0xce, 0xdc, 0xf8, 0x02, 0x54, 0x71, 0xe4, 0x44, 0xed, - 0x91, 0xa2, 0xa0, 0xb8, 0x05, 0x30, 0xc5, 0x01, 0x3e, 0x01, 0x47, 0xaa, 0x5f, 0xf7, 0xfc, 0xf5, - 0x28, 0x95, 0x84, 0xdb, 0x5e, 0xa4, 0xee, 0x7e, 0xef, 0x75, 0xf7, 0x7b, 0xf3, 0xde, 0xfb, 0xbd, - 0xd7, 0xb0, 0x4e, 0xfb, 0x03, 0x77, 0x5f, 0x5c, 0x06, 0x8c, 0xab, 0xdf, 0xbd, 0x20, 0xf4, 0x85, - 0x4f, 0x16, 0x71, 0xd2, 0x7d, 0x67, 0xe8, 0x8a, 0xd1, 0xb4, 0xbf, 0x37, 0xf0, 0x27, 0xfb, 0x43, - 0x7f, 0xe8, 0xef, 0x23, 0x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0x5f, 0x08, 0xbd, 0xb8, 0x61, 0xe9, 0xdb, 0x7d, 0x51, 0x8a, 0x85, 0x63, 0x3f, 0x20, 0x87, - 0x50, 0x91, 0x81, 0x84, 0xd2, 0xcd, 0x83, 0xee, 0x9e, 0x8a, 0xb2, 0xbd, 0x28, 0xca, 0xf6, 0x9e, - 0x44, 0x51, 0xd6, 0xab, 0x7f, 0xf9, 0x62, 0x6b, 0xe1, 0x8b, 0xbf, 0x6d, 0x19, 0x16, 0x4a, 0x90, - 0x5b, 0xf2, 0x53, 0x52, 0xd7, 0xb3, 0x5d, 0x47, 0x9f, 0x53, 0xc3, 0xf9, 0x89, 0x43, 0x8e, 0x60, - 0x65, 0xe0, 0x7b, 0x9c, 0x79, 0x7c, 0xca, 0xed, 0x80, 0x86, 0x74, 0xc2, 0x75, 0x94, 0x44, 0x1f, - 0xee, 0x41, 0x44, 0x3e, 0x45, 0xaa, 0xd5, 0x1e, 0x64, 0x17, 0xc8, 0x07, 0x00, 0x17, 0x74, 0xec, - 0x3a, 0x54, 0xf8, 0x21, 0xef, 0x54, 0x6e, 0x97, 0x53, 0xc2, 0x67, 0x11, 0xe1, 0x69, 0xe0, 0x50, - 0xc1, 0x7a, 0x15, 0x79, 0x33, 0x2b, 0xc5, 0x4f, 0xee, 0x40, 0x9b, 0x06, 0x81, 0xcd, 0x05, 0x15, - 0xcc, 0xee, 0x5f, 0x0a, 0xc6, 0x31, 0x92, 0x96, 0xac, 0x65, 0x1a, 0x04, 0x8f, 0xe5, 0x6a, 0x4f, - 0x2e, 0x9a, 0x4e, 0xfc, 0x1d, 0xd0, 0xc9, 0x09, 0x81, 0x8a, 0x43, 0x05, 0x45, 0x6b, 0x2c, 0x59, - 0x38, 0x96, 0x6b, 0x01, 0x15, 0x23, 0xad, 0x23, 0x8e, 0xc9, 0x3a, 0x54, 0x47, 0xcc, 0x1d, 0x8e, - 0x04, 0xaa, 0x55, 0xb6, 0xf4, 0x4c, 0x1a, 0x3e, 0x08, 0xf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19, 0x18, 0xc8, 0x6f, 0x9c, 0xc1, 0x81, 0x7b, 0x05, 0x38, 0x90, 0xbf, 0xfe, 0x1c, 0x20, 0xb8, - 0x57, 0x00, 0x04, 0x9d, 0x6b, 0x67, 0x15, 0x22, 0xc1, 0x6e, 0x16, 0x09, 0xf2, 0xea, 0xe4, 0xa0, - 0xe0, 0x83, 0x22, 0x28, 0xb8, 0x95, 0x93, 0x99, 0x8b, 0x05, 0xef, 0x5d, 0xc3, 0x82, 0xf5, 0x9c, - 0x68, 0x01, 0x18, 0xdc, 0xcb, 0x64, 0x69, 0x28, 0xd4, 0xad, 0x38, 0x4d, 0x93, 0xef, 0x5f, 0xc7, - 0x91, 0x8d, 0xfc, 0xa7, 0x2d, 0x02, 0x92, 0xfd, 0x1c, 0x90, 0xdc, 0xcc, 0xdf, 0x32, 0x87, 0x24, - 0x09, 0x1e, 0xec, 0xc8, 0xb8, 0xcf, 0x79, 0x9a, 0xcc, 0x11, 0x2c, 0x0c, 0xfd, 0x50, 0x27, 0x6c, - 0x35, 0x31, 0xb7, 0x65, 0x26, 0x4a, 0xfc, 0xeb, 0x25, 0xd8, 0x81, 0x4e, 0x9f, 0xf2, 0x2e, 0xf3, - 0x57, 0x46, 0x22, 0x8b, 0x11, 0x9d, 0xce, 0x62, 0x0d, 0x9d, 0xc5, 0x52, 0x90, 0x52, 0xca, 0x40, - 0x0a, 0xf9, 0x0e, 0xdc, 0xc0, 0x34, 0x82, 0x76, 0xb1, 0x33, 0x69, 0xad, 0x2d, 0x09, 0xca, 0x20, - 0x2a, 0xbf, 0xbd, 0x03, 0xab, 0x29, 0x5e, 0x99, 0x62, 0x31, 0x85, 0x55, 0x30, 0x78, 0x57, 0x62, - 0xee, 0xa3, 0x20, 0x38, 0xa6, 0x7c, 0x64, 0xfe, 0x38, 0xd1, 0x3f, 0x81, 0x2b, 0x02, 0x95, 0x81, - 0xef, 0x28, 0xb5, 0x96, 0x2d, 0x1c, 0x4b, 0x08, 0x1b, 0xfb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x39, 0x84, 0x5a, 0x54, 0x9b, 0x16, 0xbf, - 0x3d, 0x76, 0xe7, 0xb4, 0xa1, 0xd2, 0x3c, 0xaa, 0xbe, 0x2f, 0x7a, 0x20, 0xed, 0x16, 0xf6, 0xca, - 0xe4, 0x2e, 0x54, 0x75, 0xb1, 0x51, 0xf8, 0xfe, 0xd8, 0x2d, 0x6e, 0x26, 0xa5, 0x92, 0x49, 0x87, - 0x33, 0xef, 0x11, 0xb7, 0x3b, 0xb7, 0xa9, 0x27, 0x47, 0x00, 0xa9, 0x9a, 0x7e, 0xee, 0xeb, 0x6c, - 0x77, 0x7e, 0xb3, 0x4e, 0xee, 0x43, 0x3d, 0x79, 0x80, 0x29, 0x7e, 0x6f, 0xed, 0xce, 0xeb, 0x9f, - 0x7b, 0x5f, 0xff, 0xef, 0x3f, 0x36, 0x8d, 0xdf, 0x5c, 0x6d, 0x1a, 0xbf, 0xbb, 0xda, 0x34, 0xbe, - 0xbc, 0xda, 0x34, 0xfe, 0x78, 0xb5, 0x69, 0xfc, 0xfd, 0x6a, 0xd3, 0xf8, 0xfd, 0x3f, 0x37, 0x8d, - 0x7e, 0x15, 0xdd, 0xff, 0xbd, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x48, 0x26, 0x13, 0xca, 0x22, - 0x18, 0x00, 0x00, + golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_bfbaec40016cbadd) +} + +var fileDescriptor_types_bfbaec40016cbadd = []byte{ + // 2062 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x23, 0x49, + 0x15, 0x4f, 0xdb, 0x8e, 0xed, 0x7e, 0x49, 0xec, 0x4c, 0x25, 0x93, 0x78, 0x0c, 0x24, 0xa3, 0x06, + 0x76, 0x13, 0x36, 0x9b, 0xac, 0xb2, 0x2c, 0xca, 0xec, 0x2c, 0x2b, 0xc5, 0x33, 0x03, 0x89, 0x76, + 0x81, 0xd0, 0x33, 0x13, 0x2e, 0x48, 0xad, 0xb2, 0xbb, 0x62, 0xb7, 0xc6, 0xee, 0xee, 0xed, 0x2e, + 0x67, 0x9d, 0x39, 0x72, 0xde, 0xc3, 0x1e, 0x90, 0xf8, 0x0a, 0x7c, 0x01, 0x24, 0x8e, 0x9c, 0xd0, + 0x1e, 0x11, 0x02, 0x71, 0x1b, 0x20, 0x88, 0x03, 0x7c, 0x02, 0x8e, 0xa8, 0x5e, 0x55, 0xf5, 0xbf, + 0xb4, 0x47, 0x33, 0xc3, 0x8d, 0x4b, 0xab, 0xab, 0xde, 0x7b, 0x55, 0xf5, 0x5e, 0xbd, 0xf7, 0x7e, + 0xef, 0x15, 0x6c, 0xd0, 0xfe, 0xc0, 0x3b, 0xe0, 0x57, 0x21, 0x8b, 0xe5, 0x77, 0x3f, 0x8c, 0x02, + 0x1e, 0x90, 0x45, 0x1c, 0x74, 0xdf, 0x1d, 0x7a, 0x7c, 0x34, 0xed, 0xef, 0x0f, 0x82, 0xc9, 0xc1, + 0x30, 0x18, 0x06, 0x07, 0x48, 0xed, 0x4f, 0x2f, 0x70, 0x84, 0x03, 0xfc, 0x93, 0x52, 0xdd, 0xed, + 0x61, 0x10, 0x0c, 0xc7, 0x2c, 0xe5, 0xe2, 0xde, 0x84, 0xc5, 0x9c, 0x4e, 0x42, 0xc5, 0x70, 0x94, + 0x59, 0x8f, 0x33, 0xdf, 0x65, 0xd1, 0xc4, 0xf3, 0x79, 0xf6, 0x77, 0xec, 0xf5, 0xe3, 0x83, 0x41, + 0x30, 0x99, 0x04, 0x7e, 0xf6, 0x40, 0xd6, 0xef, 0x6b, 0xd0, 0xb0, 0xd9, 0x67, 0x53, 0x16, 0x73, + 0xb2, 0x03, 0x35, 0x36, 0x18, 0x05, 0x9d, 0xca, 0x5d, 0x63, 0x67, 0xe9, 0x90, 0xec, 0x4b, 0x3e, + 0x45, 0x7d, 0x34, 0x18, 0x05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0x1e, 0x68, 0xf2, 0x19, 0x52, 0xed, 0xf6, 0x20, 0x3f, 0x41, 0x3e, 0x02, 0xb8, 0xa4, + 0x63, 0xcf, 0xa5, 0x3c, 0x88, 0xe2, 0x4e, 0xed, 0x6e, 0x35, 0x23, 0x7c, 0xae, 0x09, 0x4f, 0x43, + 0x97, 0x72, 0xd6, 0xab, 0x89, 0x93, 0xd9, 0x19, 0x7e, 0xf2, 0x16, 0xb4, 0x69, 0x18, 0x3a, 0x31, + 0xa7, 0x9c, 0x39, 0xfd, 0x2b, 0xce, 0x62, 0x8c, 0xa4, 0x65, 0x7b, 0x85, 0x86, 0xe1, 0x63, 0x31, + 0xdb, 0x13, 0x93, 0x96, 0x9b, 0xdc, 0x03, 0x3a, 0x39, 0x21, 0x50, 0x73, 0x29, 0xa7, 0x68, 0x8d, + 0x65, 0x1b, 0xff, 0xc5, 0x5c, 0x48, 0xf9, 0x48, 0xe9, 0x88, 0xff, 0x64, 0x03, 0xea, 0x23, 0xe6, + 0x0d, 0x47, 0x1c, 0xd5, 0xaa, 0xda, 0x6a, 0x24, 0x0c, 0x1f, 0x46, 0xc1, 0x25, 0xc3, 0x38, 0x6f, + 0xda, 0x72, 0x60, 0xfd, 0xd3, 0x80, 0x5b, 0x37, 0x02, 0x43, 0xac, 0x3b, 0xa2, 0xf1, 0x48, 0xef, + 0x25, 0xfe, 0xc9, 0x3b, 0x62, 0x5d, 0xea, 0xb2, 0x48, 0xe5, 0x9f, 0x15, 0xa5, 0xf1, 0x09, 0x4e, + 0x2a, 0x45, 0x15, 0x0b, 0x79, 0x04, 0xab, 0x63, 0x1a, 0x73, 0x47, 0xfa, 0xaf, 0x83, 0xf9, 0xa5, + 0x9a, 0x8b, 0xa9, 0x4f, 0xa9, 0xf6, 0x73, 0xe1, 0x56, 0x4a, 0xbc, 0x35, 0xce, 0xcd, 0x92, 0x13, + 0x58, 0xef, 0x5f, 0x3d, 0xa7, 0x3e, 0xf7, 0x7c, 0xe6, 0xdc, 0xb0, 0x79, 0x5b, 0x2d, 0xf5, 0xe8, + 0xd2, 0x73, 0x99, 0x3f, 0xd0, 0xc6, 0x5e, 0x4b, 0x44, 0x92, 0xcb, 0x88, 0xad, 0xbb, 0xd0, 0xca, + 0x47, 0x31, 0x69, 0x41, 0x85, 0xcf, 0x94, 0x86, 0x15, 0x3e, 0xb3, 0xac, 0xc4, 0x03, 0x93, 0x50, + 0xba, 0xc1, 0xb3, 0x0b, 0xed, 0x42, 0x58, 0x67, 0xcc, 0x6d, 0x64, 0xcd, 0x6d, 0xb5, 0x61, 0x25, + 0x17, 0xcd, 0xd6, 0x17, 0x8b, 0xd0, 0xb4, 0x59, 0x1c, 0x0a, 0x67, 0x22, 0x47, 0x60, 0xb2, 0xd9, + 0x80, 0xc9, 0x44, 0x6a, 0x14, 0xd2, 0x94, 0xe4, 0x79, 0xa4, 0xe9, 0x22, 0xa0, 0x13, 0x66, 0xb2, + 0x9b, 0x03, 0x81, 0xb5, 0xa2, 0x50, 0x16, 0x05, 0xf6, 0xf2, 0x28, 0xb0, 0x5e, 0xe0, 0x2d, 0xc0, + 0xc0, 0x6e, 0x0e, 0x06, 0x8a, 0x0b, 0xe7, 0x70, 0xe0, 0x5e, 0x09, 0x0e, 0x14, 0x8f, 0x3f, 0x07, + 0x08, 0xee, 0x95, 0x00, 0x41, 0xe7, 0xc6, 0x5e, 0xa5, 0x48, 0xb0, 0x97, 0x47, 0x82, 0xa2, 0x3a, + 0x05, 0x28, 0xf8, 0xa8, 0x0c, 0x0a, 0xee, 0x14, 0x64, 0xe6, 0x62, 0xc1, 0xfb, 0x37, 0xb0, 0x60, + 0xa3, 0x20, 0x5a, 0x02, 0x06, 0xf7, 0x72, 0x59, 0x1a, 0x4a, 0x75, 0x2b, 0x4f, 0xd3, 0xe4, 0x7b, + 0x37, 0x71, 0x64, 0xb3, 0x78, 0xb5, 0x65, 0x40, 0x72, 0x50, 0x00, 0x92, 0xdb, 0xc5, 0x53, 0x16, + 0x90, 0x24, 0xc5, 0x83, 0x5d, 0x11, 0xf7, 0x05, 0x4f, 0x13, 0x39, 0x82, 0x45, 0x51, 0x10, 0xa9, + 0x84, 0x2d, 0x07, 0xd6, 0x8e, 0xc8, 0x44, 0xa9, 0x7f, 0xbd, 0x04, 0x3b, 0xd0, 0xe9, 0x33, 0xde, + 0x65, 0xfd, 0xca, 0x48, 0x65, 0x31, 0xa2, 0xb3, 0x59, 0xcc, 0x54, 0x59, 0x2c, 0x03, 0x29, 0x95, + 0x1c, 0xa4, 0x90, 0xef, 0xc0, 0x2d, 0x4c, 0x23, 0x68, 0x17, 0x27, 0x97, 0xd6, 0xda, 0x82, 0x20, + 0x0d, 0x22, 0xf3, 0xdb, 0xbb, 0xb0, 0x96, 0xe1, 0x15, 0x29, 0x16, 0x53, 0x58, 0x0d, 0x83, 0x77, + 0x35, 0xe1, 0x3e, 0x0e, 0xc3, 0x13, 0x1a, 0x8f, 0xac, 0x1f, 0xa5, 0xfa, 0xa7, 0x70, 0x45, 0xa0, + 0x36, 0x08, 0x5c, 0xa9, 0xd6, 0x8a, 0x8d, 0xff, 0x02, 0xc2, 0xc6, 0xc1, 0x10, 0x77, 0x35, 0x6d, + 0xf1, 0x2b, 0xb8, 0x92, 0x48, 0x31, 0x65, 0x48, 0x58, 0xbf, 0x34, 0xd2, 0xf5, 0x52, 0x04, 0x2b, + 0x03, 0x1b, 0xe3, 0x7f, 0x01, 0x9b, 0xca, 0xeb, 0x81, 0x8d, 0xf5, 0x1b, 0x23, 0xbd, 0x91, 0x04, + 0x46, 0xde, 0x4c, 0x45, 0xe1, 0x1c, 0x9e, 0xef, 0xb2, 0x19, 0x06, 0x7c, 0xd5, 0x96, 0x03, 0x8d, + 0xf0, 0x75, 0x34, 0x73, 0x1e, 0xe1, 0x1b, 0x38, 0x27, 0x07, 0x0a, 0x7e, 0x82, 0x0b, 0x8c, 0xc4, + 0x65, 0x5b, 0x0e, 0x32, 0xd9, 0xd3, 0xcc, 0x65, 0xcf, 0x33, 0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xac, 0x17, 0x00, 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index 75a53ac46..eacce5442 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -200,27 +200,21 @@ message ResponseCommit { // that can be adjusted by the abci app message ConsensusParams { BlockSize block_size = 1; - TxSize tx_size = 2; - BlockGossip block_gossip = 3; + EvidenceParams evidence_params = 2; } // BlockSize contains limits on the block size. message BlockSize { + // Note: must be greater than 0 int32 max_bytes = 1; + // Note: must be greater or equal to -1 int64 max_gas = 2; } -// TxSize contains limits on the tx size. -message TxSize { - int32 max_bytes = 1; - int64 max_gas = 2; -} - -// BlockGossip determine consensus critical -// elements of how blocks are gossiped -message BlockGossip { - // Note: must not be 0 - int32 block_part_size_bytes = 1; +// EvidenceParams contains limits on the evidence. +message EvidenceParams { + // Note: must be greater than 0 + int64 max_age = 1; } message LastCommitInfo { diff --git a/abci/types/typespb_test.go b/abci/types/typespb_test.go index 0411afc84..5da925e17 100644 --- a/abci/types/typespb_test.go +++ b/abci/types/typespb_test.go @@ -1534,15 +1534,15 @@ func TestBlockSizeMarshalTo(t *testing.T) { } } -func TestTxSizeProto(t *testing.T) { +func TestEvidenceParamsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, false) + p := NewPopulatedEvidenceParams(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TxSize{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1565,10 +1565,10 @@ func TestTxSizeProto(t *testing.T) { } } -func TestTxSizeMarshalTo(t *testing.T) { +func TestEvidenceParamsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, false) + p := NewPopulatedEvidenceParams(popr, false) size := p.Size() dAtA := make([]byte, size) for i := range dAtA { @@ -1578,63 +1578,7 @@ func TestTxSizeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TxSize{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockGossipProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockGossip{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBlockGossipMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockGossip{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2636,34 +2580,16 @@ func TestBlockSizeJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestTxSizeJSON(t *testing.T) { +func TestEvidenceParamsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) + p := NewPopulatedEvidenceParams(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TxSize{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBlockGossipJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockGossip{} + msg := &EvidenceParams{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -3590,12 +3516,12 @@ func TestBlockSizeProtoCompactText(t *testing.T) { } } -func TestTxSizeProtoText(t *testing.T) { +func TestEvidenceParamsProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) + p := NewPopulatedEvidenceParams(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TxSize{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3604,40 +3530,12 @@ func TestTxSizeProtoText(t *testing.T) { } } -func TestTxSizeProtoCompactText(t *testing.T) { +func TestEvidenceParamsProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) + p := NewPopulatedEvidenceParams(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TxSize{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockGossipProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &BlockGossip{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockGossipProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &BlockGossip{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4492,32 +4390,10 @@ func TestBlockSizeSize(t *testing.T) { } } -func TestTxSizeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBlockGossipSize(t *testing.T) { +func TestEvidenceParamsSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) + p := NewPopulatedEvidenceParams(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { diff --git a/blockchain/reactor.go b/blockchain/reactor.go index f975737c6..fc1b1f4d3 100644 --- a/blockchain/reactor.go +++ b/blockchain/reactor.go @@ -290,7 +290,7 @@ FOR_LOOP: didProcessCh <- struct{}{} } - firstParts := first.MakePartSet(state.ConsensusParams.BlockPartSizeBytes) + firstParts := first.MakePartSet(types.BlockPartSizeBytes) firstPartsHeader := firstParts.Header() firstID := types.BlockID{first.Hash(), firstPartsHeader} // Finally, verify the first block using the second's commit diff --git a/blockchain/reactor_test.go b/blockchain/reactor_test.go index f590fd52e..0ef38a6c4 100644 --- a/blockchain/reactor_test.go +++ b/blockchain/reactor_test.go @@ -48,7 +48,7 @@ func newBlockchainReactor(logger log.Logger, maxBlockHeight int64) *BlockchainRe for blockHeight := int64(1); blockHeight <= maxBlockHeight; blockHeight++ { firstBlock := makeBlock(blockHeight, state) secondBlock := makeBlock(blockHeight+1, state) - firstParts := firstBlock.MakePartSet(state.ConsensusParams.BlockGossip.BlockPartSizeBytes) + firstParts := firstBlock.MakePartSet(types.BlockPartSizeBytes) blockStore.SaveBlock(firstBlock, firstParts, secondBlock.LastCommit) } diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 8ea71d353..44280f694 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -102,14 +102,6 @@ func TestWALCrash(t *testing.T) { {"empty block", func(stateDB dbm.DB, cs *ConsensusState, ctx context.Context) {}, 1}, - {"block with a smaller part size", - func(stateDB dbm.DB, cs *ConsensusState, ctx context.Context) { - // XXX: is there a better way to change BlockPartSizeBytes? - cs.state.ConsensusParams.BlockPartSizeBytes = 512 - sm.SaveState(stateDB, cs.state) - go sendTxs(cs, ctx) - }, - 1}, {"many non-empty blocks", func(stateDB dbm.DB, cs *ConsensusState, ctx context.Context) { go sendTxs(cs, ctx) @@ -397,7 +389,7 @@ func testHandshakeReplay(t *testing.T, nBlocks int, mode uint) { } func applyBlock(stateDB dbm.DB, st sm.State, blk *types.Block, proxyApp proxy.AppConns) sm.State { - testPartSize := st.ConsensusParams.BlockPartSizeBytes + testPartSize := types.BlockPartSizeBytes blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(), proxyApp.Consensus(), mempool, evpool) blkID := types.BlockID{blk.Hash(), blk.MakePartSet(testPartSize).Header()} @@ -620,7 +612,7 @@ func (bs *mockBlockStore) LoadBlock(height int64) *types.Block { return bs.chain func (bs *mockBlockStore) LoadBlockMeta(height int64) *types.BlockMeta { block := bs.chain[height-1] return &types.BlockMeta{ - BlockID: types.BlockID{block.Hash(), block.MakePartSet(bs.params.BlockPartSizeBytes).Header()}, + BlockID: types.BlockID{block.Hash(), block.MakePartSet(types.BlockPartSizeBytes).Header()}, Header: block.Header, } } diff --git a/consensus/state.go b/consensus/state.go index d77afafe9..aeb2b8675 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -950,22 +950,15 @@ func (cs *ConsensusState) createProposalBlock() (block *types.Block, blockParts maxBytes := cs.state.ConsensusParams.BlockSize.MaxBytes // bound evidence to 1/10th of the block - evidence := cs.evpool.PendingEvidence(maxBytes / 10) + evidence := cs.evpool.PendingEvidence(types.MaxEvidenceBytesPerBlock(maxBytes)) // Mempool validated transactions - txs := cs.mempool.ReapMaxBytes(maxDataBytes(maxBytes, cs.state.Validators.Size(), len(evidence))) + txs := cs.mempool.ReapMaxBytes(types.MaxDataBytes(maxBytes, cs.state.Validators.Size(), len(evidence))) proposerAddr := cs.privValidator.GetAddress() block, parts := cs.state.MakeBlock(cs.Height, txs, commit, evidence, proposerAddr) return block, parts } -func maxDataBytes(maxBytes, valsCount, evidenceCount int) int { - return maxBytes - - types.MaxAminoOverheadForBlock - - types.MaxHeaderBytes - - (valsCount * types.MaxVoteBytes) - - (evidenceCount * types.MaxEvidenceBytes) -} // Enter: `timeoutPropose` after entering Propose. // Enter: proposal block and POL is ready. diff --git a/consensus/state_test.go b/consensus/state_test.go index 14cd0593e..9c3631504 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -184,7 +184,7 @@ func TestStateBadProposal(t *testing.T) { height, round := cs1.Height, cs1.Round vs2 := vss[1] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) voteCh := subscribe(cs1.eventBus, types.EventQueryVote) @@ -339,7 +339,7 @@ func TestStateLockNoPOL(t *testing.T) { vs2 := vss[1] height := cs1.Height - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) timeoutWaitCh := subscribe(cs1.eventBus, types.EventQueryTimeoutWait) @@ -507,7 +507,7 @@ func TestStateLockPOLRelock(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) timeoutWaitCh := subscribe(cs1.eventBus, types.EventQueryTimeoutWait) @@ -622,7 +622,7 @@ func TestStateLockPOLUnlock(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) @@ -719,7 +719,7 @@ func TestStateLockPOLSafety1(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) @@ -842,7 +842,7 @@ func TestStateLockPOLSafety2(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) @@ -1021,7 +1021,7 @@ func TestStateHalt1(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutWaitCh := subscribe(cs1.eventBus, types.EventQueryTimeoutWait) diff --git a/consensus/wal.go b/consensus/wal.go index 870701f1c..10bef542b 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -18,7 +18,7 @@ import ( ) const ( - // must be greater than params.BlockGossip.BlockPartSizeBytes + a few bytes + // must be greater than types.BlockPartSizeBytes + a few bytes maxMsgSizeBytes = 1024 * 1024 // 1MB ) diff --git a/node/node.go b/node/node.go index 76f23dfdd..cb3d7d67d 100644 --- a/node/node.go +++ b/node/node.go @@ -241,13 +241,16 @@ func NewNode(config *cfg.Config, csMetrics, p2pMetrics, memplMetrics := metricsProvider() // Make MempoolReactor - maxBytes := state.ConsensusParams.TxSize.MaxBytes + maxDataBytes := types.MaxDataBytesUnknownEvidence( + state.ConsensusParams.BlockSize.MaxBytes, + state.Validators.Size(), + ) mempool := mempl.NewMempool( config.Mempool, proxyApp.Mempool(), state.LastBlockHeight, mempl.WithMetrics(memplMetrics), - mempl.WithFilter(func(tx types.Tx) bool { return len(tx) <= maxBytes }), + mempl.WithFilter(func(tx types.Tx) bool { return len(tx) <= maxDataBytes }), ) mempoolLogger := logger.With("module", "mempool") mempool.SetLogger(mempoolLogger) @@ -751,7 +754,6 @@ func saveGenesisDoc(db dbm.DB, genDoc *types.GenesisDoc) { db.SetSync(genesisDocKey, bytes) } - // splitAndTrimEmpty slices s into all subslices separated by sep and returns a // slice of the string s with all leading and trailing Unicode code points // contained in cutset removed. If sep is empty, SplitAndTrim splits after each diff --git a/state/execution.go b/state/execution.go index b1859c220..b4cdb7a3e 100644 --- a/state/execution.go +++ b/state/execution.go @@ -145,8 +145,11 @@ func (blockExec *BlockExecutor) Commit(state State, block *types.Block) ([]byte, "appHash", fmt.Sprintf("%X", res.Data)) // Update mempool. - maxBytes := state.ConsensusParams.TxSize.MaxBytes - filter := func(tx types.Tx) bool { return len(tx) <= maxBytes } + maxDataBytes := types.MaxDataBytesUnknownEvidence( + state.ConsensusParams.BlockSize.MaxBytes, + state.Validators.Size(), + ) + filter := func(tx types.Tx) bool { return len(tx) <= maxDataBytes } if err := blockExec.mempool.Update(block.Height, block.Txs, filter); err != nil { return nil, err } diff --git a/state/state.go b/state/state.go index 10da67e92..26510816b 100644 --- a/state/state.go +++ b/state/state.go @@ -139,7 +139,7 @@ func (state State) MakeBlock( // IncrementAccum for rounds there. block.ProposerAddress = proposerAddress - return block, block.MakePartSet(state.ConsensusParams.BlockGossip.BlockPartSizeBytes) + return block, block.MakePartSet(types.BlockPartSizeBytes) } // MedianTime computes a median time for a given Commit (based on Timestamp field of votes messages) and the diff --git a/state/state_test.go b/state/state_test.go index 9a793c8e7..51e98814e 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -373,18 +373,14 @@ func TestConsensusParamsChangesSaveLoad(t *testing.T) { } } -func makeParams(txsBytes, blockGas, txBytes, txGas, partSize int) types.ConsensusParams { +func makeParams(txsBytes, blockGas, evidenceAge int) types.ConsensusParams { return types.ConsensusParams{ BlockSize: types.BlockSize{ MaxBytes: txsBytes, MaxGas: int64(blockGas), }, - TxSize: types.TxSize{ - MaxBytes: txBytes, - MaxGas: int64(txGas), - }, - BlockGossip: types.BlockGossip{ - BlockPartSizeBytes: partSize, + EvidenceParams: types.EvidenceParams{ + MaxAge: int64(evidenceAge), }, } } @@ -394,7 +390,7 @@ func pk() []byte { } func TestApplyUpdates(t *testing.T) { - initParams := makeParams(1, 2, 3, 4, 5) + initParams := makeParams(1, 2, 3) cases := [...]struct { init types.ConsensusParams @@ -404,33 +400,20 @@ func TestApplyUpdates(t *testing.T) { 0: {initParams, abci.ConsensusParams{}, initParams}, 1: {initParams, abci.ConsensusParams{}, initParams}, 2: {initParams, - abci.ConsensusParams{ - TxSize: &abci.TxSize{ - MaxBytes: 123, - }, - }, - makeParams(1, 2, 123, 4, 5)}, - 3: {initParams, abci.ConsensusParams{ BlockSize: &abci.BlockSize{ - MaxBytes: 1, + MaxBytes: 44, MaxGas: 55, }, }, - makeParams(1, 55, 3, 4, 5)}, - 4: {initParams, + makeParams(44, 55, 3)}, + 3: {initParams, abci.ConsensusParams{ - BlockSize: &abci.BlockSize{ - MaxBytes: 1, - }, - TxSize: &abci.TxSize{ - MaxGas: 888, - }, - BlockGossip: &abci.BlockGossip{ - BlockPartSizeBytes: 2002, + EvidenceParams: &abci.EvidenceParams{ + MaxAge: 66, }, }, - makeParams(1, 2, 3, 888, 2002)}, + makeParams(1, 2, 66)}, } for i, tc := range cases { diff --git a/types/block.go b/types/block.go index d0a1a826f..951ad96fe 100644 --- a/types/block.go +++ b/types/block.go @@ -204,6 +204,28 @@ func (b *Block) StringShort() string { //----------------------------------------------------------------------------- +// MaxDataBytes returns the maximum size of block's data. +func MaxDataBytes(maxBytes, valsCount, evidenceCount int) int { + return maxBytes - + MaxAminoOverheadForBlock - + MaxHeaderBytes - + (valsCount * MaxVoteBytes) - + (evidenceCount * MaxEvidenceBytes) +} + +// MaxDataBytesUnknownEvidence returns the maximum size of block's data when +// evidence count is unknown. MaxEvidenceBytesPerBlock will be used as the size +// of evidence. +func MaxDataBytesUnknownEvidence(maxBytes, valsCount int) int { + return maxBytes - + MaxAminoOverheadForBlock - + MaxHeaderBytes - + (valsCount * MaxVoteBytes) - + MaxEvidenceBytesPerBlock(maxBytes) +} + +//----------------------------------------------------------------------------- + // Header defines the structure of a Tendermint block header // TODO: limit header size // NOTE: changes to the Header should be duplicated in the abci Header diff --git a/types/evidence.go b/types/evidence.go index 8377fcd7f..2526a3942 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -52,6 +52,11 @@ func RegisterEvidences(cdc *amino.Codec) { cdc.RegisterConcrete(MockBadEvidence{}, "tendermint/MockBadEvidence", nil) } +// MaxEvidenceBytesPerBlock returns the maximum evidence size per block. +func MaxEvidenceBytesPerBlock(blockMaxBytes int) int { + return blockMaxBytes / 10 +} + //------------------------------------------- // DuplicateVoteEvidence contains evidence a validator signed two conflicting votes. diff --git a/types/params.go b/types/params.go index 77f68eb7b..902b7873f 100644 --- a/types/params.go +++ b/types/params.go @@ -9,34 +9,24 @@ import ( const ( // MaxBlockSizeBytes is the maximum permitted size of the blocks. MaxBlockSizeBytes = 104857600 // 100MB + + // BlockPartSizeBytes is the size of one block part. + BlockPartSizeBytes = 65536 // 64kB ) -// ConsensusParams contains consensus critical parameters -// that determine the validity of blocks. +// ConsensusParams contains consensus critical parameters that determine the +// validity of blocks. type ConsensusParams struct { BlockSize `json:"block_size_params"` - TxSize `json:"tx_size_params"` - BlockGossip `json:"block_gossip_params"` EvidenceParams `json:"evidence_params"` } // BlockSize contain limits on the block size. type BlockSize struct { - MaxBytes int `json:"max_txs_bytes"` // NOTE: must not be 0 nor greater than 100MB - MaxGas int64 `json:"max_gas"` -} - -// TxSize contain limits on the tx size. -type TxSize struct { - MaxBytes int `json:"max_bytes"` + MaxBytes int `json:"max_txs_bytes"` MaxGas int64 `json:"max_gas"` } -// BlockGossip determine consensus critical elements of how blocks are gossiped -type BlockGossip struct { - BlockPartSizeBytes int `json:"block_part_size_bytes"` // NOTE: must not be 0 -} - // EvidenceParams determine how we handle evidence of malfeasance type EvidenceParams struct { MaxAge int64 `json:"max_age"` // only accept new evidence more recent than this @@ -46,8 +36,6 @@ type EvidenceParams struct { func DefaultConsensusParams() *ConsensusParams { return &ConsensusParams{ DefaultBlockSize(), - DefaultTxSize(), - DefaultBlockGossip(), DefaultEvidenceParams(), } } @@ -55,61 +43,49 @@ func DefaultConsensusParams() *ConsensusParams { // DefaultBlockSize returns a default BlockSize. func DefaultBlockSize() BlockSize { return BlockSize{ - MaxBytes: 22020096, // 21MB - MaxGas: -1, - } -} - -// DefaultTxSize returns a default TxSize. -func DefaultTxSize() TxSize { - return TxSize{ - MaxBytes: 10240, // 10kB + MaxBytes: 22020096, // 21MB MaxGas: -1, } } -// DefaultBlockGossip returns a default BlockGossip. -func DefaultBlockGossip() BlockGossip { - return BlockGossip{ - BlockPartSizeBytes: 65536, // 64kB, - } -} - -// DefaultEvidence Params returns a default EvidenceParams. +// DefaultEvidenceParams Params returns a default EvidenceParams. func DefaultEvidenceParams() EvidenceParams { return EvidenceParams{ MaxAge: 100000, // 27.8 hrs at 1block/s } } -// Validate validates the ConsensusParams to ensure all values -// are within their allowed limits, and returns an error if they are not. +// Validate validates the ConsensusParams to ensure all values are within their +// allowed limits, and returns an error if they are not. func (params *ConsensusParams) Validate() error { - // ensure some values are greater than 0 if params.BlockSize.MaxBytes <= 0 { - return cmn.NewError("BlockSize.MaxBytes must be greater than 0. Got %d", params.BlockSize.MaxBytes) - } - if params.BlockGossip.BlockPartSizeBytes <= 0 { - return cmn.NewError("BlockGossip.BlockPartSizeBytes must be greater than 0. Got %d", params.BlockGossip.BlockPartSizeBytes) + return cmn.NewError("BlockSize.MaxBytes must be greater than 0. Got %d", + params.BlockSize.MaxBytes) } - - // ensure blocks aren't too big if params.BlockSize.MaxBytes > MaxBlockSizeBytes { return cmn.NewError("BlockSize.MaxBytes is too big. %d > %d", params.BlockSize.MaxBytes, MaxBlockSizeBytes) } + + if params.BlockSize.MaxGas < -1 { + return cmn.NewError("BlockSize.MaxGas must be greater or equal to -1. Got %d", + params.BlockSize.MaxGas) + } + + if params.EvidenceParams.MaxAge <= 0 { + return cmn.NewError("EvidenceParams.MaxAge must be greater than 0. Got %d", + params.EvidenceParams.MaxAge) + } + return nil } -// Hash returns a merkle hash of the parameters to store -// in the block header +// Hash returns a merkle hash of the parameters to store in the block header func (params *ConsensusParams) Hash() []byte { return merkle.SimpleHashFromMap(map[string]merkle.Hasher{ - "block_gossip_part_size_bytes": aminoHasher(params.BlockGossip.BlockPartSizeBytes), - "block_size_max_bytes": aminoHasher(params.BlockSize.MaxBytes), - "block_size_max_gas": aminoHasher(params.BlockSize.MaxGas), - "tx_size_max_bytes": aminoHasher(params.TxSize.MaxBytes), - "tx_size_max_gas": aminoHasher(params.TxSize.MaxGas), + "block_size_max_bytes": aminoHasher(params.BlockSize.MaxBytes), + "block_size_max_gas": aminoHasher(params.BlockSize.MaxGas), + "evidence_params_max_age": aminoHasher(params.EvidenceParams.MaxAge), }) } @@ -126,25 +102,11 @@ func (params ConsensusParams) Update(params2 *abci.ConsensusParams) ConsensusPar // XXX: it's cast city over here. It's ok because we only do int32->int // but still, watch it champ. if params2.BlockSize != nil { - if params2.BlockSize.MaxBytes > 0 { - res.BlockSize.MaxBytes = int(params2.BlockSize.MaxBytes) - } - if params2.BlockSize.MaxGas > 0 { - res.BlockSize.MaxGas = params2.BlockSize.MaxGas - } - } - if params2.TxSize != nil { - if params2.TxSize.MaxBytes > 0 { - res.TxSize.MaxBytes = int(params2.TxSize.MaxBytes) - } - if params2.TxSize.MaxGas > 0 { - res.TxSize.MaxGas = params2.TxSize.MaxGas - } + res.BlockSize.MaxBytes = int(params2.BlockSize.MaxBytes) + res.BlockSize.MaxGas = params2.BlockSize.MaxGas } - if params2.BlockGossip != nil { - if params2.BlockGossip.BlockPartSizeBytes > 0 { - res.BlockGossip.BlockPartSizeBytes = int(params2.BlockGossip.BlockPartSizeBytes) - } + if params2.EvidenceParams != nil { + res.EvidenceParams.MaxAge = params2.EvidenceParams.MaxAge } return res } diff --git a/types/params_test.go b/types/params_test.go index 119109ce0..ab235bc47 100644 --- a/types/params_test.go +++ b/types/params_test.go @@ -9,10 +9,10 @@ import ( abci "github.com/tendermint/tendermint/abci/types" ) -func newConsensusParams(txsBytes, partSize int) ConsensusParams { +func newConsensusParams(txsBytes, evidenceAge int) ConsensusParams { return ConsensusParams{ - BlockSize: BlockSize{MaxBytes: txsBytes}, - BlockGossip: BlockGossip{BlockPartSizeBytes: partSize}, + BlockSize: BlockSize{MaxBytes: txsBytes}, + EvidenceParams: EvidenceParams{MaxAge: int64(evidenceAge)}, } } @@ -21,50 +21,45 @@ func TestConsensusParamsValidation(t *testing.T) { params ConsensusParams valid bool }{ - {newConsensusParams(1, 1), true}, - {newConsensusParams(1, 0), false}, - {newConsensusParams(0, 1), false}, - {newConsensusParams(0, 0), false}, - {newConsensusParams(0, 10), false}, - {newConsensusParams(10, -1), false}, - {newConsensusParams(47*1024*1024, 400), true}, - {newConsensusParams(10, 400), true}, - {newConsensusParams(100*1024*1024, 400), true}, - {newConsensusParams(101*1024*1024, 400), false}, - {newConsensusParams(1024*1024*1024, 400), false}, + // test block size + 0: {newConsensusParams(1, 1), true}, + 1: {newConsensusParams(0, 1), false}, + 2: {newConsensusParams(47*1024*1024, 1), true}, + 3: {newConsensusParams(10, 1), true}, + 4: {newConsensusParams(100*1024*1024, 1), true}, + 5: {newConsensusParams(101*1024*1024, 1), false}, + 6: {newConsensusParams(1024*1024*1024, 1), false}, + 7: {newConsensusParams(1024*1024*1024, -1), false}, + // test evidence age + 8: {newConsensusParams(1, 0), false}, + 9: {newConsensusParams(1, -1), false}, } - for _, tc := range testCases { + for i, tc := range testCases { if tc.valid { - assert.NoError(t, tc.params.Validate(), "expected no error for valid params") + assert.NoErrorf(t, tc.params.Validate(), "expected no error for valid params (#%d)", i) } else { - assert.Error(t, tc.params.Validate(), "expected error for non valid params") + assert.Errorf(t, tc.params.Validate(), "expected error for non valid params (#%d)", i) } } } -func makeParams(txsBytes, blockGas, txBytes, txGas, partSize int) ConsensusParams { +func makeParams(txsBytes, blockGas, evidenceAge int) ConsensusParams { return ConsensusParams{ BlockSize: BlockSize{ MaxBytes: txsBytes, MaxGas: int64(blockGas), }, - TxSize: TxSize{ - MaxBytes: txBytes, - MaxGas: int64(txGas), - }, - BlockGossip: BlockGossip{ - BlockPartSizeBytes: partSize, + EvidenceParams: EvidenceParams{ + MaxAge: int64(evidenceAge), }, } } func TestConsensusParamsHash(t *testing.T) { params := []ConsensusParams{ - makeParams(6, 2, 3, 4, 5), - makeParams(1, 6, 3, 4, 5), - makeParams(1, 2, 6, 4, 5), - makeParams(1, 2, 3, 6, 5), - makeParams(1, 2, 3, 4, 6), + makeParams(4, 2, 3), + makeParams(1, 4, 3), + makeParams(1, 2, 4), } hashes := make([][]byte, len(params)) @@ -90,45 +85,23 @@ func TestConsensusParamsUpdate(t *testing.T) { }{ // empty updates { - makeParams(1, 2, 3, 4, 5), + makeParams(1, 2, 3), &abci.ConsensusParams{}, - makeParams(1, 2, 3, 4, 5), - }, - // negative BlockPartSizeBytes - { - makeParams(1, 2, 3, 4, 5), - &abci.ConsensusParams{ - BlockSize: &abci.BlockSize{ - MaxBytes: -100, - MaxGas: -200, - }, - TxSize: &abci.TxSize{ - MaxBytes: -400, - MaxGas: -500, - }, - BlockGossip: &abci.BlockGossip{ - BlockPartSizeBytes: -600, - }, - }, - makeParams(1, 2, 3, 4, 5), + makeParams(1, 2, 3), }, // fine updates { - makeParams(1, 2, 3, 4, 5), + makeParams(1, 2, 3), &abci.ConsensusParams{ BlockSize: &abci.BlockSize{ MaxBytes: 100, MaxGas: 200, }, - TxSize: &abci.TxSize{ - MaxBytes: 300, - MaxGas: 400, - }, - BlockGossip: &abci.BlockGossip{ - BlockPartSizeBytes: 500, + EvidenceParams: &abci.EvidenceParams{ + MaxAge: 300, }, }, - makeParams(100, 200, 300, 400, 500), + makeParams(100, 200, 300), }, } for _, tc := range testCases { diff --git a/types/protobuf.go b/types/protobuf.go index 9c448cd84..df19a5b55 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -115,15 +115,11 @@ func (tm2pb) ValidatorUpdates(vals *ValidatorSet) []abci.ValidatorUpdate { func (tm2pb) ConsensusParams(params *ConsensusParams) *abci.ConsensusParams { return &abci.ConsensusParams{ BlockSize: &abci.BlockSize{ - MaxBytes: int32(params.BlockSize.MaxBytes), - MaxGas: params.BlockSize.MaxGas, + MaxBytes: int32(params.BlockSize.MaxBytes), + MaxGas: params.BlockSize.MaxGas, }, - TxSize: &abci.TxSize{ - MaxBytes: int32(params.TxSize.MaxBytes), - MaxGas: params.TxSize.MaxGas, - }, - BlockGossip: &abci.BlockGossip{ - BlockPartSizeBytes: int32(params.BlockGossip.BlockPartSizeBytes), + EvidenceParams: &abci.EvidenceParams{ + MaxAge: params.EvidenceParams.MaxAge, }, } } @@ -215,18 +211,11 @@ func (pb2tm) ValidatorUpdates(vals []abci.ValidatorUpdate) ([]*Validator, error) func (pb2tm) ConsensusParams(csp *abci.ConsensusParams) ConsensusParams { return ConsensusParams{ BlockSize: BlockSize{ - MaxBytes: int(csp.BlockSize.MaxBytes), // XXX - MaxGas: csp.BlockSize.MaxGas, - }, - TxSize: TxSize{ - MaxBytes: int(csp.TxSize.MaxBytes), // XXX - MaxGas: csp.TxSize.MaxGas, + MaxBytes: int(csp.BlockSize.MaxBytes), // XXX + MaxGas: csp.BlockSize.MaxGas, }, - BlockGossip: BlockGossip{ - BlockPartSizeBytes: int(csp.BlockGossip.BlockPartSizeBytes), // XXX + EvidenceParams: EvidenceParams{ + MaxAge: csp.EvidenceParams.MaxAge, // XXX }, - // TODO: EvidenceParams: EvidenceParams{ - // MaxAge: int(csp.Evidence.MaxAge), // XXX - // }, } }