diff --git a/README.md b/README.md index 2506c57e97..b2a71d5f7f 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ celestia-core is a fork of [cometbft/cometbft](https://github.com/cometbft/cometbft), an implementation of the Tendermint protocol, with the following changes: -1. Early adoption of the ABCI++ methods: `PrepareProposal` and `ProcessProposal` because they haven't yet landed in a CometBFT release. -1. Modifications to how `DataHash` in the block header is determined. In CometBFT, `DataHash` is based on the transactions included in a block. In Celestia, block data (including transactions) are erasure coded into a data square to enable data availability sampling. In order for the header to contain a commitment to this data square, `DataHash` was modified to be the Merkle root of the row and column roots of the erasure coded data square. See [ADR 008](https://github.com/celestiaorg/celestia-core/blob/v0.34.x-celestia/docs/celestia-architecture/adr-008-updating-to-tendermint-v0.35.x.md?plain=1#L20) for the motivation or [celestia-app/pkg/da/data_availability_header.go](https://github.com/celestiaorg/celestia-app/blob/2f89956b22c4c3cfdec19b3b8601095af6f69804/pkg/da/data_availability_header.go) for the implementation. Note on the implementation: celestia-app computes the hash in prepare_proposal and returns it to CometBFT via [`blockData.Hash`](https://github.com/celestiaorg/celestia-app/blob/5bbdac2d3f46662a34b2111602b8f964d6e6fba5/app/prepare_proposal.go#L78) so a modification to celestia-core isn't strictly necessary but [comments](https://github.com/celestiaorg/celestia-core/blob/2ec23f804691afc196d0104616e6c880d4c1ca41/types/block.go#L1041-L1042) were added. +1. Modifications to how `DataHash` in the block header is determined. In CometBFT, `DataHash` is based on the transactions included in a block. In Celestia, block data (including transactions) are erasure coded into a data square to enable data availability sampling. In order for the header to contain a commitment to this data square, `DataHash` was modified to be the Merkle root of the row and column roots of the erasure coded data square. See [ADR 008](https://github.com/celestiaorg/celestia-core/blob/v0.34.x-celestia/docs/celestia-architecture/adr-008-updating-to-tendermint-v0.35.x.md?plain=1#L20) for the motivation or [celestia-app/pkg/da/data_availability_header.go](https://github.com/celestiaorg/celestia-app/blob/2f89956b22c4c3cfdec19b3b8601095af6f69804/pkg/da/data_availability_header.go) for the implementation. The `DataHash` is computed by the application in `PrepareProposal` and returned to `CometBFT` as the second to last transaction. The last transaction is the big endian encoded uint64 of the square size. The `SquareSize` is included in the modified `Data` struct that is gossiped to peers. Similarly `CometBFT` passes the `DataHash` as the second to last tx and the `SquareSize` as the final transaction in `ProcessProposal`. +2. A content-addressable transaction (CAT) pool was implemented using the `Mempool` interface to reduce the duplication and thus bandwidth of peers sending transactions to one another. The specification can be found [here](./mempool/cat/spec.md). See [./docs/celestia-architecture](./docs/celestia-architecture/) for architecture decision records (ADRs) on Celestia modifications. diff --git a/abci/example/kvstore/persistent_kvstore.go b/abci/example/kvstore/persistent_kvstore.go index 3cd8accc69..521e49239a 100644 --- a/abci/example/kvstore/persistent_kvstore.go +++ b/abci/example/kvstore/persistent_kvstore.go @@ -129,7 +129,7 @@ func (app *PersistentKVStoreApplication) BeginBlock(req types.RequestBeginBlock) // Punish validators who committed equivocation. for _, ev := range req.ByzantineValidators { - if ev.Type == types.EvidenceType_DUPLICATE_VOTE { + if ev.Type == types.MisbehaviorType_DUPLICATE_VOTE { addr := string(ev.Validator.Address) if pubKey, ok := app.valAddrToPubKeyMap[addr]; ok { app.updateValidator(types.ValidatorUpdate{ @@ -180,7 +180,7 @@ func (app *PersistentKVStoreApplication) PrepareProposal( func (app *PersistentKVStoreApplication) ProcessProposal( req types.RequestProcessProposal) types.ResponseProcessProposal { - return types.ResponseProcessProposal{Result: types.ResponseProcessProposal_ACCEPT} + return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_ACCEPT} } //--------------------------------------------- diff --git a/abci/types/application.go b/abci/types/application.go index 35eb1cd08e..be68b1510b 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -1,7 +1,10 @@ package types import ( - context "golang.org/x/net/context" + "context" + "encoding/binary" + + "github.com/tendermint/tendermint/crypto/tmhash" ) // Application is an interface that enables any finite, deterministic state machine @@ -98,11 +101,15 @@ func (BaseApplication) ApplySnapshotChunk(req RequestApplySnapshotChunk) Respons } func (BaseApplication) PrepareProposal(req RequestPrepareProposal) ResponsePrepareProposal { - return ResponsePrepareProposal{BlockData: req.BlockData} + // we use placeholder values for the hash and square size + squareSizeBytes := make([]byte, 8) + binary.BigEndian.PutUint64(squareSizeBytes, 0) + req.Txs = append(req.Txs, tmhash.Sum(nil), squareSizeBytes) + return ResponsePrepareProposal{Txs: req.Txs} } func (BaseApplication) ProcessProposal(req RequestProcessProposal) ResponseProcessProposal { - return ResponseProcessProposal{Result: ResponseProcessProposal_ACCEPT} + return ResponseProcessProposal{Status: ResponseProcessProposal_ACCEPT} } //------------------------------------------------------- diff --git a/abci/types/result.go b/abci/types/result.go index d1a9d4cf7d..ed13e3f6d9 100644 --- a/abci/types/result.go +++ b/abci/types/result.go @@ -41,19 +41,20 @@ func (r ResponseQuery) IsErr() bool { return r.Code != CodeTypeOK } -// IsUnknown returns true if Code is Unknown +// IsUnknown returns true if this ResponseProcessProposal status is unknown + func (r ResponseProcessProposal) IsUnknown() bool { - return r.Result == ResponseProcessProposal_UNKNOWN + return r.Status == ResponseProcessProposal_UNKNOWN } -// IsOK returns true if Code is OK -func (r ResponseProcessProposal) IsOK() bool { - return r.Result == ResponseProcessProposal_ACCEPT +// IsAccepted returns true if this ResponseProcessProposal was accepted +func (r ResponseProcessProposal) IsAccepted() bool { + return r.Status == ResponseProcessProposal_ACCEPT } // IsRejected returns true if this ResponseProcessProposal was rejected func (r ResponseProcessProposal) IsRejected() bool { - return r.Result == ResponseProcessProposal_REJECT + return r.Status == ResponseProcessProposal_REJECT } //--------------------------------------------------------------------------- diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 51c0dec764..10253387ca 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -58,31 +58,31 @@ func (CheckTxType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{0} } -type EvidenceType int32 +type MisbehaviorType int32 const ( - EvidenceType_UNKNOWN EvidenceType = 0 - EvidenceType_DUPLICATE_VOTE EvidenceType = 1 - EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2 + MisbehaviorType_UNKNOWN MisbehaviorType = 0 + MisbehaviorType_DUPLICATE_VOTE MisbehaviorType = 1 + MisbehaviorType_LIGHT_CLIENT_ATTACK MisbehaviorType = 2 ) -var EvidenceType_name = map[int32]string{ +var MisbehaviorType_name = map[int32]string{ 0: "UNKNOWN", 1: "DUPLICATE_VOTE", 2: "LIGHT_CLIENT_ATTACK", } -var EvidenceType_value = map[string]int32{ +var MisbehaviorType_value = map[string]int32{ "UNKNOWN": 0, "DUPLICATE_VOTE": 1, "LIGHT_CLIENT_ATTACK": 2, } -func (x EvidenceType) String() string { - return proto.EnumName(EvidenceType_name, int32(x)) +func (x MisbehaviorType) String() string { + return proto.EnumName(MisbehaviorType_name, int32(x)) } -func (EvidenceType) EnumDescriptor() ([]byte, []int) { +func (MisbehaviorType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{1} } @@ -160,31 +160,31 @@ func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{34, 0} } -type ResponseProcessProposal_Result int32 +type ResponseProcessProposal_ProposalStatus int32 const ( - ResponseProcessProposal_UNKNOWN ResponseProcessProposal_Result = 0 - ResponseProcessProposal_ACCEPT ResponseProcessProposal_Result = 1 - ResponseProcessProposal_REJECT ResponseProcessProposal_Result = 2 + ResponseProcessProposal_UNKNOWN ResponseProcessProposal_ProposalStatus = 0 + ResponseProcessProposal_ACCEPT ResponseProcessProposal_ProposalStatus = 1 + ResponseProcessProposal_REJECT ResponseProcessProposal_ProposalStatus = 2 ) -var ResponseProcessProposal_Result_name = map[int32]string{ +var ResponseProcessProposal_ProposalStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "ACCEPT", 2: "REJECT", } -var ResponseProcessProposal_Result_value = map[string]int32{ +var ResponseProcessProposal_ProposalStatus_value = map[string]int32{ "UNKNOWN": 0, "ACCEPT": 1, "REJECT": 2, } -func (x ResponseProcessProposal_Result) String() string { - return proto.EnumName(ResponseProcessProposal_Result_name, int32(x)) +func (x ResponseProcessProposal_ProposalStatus) String() string { + return proto.EnumName(ResponseProcessProposal_ProposalStatus_name, int32(x)) } -func (ResponseProcessProposal_Result) EnumDescriptor() ([]byte, []int) { +func (ResponseProcessProposal_ProposalStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{36, 0} } @@ -814,10 +814,10 @@ func (m *RequestQuery) GetProve() bool { } type RequestBeginBlock struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` - LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"` - ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` + LastCommitInfo CommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"` + ByzantineValidators []Misbehavior `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` } func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } @@ -867,14 +867,14 @@ func (m *RequestBeginBlock) GetHeader() types1.Header { return types1.Header{} } -func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo { +func (m *RequestBeginBlock) GetLastCommitInfo() CommitInfo { if m != nil { return m.LastCommitInfo } - return LastCommitInfo{} + return CommitInfo{} } -func (m *RequestBeginBlock) GetByzantineValidators() []Evidence { +func (m *RequestBeginBlock) GetByzantineValidators() []Misbehavior { if m != nil { return m.ByzantineValidators } @@ -1270,12 +1270,18 @@ func (m *RequestApplySnapshotChunk) GetSender() string { } type RequestPrepareProposal struct { - // block_data is an array of transactions that will be included in a block, + // the modified transactions cannot exceed this size. + MaxTxBytes int64 `protobuf:"varint,1,opt,name=max_tx_bytes,json=maxTxBytes,proto3" json:"max_tx_bytes,omitempty"` + // txs is an array of transactions that will be included in a block, // sent to the app for possible modifications. - // applications can not exceed the size of the data passed to it. - BlockData *types1.Data `protobuf:"bytes,1,opt,name=block_data,json=blockData,proto3" json:"block_data,omitempty"` - // If an application decides to populate block_data with extra information, they can not exceed this value. - BlockDataSize int64 `protobuf:"varint,2,opt,name=block_data_size,json=blockDataSize,proto3" json:"block_data_size,omitempty"` + Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` + LocalLastCommit ExtendedCommitInfo `protobuf:"bytes,3,opt,name=local_last_commit,json=localLastCommit,proto3" json:"local_last_commit"` + Misbehavior []Misbehavior `protobuf:"bytes,4,rep,name=misbehavior,proto3" json:"misbehavior"` + Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,6,opt,name=time,proto3,stdtime" json:"time"` + NextValidatorsHash []byte `protobuf:"bytes,7,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + // address of the public key of the validator proposing the block. + ProposerAddress []byte `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (m *RequestPrepareProposal) Reset() { *m = RequestPrepareProposal{} } @@ -1311,23 +1317,73 @@ func (m *RequestPrepareProposal) XXX_DiscardUnknown() { var xxx_messageInfo_RequestPrepareProposal proto.InternalMessageInfo -func (m *RequestPrepareProposal) GetBlockData() *types1.Data { +func (m *RequestPrepareProposal) GetMaxTxBytes() int64 { if m != nil { - return m.BlockData + return m.MaxTxBytes + } + return 0 +} + +func (m *RequestPrepareProposal) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *RequestPrepareProposal) GetLocalLastCommit() ExtendedCommitInfo { + if m != nil { + return m.LocalLastCommit + } + return ExtendedCommitInfo{} +} + +func (m *RequestPrepareProposal) GetMisbehavior() []Misbehavior { + if m != nil { + return m.Misbehavior } return nil } -func (m *RequestPrepareProposal) GetBlockDataSize() int64 { +func (m *RequestPrepareProposal) GetHeight() int64 { if m != nil { - return m.BlockDataSize + return m.Height } return 0 } +func (m *RequestPrepareProposal) GetTime() time.Time { + if m != nil { + return m.Time + } + return time.Time{} +} + +func (m *RequestPrepareProposal) GetNextValidatorsHash() []byte { + if m != nil { + return m.NextValidatorsHash + } + return nil +} + +func (m *RequestPrepareProposal) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + type RequestProcessProposal struct { - Header types1.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` - BlockData *types1.Data `protobuf:"bytes,2,opt,name=block_data,json=blockData,proto3" json:"block_data,omitempty"` + Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + ProposedLastCommit CommitInfo `protobuf:"bytes,2,opt,name=proposed_last_commit,json=proposedLastCommit,proto3" json:"proposed_last_commit"` + Misbehavior []Misbehavior `protobuf:"bytes,3,rep,name=misbehavior,proto3" json:"misbehavior"` + // hash is the merkle root hash of the fields of the proposed block. + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,6,opt,name=time,proto3,stdtime" json:"time"` + NextValidatorsHash []byte `protobuf:"bytes,7,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + // address of the public key of the original proposer of the block. + ProposerAddress []byte `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (m *RequestProcessProposal) Reset() { *m = RequestProcessProposal{} } @@ -1363,22 +1419,65 @@ func (m *RequestProcessProposal) XXX_DiscardUnknown() { var xxx_messageInfo_RequestProcessProposal proto.InternalMessageInfo -func (m *RequestProcessProposal) GetHeader() types1.Header { +func (m *RequestProcessProposal) GetTxs() [][]byte { if m != nil { - return m.Header + return m.Txs } - return types1.Header{} + return nil +} + +func (m *RequestProcessProposal) GetProposedLastCommit() CommitInfo { + if m != nil { + return m.ProposedLastCommit + } + return CommitInfo{} +} + +func (m *RequestProcessProposal) GetMisbehavior() []Misbehavior { + if m != nil { + return m.Misbehavior + } + return nil +} + +func (m *RequestProcessProposal) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *RequestProcessProposal) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *RequestProcessProposal) GetTime() time.Time { + if m != nil { + return m.Time + } + return time.Time{} +} + +func (m *RequestProcessProposal) GetNextValidatorsHash() []byte { + if m != nil { + return m.NextValidatorsHash + } + return nil } -func (m *RequestProcessProposal) GetBlockData() *types1.Data { +func (m *RequestProcessProposal) GetProposerAddress() []byte { if m != nil { - return m.BlockData + return m.ProposerAddress } return nil } type Response struct { // Types that are valid to be assigned to Value: + // // *Response_Exception // *Response_Echo // *Response_Flush @@ -2677,8 +2776,11 @@ func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string { return nil } +// ResponsePrepareProposal reflects the same protobuf message as CometBFT +// The exception here is that the second to last transaction is always the +// data hash and the last transaction is the square size (to be used in Data) type ResponsePrepareProposal struct { - BlockData *types1.Data `protobuf:"bytes,1,opt,name=block_data,json=blockData,proto3" json:"block_data,omitempty"` + Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` } func (m *ResponsePrepareProposal) Reset() { *m = ResponsePrepareProposal{} } @@ -2714,16 +2816,15 @@ func (m *ResponsePrepareProposal) XXX_DiscardUnknown() { var xxx_messageInfo_ResponsePrepareProposal proto.InternalMessageInfo -func (m *ResponsePrepareProposal) GetBlockData() *types1.Data { +func (m *ResponsePrepareProposal) GetTxs() [][]byte { if m != nil { - return m.BlockData + return m.Txs } return nil } type ResponseProcessProposal struct { - Result ResponseProcessProposal_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseProcessProposal_Result" json:"result,omitempty"` - Evidence [][]byte `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence,omitempty"` + Status ResponseProcessProposal_ProposalStatus `protobuf:"varint,1,opt,name=status,proto3,enum=tendermint.abci.ResponseProcessProposal_ProposalStatus" json:"status,omitempty"` } func (m *ResponseProcessProposal) Reset() { *m = ResponseProcessProposal{} } @@ -2759,20 +2860,13 @@ func (m *ResponseProcessProposal) XXX_DiscardUnknown() { var xxx_messageInfo_ResponseProcessProposal proto.InternalMessageInfo -func (m *ResponseProcessProposal) GetResult() ResponseProcessProposal_Result { +func (m *ResponseProcessProposal) GetStatus() ResponseProcessProposal_ProposalStatus { if m != nil { - return m.Result + return m.Status } return ResponseProcessProposal_UNKNOWN } -func (m *ResponseProcessProposal) GetEvidence() [][]byte { - if m != nil { - return m.Evidence - } - return nil -} - // ConsensusParams contains all consensus-relevant parameters // that can be adjusted by the abci app type ConsensusParams struct { @@ -2898,23 +2992,78 @@ func (m *BlockParams) GetMaxGas() int64 { return 0 } -type LastCommitInfo struct { +type CommitInfo struct { Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"` } -func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} } -func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) } -func (*LastCommitInfo) ProtoMessage() {} -func (*LastCommitInfo) Descriptor() ([]byte, []int) { +func (m *CommitInfo) Reset() { *m = CommitInfo{} } +func (m *CommitInfo) String() string { return proto.CompactTextString(m) } +func (*CommitInfo) ProtoMessage() {} +func (*CommitInfo) Descriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{39} } -func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { +func (m *CommitInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CommitInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitInfo.Merge(m, src) +} +func (m *CommitInfo) XXX_Size() int { + return m.Size() +} +func (m *CommitInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CommitInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitInfo proto.InternalMessageInfo + +func (m *CommitInfo) GetRound() int32 { + if m != nil { + return m.Round + } + return 0 +} + +func (m *CommitInfo) GetVotes() []VoteInfo { + if m != nil { + return m.Votes + } + return nil +} + +type ExtendedCommitInfo struct { + // The round at which the block proposer decided in the previous height. + Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` + // List of validators' addresses in the last validator set with their voting + // information, including vote extensions. + Votes []ExtendedVoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"` +} + +func (m *ExtendedCommitInfo) Reset() { *m = ExtendedCommitInfo{} } +func (m *ExtendedCommitInfo) String() string { return proto.CompactTextString(m) } +func (*ExtendedCommitInfo) ProtoMessage() {} +func (*ExtendedCommitInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{40} +} +func (m *ExtendedCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ExtendedCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_ExtendedCommitInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2924,26 +3073,26 @@ func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *LastCommitInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_LastCommitInfo.Merge(m, src) +func (m *ExtendedCommitInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtendedCommitInfo.Merge(m, src) } -func (m *LastCommitInfo) XXX_Size() int { +func (m *ExtendedCommitInfo) XXX_Size() int { return m.Size() } -func (m *LastCommitInfo) XXX_DiscardUnknown() { - xxx_messageInfo_LastCommitInfo.DiscardUnknown(m) +func (m *ExtendedCommitInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ExtendedCommitInfo.DiscardUnknown(m) } -var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo +var xxx_messageInfo_ExtendedCommitInfo proto.InternalMessageInfo -func (m *LastCommitInfo) GetRound() int32 { +func (m *ExtendedCommitInfo) GetRound() int32 { if m != nil { return m.Round } return 0 } -func (m *LastCommitInfo) GetVotes() []VoteInfo { +func (m *ExtendedCommitInfo) GetVotes() []ExtendedVoteInfo { if m != nil { return m.Votes } @@ -2962,7 +3111,7 @@ func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{40} + return fileDescriptor_252557cfdd89a31a, []int{41} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3016,7 +3165,7 @@ func (m *EventAttribute) Reset() { *m = EventAttribute{} } func (m *EventAttribute) String() string { return proto.CompactTextString(m) } func (*EventAttribute) ProtoMessage() {} func (*EventAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{41} + return fileDescriptor_252557cfdd89a31a, []int{42} } func (m *EventAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3080,7 +3229,7 @@ func (m *TxResult) Reset() { *m = TxResult{} } func (m *TxResult) String() string { return proto.CompactTextString(m) } func (*TxResult) ProtoMessage() {} func (*TxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{42} + return fileDescriptor_252557cfdd89a31a, []int{43} } func (m *TxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3148,7 +3297,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_252557cfdd89a31a, []int{43} + return fileDescriptor_252557cfdd89a31a, []int{44} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3201,7 +3350,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_252557cfdd89a31a, []int{44} + return fileDescriptor_252557cfdd89a31a, []int{45} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3254,7 +3403,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_252557cfdd89a31a, []int{45} + return fileDescriptor_252557cfdd89a31a, []int{46} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3297,8 +3446,68 @@ func (m *VoteInfo) GetSignedLastBlock() bool { return false } -type Evidence struct { - Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"` +type ExtendedVoteInfo struct { + Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` + SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"` + VoteExtension []byte `protobuf:"bytes,3,opt,name=vote_extension,json=voteExtension,proto3" json:"vote_extension,omitempty"` +} + +func (m *ExtendedVoteInfo) Reset() { *m = ExtendedVoteInfo{} } +func (m *ExtendedVoteInfo) String() string { return proto.CompactTextString(m) } +func (*ExtendedVoteInfo) ProtoMessage() {} +func (*ExtendedVoteInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{47} +} +func (m *ExtendedVoteInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtendedVoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExtendedVoteInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExtendedVoteInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtendedVoteInfo.Merge(m, src) +} +func (m *ExtendedVoteInfo) XXX_Size() int { + return m.Size() +} +func (m *ExtendedVoteInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ExtendedVoteInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtendedVoteInfo proto.InternalMessageInfo + +func (m *ExtendedVoteInfo) GetValidator() Validator { + if m != nil { + return m.Validator + } + return Validator{} +} + +func (m *ExtendedVoteInfo) GetSignedLastBlock() bool { + if m != nil { + return m.SignedLastBlock + } + return false +} + +func (m *ExtendedVoteInfo) GetVoteExtension() []byte { + if m != nil { + return m.VoteExtension + } + return nil +} + +type Misbehavior struct { + Type MisbehaviorType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.MisbehaviorType" json:"type,omitempty"` // The offending validator Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"` // The height when the offense occurred @@ -3311,18 +3520,18 @@ type Evidence struct { TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` } -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_252557cfdd89a31a, []int{46} +func (m *Misbehavior) Reset() { *m = Misbehavior{} } +func (m *Misbehavior) String() string { return proto.CompactTextString(m) } +func (*Misbehavior) ProtoMessage() {} +func (*Misbehavior) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{48} } -func (m *Evidence) XXX_Unmarshal(b []byte) error { +func (m *Misbehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Misbehavior) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Evidence.Marshal(b, m, deterministic) + return xxx_messageInfo_Misbehavior.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -3332,47 +3541,47 @@ func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Evidence) XXX_Merge(src proto.Message) { - xxx_messageInfo_Evidence.Merge(m, src) +func (m *Misbehavior) XXX_Merge(src proto.Message) { + xxx_messageInfo_Misbehavior.Merge(m, src) } -func (m *Evidence) XXX_Size() int { +func (m *Misbehavior) XXX_Size() int { return m.Size() } -func (m *Evidence) XXX_DiscardUnknown() { - xxx_messageInfo_Evidence.DiscardUnknown(m) +func (m *Misbehavior) XXX_DiscardUnknown() { + xxx_messageInfo_Misbehavior.DiscardUnknown(m) } -var xxx_messageInfo_Evidence proto.InternalMessageInfo +var xxx_messageInfo_Misbehavior proto.InternalMessageInfo -func (m *Evidence) GetType() EvidenceType { +func (m *Misbehavior) GetType() MisbehaviorType { if m != nil { return m.Type } - return EvidenceType_UNKNOWN + return MisbehaviorType_UNKNOWN } -func (m *Evidence) GetValidator() Validator { +func (m *Misbehavior) GetValidator() Validator { if m != nil { return m.Validator } return Validator{} } -func (m *Evidence) GetHeight() int64 { +func (m *Misbehavior) GetHeight() int64 { if m != nil { return m.Height } return 0 } -func (m *Evidence) GetTime() time.Time { +func (m *Misbehavior) GetTime() time.Time { if m != nil { return m.Time } return time.Time{} } -func (m *Evidence) GetTotalVotingPower() int64 { +func (m *Misbehavior) GetTotalVotingPower() int64 { if m != nil { return m.TotalVotingPower } @@ -3391,7 +3600,7 @@ func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{47} + return fileDescriptor_252557cfdd89a31a, []int{49} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3457,10 +3666,10 @@ func (m *Snapshot) GetMetadata() []byte { func init() { proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value) - proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value) + proto.RegisterEnum("tendermint.abci.MisbehaviorType", MisbehaviorType_name, MisbehaviorType_value) proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value) proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value) - proto.RegisterEnum("tendermint.abci.ResponseProcessProposal_Result", ResponseProcessProposal_Result_name, ResponseProcessProposal_Result_value) + proto.RegisterEnum("tendermint.abci.ResponseProcessProposal_ProposalStatus", ResponseProcessProposal_ProposalStatus_name, ResponseProcessProposal_ProposalStatus_value) proto.RegisterType((*Request)(nil), "tendermint.abci.Request") proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho") proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush") @@ -3500,209 +3709,221 @@ func init() { proto.RegisterType((*ResponseProcessProposal)(nil), "tendermint.abci.ResponseProcessProposal") proto.RegisterType((*ConsensusParams)(nil), "tendermint.abci.ConsensusParams") proto.RegisterType((*BlockParams)(nil), "tendermint.abci.BlockParams") - proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo") + proto.RegisterType((*CommitInfo)(nil), "tendermint.abci.CommitInfo") + proto.RegisterType((*ExtendedCommitInfo)(nil), "tendermint.abci.ExtendedCommitInfo") proto.RegisterType((*Event)(nil), "tendermint.abci.Event") proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute") proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult") proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator") proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate") proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo") - proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence") + proto.RegisterType((*ExtendedVoteInfo)(nil), "tendermint.abci.ExtendedVoteInfo") + proto.RegisterType((*Misbehavior)(nil), "tendermint.abci.Misbehavior") proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot") } func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 2995 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0xe3, 0xc6, - 0x11, 0xe6, 0x9b, 0x44, 0x53, 0x7c, 0x68, 0x76, 0xbd, 0x4b, 0xc3, 0x6b, 0x69, 0x8d, 0x2d, 0xbf, - 0xd6, 0xb6, 0x14, 0xcb, 0xb5, 0x8e, 0x1d, 0x3b, 0xb1, 0x45, 0x2e, 0xd7, 0x94, 0x57, 0x96, 0x14, - 0x88, 0x5a, 0xe7, 0xe5, 0x85, 0x41, 0x72, 0x44, 0xc2, 0x4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, 0xc9, 0x66, 0xf8, 0x50, 0xde, 0xa2, 0x83, 0x82, - 0xbd, 0x02, 0x4b, 0xba, 0xaf, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0xe0, 0xc2, 0x6e, 0x96, 0x48, - 0x28, 0x00, 0x00, + // 3156 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0x63, 0xc5, + 0xf5, 0xd7, 0xfb, 0x71, 0x64, 0x3d, 0xdc, 0x63, 0x66, 0x34, 0x62, 0xb0, 0x87, 0x3b, 0x05, 0xcc, + 0x0c, 0x60, 0xf3, 0x37, 0xff, 0xe1, 0x11, 0x20, 0x60, 0x6b, 0x34, 0xc8, 0xd8, 0xd8, 0xce, 0xb5, + 0x3c, 0x84, 0x3c, 0xe6, 0xd2, 0x92, 0xda, 0xd6, 0x65, 0xa4, 0x7b, 0x2f, 0xf7, 0xb6, 0x8c, 0xcc, + 0x32, 0x54, 0xaa, 0x52, 0x64, 0x43, 0x55, 0x36, 0x6c, 0x58, 0x64, 0x91, 0xef, 0x90, 0x4d, 0xb2, + 0xc9, 0x86, 0xaa, 0x2c, 0xc2, 0x32, 0x8b, 0x14, 0x49, 0xc1, 0x2e, 0x5f, 0x20, 0xcb, 0xa4, 0xfa, + 0x71, 0x5f, 0x92, 0xae, 0x24, 0x43, 0x2a, 0x55, 0xa9, 0xec, 0xba, 0x4f, 0x9f, 0x73, 0xfa, 0xf6, + 0xe9, 0xee, 0x73, 0xce, 0xef, 0xdc, 0x86, 0x47, 0x29, 0x31, 0xba, 0xc4, 0x1e, 0xe8, 0x06, 0xdd, + 0xc0, 0xed, 0x8e, 0xbe, 0x41, 0xcf, 0x2d, 0xe2, 0xac, 0x5b, 0xb6, 0x49, 0x4d, 0x54, 0xf6, 0x07, + 0xd7, 0xd9, 0x60, 0xed, 0xb1, 0x00, 0x77, 0xc7, 0x3e,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, 0x2a, 0x8a, 0x77, 0x19, 0xbc, 0xf8, 0x34, + 0xae, 0x55, 0xb9, 0x05, 0xe5, 0xb1, 0x00, 0x14, 0xd8, 0xbe, 0x78, 0x70, 0xfb, 0x94, 0x32, 0x14, + 0x43, 0xd1, 0x46, 0xb9, 0x0c, 0x2b, 0xd3, 0x82, 0x87, 0xd2, 0xf3, 0xe8, 0xa1, 0x20, 0x80, 0xee, + 0x40, 0xce, 0x8b, 0x1e, 0xe2, 0x32, 0x5e, 0x9d, 0x58, 0x85, 0xcb, 0xac, 0x7a, 0xac, 0xec, 0x16, + 0xb2, 0x53, 0xcd, 0x8f, 0x43, 0x82, 0x7f, 0x78, 0x16, 0x5b, 0x56, 0x13, 0x3b, 0x3d, 0xe5, 0x3d, + 0xa8, 0x46, 0x45, 0x86, 0xb1, 0x65, 0xa4, 0xbc, 0x53, 0x78, 0x19, 0x32, 0x27, 0xa6, 0x3d, 0xc0, + 0x94, 0x2b, 0x2b, 0xaa, 0xb2, 0xc7, 0x4e, 0xa7, 0x88, 0x12, 0x49, 0x4e, 0x16, 0x1d, 0x45, 0x83, + 0xab, 0x91, 0xd1, 0x81, 0x89, 0xe8, 0x46, 0x97, 0x08, 0x7b, 0x16, 0x55, 0xd1, 0xf1, 0x15, 0x89, + 0x8f, 0x15, 0x1d, 0x36, 0xad, 0xc3, 0xd7, 0xca, 0xf5, 0xe7, 0x55, 0xd9, 0x53, 0x3e, 0x4b, 0xc2, + 0xe5, 0xe9, 0x31, 0x02, 0x5d, 0x87, 0xa5, 0x01, 0x1e, 0x69, 0x74, 0x24, 0xef, 0xb2, 0xd8, 0x0e, + 0x18, 0xe0, 0x51, 0x6b, 0x24, 0x2e, 0x72, 0x05, 0x92, 0x74, 0xe4, 0x54, 0x13, 0xd7, 0x93, 0x37, + 0x97, 0x54, 0xd6, 0x44, 0xc7, 0xb0, 0xdc, 0x37, 0x3b, 0xb8, 0xaf, 0x05, 0x4e, 0xbc, 0x3c, 0xec, + 0x37, 0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 0x10, 0x88, 0x4b, 0xcf, 0x59, 0x66, 0x04, + 0x8a, 0xab, 0x87, 0x50, 0x5c, 0x66, 0x8e, 0x92, 0x08, 0x18, 0xf7, 0x82, 0x0b, 0xe3, 0xb2, 0x73, + 0x96, 0x3d, 0x86, 0xe3, 0xee, 0x85, 0x71, 0x5c, 0x2e, 0xc2, 0x0b, 0xb9, 0xd2, 0x91, 0x40, 0xee, + 0xb5, 0x00, 0x90, 0xcb, 0x47, 0xa2, 0x28, 0xa1, 0x64, 0x0a, 0x92, 0xab, 0x87, 0x90, 0x1c, 0xcc, + 0xb1, 0x41, 0x04, 0x94, 0x7b, 0x23, 0x08, 0xe5, 0x0a, 0x91, 0x68, 0x50, 0x1e, 0x9a, 0x69, 0x58, + 0xee, 0x65, 0x0f, 0xcb, 0x2d, 0x45, 0x82, 0x51, 0xb9, 0x86, 0x71, 0x30, 0x77, 0x30, 0x01, 0xe6, + 0x04, 0xf8, 0x7a, 0x32, 0x52, 0xc5, 0x1c, 0x34, 0x77, 0x30, 0x81, 0xe6, 0x4a, 0x73, 0x14, 0xce, + 0x81, 0x73, 0x3f, 0x99, 0x0e, 0xe7, 0xa2, 0x01, 0x97, 0xfc, 0xcc, 0xc5, 0xf0, 0x9c, 0x16, 0x81, + 0xe7, 0x04, 0xe6, 0x7a, 0x3a, 0x52, 0xfd, 0xc2, 0x80, 0xee, 0x78, 0x0a, 0xa0, 0x13, 0xd0, 0xeb, + 0x66, 0xa4, 0xf2, 0x05, 0x10, 0xdd, 0xf1, 0x14, 0x44, 0x87, 0xe6, 0xaa, 0x5d, 0x1c, 0xd2, 0xdd, + 0x62, 0x99, 0xf3, 0x98, 0x9b, 0x63, 0xe9, 0x07, 0xb1, 0x6d, 0xd3, 0x96, 0x68, 0x49, 0x74, 0x94, + 0x9b, 0x2c, 0x97, 0xf7, 0x5d, 0xda, 0x0c, 0xf8, 0xc7, 0xd3, 0xbc, 0x80, 0x1b, 0x53, 0x7e, 0x1b, + 0xf7, 0x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+ 0x88, 0xaa, 0xb6, 0x70, 0x71, 0x5e, 0xcc, 0x12, 0x86, 0x50, 0x8b, 0x3e, 0xaa, 0xaa, 0x2d, 0x5c, + 0xab, 0xdf, 0x6e, 0x7c, 0xf1, 0xf5, 0x6a, 0xfc, 0xcb, 0xaf, 0x57, 0xe3, 0x7f, 0xfb, 0x7a, 0x35, + 0xfe, 0xe9, 0x37, 0xab, 0xb1, 0x2f, 0xbf, 0x59, 0x8d, 0xfd, 0xf9, 0x9b, 0xd5, 0xd8, 0x8f, 0x9e, + 0x3e, 0xd5, 0x69, 0x6f, 0xd8, 0x5e, 0xef, 0x98, 0x83, 0x8d, 0xe0, 0xeb, 0xd4, 0x69, 0x2f, 0x66, + 0xdb, 0x19, 0x1e, 0x77, 0x9f, 0xff, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0x09, 0xb6, 0x19, + 0x51, 0x2b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5357,22 +5578,70 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.BlockDataSize != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.BlockDataSize)) + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x42 } - if m.BlockData != nil { - { - size, err := m.BlockData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x3a + } + n23, err23 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err23 != nil { + return 0, err23 + } + i -= n23 + i = encodeVarintTypes(dAtA, i, uint64(n23)) + i-- + dAtA[i] = 0x32 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x28 + } + if len(m.Misbehavior) > 0 { + for iNdEx := len(m.Misbehavior) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Misbehavior[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + { + size, err := m.LocalLastCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.MaxTxBytes != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.MaxTxBytes)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -5397,20 +5666,56 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.BlockData != nil { - { - size, err := m.BlockData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x3a + } + n25, err25 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err25 != nil { + return 0, err25 + } + i -= n25 + i = encodeVarintTypes(dAtA, i, uint64(n25)) + i-- + dAtA[i] = 0x32 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x28 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x22 + } + if len(m.Misbehavior) > 0 { + for iNdEx := len(m.Misbehavior) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Misbehavior[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x12 } { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ProposedLastCommit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -5418,7 +5723,16 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } return len(dAtA) - i, nil } @@ -6597,20 +6911,20 @@ func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, err } } if len(m.RefetchChunks) > 0 { - dAtA48 := make([]byte, len(m.RefetchChunks)*10) - var j47 int + dAtA49 := make([]byte, len(m.RefetchChunks)*10) + var j48 int for _, num := range m.RefetchChunks { for num >= 1<<7 { - dAtA48[j47] = uint8(uint64(num)&0x7f | 0x80) + dAtA49[j48] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j47++ + j48++ } - dAtA48[j47] = uint8(num) - j47++ + dAtA49[j48] = uint8(num) + j48++ } - i -= j47 - copy(dAtA[i:], dAtA48[:j47]) - i = encodeVarintTypes(dAtA, i, uint64(j47)) + i -= j48 + copy(dAtA[i:], dAtA49[:j48]) + i = encodeVarintTypes(dAtA, i, uint64(j48)) i-- dAtA[i] = 0x12 } @@ -6642,17 +6956,14 @@ func (m *ResponsePrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.BlockData != nil { - { - size, err := m.BlockData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -6677,17 +6988,8 @@ func (m *ResponseProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if len(m.Evidence) > 0 { - for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Evidence[iNdEx]) - copy(dAtA[i:], m.Evidence[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Evidence[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Result != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Result)) + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } @@ -6798,7 +7100,49 @@ func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) { +func (m *CommitInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommitInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Round != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Round)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ExtendedCommitInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -6808,12 +7152,12 @@ func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *ExtendedCommitInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ExtendedCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -7097,7 +7441,57 @@ func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Evidence) Marshal() (dAtA []byte, err error) { +func (m *ExtendedVoteInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExtendedVoteInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExtendedVoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VoteExtension) > 0 { + i -= len(m.VoteExtension) + copy(dAtA[i:], m.VoteExtension) + i = encodeVarintTypes(dAtA, i, uint64(len(m.VoteExtension))) + i-- + dAtA[i] = 0x1a + } + if m.SignedLastBlock { + i-- + if m.SignedLastBlock { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Misbehavior) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -7107,12 +7501,12 @@ func (m *Evidence) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { +func (m *Misbehavior) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Misbehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -7122,12 +7516,12 @@ func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n57, err57 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err57 != nil { - return 0, err57 + n58, err58 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err58 != nil { + return 0, err58 } - i -= n57 - i = encodeVarintTypes(dAtA, i, uint64(n57)) + i -= n58 + i = encodeVarintTypes(dAtA, i, uint64(n58)) i-- dAtA[i] = 0x22 if m.Height != 0 { @@ -7688,12 +8082,35 @@ func (m *RequestPrepareProposal) Size() (n int) { } var l int _ = l - if m.BlockData != nil { - l = m.BlockData.Size() + if m.MaxTxBytes != 0 { + n += 1 + sovTypes(uint64(m.MaxTxBytes)) + } + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + l = m.LocalLastCommit.Size() + n += 1 + l + sovTypes(uint64(l)) + if len(m.Misbehavior) > 0 { + for _, e := range m.Misbehavior { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = len(m.NextValidatorsHash) + if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - if m.BlockDataSize != 0 { - n += 1 + sovTypes(uint64(m.BlockDataSize)) + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } return n } @@ -7704,10 +8121,35 @@ func (m *RequestProcessProposal) Size() (n int) { } var l int _ = l - l = m.Header.Size() + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + l = m.ProposedLastCommit.Size() + n += 1 + l + sovTypes(uint64(l)) + if len(m.Misbehavior) > 0 { + for _, e := range m.Misbehavior { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) - if m.BlockData != nil { - l = m.BlockData.Size() + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n @@ -8306,9 +8748,11 @@ func (m *ResponsePrepareProposal) Size() (n int) { } var l int _ = l - if m.BlockData != nil { - l = m.BlockData.Size() - n += 1 + l + sovTypes(uint64(l)) + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } } return n } @@ -8319,14 +8763,8 @@ func (m *ResponseProcessProposal) Size() (n int) { } var l int _ = l - if m.Result != 0 { - n += 1 + sovTypes(uint64(m.Result)) - } - if len(m.Evidence) > 0 { - for _, b := range m.Evidence { - l = len(b) - n += 1 + l + sovTypes(uint64(l)) - } + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) } return n } @@ -8371,7 +8809,25 @@ func (m *BlockParams) Size() (n int) { return n } -func (m *LastCommitInfo) Size() (n int) { +func (m *CommitInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Round != 0 { + n += 1 + sovTypes(uint64(m.Round)) + } + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *ExtendedCommitInfo) Size() (n int) { if m == nil { return 0 } @@ -8493,7 +8949,25 @@ func (m *VoteInfo) Size() (n int) { return n } -func (m *Evidence) Size() (n int) { +func (m *ExtendedVoteInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Validator.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.SignedLastBlock { + n += 2 + } + l = len(m.VoteExtension) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Misbehavior) Size() (n int) { if m == nil { return 0 } @@ -10109,7 +10583,7 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ByzantineValidators = append(m.ByzantineValidators, Evidence{}) + m.ByzantineValidators = append(m.ByzantineValidators, Misbehavior{}) if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -10883,10 +11357,10 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockData", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxTxBytes", wireType) } - var msglen int + m.MaxTxBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -10896,33 +11370,16 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.MaxTxBytes |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockData == nil { - m.BlockData = &types1.Data{} - } - if err := m.BlockData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockDataSize", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } - m.BlockDataSize = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -10932,64 +11389,27 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockDataSize |= int64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestProcessProposal) 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 + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes } - if iNdEx >= l { + if postIndex > 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: RequestProcessProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestProcessProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LocalLastCommit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11016,13 +11436,13 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.LocalLastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Misbehavior", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11049,19 +11469,440 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.BlockData == nil { - m.BlockData = &types1.Data{} - } - if err := m.BlockData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Misbehavior = append(m.Misbehavior, Misbehavior{}) + if err := m.Misbehavior[len(m.Misbehavior)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", 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 < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestProcessProposal) 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: RequestProcessProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestProcessProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposedLastCommit", 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 < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ProposedLastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Misbehavior", 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 < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Misbehavior = append(m.Misbehavior, Misbehavior{}) + if err := m.Misbehavior[len(m.Misbehavior)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", 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 < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } @@ -14162,9 +15003,9 @@ func (m *ResponsePrepareProposal) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14174,27 +15015,23 @@ func (m *ResponsePrepareProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if m.BlockData == nil { - m.BlockData = &types1.Data{} - } - if err := m.BlockData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -14234,42 +15071,23 @@ func (m *ResponseProcessProposal) Unmarshal(dAtA []byte) error { 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: ResponseProcessProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseProcessProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - m.Result = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Result |= ResponseProcessProposal_Result(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + break } - var byteLen int + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseProcessProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseProcessProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14279,24 +15097,11 @@ func (m *ResponseProcessProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.Status |= ResponseProcessProposal_ProposalStatus(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Evidence = append(m.Evidence, make([]byte, postIndex-iNdEx)) - copy(m.Evidence[len(m.Evidence)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -14600,7 +15405,7 @@ func (m *BlockParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *LastCommitInfo) Unmarshal(dAtA []byte) error { +func (m *CommitInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14623,10 +15428,10 @@ func (m *LastCommitInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group") + return fmt.Errorf("proto: CommitInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -14703,6 +15508,109 @@ func (m *LastCommitInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *ExtendedCommitInfo) 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: ExtendedCommitInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtendedCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) + } + m.Round = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Round |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", 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 < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, ExtendedVoteInfo{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Event) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -15420,7 +16328,144 @@ func (m *VoteInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *Evidence) Unmarshal(dAtA []byte) error { +func (m *ExtendedVoteInfo) 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: ExtendedVoteInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtendedVoteInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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 < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SignedLastBlock = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteExtension", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VoteExtension = append(m.VoteExtension[:0], dAtA[iNdEx:postIndex]...) + if m.VoteExtension == nil { + m.VoteExtension = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Misbehavior) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15443,10 +16488,10 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Evidence: wiretype end group for non-group") + return fmt.Errorf("proto: Misbehavior: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Misbehavior: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -15463,7 +16508,7 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= EvidenceType(b&0x7F) << shift + m.Type |= MisbehaviorType(b&0x7F) << shift if b < 0x80 { break } diff --git a/blockchain/msgs_test.go b/blockchain/msgs_test.go index 810cdef3d4..a625b9b8cd 100644 --- a/blockchain/msgs_test.go +++ b/blockchain/msgs_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/require" bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" ) @@ -81,7 +80,7 @@ func TestBcStatusResponseMessageValidateBasic(t *testing.T) { //nolint:lll // ignore line length in tests func TestBlockchainMessageVectors(t *testing.T) { - block := types.MakeBlock(int64(3), factory.MakeData([]types.Tx{types.Tx("Hello World")}), nil, nil) + block := types.MakeBlock(int64(3), []types.Tx{types.Tx("Hello World")}, nil, nil) block.Version.Block = 11 // overwrite updated protocol version bpb, err := block.ToProto() diff --git a/blockchain/v0/reactor.go b/blockchain/v0/reactor.go index 090cd6f760..3fe786eb88 100644 --- a/blockchain/v0/reactor.go +++ b/blockchain/v0/reactor.go @@ -366,6 +366,11 @@ FOR_LOOP: err := state.Validators.VerifyCommitLight( chainID, firstID, first.Height, second.LastCommit) + if err == nil { + // validate the block before we persist it + err = bcR.blockExec.ValidateBlock(state, first) + } + if err == nil { var stateMachineValid bool // Block sync doesn't check that the `Data` in a block is valid. @@ -375,17 +380,12 @@ FOR_LOOP: // performed, a malicious node could fabricate an alternative // set of transactions that would cause a different app hash and // thus cause this node to panic. - stateMachineValid, err = bcR.blockExec.ProcessProposal(first) + stateMachineValid, err = bcR.blockExec.ProcessProposal(first, state) if !stateMachineValid { err = fmt.Errorf("application has rejected syncing block (%X) at height %d", first.Hash(), first.Height) } } - if err == nil { - // validate the block before we persist it - err = bcR.blockExec.ValidateBlock(state, first) - } - if err != nil { bcR.Logger.Error("Error in validation", "err", err) peerID := bcR.pool.RedoRequest(first.Height) diff --git a/blockchain/v0/reactor_test.go b/blockchain/v0/reactor_test.go index e2cd58e624..f77a3bb104 100644 --- a/blockchain/v0/reactor_test.go +++ b/blockchain/v0/reactor_test.go @@ -22,7 +22,6 @@ import ( "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/store" - "github.com/tendermint/tendermint/test/factory" "github.com/tendermint/tendermint/types" cmttime "github.com/tendermint/tendermint/types/time" ) @@ -317,7 +316,7 @@ func makeTxs(height int64) (txs []types.Tx) { func makeBlock(height int64, state sm.State, lastCommit *types.Commit) *types.Block { block, _ := state.MakeBlock( height, - factory.MakeData(makeTxs(height)), + makeTxs(height), lastCommit, nil, state.Validators.GetProposer().Address, diff --git a/blockchain/v1/peer_test.go b/blockchain/v1/peer_test.go index 31a7b6f5e9..1798f13b56 100644 --- a/blockchain/v1/peer_test.go +++ b/blockchain/v1/peer_test.go @@ -11,7 +11,6 @@ import ( "github.com/tendermint/tendermint/libs/log" cmtrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" ) @@ -277,5 +276,5 @@ func checkByStoppingPeerTimer(t *testing.T, peer *BpPeer, running bool) { } func makeSmallBlock(height int) *types.Block { - return types.MakeBlock(int64(height), factory.MakeData([]types.Tx{types.Tx("foo")}), nil, nil) + return types.MakeBlock(int64(height), []types.Tx{types.Tx("foo")}, nil, nil) } diff --git a/blockchain/v1/pool_test.go b/blockchain/v1/pool_test.go index e281586b13..31b9d09f7d 100644 --- a/blockchain/v1/pool_test.go +++ b/blockchain/v1/pool_test.go @@ -8,7 +8,6 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" ) @@ -82,7 +81,7 @@ func makeBlockPool(bcr *testBcR, height int64, peers []BpPeer, blocks map[int64] bPool.peers[p.id].RequestSent(h) if p.create { // simulate that a block at height h has been received - _ = bPool.peers[p.id].AddBlock(types.MakeBlock(h, factory.MakeData(txs), nil, nil), 100) + _ = bPool.peers[p.id].AddBlock(types.MakeBlock(h, txs, nil, nil), 100) } } return bPool @@ -393,7 +392,7 @@ func TestBlockPoolAddBlock(t *testing.T) { pool: makeBlockPool(testBcR, 10, []BpPeer{{ID: "P1", Height: 100}}, map[int64]tPBlocks{}), args: args{ peerID: "P2", - block: types.MakeBlock(int64(10), factory.MakeData(txs), nil, nil), + block: types.MakeBlock(int64(10), txs, nil, nil), blockSize: 100, }, poolWanted: makeBlockPool(testBcR, 10, []BpPeer{{ID: "P1", Height: 100}}, map[int64]tPBlocks{}), @@ -405,7 +404,7 @@ func TestBlockPoolAddBlock(t *testing.T) { map[int64]tPBlocks{10: {"P1", false}}), args: args{ peerID: "P1", - block: types.MakeBlock(int64(11), factory.MakeData(txs), nil, nil), + block: types.MakeBlock(int64(11), txs, nil, nil), blockSize: 100, }, poolWanted: makeBlockPool(testBcR, 10, @@ -419,7 +418,7 @@ func TestBlockPoolAddBlock(t *testing.T) { map[int64]tPBlocks{10: {"P1", true}, 11: {"P1", false}}), args: args{ peerID: "P1", - block: types.MakeBlock(int64(10), factory.MakeData(txs), nil, nil), + block: types.MakeBlock(int64(10), txs, nil, nil), blockSize: 100, }, poolWanted: makeBlockPool(testBcR, 10, @@ -433,7 +432,7 @@ func TestBlockPoolAddBlock(t *testing.T) { map[int64]tPBlocks{10: {"P1", false}}), args: args{ peerID: "P2", - block: types.MakeBlock(int64(10), factory.MakeData(txs), nil, nil), + block: types.MakeBlock(int64(10), txs, nil, nil), blockSize: 100, }, poolWanted: makeBlockPool(testBcR, 10, @@ -447,7 +446,7 @@ func TestBlockPoolAddBlock(t *testing.T) { map[int64]tPBlocks{10: {"P1", false}}), args: args{ peerID: "P1", - block: types.MakeBlock(int64(10), factory.MakeData(txs), nil, nil), + block: types.MakeBlock(int64(10), txs, nil, nil), blockSize: 100, }, poolWanted: makeBlockPool(testBcR, 10, diff --git a/blockchain/v1/reactor_fsm_test.go b/blockchain/v1/reactor_fsm_test.go index 45c2bac1fa..fad40b0052 100644 --- a/blockchain/v1/reactor_fsm_test.go +++ b/blockchain/v1/reactor_fsm_test.go @@ -11,7 +11,6 @@ import ( cmtmath "github.com/tendermint/tendermint/libs/math" cmtrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" ) @@ -143,7 +142,7 @@ func sBlockRespEv(current, expected string, peerID p2p.ID, height int64, prevBlo data: bReactorEventData{ peerID: peerID, height: height, - block: types.MakeBlock(height, factory.MakeData(txs), nil, nil), + block: types.MakeBlock(height, txs, nil, nil), length: 100}, wantState: expected, wantNewBlocks: append(prevBlocks, height), @@ -160,7 +159,7 @@ func sBlockRespEvErrored(current, expected string, data: bReactorEventData{ peerID: peerID, height: height, - block: types.MakeBlock(height, factory.MakeData(txs), nil, nil), + block: types.MakeBlock(height, txs, nil, nil), length: 100}, wantState: expected, wantErr: wantErr, diff --git a/blockchain/v1/reactor_test.go b/blockchain/v1/reactor_test.go index 2f090b4c7a..54384a3f37 100644 --- a/blockchain/v1/reactor_test.go +++ b/blockchain/v1/reactor_test.go @@ -23,7 +23,6 @@ import ( cmtproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" cmttime "github.com/tendermint/tendermint/types/time" @@ -384,7 +383,7 @@ func makeTxs(height int64) (txs []types.Tx) { func makeBlock(height int64, state sm.State, lastCommit *types.Commit) *types.Block { block, _ := state.MakeBlock( height, - factory.MakeData(makeTxs(height)), + makeTxs(height), lastCommit, nil, state.Validators.GetProposer().Address, diff --git a/blockchain/v2/reactor_test.go b/blockchain/v2/reactor_test.go index d3231a4ae3..1d9d5b33c7 100644 --- a/blockchain/v2/reactor_test.go +++ b/blockchain/v2/reactor_test.go @@ -25,7 +25,6 @@ import ( bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" cmttime "github.com/tendermint/tendermint/types/time" @@ -473,7 +472,7 @@ func makeTxs(height int64) (txs []types.Tx) { func makeBlock(height int64, state sm.State, lastCommit *types.Commit) *types.Block { block, _ := state.MakeBlock( height, - factory.MakeData(makeTxs(height)), + makeTxs(height), lastCommit, nil, state.Validators.GetProposer().Address, diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index 3159f30477..a2589579ba 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -251,8 +251,3 @@ func (app *CounterApplication) Commit() abci.ResponseCommit { binary.BigEndian.PutUint64(hash, uint64(app.txCount)) return abci.ResponseCommit{Data: hash} } - -func (app *CounterApplication) PrepareProposal( - req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - return abci.ResponsePrepareProposal{BlockData: req.BlockData} -} diff --git a/consensus/replay_test.go b/consensus/replay_test.go index a1b703f8d6..19047d1387 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -30,7 +30,6 @@ import ( cmtproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" ) @@ -1008,7 +1007,7 @@ func makeBlock(state sm.State, lastBlock *types.Block, lastBlockMeta *types.Bloc return state.MakeBlock( height, - factory.MakeData([]types.Tx{}), + []types.Tx{}, lastCommit, nil, state.Validators.GetProposer().Address, diff --git a/consensus/state.go b/consensus/state.go index b9e90e2103..38eb0809c3 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1288,7 +1288,7 @@ func (cs *State) defaultDoPrevote(height int64, round int32) { return } - stateMachineValidBlock, err := cs.blockExec.ProcessProposal(cs.ProposalBlock) + stateMachineValidBlock, err := cs.blockExec.ProcessProposal(cs.ProposalBlock, cs.state) if err != nil { cs.Logger.Error("state machine returned an error when trying to process proposal block", "err", err) } diff --git a/evidence/pool_test.go b/evidence/pool_test.go index 52abf0f9e3..5d8d38e103 100644 --- a/evidence/pool_test.go +++ b/evidence/pool_test.go @@ -19,7 +19,6 @@ import ( sm "github.com/tendermint/tendermint/state" smmocks "github.com/tendermint/tendermint/state/mocks" "github.com/tendermint/tendermint/store" - "github.com/tendermint/tendermint/test/factory" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" ) @@ -193,7 +192,7 @@ func TestEvidencePoolUpdate(t *testing.T) { ev := types.NewMockDuplicateVoteEvidenceWithValidator(height, defaultEvidenceTime.Add(21*time.Minute), val, evidenceChainID) lastCommit := makeCommit(height, val.PrivKey.PubKey().Address()) - block := types.MakeBlock(height+1, factory.MakeData([]types.Tx{}), lastCommit, []types.Evidence{ev}) + block := types.MakeBlock(height+1, []types.Tx{}, lastCommit, []types.Evidence{ev}) // update state (partially) state.LastBlockHeight = height + 1 @@ -407,7 +406,7 @@ func initializeBlockStore(db dbm.DB, state sm.State, valAddr []byte) *store.Bloc for i := int64(1); i <= state.LastBlockHeight; i++ { lastCommit := makeCommit(i-1, valAddr) - block, _ := state.MakeBlock(i, factory.MakeData([]types.Tx{}), lastCommit, nil, + block, _ := state.MakeBlock(i, []types.Tx{}, lastCommit, nil, state.Validators.GetProposer().Address) block.Header.Time = defaultEvidenceTime.Add(time.Duration(i) * time.Minute) block.Header.Version = cmtversion.Consensus{Block: version.BlockProtocol, App: 1} diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 4947a44161..4d330fc5b1 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -79,8 +79,8 @@ message RequestQuery { message RequestBeginBlock { bytes hash = 1; tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; + CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated Misbehavior byzantine_validators = 4 [(gogoproto.nullable) = false]; } enum CheckTxType { @@ -127,17 +127,31 @@ message RequestApplySnapshotChunk { } message RequestPrepareProposal { - // block_data is an array of transactions that will be included in a block, + // the modified transactions cannot exceed this size. + int64 max_tx_bytes = 1; + // txs is an array of transactions that will be included in a block, // sent to the app for possible modifications. - // applications can not exceed the size of the data passed to it. - tendermint.types.Data block_data = 1; - // If an application decides to populate block_data with extra information, they can not exceed this value. - int64 block_data_size = 2; + repeated bytes txs = 2; + ExtendedCommitInfo local_last_commit = 3 [(gogoproto.nullable) = false]; + repeated Misbehavior misbehavior = 4 [(gogoproto.nullable) = false]; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // address of the public key of the validator proposing the block. + bytes proposer_address = 8; } message RequestProcessProposal { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; - tendermint.types.Data block_data = 2; + repeated bytes txs = 1; + CommitInfo proposed_last_commit = 2 [(gogoproto.nullable) = false]; + repeated Misbehavior misbehavior = 3 [(gogoproto.nullable) = false]; + // hash is the merkle root hash of the fields of the proposed block. + bytes hash = 4; + int64 height = 5; + google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes next_validators_hash = 7; + // address of the public key of the original proposer of the block. + bytes proposer_address = 8; } //---------------------------------------- @@ -300,18 +314,20 @@ message ResponseApplySnapshotChunk { } } +// ResponsePrepareProposal reflects the same protobuf message as CometBFT +// The exception here is that the second to last transaction is always the +// data hash and the last transaction is the square size (to be used in Data) message ResponsePrepareProposal { - tendermint.types.Data block_data = 1; + repeated bytes txs = 1; } message ResponseProcessProposal { - Result result = 1; - repeated bytes evidence = 2; + ProposalStatus status = 1; - enum Result { - UNKNOWN = 0; // Unknown result, invalidate - ACCEPT = 1; // proposal verified, vote on the proposal - REJECT = 2; // proposal invalidated + enum ProposalStatus { + UNKNOWN = 0; + ACCEPT = 1; + REJECT = 2; } } @@ -335,11 +351,19 @@ message BlockParams { int64 max_gas = 2; } -message LastCommitInfo { +message CommitInfo { int32 round = 1; repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; } +message ExtendedCommitInfo { + // The round at which the block proposer decided in the previous height. + int32 round = 1; + // List of validators' addresses in the last validator set with their voting + // information, including vote extensions. + repeated ExtendedVoteInfo votes = 2 [(gogoproto.nullable) = false]; +} + // Event allows application developers to attach additional information to // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. // Later, transactions may be queried using these events. @@ -390,14 +414,20 @@ message VoteInfo { bool signed_last_block = 2; } -enum EvidenceType { +message ExtendedVoteInfo { + Validator validator = 1 [(gogoproto.nullable) = false]; + bool signed_last_block = 2; + bytes vote_extension = 3; // Reserved for future use +} + +enum MisbehaviorType { UNKNOWN = 0; DUPLICATE_VOTE = 1; LIGHT_CLIENT_ATTACK = 2; } -message Evidence { - EvidenceType type = 1; +message Misbehavior { + MisbehaviorType type = 1; // The offending validator Validator validator = 2 [(gogoproto.nullable) = false]; // The height when the offense occurred diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 2fe5aa16aa..4c5357ea50 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -108,9 +108,9 @@ message Data { // to a namespace and is encoded into shares based on the format specified by // share_version. message Blob { - bytes namespace_id = 1; - bytes data = 2; - uint32 share_version = 3; + bytes namespace_id = 1; + bytes data = 2; + uint32 share_version = 3; uint32 namespace_version = 4; } @@ -211,17 +211,17 @@ message BlobTx { // ShareProof is an NMT proof that a set of shares exist in a set of rows and a // Merkle proof that those rows exist in a Merkle tree with a given data root. message ShareProof { - repeated bytes data = 1; - repeated NMTProof share_proofs = 2; - bytes namespace_id = 3; - RowProof row_proof = 4; - uint32 namespace_version = 5; + repeated bytes data = 1; + repeated NMTProof share_proofs = 2; + bytes namespace_id = 3; + RowProof row_proof = 4; + uint32 namespace_version = 5; } // RowProof is a Merkle proof that a set of rows exist in a Merkle tree with a // given data root. message RowProof { - repeated bytes row_roots = 1; + repeated bytes row_roots = 1; repeated tendermint.crypto.Proof proofs = 2; bytes root = 3; uint32 start_row = 4; diff --git a/state/execution.go b/state/execution.go index 1fcf43a982..a7f2fc143e 100644 --- a/state/execution.go +++ b/state/execution.go @@ -1,12 +1,14 @@ package state import ( + "encoding/binary" "errors" "fmt" "time" abci "github.com/tendermint/tendermint/abci/types" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" + "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/fail" "github.com/tendermint/tendermint/libs/log" mempl "github.com/tendermint/tendermint/mempool" @@ -106,19 +108,21 @@ func (blockExec *BlockExecutor) CreateProposalBlock( // Fetch a limited amount of valid txs maxDataBytes := types.MaxDataBytes(maxBytes, evSize, state.Validators.Size()) - - // TODO(ismail): reaping the mempool has to happen in relation to a max - // allowed square size instead of (only) Gas / bytes - // maybe the mempool actually should track things separately - // meaning that CheckTx should already do the mapping: - // Tx -> Txs, Message - // https://github.com/tendermint/tendermint/issues/77 txs := blockExec.mempool.ReapMaxBytesMaxGas(maxDataBytes, maxGas) + block, _ := state.MakeBlock(height, txs, commit, evidence, proposerAddr) - preparedProposal, err := blockExec.proxyApp.PrepareProposalSync( + localLastCommit := buildLastCommitInfo(block, blockExec.store, state.InitialHeight) + rpp, err := blockExec.proxyApp.PrepareProposalSync( abci.RequestPrepareProposal{ - BlockData: &cmtproto.Data{Txs: txs.ToSliceOfBytes()}, - BlockDataSize: maxDataBytes}, + MaxTxBytes: maxDataBytes, + Txs: block.Txs.ToSliceOfBytes(), + LocalLastCommit: extendedCommitInfo(localLastCommit), + Misbehavior: block.Evidence.Evidence.ToABCI(), + Height: block.Height, + Time: block.Time, + NextValidatorsHash: block.NextValidatorsHash, + ProposerAddress: block.ProposerAddress, + }, ) if err != nil { // The App MUST ensure that only valid (and hence 'processable') transactions @@ -131,50 +135,72 @@ func (blockExec *BlockExecutor) CreateProposalBlock( // purpose for now. panic(err) } - rawNewData := preparedProposal.GetBlockData() + + // Celestia passes the data root back as the second to last transaction + // and the big endian encoding of the square size as the last transaction. + if len(rpp.Txs) < 2 { + panic("state machine returned an invalid prepare proposal response: expected at least 2 transactions") + } + + if len(rpp.Txs[len(rpp.Txs)-2]) != tmhash.Size { + panic(fmt.Sprintf("state machine returned an invalid prepare proposal response: expected second to last transaction to be a hash, got %d bytes", len(rpp.Txs[len(rpp.Txs)-2]))) + } + + if len(rpp.Txs[len(rpp.Txs)-1]) != 8 { + panic("state machine returned an invalid prepare proposal response: expected last transaction to be a uint64 (square size)") + } + + // update the block with the response from PrepareProposal + block.Data, _ = types.DataFromProto(&cmtproto.Data{ + SquareSize: binary.BigEndian.Uint64(rpp.Txs[len(rpp.Txs)-1]), + Txs: rpp.Txs[:len(rpp.Txs)-2], + Hash: rpp.Txs[len(rpp.Txs)-2], + }) + var blockDataSize int - for _, tx := range rawNewData.GetTxs() { + for _, tx := range block.Txs { blockDataSize += len(tx) - if maxDataBytes < int64(blockDataSize) { panic("block data exceeds max amount of allowed bytes") } } - newData, err := types.DataFromProto(rawNewData) - if err != nil { - // todo(evan): see if we can get rid of this panic - panic(err) - } - - return state.MakeBlock( - height, - newData, - commit, - evidence, - proposerAddr, - ) + return block, block.MakePartSet(types.BlockPartSizeBytes) } func (blockExec *BlockExecutor) ProcessProposal( block *types.Block, + state State, ) (bool, error) { - pData := block.Data.ToProto() - req := abci.RequestProcessProposal{ - BlockData: &pData, - Header: *block.Header.ToProto(), - } - resp, err := blockExec.proxyApp.ProcessProposalSync(req) + // Similar to PrepareProposal, the last two transactions provided to Celestia + // in ProcessProposal are the data hash and square size respectively + squareSizeBytes := make([]byte, 8) + binary.BigEndian.PutUint64(squareSizeBytes, block.Data.SquareSize) + txs := append(block.Data.Txs.ToSliceOfBytes(), block.DataHash, squareSizeBytes) + + resp, err := blockExec.proxyApp.ProcessProposalSync(abci.RequestProcessProposal{ + Hash: block.Header.Hash(), + Height: block.Header.Height, + Time: block.Header.Time, + Txs: txs, + ProposedLastCommit: buildLastCommitInfo(block, blockExec.store, state.InitialHeight), + Misbehavior: block.Evidence.Evidence.ToABCI(), + ProposerAddress: block.ProposerAddress, + NextValidatorsHash: block.NextValidatorsHash, + }) if err != nil { return false, ErrInvalidBlock(err) } + if resp.IsUnknown() { + panic(fmt.Sprintf("ProcessProposal responded with status %s", resp.Status.String())) + } if resp.IsRejected() { blockExec.metrics.ProcessProposalRejected.Add(1) } - return resp.IsOK(), nil + return resp.IsAccepted(), nil } // ValidateBlock validates the given block against the given state. @@ -360,9 +386,9 @@ func execBlockOnProxyApp( } proxyAppConn.SetResponseCallback(proxyCb) - commitInfo := getBeginBlockValidatorInfo(block, store, initialHeight) + commitInfo := buildLastCommitInfo(block, store, initialHeight) - byzVals := make([]abci.Evidence, 0) + byzVals := make([]abci.Misbehavior, 0) for _, evidence := range block.Evidence.Evidence { byzVals = append(byzVals, evidence.ABCI()...) } @@ -409,43 +435,62 @@ func execBlockOnProxyApp( return abciResponses, nil } -func getBeginBlockValidatorInfo(block *types.Block, store Store, - initialHeight int64) 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 - // sense for LastCommitInfo.Votes to also be empty. - if block.Height > initialHeight { - lastValSet, err := store.LoadValidators(block.Height - 1) - if err != nil { - panic(err) - } +func buildLastCommitInfo(block *types.Block, store Store, initialHeight int64) abci.CommitInfo { + if block.Height == initialHeight { + // there is no last commit for the initial height. + // return an empty value. + return abci.CommitInfo{} + } - // Sanity check that commit size matches validator set size - only applies - // after first block. - var ( - commitSize = block.LastCommit.Size() - valSetLen = len(lastValSet.Validators) - ) - if commitSize != valSetLen { - panic(fmt.Sprintf( - "commit size (%d) doesn't match valset length (%d) at height %d\n\n%v\n\n%v", - commitSize, valSetLen, block.Height, block.LastCommit.Signatures, lastValSet.Validators, - )) - } + lastValSet, err := store.LoadValidators(block.Height - 1) + if err != nil { + panic(fmt.Errorf("failed to load validator set at height %d: %w", block.Height-1, err)) + } - for i, val := range lastValSet.Validators { - commitSig := block.LastCommit.Signatures[i] - voteInfos[i] = abci.VoteInfo{ - Validator: types.TM2PB.Validator(val), - SignedLastBlock: !commitSig.Absent(), - } + var ( + commitSize = block.LastCommit.Size() + valSetLen = len(lastValSet.Validators) + ) + + // ensure that the size of the validator set in the last commit matches + // the size of the validator set in the state store. + if commitSize != valSetLen { + panic(fmt.Sprintf( + "commit size (%d) doesn't match validator set length (%d) at height %d\n\n%v\n\n%v", + commitSize, valSetLen, block.Height, block.LastCommit.Signatures, lastValSet.Validators, + )) + } + + votes := make([]abci.VoteInfo, block.LastCommit.Size()) + for i, val := range lastValSet.Validators { + commitSig := block.LastCommit.Signatures[i] + votes[i] = abci.VoteInfo{ + Validator: types.TM2PB.Validator(val), + SignedLastBlock: commitSig.BlockIDFlag != types.BlockIDFlagAbsent, } } - return abci.LastCommitInfo{ + return abci.CommitInfo{ Round: block.LastCommit.Round, - Votes: voteInfos, + Votes: votes, + } +} + +func extendedCommitInfo(c abci.CommitInfo) abci.ExtendedCommitInfo { + vs := make([]abci.ExtendedVoteInfo, len(c.Votes)) + for i := range vs { + vs[i] = abci.ExtendedVoteInfo{ + Validator: c.Votes[i].Validator, + SignedLastBlock: c.Votes[i].SignedLastBlock, + /* + TODO: Include vote extensions information when implementing vote extensions. + VoteExtension: []byte{}, + */ + } + } + return abci.ExtendedCommitInfo{ + Round: c.Round, + Votes: vs, } } diff --git a/state/execution_test.go b/state/execution_test.go index 144f0c5327..1990096828 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -119,7 +119,7 @@ func TestBeginBlockValidators(t *testing.T) { // block for height 2 block, _ := state.MakeBlock( 2, - factory.MakeData(factory.MakeTenTxs(2)), + factory.MakeTenTxs(2), lastCommit, nil, state.Validators.GetProposer().Address, @@ -201,16 +201,16 @@ func TestBeginBlockByzantineValidators(t *testing.T) { ev := []types.Evidence{dve, lcae} - abciEv := []abci.Evidence{ + abciEv := []abci.Misbehavior{ { - Type: abci.EvidenceType_DUPLICATE_VOTE, + Type: abci.MisbehaviorType_DUPLICATE_VOTE, Height: 3, Time: defaultEvidenceTime, Validator: types.TM2PB.Validator(state.Validators.Validators[0]), TotalVotingPower: 10, }, { - Type: abci.EvidenceType_LIGHT_CLIENT_ATTACK, + Type: abci.MisbehaviorType_LIGHT_CLIENT_ATTACK, Height: 8, Time: defaultEvidenceTime, Validator: types.TM2PB.Validator(state.Validators.Validators[0]), @@ -259,7 +259,7 @@ func TestProcessProposal(t *testing.T) { block := sf.MakeBlock(state, int64(height), new(types.Commit)) block.Txs = txs - acceptBlock, err := blockExec.ProcessProposal(block) + acceptBlock, err := blockExec.ProcessProposal(block, state) require.Nil(t, err) require.Equal(t, expectAccept, acceptBlock) } @@ -307,7 +307,7 @@ func TestProcessProposalRejectedMetric(t *testing.T) { for _, test := range tests { blockExec := makeBlockExec(t, test.name, test.block, stateDB, metrics) - _, err := blockExec.ProcessProposal(test.block) + _, err := blockExec.ProcessProposal(test.block, state) require.Nil(t, err, test.name) prometheusOutput := getPrometheusOutput() diff --git a/state/helpers_test.go b/state/helpers_test.go index bc534e6dc2..d3f6a99a21 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -57,7 +57,7 @@ func makeAndApplyGoodBlock(state sm.State, height int64, lastCommit *types.Commi blockExec *sm.BlockExecutor, evidence []types.Evidence) (sm.State, types.BlockID, error) { block, _ := state.MakeBlock( height, - factory.MakeData(factory.MakeTenTxs(height)), + factory.MakeTenTxs(height), lastCommit, evidence, proposerAddr, @@ -143,7 +143,7 @@ func makeState(nVals, height int) (sm.State, dbm.DB, map[string]types.PrivValida func makeBlock(state sm.State, height int64) *types.Block { block, _ := state.MakeBlock( height, - factory.MakeData(makeTxs(state.LastBlockHeight)), + makeTxs(state.LastBlockHeight), new(types.Commit), nil, state.Validators.GetProposer().Address, @@ -243,7 +243,7 @@ type testApp struct { abci.BaseApplication CommitVotes []abci.VoteInfo - ByzantineValidators []abci.Evidence + ByzantineValidators []abci.Misbehavior ValidatorUpdates []abci.ValidatorUpdate } @@ -284,10 +284,10 @@ func (app *testApp) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQue } func (app *testApp) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { - for _, tx := range req.BlockData.Txs { + for _, tx := range req.Txs { if len(tx) == 0 { - return abci.ResponseProcessProposal{Result: abci.ResponseProcessProposal_REJECT} + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} } } - return abci.ResponseProcessProposal{Result: abci.ResponseProcessProposal_ACCEPT} + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} } diff --git a/state/state.go b/state/state.go index 53ff02bb47..08f8f085b0 100644 --- a/state/state.go +++ b/state/state.go @@ -233,13 +233,13 @@ func FromProto(pb *cmtstate.State) (*State, error) { //nolint:golint // track rounds, and hence does not know the correct proposer. TODO: fix this! func (state State) MakeBlock( height int64, - data types.Data, + txs types.Txs, commit *types.Commit, evidence []types.Evidence, proposerAddress []byte, ) (*types.Block, *types.PartSet) { // Build base block with block data. - block := types.MakeBlock(height, data, commit, evidence) + block := types.MakeBlock(height, txs, commit, evidence) // Set time. var timestamp time.Time diff --git a/state/test/factory/block.go b/state/test/factory/block.go index ec5ef24f1b..32b67c3f60 100644 --- a/state/test/factory/block.go +++ b/state/test/factory/block.go @@ -40,7 +40,7 @@ func MakeBlocks(n int, state *sm.State, privVal types.PrivValidator) []*types.Bl func MakeBlock(state sm.State, height int64, c *types.Commit) *types.Block { block, _ := state.MakeBlock( height, - MakeData(factory.MakeTenTxs(state.LastBlockHeight)), + factory.MakeTenTxs(state.LastBlockHeight), c, nil, state.Validators.GetProposer().Address, @@ -48,12 +48,6 @@ func MakeBlock(state sm.State, height int64, c *types.Commit) *types.Block { return block } -func MakeData(txs []types.Tx) types.Data { - return types.Data{ - Txs: txs, - } -} - func makeBlockAndPartSet(state sm.State, lastBlock *types.Block, lastBlockMeta *types.BlockMeta, privVal types.PrivValidator, height int64) (*types.Block, *types.PartSet) { @@ -69,7 +63,7 @@ func makeBlockAndPartSet(state sm.State, lastBlock *types.Block, lastBlockMeta * lastBlockMeta.BlockID, []types.CommitSig{vote.CommitSig()}) } - return state.MakeBlock(height, MakeData([]types.Tx{}), lastCommit, nil, state.Validators.GetProposer().Address) + return state.MakeBlock(height, []types.Tx{}, lastCommit, nil, state.Validators.GetProposer().Address) } func MakeVote( diff --git a/state/validation_test.go b/state/validation_test.go index 0014f45dab..36700be138 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -80,7 +80,7 @@ func TestValidateBlockHeader(t *testing.T) { Invalid blocks don't pass */ for _, tc := range testCases { - block, _ := state.MakeBlock(height, factory.MakeData(makeTxs(height)), lastCommit, nil, proposerAddr) + block, _ := state.MakeBlock(height, makeTxs(height), lastCommit, nil, proposerAddr) tc.malleateBlock(block) err := blockExec.ValidateBlock(state, block) require.Error(t, err, tc.name) @@ -97,7 +97,7 @@ func TestValidateBlockHeader(t *testing.T) { nextHeight := validationTestsStopHeight block, _ := state.MakeBlock( nextHeight, - factory.MakeData(factory.MakeTenTxs(nextHeight)), + factory.MakeTenTxs(nextHeight), lastCommit, nil, state.Validators.GetProposer().Address, @@ -152,7 +152,7 @@ func TestValidateBlockCommit(t *testing.T) { ) block, _ := state.MakeBlock( height, - factory.MakeData(factory.MakeTenTxs(height)), + factory.MakeTenTxs(height), wrongHeightCommit, nil, proposerAddr, @@ -166,7 +166,7 @@ func TestValidateBlockCommit(t *testing.T) { */ block, _ = state.MakeBlock( height, - factory.MakeData(factory.MakeTenTxs(height)), + factory.MakeTenTxs(height), wrongSigsCommit, nil, proposerAddr, @@ -252,7 +252,7 @@ func TestValidateBlockEvidence(t *testing.T) { evpool.On("CheckEvidence", mock.AnythingOfType("types.EvidenceList")).Return(nil) evpool.On("Update", mock.AnythingOfType("state.State"), mock.AnythingOfType("types.EvidenceList")).Return() evpool.On("ABCIEvidence", mock.AnythingOfType("int64"), mock.AnythingOfType("[]types.Evidence")).Return( - []abci.Evidence{}) + []abci.Misbehavior{}) state.ConsensusParams.Evidence.MaxBytes = 1000 blockExec := sm.NewBlockExecutor( @@ -282,7 +282,7 @@ func TestValidateBlockEvidence(t *testing.T) { } block, _ := state.MakeBlock( height, - factory.MakeData(factory.MakeTenTxs(height)), + factory.MakeTenTxs(height), lastCommit, evidence, proposerAddr, diff --git a/store/store_test.go b/store/store_test.go index bd117c1afd..b1f75813cc 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -21,7 +21,6 @@ import ( cmtstore "github.com/tendermint/tendermint/proto/tendermint/store" cmtversion "github.com/tendermint/tendermint/proto/tendermint/version" sm "github.com/tendermint/tendermint/state" - "github.com/tendermint/tendermint/state/test/factory" "github.com/tendermint/tendermint/types" cmttime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" @@ -53,7 +52,7 @@ func makeTxs(height int64) (txs []types.Tx) { func makeBlock(height int64, state sm.State, lastCommit *types.Commit) *types.Block { block, _ := state.MakeBlock( height, - factory.MakeData(makeTxs(height)), + makeTxs(height), lastCommit, nil, state.Validators.GetProposer().Address, diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index e603d34fae..672f9d0751 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -257,16 +257,6 @@ func (app *Application) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) a return abci.ResponseApplySnapshotChunk{Result: abci.ResponseApplySnapshotChunk_ACCEPT} } -func (app *Application) PrepareProposal( - req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - return abci.ResponsePrepareProposal{BlockData: req.BlockData} -} - -func (app *Application) ProcessProposal( - req abci.RequestProcessProposal) abci.ResponseProcessProposal { - return abci.ResponseProcessProposal{Result: abci.ResponseProcessProposal_ACCEPT} -} - func (app *Application) Rollback() error { return app.state.Rollback() } diff --git a/types/block.go b/types/block.go index 858969852f..8c5071158c 100644 --- a/types/block.go +++ b/types/block.go @@ -314,7 +314,7 @@ func MaxDataBytesNoEvidence(maxBytes int64, valsCount int) int64 { // It populates the same set of fields validated by ValidateBasic. func MakeBlock( height int64, - data Data, + txs Txs, lastCommit *Commit, evidence []Evidence) *Block { block := &Block{ @@ -322,7 +322,7 @@ func MakeBlock( Version: cmtversion.Consensus{Block: version.BlockProtocol, App: 0}, Height: height, }, - Data: data, + Data: Data{Txs: txs}, Evidence: EvidenceData{Evidence: evidence}, LastCommit: lastCommit, } diff --git a/types/block_test.go b/types/block_test.go index b20986137b..97dce0e2ed 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -45,7 +45,7 @@ func TestBlockAddEvidence(t *testing.T) { ev := NewMockDuplicateVoteEvidenceWithValidator(h, time.Now(), vals[0], "block-test-chain") evList := []Evidence{ev} - block := MakeBlock(h, makeData(txs), commit, evList) + block := MakeBlock(h, txs, commit, evList) require.NotNil(t, block) require.Equal(t, 1, len(block.Evidence.Evidence)) require.NotNil(t, block.EvidenceHash) @@ -89,7 +89,7 @@ func TestBlockValidateBasic(t *testing.T) { tc := tc i := i t.Run(tc.testName, func(t *testing.T) { - block := MakeBlock(h, makeData(txs), commit, evList) + block := MakeBlock(h, txs, commit, evList) block.ProposerAddress = valSet.GetProposer().Address tc.malleateBlock(block) err = block.ValidateBasic() @@ -100,13 +100,13 @@ func TestBlockValidateBasic(t *testing.T) { func TestBlockHash(t *testing.T) { assert.Nil(t, (*Block)(nil).Hash()) - assert.Nil(t, MakeBlock(int64(3), makeData([]Tx{Tx("Hello World")}), nil, nil).Hash()) + assert.Nil(t, MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).Hash()) } func TestBlockMakePartSet(t *testing.T) { assert.Nil(t, (*Block)(nil).MakePartSet(2)) - partSet := MakeBlock(int64(3), makeData([]Tx{Tx("Hello World")}), nil, nil).MakePartSet(1024) + partSet := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).MakePartSet(1024) assert.NotNil(t, partSet) assert.EqualValues(t, 1, partSet.Total()) } @@ -124,7 +124,7 @@ func TestBlockMakePartSetWithEvidence(t *testing.T) { ev := NewMockDuplicateVoteEvidenceWithValidator(h, time.Now(), vals[0], "block-test-chain") evList := []Evidence{ev} - partSet := MakeBlock(h, makeData([]Tx{Tx("Hello World")}), commit, evList).MakePartSet(512) + partSet := MakeBlock(h, []Tx{Tx("Hello World")}, commit, evList).MakePartSet(512) assert.NotNil(t, partSet) assert.EqualValues(t, 4, partSet.Total()) } @@ -141,7 +141,7 @@ func TestBlockHashesTo(t *testing.T) { ev := NewMockDuplicateVoteEvidenceWithValidator(h, time.Now(), vals[0], "block-test-chain") evList := []Evidence{ev} - block := MakeBlock(h, makeData([]Tx{Tx("Hello World")}), commit, evList) + block := MakeBlock(h, []Tx{Tx("Hello World")}, commit, evList) block.ValidatorsHash = valSet.Hash() assert.False(t, block.HashesTo([]byte{})) assert.False(t, block.HashesTo([]byte("something else"))) @@ -149,7 +149,7 @@ func TestBlockHashesTo(t *testing.T) { } func TestBlockSize(t *testing.T) { - size := MakeBlock(int64(3), makeData([]Tx{Tx("Hello World")}), nil, nil).Size() + size := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).Size() if size <= 0 { t.Fatal("Size of the block is zero or negative") } @@ -160,7 +160,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), makeData([]Tx{Tx("Hello World")}), nil, nil) + block := MakeBlock(int64(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()) @@ -618,16 +618,16 @@ func TestBlockIDValidateBasic(t *testing.T) { func TestBlockProtoBuf(t *testing.T) { h := cmtrand.Int63() c1 := randCommit(time.Now()) - b1 := MakeBlock(h, makeData([]Tx{Tx([]byte{1})}), &Commit{Signatures: []CommitSig{}}, []Evidence{}) + b1 := MakeBlock(h, []Tx{Tx([]byte{1})}, &Commit{Signatures: []CommitSig{}}, []Evidence{}) b1.ProposerAddress = cmtrand.Bytes(crypto.AddressSize) evidenceTime := time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC) evi := NewMockDuplicateVoteEvidence(h, evidenceTime, "block-test-chain") - b2 := MakeBlock(h, makeData([]Tx{Tx([]byte{1})}), c1, []Evidence{evi}) + b2 := MakeBlock(h, []Tx{Tx([]byte{1})}, c1, []Evidence{evi}) b2.ProposerAddress = cmtrand.Bytes(crypto.AddressSize) b2.Evidence.ByteSize() - b3 := MakeBlock(h, makeData([]Tx{}), c1, []Evidence{}) + b3 := MakeBlock(h, []Tx{}, c1, []Evidence{}) b3.ProposerAddress = cmtrand.Bytes(crypto.AddressSize) testCases := []struct { msg string @@ -652,7 +652,7 @@ func TestBlockProtoBuf(t *testing.T) { if tc.expPass2 { require.NoError(t, err, tc.msg) require.EqualValues(t, tc.b1.Header, block.Header, tc.msg) - require.EqualValues(t, tc.b1.Data, block.Data, tc.msg) // todo + require.EqualValues(t, tc.b1.Data.Txs, block.Data.Txs, tc.msg) // todo require.EqualValues(t, tc.b1.Evidence.Evidence, block.Evidence.Evidence, tc.msg) require.EqualValues(t, *tc.b1.LastCommit, *block.LastCommit, tc.msg) } else { @@ -663,28 +663,13 @@ func TestBlockProtoBuf(t *testing.T) { func TestBlockDataProtobuf(t *testing.T) { type test struct { - name string - txs Txs - blobs []Blob + name string + txs Txs } tests := []test{ { name: "only txs", txs: Txs([]Tx{stdbytes.Repeat([]byte{1}, 200)}), }, - { - name: "everything", - txs: Txs([]Tx{stdbytes.Repeat([]byte{1}, 200)}), - blobs: []Blob{ - { - NamespaceID: []byte{8, 7, 6, 5, 4, 3, 2, 1}, - Data: stdbytes.Repeat([]byte{3, 2, 1, 0}, 100), - }, - { - NamespaceID: []byte{1, 2, 3, 4, 5, 6, 7, 8}, - Data: stdbytes.Repeat([]byte{1, 2, 3}, 100), - }, - }, - }, } for _, tt := range tests { diff --git a/types/event_bus_test.go b/types/event_bus_test.go index 5738509aa7..db05ca964a 100644 --- a/types/event_bus_test.go +++ b/types/event_bus_test.go @@ -126,7 +126,7 @@ func TestEventBusPublishEventNewBlock(t *testing.T) { } }) - block := MakeBlock(0, makeData([]Tx{}), nil, []Evidence{}) + block := MakeBlock(0, []Tx{}, nil, []Evidence{}) // blockID := BlockID{Hash: block.Hash(), PartSetHeader: block.MakePartSet(BlockPartSizeBytes).Header()} resultBeginBlock := abci.ResponseBeginBlock{ Events: []abci.Event{ @@ -279,7 +279,7 @@ func TestEventBusPublishEventNewBlockHeader(t *testing.T) { } }) - block := MakeBlock(0, makeData([]Tx{}), nil, []Evidence{}) + block := MakeBlock(0, []Tx{}, nil, []Evidence{}) resultBeginBlock := abci.ResponseBeginBlock{ Events: []abci.Event{ {Type: "testType", Attributes: []abci.EventAttribute{{Key: []byte("baz"), Value: []byte("1")}}}, diff --git a/types/evidence.go b/types/evidence.go index 1d4c0f1567..c451f7d1d0 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -20,13 +20,13 @@ import ( // Evidence represents any provable malicious activity by a validator. // Verification logic for each evidence is part of the evidence module. 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 - String() string // string format of the evidence - Time() time.Time // time of the infraction - ValidateBasic() error // basic consistency check + ABCI() []abci.Misbehavior // 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 + String() string // string format of the evidence + Time() time.Time // time of the infraction + ValidateBasic() error // basic consistency check } //-------------------------------------------------------------------------------------- @@ -73,9 +73,9 @@ func NewDuplicateVoteEvidence(vote1, vote2 *Vote, blockTime time.Time, valSet *V } // ABCI returns the application relevant representation of the evidence -func (dve *DuplicateVoteEvidence) ABCI() []abci.Evidence { - return []abci.Evidence{{ - Type: abci.EvidenceType_DUPLICATE_VOTE, +func (dve *DuplicateVoteEvidence) ABCI() []abci.Misbehavior { + return []abci.Misbehavior{{ + Type: abci.MisbehaviorType_DUPLICATE_VOTE, Validator: abci.Validator{ Address: dve.VoteA.ValidatorAddress, Power: dve.ValidatorPower, @@ -200,11 +200,11 @@ type LightClientAttackEvidence struct { var _ Evidence = &LightClientAttackEvidence{} // ABCI forms an array of abci evidence for each byzantine validator -func (l *LightClientAttackEvidence) ABCI() []abci.Evidence { - abciEv := make([]abci.Evidence, len(l.ByzantineValidators)) +func (l *LightClientAttackEvidence) ABCI() []abci.Misbehavior { + abciEv := make([]abci.Misbehavior, len(l.ByzantineValidators)) for idx, val := range l.ByzantineValidators { - abciEv[idx] = abci.Evidence{ - Type: abci.EvidenceType_LIGHT_CLIENT_ATTACK, + abciEv[idx] = abci.Misbehavior{ + Type: abci.MisbehaviorType_LIGHT_CLIENT_ATTACK, Validator: TM2PB.Validator(val), Height: l.Height(), Time: l.Timestamp, @@ -459,6 +459,16 @@ func (evl EvidenceList) Has(evidence Evidence) bool { return false } +// ToABCI converts the evidence list to a slice of the ABCI protobuf messages +// for use when communicating the evidence to an application. +func (evl EvidenceList) ToABCI() []abci.Misbehavior { + var el []abci.Misbehavior + for _, e := range evl { + el = append(el, e.ABCI()...) + } + return el +} + //------------------------------------------ PROTO -------------------------------------- // EvidenceToProto is a generalized function for encoding evidence that conforms to the diff --git a/types/test_util.go b/types/test_util.go index 8c9bcc7533..17b74872d3 100644 --- a/types/test_util.go +++ b/types/test_util.go @@ -78,9 +78,3 @@ func MakeVote( return vote, nil } - -func makeData(txs []Tx) Data { - return Data{ - Txs: txs, - } -} diff --git a/types/tx_test.go b/types/tx_test.go index 758f00eb49..a3143622d7 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -53,12 +53,10 @@ func TestUnmarshalIndexWrapper(t *testing.T) { _, ok := UnmarshalIndexWrapper(tx) require.False(t, ok) - data := Data{Txs: []Tx{tx}} - // create a proto message that used to be decoded when it shouldn't have randomBlock := MakeBlock( 1, - data, + []Tx{tx}, &Commit{}, []Evidence{}, )