From f861062ee230087fc2d01c8cde1112d26206ba9f Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Tue, 9 Aug 2022 15:15:18 +0200 Subject: [PATCH] abci: implement process proposal to spec (#9122) --- abci/client/client.go | 2 + abci/client/grpc_client.go | 15 + abci/client/local_client.go | 19 + abci/client/mocks/client.go | 39 + abci/client/socket_client.go | 15 + abci/example/kvstore/kvstore.go | 10 + abci/example/kvstore/persistent_kvstore.go | 10 + abci/server/socket_server.go | 3 + abci/types/application.go | 15 +- abci/types/messages.go | 12 + abci/types/mocks/application.go | 16 +- abci/types/mocks/base.go | 11 + abci/types/types.go | 10 + abci/types/types.pb.go | 1488 ++++++++++++++++---- consensus/common_test.go | 34 +- consensus/mempool_test.go | 5 + consensus/state.go | 29 +- consensus/state_test.go | 53 + consensus/types/round_state.go | 13 +- evidence/pool_test.go | 1 - internal/test/block.go | 92 ++ internal/test/doc.go | 6 + internal/test/factory_test.go | 11 + internal/test/genesis.go | 34 + internal/test/tx.go | 11 + internal/test/validator.go | 41 + internal/test/vote.go | 44 + proto/tendermint/abci/types.proto | 41 +- proto/tendermint/consensus/types.pb.go | 2 +- proto/tendermint/consensus/types.proto | 2 +- proto/tendermint/types/evidence.proto | 18 +- proto/tendermint/types/types.proto | 8 +- proxy/app_conn.go | 6 +- proxy/mocks/app_conn_consensus.go | 23 + scripts/mockery_generate.sh | 15 + state/execution.go | 100 +- state/execution_test.go | 79 ++ state/helpers_test.go | 10 +- test/e2e/app/app.go | 12 + 39 files changed, 2004 insertions(+), 351 deletions(-) create mode 100644 internal/test/block.go create mode 100644 internal/test/doc.go create mode 100644 internal/test/factory_test.go create mode 100644 internal/test/genesis.go create mode 100644 internal/test/tx.go create mode 100644 internal/test/validator.go create mode 100644 internal/test/vote.go create mode 100755 scripts/mockery_generate.sh diff --git a/abci/client/client.go b/abci/client/client.go index a46d83aa0..0c63d0ce5 100644 --- a/abci/client/client.go +++ b/abci/client/client.go @@ -43,6 +43,7 @@ type Client interface { OfferSnapshotAsync(types.RequestOfferSnapshot) *ReqRes LoadSnapshotChunkAsync(types.RequestLoadSnapshotChunk) *ReqRes ApplySnapshotChunkAsync(types.RequestApplySnapshotChunk) *ReqRes + ProcessProposalAsync(types.RequestProcessProposal) *ReqRes FlushSync() error EchoSync(msg string) (*types.ResponseEcho, error) @@ -60,6 +61,7 @@ type Client interface { OfferSnapshotSync(types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) LoadSnapshotChunkSync(types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) ApplySnapshotChunkSync(types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) + ProcessProposalSync(types.RequestProcessProposal) (*types.ResponseProcessProposal, error) } //---------------------------------------- diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index 38a7973d5..bf3d9efcf 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -309,6 +309,16 @@ func (cli *grpcClient) PrepareProposalAsync(params types.RequestPrepareProposal) return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_PrepareProposal{PrepareProposal: res}}) } +func (cli *grpcClient) ProcessProposalAsync(params types.RequestProcessProposal) *ReqRes { + req := types.ToRequestProcessProposal(params) + res, err := cli.client.ProcessProposal(context.Background(), req.GetProcessProposal(), grpc.WaitForReady(true)) + if err != nil { + cli.StopForError(err) + } + + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_ProcessProposal{ProcessProposal: res}}) +} + // finishAsyncCall creates a ReqRes for an async call, and immediately populates it // with the response. We don't complete it until it's been ordered via the channel. func (cli *grpcClient) finishAsyncCall(req *types.Request, res *types.Response) *ReqRes { @@ -432,3 +442,8 @@ func (cli *grpcClient) PrepareProposalSync( reqres := cli.PrepareProposalAsync(params) return cli.finishSyncCall(reqres).GetPrepareProposal(), cli.Error() } + +func (cli *grpcClient) ProcessProposalSync(params types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + reqres := cli.ProcessProposalAsync(params) + return cli.finishSyncCall(reqres).GetProcessProposal(), cli.Error() +} diff --git a/abci/client/local_client.go b/abci/client/local_client.go index e33e68ca2..d3ca51997 100644 --- a/abci/client/local_client.go +++ b/abci/client/local_client.go @@ -218,6 +218,17 @@ func (app *localClient) PrepareProposalAsync(req types.RequestPrepareProposal) * ) } +func (app *localClient) ProcessProposalAsync(req types.RequestProcessProposal) *ReqRes { + app.mtx.Lock() + defer app.mtx.Unlock() + + res := app.Application.ProcessProposal(req) + return app.callback( + types.ToRequestProcessProposal(req), + types.ToResponseProcessProposal(res), + ) +} + //------------------------------------------------------- func (app *localClient) FlushSync() error { @@ -342,6 +353,14 @@ func (app *localClient) PrepareProposalSync(req types.RequestPrepareProposal) (* return &res, nil } +func (app *localClient) ProcessProposalSync(req types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + app.mtx.Lock() + defer app.mtx.Unlock() + + res := app.Application.ProcessProposal(req) + return &res, nil +} + //------------------------------------------------------- func (app *localClient) callback(req *types.Request, res *types.Response) *ReqRes { diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 408cdebbb..c25c49542 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -614,6 +614,45 @@ func (_m *Client) PrepareProposalSync(_a0 types.RequestPrepareProposal) (*types. return r0, r1 } +// ProcessProposalAsync provides a mock function with given fields: _a0 +func (_m *Client) ProcessProposalAsync(_a0 types.RequestProcessProposal) *abcicli.ReqRes { + ret := _m.Called(_a0) + + var r0 *abcicli.ReqRes + if rf, ok := ret.Get(0).(func(types.RequestProcessProposal) *abcicli.ReqRes); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*abcicli.ReqRes) + } + } + + return r0 +} + +// ProcessProposalSync provides a mock function with given fields: _a0 +func (_m *Client) ProcessProposalSync(_a0 types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + ret := _m.Called(_a0) + + var r0 *types.ResponseProcessProposal + if rf, ok := ret.Get(0).(func(types.RequestProcessProposal) *types.ResponseProcessProposal); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseProcessProposal) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(types.RequestProcessProposal) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // QueryAsync provides a mock function with given fields: _a0 func (_m *Client) QueryAsync(_a0 types.RequestQuery) *abcicli.ReqRes { ret := _m.Called(_a0) diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index dd1c556c2..1f3de7384 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -283,6 +283,10 @@ func (cli *socketClient) PrepareProposalAsync(req types.RequestPrepareProposal) return cli.queueRequest(types.ToRequestPrepareProposal(req)) } +func (cli *socketClient) ProcessProposalAsync(req types.RequestProcessProposal) *ReqRes { + return cli.queueRequest(types.ToRequestProcessProposal(req)) +} + //---------------------------------------- func (cli *socketClient) FlushSync() error { @@ -430,6 +434,15 @@ func (cli *socketClient) PrepareProposalSync(req types.RequestPrepareProposal) ( return reqres.Response.GetPrepareProposal(), cli.Error() } +func (cli *socketClient) ProcessProposalSync(req types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + reqres := cli.queueRequest(types.ToRequestProcessProposal(req)) + if err := cli.FlushSync(); err != nil { + return nil, err + } + + return reqres.Response.GetProcessProposal(), cli.Error() +} + //---------------------------------------- func (cli *socketClient) queueRequest(req *types.Request) *ReqRes { @@ -507,6 +520,8 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) { _, ok = res.Value.(*types.Response_OfferSnapshot) case *types.Request_PrepareProposal: _, ok = res.Value.(*types.Response_PrepareProposal) + case *types.Request_ProcessProposal: + _, ok = res.Value.(*types.Response_ProcessProposal) } return ok } diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 8b851ca9a..8f28e2852 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -170,3 +170,13 @@ func (app *Application) Query(reqQuery types.RequestQuery) (resQuery types.Respo return resQuery } + +func (app *Application) ProcessProposal( + req types.RequestProcessProposal) types.ResponseProcessProposal { + for _, tx := range req.Txs { + if len(tx) == 0 { + return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT} + } + } + return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_ACCEPT} +} diff --git a/abci/example/kvstore/persistent_kvstore.go b/abci/example/kvstore/persistent_kvstore.go index dc740bfec..b24c0d268 100644 --- a/abci/example/kvstore/persistent_kvstore.go +++ b/abci/example/kvstore/persistent_kvstore.go @@ -179,6 +179,16 @@ func (app *PersistentKVStoreApplication) PrepareProposal( return types.ResponsePrepareProposal{TxRecords: app.substPrepareTx(req.Txs, req.MaxTxBytes)} } +func (app *PersistentKVStoreApplication) ProcessProposal( + req types.RequestProcessProposal) types.ResponseProcessProposal { + for _, tx := range req.Txs { + if len(tx) == 0 { + return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT} + } + } + return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_ACCEPT} +} + //--------------------------------------------- // update validators diff --git a/abci/server/socket_server.go b/abci/server/socket_server.go index d816aa40c..2c9cd3c4d 100644 --- a/abci/server/socket_server.go +++ b/abci/server/socket_server.go @@ -233,6 +233,9 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types case *types.Request_PrepareProposal: res := s.app.PrepareProposal(*r.PrepareProposal) responses <- types.ToResponsePrepareProposal(res) + case *types.Request_ProcessProposal: + res := s.app.ProcessProposal(*r.ProcessProposal) + responses <- types.ToResponseProcessProposal(res) case *types.Request_LoadSnapshotChunk: res := s.app.LoadSnapshotChunk(*r.LoadSnapshotChunk) responses <- types.ToResponseLoadSnapshotChunk(res) diff --git a/abci/types/application.go b/abci/types/application.go index c30b16832..c97411856 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -4,7 +4,8 @@ import ( context "golang.org/x/net/context" ) -//go:generate mockery --case underscore --name Application +//go:generate ../../scripts/mockery_generate.sh Application + // Application is an interface that enables any finite, deterministic state machine // to be driven by a blockchain-based replication engine via the ABCI. // All methods take a RequestXxx argument and return a ResponseXxx argument, @@ -21,6 +22,7 @@ type Application interface { // Consensus Connection InitChain(RequestInitChain) ResponseInitChain // Initialize blockchain w validators/other info from TendermintCore PrepareProposal(RequestPrepareProposal) ResponsePrepareProposal + ProcessProposal(RequestProcessProposal) ResponseProcessProposal BeginBlock(RequestBeginBlock) ResponseBeginBlock // Signals the beginning of a block DeliverTx(RequestDeliverTx) ResponseDeliverTx // Deliver a tx for full processing EndBlock(RequestEndBlock) ResponseEndBlock // Signals the end of a block, returns changes to the validator set @@ -113,6 +115,11 @@ func (BaseApplication) PrepareProposal(req RequestPrepareProposal) ResponsePrepa return ResponsePrepareProposal{TxRecords: trs} } +func (BaseApplication) ProcessProposal(req RequestProcessProposal) ResponseProcessProposal { + return ResponseProcessProposal{ + Status: ResponseProcessProposal_ACCEPT} +} + //------------------------------------------------------- // GRPCApplication is a GRPC wrapper for Application @@ -206,3 +213,9 @@ func (app *GRPCApplication) PrepareProposal( res := app.app.PrepareProposal(*req) return &res, nil } + +func (app *GRPCApplication) ProcessProposal( + ctx context.Context, req *RequestProcessProposal) (*ResponseProcessProposal, error) { + res := app.app.ProcessProposal(*req) + return &res, nil +} diff --git a/abci/types/messages.go b/abci/types/messages.go index 599e8c05f..4314b5bfc 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -165,6 +165,12 @@ func ToRequestPrepareProposal(req RequestPrepareProposal) *Request { } } +func ToRequestProcessProposal(req RequestProcessProposal) *Request { + return &Request{ + Value: &Request_ProcessProposal{&req}, + } +} + //---------------------------------------- func ToResponseException(errStr string) *Response { @@ -268,3 +274,9 @@ func ToResponsePrepareProposal(res ResponsePrepareProposal) *Response { Value: &Response_PrepareProposal{&res}, } } + +func ToResponseProcessProposal(res ResponseProcessProposal) *Response { + return &Response{ + Value: &Response_ProcessProposal{&res}, + } +} diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index d945bf5f3..1999ce567 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -180,6 +180,20 @@ func (_m *Application) PrepareProposal(_a0 types.RequestPrepareProposal) types.R return r0 } +// ProcessProposal provides a mock function with given fields: _a0 +func (_m *Application) ProcessProposal(_a0 types.RequestProcessProposal) types.ResponseProcessProposal { + ret := _m.Called(_a0) + + var r0 types.ResponseProcessProposal + if rf, ok := ret.Get(0).(func(types.RequestProcessProposal) types.ResponseProcessProposal); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(types.ResponseProcessProposal) + } + + return r0 +} + // Query provides a mock function with given fields: _a0 func (_m *Application) Query(_a0 types.RequestQuery) types.ResponseQuery { ret := _m.Called(_a0) diff --git a/abci/types/mocks/base.go b/abci/types/mocks/base.go index caf9fc0d2..d0a33ebb0 100644 --- a/abci/types/mocks/base.go +++ b/abci/types/mocks/base.go @@ -84,6 +84,17 @@ func (m BaseMock) PrepareProposal(input types.RequestPrepareProposal) types.Resp return ret } +func (m BaseMock) ProcessProposal(input types.RequestProcessProposal) types.ResponseProcessProposal { + var ret types.ResponseProcessProposal + defer func() { + if r := recover(); r != nil { + ret = m.base.ProcessProposal(input) + } + }() + ret = m.Application.ProcessProposal(input) + return ret +} + // Commit the state and return the application Merkle root hash func (m BaseMock) Commit() types.ResponseCommit { var ret types.ResponseCommit diff --git a/abci/types/types.go b/abci/types/types.go index 53acdb906..f7a384b06 100644 --- a/abci/types/types.go +++ b/abci/types/types.go @@ -41,6 +41,16 @@ func (r ResponseQuery) IsErr() bool { return r.Code != CodeTypeOK } +// IsAccepted returns true if Code is ACCEPT +func (r ResponseProcessProposal) IsAccepted() bool { + return r.Status == ResponseProcessProposal_ACCEPT +} + +// IsStatusUnknown returns true if Code is UNKNOWN +func (r ResponseProcessProposal) IsStatusUnknown() bool { + return r.Status == ResponseProcessProposal_UNKNOWN +} + //--------------------------------------------------------------------------- // override JSON marshaling so we emit defaults (ie. disable omitempty) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index d61962369..696f15f33 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -120,7 +120,7 @@ func (x ResponseOfferSnapshot_Result) String() string { } func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{31, 0} + return fileDescriptor_252557cfdd89a31a, []int{32, 0} } type ResponseApplySnapshotChunk_Result int32 @@ -157,7 +157,35 @@ func (x ResponseApplySnapshotChunk_Result) String() string { } func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{33, 0} + return fileDescriptor_252557cfdd89a31a, []int{34, 0} +} + +type ResponseProcessProposal_ProposalStatus int32 + +const ( + ResponseProcessProposal_UNKNOWN ResponseProcessProposal_ProposalStatus = 0 + ResponseProcessProposal_ACCEPT ResponseProcessProposal_ProposalStatus = 1 + ResponseProcessProposal_REJECT ResponseProcessProposal_ProposalStatus = 2 +) + +var ResponseProcessProposal_ProposalStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ACCEPT", + 2: "REJECT", +} + +var ResponseProcessProposal_ProposalStatus_value = map[string]int32{ + "UNKNOWN": 0, + "ACCEPT": 1, + "REJECT": 2, +} + +func (x ResponseProcessProposal_ProposalStatus) String() string { + return proto.EnumName(ResponseProcessProposal_ProposalStatus_name, int32(x)) +} + +func (ResponseProcessProposal_ProposalStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{36, 0} } // TxAction contains App-provided information on what to do with a transaction that is part of a raw proposal @@ -189,7 +217,7 @@ func (x TxRecord_TxAction) String() string { } func (TxRecord_TxAction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{42, 0} + return fileDescriptor_252557cfdd89a31a, []int{44, 0} } type Request struct { @@ -210,6 +238,7 @@ type Request struct { // *Request_LoadSnapshotChunk // *Request_ApplySnapshotChunk // *Request_PrepareProposal + // *Request_ProcessProposal Value isRequest_Value `protobuf_oneof:"value"` } @@ -300,6 +329,9 @@ type Request_ApplySnapshotChunk struct { type Request_PrepareProposal struct { PrepareProposal *RequestPrepareProposal `protobuf:"bytes,16,opt,name=prepare_proposal,json=prepareProposal,proto3,oneof" json:"prepare_proposal,omitempty"` } +type Request_ProcessProposal struct { + ProcessProposal *RequestProcessProposal `protobuf:"bytes,17,opt,name=process_proposal,json=processProposal,proto3,oneof" json:"process_proposal,omitempty"` +} func (*Request_Echo) isRequest_Value() {} func (*Request_Flush) isRequest_Value() {} @@ -317,6 +349,7 @@ func (*Request_OfferSnapshot) isRequest_Value() {} func (*Request_LoadSnapshotChunk) isRequest_Value() {} func (*Request_ApplySnapshotChunk) isRequest_Value() {} func (*Request_PrepareProposal) isRequest_Value() {} +func (*Request_ProcessProposal) isRequest_Value() {} func (m *Request) GetValue() isRequest_Value { if m != nil { @@ -437,6 +470,13 @@ func (m *Request) GetPrepareProposal() *RequestPrepareProposal { return nil } +func (m *Request) GetProcessProposal() *RequestProcessProposal { + if x, ok := m.GetValue().(*Request_ProcessProposal); ok { + return x.ProcessProposal + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Request) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -456,6 +496,7 @@ func (*Request) XXX_OneofWrappers() []interface{} { (*Request_LoadSnapshotChunk)(nil), (*Request_ApplySnapshotChunk)(nil), (*Request_PrepareProposal)(nil), + (*Request_ProcessProposal)(nil), } } @@ -805,10 +846,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 []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` } func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } @@ -858,11 +899,11 @@ 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 { @@ -1347,6 +1388,108 @@ func (m *RequestPrepareProposal) GetMaxTxBytes() int64 { return 0 } +type RequestProcessProposal struct { + 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 []Evidence `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{} } +func (m *RequestProcessProposal) String() string { return proto.CompactTextString(m) } +func (*RequestProcessProposal) ProtoMessage() {} +func (*RequestProcessProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{17} +} +func (m *RequestProcessProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestProcessProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestProcessProposal.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 *RequestProcessProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestProcessProposal.Merge(m, src) +} +func (m *RequestProcessProposal) XXX_Size() int { + return m.Size() +} +func (m *RequestProcessProposal) XXX_DiscardUnknown() { + xxx_messageInfo_RequestProcessProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestProcessProposal proto.InternalMessageInfo + +func (m *RequestProcessProposal) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *RequestProcessProposal) GetProposedLastCommit() CommitInfo { + if m != nil { + return m.ProposedLastCommit + } + return CommitInfo{} +} + +func (m *RequestProcessProposal) GetMisbehavior() []Evidence { + 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) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + type Response struct { // Types that are valid to be assigned to Value: // *Response_Exception @@ -1366,6 +1509,7 @@ type Response struct { // *Response_LoadSnapshotChunk // *Response_ApplySnapshotChunk // *Response_PrepareProposal + // *Response_ProcessProposal Value isResponse_Value `protobuf_oneof:"value"` } @@ -1373,7 +1517,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{17} + return fileDescriptor_252557cfdd89a31a, []int{18} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1459,6 +1603,9 @@ type Response_ApplySnapshotChunk struct { type Response_PrepareProposal struct { PrepareProposal *ResponsePrepareProposal `protobuf:"bytes,17,opt,name=prepare_proposal,json=prepareProposal,proto3,oneof" json:"prepare_proposal,omitempty"` } +type Response_ProcessProposal struct { + ProcessProposal *ResponseProcessProposal `protobuf:"bytes,18,opt,name=process_proposal,json=processProposal,proto3,oneof" json:"process_proposal,omitempty"` +} func (*Response_Exception) isResponse_Value() {} func (*Response_Echo) isResponse_Value() {} @@ -1477,6 +1624,7 @@ func (*Response_OfferSnapshot) isResponse_Value() {} func (*Response_LoadSnapshotChunk) isResponse_Value() {} func (*Response_ApplySnapshotChunk) isResponse_Value() {} func (*Response_PrepareProposal) isResponse_Value() {} +func (*Response_ProcessProposal) isResponse_Value() {} func (m *Response) GetValue() isResponse_Value { if m != nil { @@ -1604,6 +1752,13 @@ func (m *Response) GetPrepareProposal() *ResponsePrepareProposal { return nil } +func (m *Response) GetProcessProposal() *ResponseProcessProposal { + if x, ok := m.GetValue().(*Response_ProcessProposal); ok { + return x.ProcessProposal + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Response) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1624,6 +1779,7 @@ func (*Response) XXX_OneofWrappers() []interface{} { (*Response_LoadSnapshotChunk)(nil), (*Response_ApplySnapshotChunk)(nil), (*Response_PrepareProposal)(nil), + (*Response_ProcessProposal)(nil), } } @@ -1636,7 +1792,7 @@ func (m *ResponseException) Reset() { *m = ResponseException{} } func (m *ResponseException) String() string { return proto.CompactTextString(m) } func (*ResponseException) ProtoMessage() {} func (*ResponseException) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{18} + return fileDescriptor_252557cfdd89a31a, []int{19} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1680,7 +1836,7 @@ func (m *ResponseEcho) Reset() { *m = ResponseEcho{} } func (m *ResponseEcho) String() string { return proto.CompactTextString(m) } func (*ResponseEcho) ProtoMessage() {} func (*ResponseEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{19} + return fileDescriptor_252557cfdd89a31a, []int{20} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1723,7 +1879,7 @@ func (m *ResponseFlush) Reset() { *m = ResponseFlush{} } func (m *ResponseFlush) String() string { return proto.CompactTextString(m) } func (*ResponseFlush) ProtoMessage() {} func (*ResponseFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{20} + return fileDescriptor_252557cfdd89a31a, []int{21} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1764,7 +1920,7 @@ func (m *ResponseInfo) Reset() { *m = ResponseInfo{} } func (m *ResponseInfo) String() string { return proto.CompactTextString(m) } func (*ResponseInfo) ProtoMessage() {} func (*ResponseInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{21} + return fileDescriptor_252557cfdd89a31a, []int{22} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1840,7 +1996,7 @@ func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} } func (m *ResponseSetOption) String() string { return proto.CompactTextString(m) } func (*ResponseSetOption) ProtoMessage() {} func (*ResponseSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{22} + return fileDescriptor_252557cfdd89a31a, []int{23} } func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1900,7 +2056,7 @@ func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} } func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) } func (*ResponseInitChain) ProtoMessage() {} func (*ResponseInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{23} + return fileDescriptor_252557cfdd89a31a, []int{24} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1967,7 +2123,7 @@ func (m *ResponseQuery) Reset() { *m = ResponseQuery{} } func (m *ResponseQuery) String() string { return proto.CompactTextString(m) } func (*ResponseQuery) ProtoMessage() {} func (*ResponseQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{24} + return fileDescriptor_252557cfdd89a31a, []int{25} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2067,7 +2223,7 @@ func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} } func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) } func (*ResponseBeginBlock) ProtoMessage() {} func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{25} + return fileDescriptor_252557cfdd89a31a, []int{26} } func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2123,7 +2279,7 @@ func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) } func (*ResponseCheckTx) ProtoMessage() {} func (*ResponseCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{26} + return fileDescriptor_252557cfdd89a31a, []int{27} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2244,7 +2400,7 @@ func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} } func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) } func (*ResponseDeliverTx) ProtoMessage() {} func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{27} + return fileDescriptor_252557cfdd89a31a, []int{28} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2339,7 +2495,7 @@ func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} } func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) } func (*ResponseEndBlock) ProtoMessage() {} func (*ResponseEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{28} + return fileDescriptor_252557cfdd89a31a, []int{29} } func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2399,7 +2555,7 @@ func (m *ResponseCommit) Reset() { *m = ResponseCommit{} } func (m *ResponseCommit) String() string { return proto.CompactTextString(m) } func (*ResponseCommit) ProtoMessage() {} func (*ResponseCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{29} + return fileDescriptor_252557cfdd89a31a, []int{30} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2450,7 +2606,7 @@ func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} } func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) } func (*ResponseListSnapshots) ProtoMessage() {} func (*ResponseListSnapshots) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{30} + return fileDescriptor_252557cfdd89a31a, []int{31} } func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2494,7 +2650,7 @@ func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} } func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) } func (*ResponseOfferSnapshot) ProtoMessage() {} func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{31} + return fileDescriptor_252557cfdd89a31a, []int{32} } func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2538,7 +2694,7 @@ func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotC func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) } func (*ResponseLoadSnapshotChunk) ProtoMessage() {} func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{32} + return fileDescriptor_252557cfdd89a31a, []int{33} } func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2584,7 +2740,7 @@ func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapsho func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) } func (*ResponseApplySnapshotChunk) ProtoMessage() {} func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{33} + return fileDescriptor_252557cfdd89a31a, []int{34} } func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2642,7 +2798,7 @@ func (m *ResponsePrepareProposal) Reset() { *m = ResponsePrepareProposal func (m *ResponsePrepareProposal) String() string { return proto.CompactTextString(m) } func (*ResponsePrepareProposal) ProtoMessage() {} func (*ResponsePrepareProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{34} + return fileDescriptor_252557cfdd89a31a, []int{35} } func (m *ResponsePrepareProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2678,6 +2834,50 @@ func (m *ResponsePrepareProposal) GetTxRecords() []*TxRecord { return nil } +type ResponseProcessProposal struct { + Status ResponseProcessProposal_ProposalStatus `protobuf:"varint,1,opt,name=status,proto3,enum=tendermint.abci.ResponseProcessProposal_ProposalStatus" json:"status,omitempty"` +} + +func (m *ResponseProcessProposal) Reset() { *m = ResponseProcessProposal{} } +func (m *ResponseProcessProposal) String() string { return proto.CompactTextString(m) } +func (*ResponseProcessProposal) ProtoMessage() {} +func (*ResponseProcessProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{36} +} +func (m *ResponseProcessProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseProcessProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseProcessProposal.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 *ResponseProcessProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseProcessProposal.Merge(m, src) +} +func (m *ResponseProcessProposal) XXX_Size() int { + return m.Size() +} +func (m *ResponseProcessProposal) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseProcessProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseProcessProposal proto.InternalMessageInfo + +func (m *ResponseProcessProposal) GetStatus() ResponseProcessProposal_ProposalStatus { + if m != nil { + return m.Status + } + return ResponseProcessProposal_UNKNOWN +} + // ConsensusParams contains all consensus-relevant parameters // that can be adjusted by the abci app type ConsensusParams struct { @@ -2691,7 +2891,7 @@ func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } func (*ConsensusParams) ProtoMessage() {} func (*ConsensusParams) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{35} + return fileDescriptor_252557cfdd89a31a, []int{37} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2760,7 +2960,7 @@ func (m *BlockParams) Reset() { *m = BlockParams{} } func (m *BlockParams) String() string { return proto.CompactTextString(m) } func (*BlockParams) ProtoMessage() {} func (*BlockParams) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{36} + return fileDescriptor_252557cfdd89a31a, []int{38} } func (m *BlockParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2803,23 +3003,23 @@ 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) { - return fileDescriptor_252557cfdd89a31a, []int{37} +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 *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_CommitInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2829,26 +3029,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 *CommitInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitInfo.Merge(m, src) } -func (m *LastCommitInfo) XXX_Size() int { +func (m *CommitInfo) XXX_Size() int { return m.Size() } -func (m *LastCommitInfo) XXX_DiscardUnknown() { - xxx_messageInfo_LastCommitInfo.DiscardUnknown(m) +func (m *CommitInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CommitInfo.DiscardUnknown(m) } -var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo +var xxx_messageInfo_CommitInfo proto.InternalMessageInfo -func (m *LastCommitInfo) GetRound() int32 { +func (m *CommitInfo) GetRound() int32 { if m != nil { return m.Round } return 0 } -func (m *LastCommitInfo) GetVotes() []VoteInfo { +func (m *CommitInfo) GetVotes() []VoteInfo { if m != nil { return m.Votes } @@ -2864,7 +3064,7 @@ 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{38} + return fileDescriptor_252557cfdd89a31a, []int{40} } func (m *ExtendedCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2919,7 +3119,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{39} + return fileDescriptor_252557cfdd89a31a, []int{41} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2973,7 +3173,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{40} + return fileDescriptor_252557cfdd89a31a, []int{42} } func (m *EventAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3037,7 +3237,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{41} + return fileDescriptor_252557cfdd89a31a, []int{43} } func (m *TxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3103,7 +3303,7 @@ func (m *TxRecord) Reset() { *m = TxRecord{} } func (m *TxRecord) String() string { return proto.CompactTextString(m) } func (*TxRecord) ProtoMessage() {} func (*TxRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{42} + return fileDescriptor_252557cfdd89a31a, []int{44} } func (m *TxRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3157,7 +3357,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{45} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3210,7 +3410,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{46} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3263,7 +3463,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{47} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3316,7 +3516,7 @@ 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{46} + return fileDescriptor_252557cfdd89a31a, []int{48} } func (m *ExtendedVoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3384,7 +3584,7 @@ func (m *Evidence) Reset() { *m = Evidence{} } func (m *Evidence) String() string { return proto.CompactTextString(m) } func (*Evidence) ProtoMessage() {} func (*Evidence) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{47} + return fileDescriptor_252557cfdd89a31a, []int{49} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3460,7 +3660,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{48} + return fileDescriptor_252557cfdd89a31a, []int{50} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3529,6 +3729,7 @@ func init() { proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_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_ProposalStatus", ResponseProcessProposal_ProposalStatus_name, ResponseProcessProposal_ProposalStatus_value) proto.RegisterEnum("tendermint.abci.TxRecord_TxAction", TxRecord_TxAction_name, TxRecord_TxAction_value) proto.RegisterType((*Request)(nil), "tendermint.abci.Request") proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho") @@ -3547,6 +3748,7 @@ func init() { proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk") proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk") proto.RegisterType((*RequestPrepareProposal)(nil), "tendermint.abci.RequestPrepareProposal") + proto.RegisterType((*RequestProcessProposal)(nil), "tendermint.abci.RequestProcessProposal") proto.RegisterType((*Response)(nil), "tendermint.abci.Response") proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException") proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho") @@ -3565,9 +3767,10 @@ func init() { proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk") proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk") proto.RegisterType((*ResponsePrepareProposal)(nil), "tendermint.abci.ResponsePrepareProposal") + 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") @@ -3584,200 +3787,211 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3078 bytes of a gzipped FileDescriptorProto - 0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xdf, 0xd8, 0x34, 0x16, 0xc8, 0xfa, 0xa3, 0x03, 0x80, 0x48, 0xba, 0x65, 0x81, - 0xc7, 0x33, 0x8d, 0x45, 0xb2, 0xf9, 0xa8, 0x03, 0xa5, 0x20, 0xfa, 0x9d, 0xfb, 0x94, 0xa5, 0x31, - 0x3f, 0xad, 0x8e, 0x1e, 0x42, 0x25, 0x1e, 0xf6, 0x2d, 0xf6, 0x40, 0xa5, 0xb1, 0x60, 0xbe, 0x9c, - 0xf9, 0x8f, 0xc7, 0x80, 0x8b, 0x3d, 0x58, 0x69, 0x2c, 0x98, 0x3e, 0x47, 0x1f, 0xc2, 0xca, 0x74, - 0x8c, 0xb6, 0xf8, 0xfb, 0x95, 0xc6, 0x39, 0x12, 0xea, 0x68, 0x08, 0x68, 0x46, 0x6c, 0x77, 0x8e, - 0xe7, 0x2c, 0x8d, 0xf3, 0xe4, 0xd7, 0x91, 0x01, 0xb5, 0xc9, 0x80, 0x69, 0xd1, 0xe7, 0x2d, 0x8d, - 0x85, 0x73, 0xed, 0x5b, 0xad, 0x2f, 0xbf, 0x59, 0x4d, 0x7f, 0xf5, 0xcd, 0x6a, 0xfa, 0xcf, 0xdf, - 0xac, 0xa6, 0x3f, 0xfb, 0x76, 0x35, 0xf5, 0xd5, 0xb7, 0xab, 0xa9, 0x3f, 0x7c, 0xbb, 0x9a, 0xfa, - 0xd1, 0xf3, 0xc7, 0x26, 0xed, 0x8f, 0x0e, 0xd7, 0x7b, 0xf6, 0xf0, 0x66, 0xf4, 0x45, 0xdf, 0xac, - 0x57, 0x86, 0x87, 0x05, 0x7e, 0x1d, 0xbe, 0xfc, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0xf1, - 0x86, 0x0d, 0x85, 0x28, 0x00, 0x00, + // 3259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x93, 0x23, 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0x5e, 0x6f, 0x7c, 0x78, 0x83, 0xe8, 0x23, 0xec, 0x10, 0x75, 0x64, 0x09, 0x86, 0xd5, + 0x23, 0xf3, 0xc8, 0x64, 0xcd, 0x1b, 0xb4, 0xc5, 0xa9, 0xd2, 0x1f, 0xf2, 0x90, 0x95, 0xf1, 0x87, + 0x63, 0xec, 0x10, 0xb4, 0x09, 0x29, 0xdc, 0x1f, 0x98, 0xb5, 0xf8, 0xe5, 0xf8, 0xd5, 0xc2, 0xe6, + 0xa5, 0x8d, 0x29, 0xe3, 0x36, 0x04, 0x5f, 0xab, 0x3f, 0x30, 0xdb, 0x31, 0x99, 0xf1, 0xa2, 0x9b, + 0x90, 0x3e, 0x1c, 0x8e, 0x9d, 0x41, 0x2d, 0xc1, 0x84, 0x9e, 0x88, 0x12, 0xba, 0x4d, 0x99, 0xda, + 0x31, 0x99, 0x73, 0xd3, 0xa1, 0x74, 0xe3, 0xd0, 0xac, 0x25, 0x4f, 0x1f, 0x6a, 0xc7, 0x38, 0x64, + 0x43, 0x51, 0x5e, 0xb4, 0x05, 0xe0, 0x60, 0xa2, 0x98, 0x16, 0xd1, 0x4d, 0xa3, 0x96, 0x62, 0x92, + 0x4f, 0x46, 0x49, 0xee, 0x63, 0xd2, 0x61, 0x8c, 0xed, 0x98, 0x9c, 0x77, 0xdc, 0x0e, 0xd5, 0xa1, + 0x1b, 0x3a, 0x51, 0xfa, 0x03, 0x55, 0x37, 0x6a, 0xe9, 0xd3, 0x75, 0xec, 0x18, 0x3a, 0x69, 0x52, + 0x46, 0xaa, 0x43, 0x77, 0x3b, 0xd4, 0xe4, 0x0f, 0xc7, 0xd8, 0x3e, 0xa9, 0x65, 0x4e, 0x37, 0xf9, + 0xff, 0x29, 0x13, 0x35, 0x99, 0x71, 0xa3, 0x16, 0x14, 0x7a, 0xf8, 0x48, 0x37, 0x94, 0xde, 0xd0, + 0xec, 0x3f, 0xaa, 0x65, 0x99, 0xb0, 0x14, 0x25, 0xbc, 0x45, 0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 0x95, 0x8e, 0x44, 0x5b, 0x6f, 0x06, 0xd0, 0x56, 0x3e, 0x12, 0xea, 0x70, 0x25, 0x73, 0xe0, + 0x56, 0x33, 0x04, 0xb7, 0x60, 0xc1, 0x1c, 0x44, 0xe0, 0xad, 0xb7, 0x83, 0x78, 0xab, 0x10, 0x09, + 0xd9, 0xc4, 0xa6, 0x99, 0x07, 0xb8, 0x5e, 0xf5, 0x00, 0x57, 0x31, 0x12, 0x31, 0x0a, 0x1b, 0xa6, + 0x11, 0x57, 0x67, 0x06, 0x71, 0x71, 0x84, 0xf4, 0x74, 0xa4, 0x8a, 0x05, 0x90, 0xab, 0x33, 0x03, + 0xb9, 0xca, 0x0b, 0x14, 0x2e, 0xc0, 0x5c, 0x3f, 0x9d, 0x8f, 0xb9, 0xa2, 0x51, 0x91, 0xf8, 0xcd, + 0xe5, 0x40, 0x97, 0x12, 0x01, 0xba, 0x38, 0x30, 0x7a, 0x36, 0x52, 0xfd, 0xd2, 0xa8, 0xeb, 0x60, + 0x0e, 0xea, 0xe2, 0xf8, 0xe8, 0x6a, 0xa4, 0xf2, 0x25, 0x60, 0xd7, 0xc1, 0x1c, 0xd8, 0x85, 0x16, + 0xaa, 0x5d, 0x1e, 0x77, 0x5d, 0xa3, 0xe9, 0xed, 0x94, 0x9b, 0xa3, 0x69, 0x02, 0xb6, 0x6d, 0xd3, + 0x16, 0x90, 0x86, 0x77, 0xa4, 0xab, 0x34, 0xe1, 0xf6, 0x5d, 0xda, 0x29, 0x18, 0x8d, 0xa5, 0x63, + 0x01, 0x37, 0x26, 0xfd, 0x3e, 0xee, 0xcb, 0xb2, 0x3c, 0x35, 0x98, 0xac, 0xe7, 0x45, 0xb2, 0x1e, + 0x80, 0x6e, 0x89, 0x30, 0x74, 0x5b, 0x87, 0x02, 0x4d, 0xb3, 0xa6, 0x50, 0x99, 0x6a, 0xb9, 0xa8, + 0x0c, 0x5d, 0x87, 0x15, 0x16, 0x2d, 0x39, 0xc0, 0x13, 0x51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bb, 0x22, 0xbe, 0xe9, + 0xf2, 0x94, 0x8d, 0x52, 0xf7, 0x39, 0x51, 0x7a, 0xff, 0x4c, 0x73, 0x99, 0x87, 0xb4, 0xdc, 0xea, + 0xca, 0xef, 0x55, 0x93, 0x08, 0x41, 0x99, 0x35, 0x95, 0xfd, 0xdd, 0xc6, 0xde, 0x7e, 0xbb, 0x43, + 0xe7, 0xf2, 0x1c, 0x54, 0xdc, 0xb9, 0x74, 0x89, 0x69, 0x69, 0x1f, 0x2e, 0x44, 0xa4, 0x8f, 0xe8, + 0x16, 0x00, 0x99, 0x28, 0x36, 0xee, 0x9b, 0xb6, 0x16, 0xbd, 0xc7, 0xba, 0x13, 0x99, 0x71, 0xc8, + 0x79, 0x22, 0x5a, 0x8e, 0xf4, 0xdb, 0x78, 0x50, 0x6b, 0xb8, 0x48, 0xd1, 0x81, 0x8c, 0x43, 0x54, + 0x32, 0x76, 0xc4, 0x64, 0xbf, 0xb2, 0x6c, 0xde, 0xb9, 0xe1, 0x36, 0xf6, 0x99, 0xb8, 0x2c, 0xd4, + 0x48, 0x37, 0xa1, 0x1c, 0xfe, 0x12, 0x3d, 0x57, 0xfe, 0x66, 0x4b, 0x48, 0xff, 0x8e, 0x43, 0x65, + 0xca, 0x33, 0xa0, 0x4d, 0x48, 0x73, 0x38, 0x15, 0x75, 0xd5, 0xc9, 0x1c, 0x9b, 0x70, 0x23, 0x9c, + 0x15, 0xbd, 0x01, 0x39, 0x2c, 0x2a, 0x1d, 0xf3, 0x3c, 0x10, 0x2f, 0x54, 0xb9, 0xb5, 0x10, 0x21, + 0xea, 0x49, 0xa0, 0xb7, 0x20, 0xef, 0xb9, 0x38, 0x81, 0xe1, 0x9f, 0x9c, 0x15, 0xf7, 0x9c, 0xa3, + 0x90, 0xf7, 0x65, 0xd0, 0xab, 0x7e, 0x96, 0x9b, 0x9a, 0x05, 0x71, 0x42, 0x9c, 0x33, 0x08, 0x61, + 0x97, 0x5f, 0x6a, 0x42, 0x21, 0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40, 0x0f, 0xa1, 0x14, + 0x86, 0xa5, 0xcb, 0xbd, 0xb8, 0xaa, 0x2f, 0x79, 0x4d, 0x40, 0xf5, 0x87, 0x31, 0xea, 0x72, 0x2f, + 0xb0, 0xea, 0x4b, 0xde, 0x1a, 0xa0, 0x0f, 0x60, 0x65, 0x16, 0x43, 0x2e, 0xff, 0x20, 0xab, 0x7e, + 0x86, 0x7b, 0x04, 0x34, 0x02, 0x34, 0x07, 0x7b, 0x9e, 0xe1, 0x7d, 0x56, 0xfd, 0x2c, 0xd7, 0x0a, + 0x48, 0x83, 0xca, 0x34, 0xa0, 0x5b, 0xf6, 0xbd, 0x56, 0x7d, 0xe9, 0x2b, 0x06, 0x3e, 0x4a, 0x18, + 0xe0, 0x2d, 0xfb, 0x7e, 0xab, 0xbe, 0xf4, 0x8d, 0xc3, 0x56, 0xeb, 0xcb, 0x6f, 0xd6, 0xe2, 0x5f, + 0x7d, 0xb3, 0x16, 0xff, 0xfb, 0x37, 0x6b, 0xf1, 0xcf, 0xbe, 0x5d, 0x8b, 0x7d, 0xf5, 0xed, 0x5a, + 0xec, 0x2f, 0xdf, 0xae, 0xc5, 0x7e, 0xfc, 0xec, 0x91, 0x4e, 0x06, 0xe3, 0xde, 0x46, 0xdf, 0x1c, + 0xdd, 0x08, 0x3e, 0x84, 0x9d, 0xf7, 0x38, 0xb7, 0x97, 0x61, 0x41, 0xf7, 0xa5, 0xff, 0x04, 0x00, + 0x00, 0xff, 0xff, 0x9d, 0x12, 0x6d, 0x89, 0xbc, 0x2b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3808,6 +4022,7 @@ type ABCIApplicationClient interface { LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) PrepareProposal(ctx context.Context, in *RequestPrepareProposal, opts ...grpc.CallOption) (*ResponsePrepareProposal, error) + ProcessProposal(ctx context.Context, in *RequestProcessProposal, opts ...grpc.CallOption) (*ResponseProcessProposal, error) } type aBCIApplicationClient struct { @@ -3962,6 +4177,15 @@ func (c *aBCIApplicationClient) PrepareProposal(ctx context.Context, in *Request return out, nil } +func (c *aBCIApplicationClient) ProcessProposal(ctx context.Context, in *RequestProcessProposal, opts ...grpc.CallOption) (*ResponseProcessProposal, error) { + out := new(ResponseProcessProposal) + err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ProcessProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ABCIApplicationServer is the server API for ABCIApplication service. type ABCIApplicationServer interface { Echo(context.Context, *RequestEcho) (*ResponseEcho, error) @@ -3980,6 +4204,7 @@ type ABCIApplicationServer interface { LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) PrepareProposal(context.Context, *RequestPrepareProposal) (*ResponsePrepareProposal, error) + ProcessProposal(context.Context, *RequestProcessProposal) (*ResponseProcessProposal, error) } // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations. @@ -4034,6 +4259,9 @@ func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Contex func (*UnimplementedABCIApplicationServer) PrepareProposal(ctx context.Context, req *RequestPrepareProposal) (*ResponsePrepareProposal, error) { return nil, status.Errorf(codes.Unimplemented, "method PrepareProposal not implemented") } +func (*UnimplementedABCIApplicationServer) ProcessProposal(ctx context.Context, req *RequestProcessProposal) (*ResponseProcessProposal, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProcessProposal not implemented") +} func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) { s.RegisterService(&_ABCIApplication_serviceDesc, srv) @@ -4327,6 +4555,24 @@ func _ABCIApplication_PrepareProposal_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _ABCIApplication_ProcessProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestProcessProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIApplicationServer).ProcessProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tendermint.abci.ABCIApplication/ProcessProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).ProcessProposal(ctx, req.(*RequestProcessProposal)) + } + return interceptor(ctx, in, info, handler) +} + var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ ServiceName: "tendermint.abci.ABCIApplication", HandlerType: (*ABCIApplicationServer)(nil), @@ -4395,6 +4641,10 @@ var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ MethodName: "PrepareProposal", Handler: _ABCIApplication_PrepareProposal_Handler, }, + { + MethodName: "ProcessProposal", + Handler: _ABCIApplication_ProcessProposal_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "tendermint/abci/types.proto", @@ -4770,6 +5020,29 @@ func (m *Request_PrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) } return len(dAtA) - i, nil } +func (m *Request_ProcessProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Request_ProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ProcessProposal != nil { + { + size, err := m.ProcessProposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + return len(dAtA) - i, nil +} func (m *RequestEcho) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4965,12 +5238,12 @@ func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err18 != nil { - return 0, err18 + n19, err19 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err19 != nil { + return 0, err19 } - i -= n18 - i = encodeVarintTypes(dAtA, i, uint64(n18)) + i -= n19 + i = encodeVarintTypes(dAtA, i, uint64(n19)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -5431,6 +5704,96 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *RequestProcessProposal) 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 *RequestProcessProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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-- + dAtA[i] = 0x1a + } + } + { + size, err := m.ProposedLastCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + 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 +} + func (m *Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5824,6 +6187,29 @@ func (m *Response_PrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error } return len(dAtA) - i, nil } +func (m *Response_ProcessProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Response_ProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ProcessProposal != nil { + { + size, err := m.ProcessProposal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + return len(dAtA) - i, nil +} func (m *ResponseException) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6583,20 +6969,20 @@ func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, err } } if len(m.RefetchChunks) > 0 { - dAtA45 := make([]byte, len(m.RefetchChunks)*10) - var j44 int + dAtA49 := make([]byte, len(m.RefetchChunks)*10) + var j48 int for _, num := range m.RefetchChunks { for num >= 1<<7 { - dAtA45[j44] = uint8(uint64(num)&0x7f | 0x80) + dAtA49[j48] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j44++ + j48++ } - dAtA45[j44] = uint8(num) - j44++ + dAtA49[j48] = uint8(num) + j48++ } - i -= j44 - copy(dAtA[i:], dAtA45[:j44]) - i = encodeVarintTypes(dAtA, i, uint64(j44)) + i -= j48 + copy(dAtA[i:], dAtA49[:j48]) + i = encodeVarintTypes(dAtA, i, uint64(j48)) i-- dAtA[i] = 0x12 } @@ -6645,6 +7031,34 @@ func (m *ResponsePrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *ResponseProcessProposal) 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 *ResponseProcessProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *ConsensusParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6749,7 +7163,7 @@ 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]) @@ -6759,12 +7173,12 @@ func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *CommitInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -7200,12 +7614,12 @@ func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n54, err54 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err54 != nil { - return 0, err54 + 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 -= n54 - i = encodeVarintTypes(dAtA, i, uint64(n54)) + i -= n58 + i = encodeVarintTypes(dAtA, i, uint64(n58)) i-- dAtA[i] = 0x22 if m.Height != 0 { @@ -7498,6 +7912,18 @@ func (m *Request_PrepareProposal) Size() (n int) { } return n } +func (m *Request_ProcessProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProcessProposal != nil { + l = m.ProcessProposal.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} func (m *RequestEcho) Size() (n int) { if m == nil { return 0 @@ -7780,6 +8206,46 @@ func (m *RequestPrepareProposal) Size() (n int) { return n } +func (m *RequestProcessProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + 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)) + 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 +} + func (m *Response) Size() (n int) { if m == nil { return 0 @@ -7996,6 +8462,18 @@ func (m *Response_PrepareProposal) Size() (n int) { } return n } +func (m *Response_ProcessProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProcessProposal != nil { + l = m.ProcessProposal.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} func (m *ResponseException) Size() (n int) { if m == nil { return 0 @@ -8370,6 +8848,18 @@ func (m *ResponsePrepareProposal) Size() (n int) { return n } +func (m *ResponseProcessProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + return n +} + func (m *ConsensusParams) Size() (n int) { if m == nil { return 0 @@ -8410,7 +8900,7 @@ 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 } @@ -9227,6 +9717,41 @@ func (m *Request) Unmarshal(dAtA []byte) error { } m.Value = &Request_PrepareProposal{v} iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessProposal", 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 + } + v := &RequestProcessProposal{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_ProcessProposal{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -11144,6 +11669,309 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { } 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, Evidence{}) + 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 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -11768,6 +12596,41 @@ func (m *Response) Unmarshal(dAtA []byte) error { } m.Value = &Response_PrepareProposal{v} iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessProposal", 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 + } + v := &ResponseProcessProposal{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_ProcessProposal{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -14247,6 +15110,75 @@ func (m *ResponsePrepareProposal) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResponseProcessProposal) 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: 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 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= ResponseProcessProposal_ProposalStatus(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 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ConsensusParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -14529,7 +15461,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 { @@ -14552,10 +15484,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: diff --git a/consensus/common_test.go b/consensus/common_test.go index a8375279c..dc8b6c28b 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -13,6 +13,7 @@ import ( "time" "github.com/go-kit/log/term" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "path" @@ -462,12 +463,16 @@ func loadPrivValidator(config *cfg.Config) *privval.FilePV { } func randState(nValidators int) (*State, []*validatorStub) { + return randStateWithApp(nValidators, counter.NewApplication(true)) +} + +func randStateWithApp(nValidators int, app abci.Application) (*State, []*validatorStub) { // Get State state, privVals := randGenesisState(nValidators, false, 10) vss := make([]*validatorStub, nValidators) - cs := newState(state, privVals[0], counter.NewApplication(true)) + cs := newState(state, privVals[0], app) for i := 0; i < nValidators; i++ { vss[i] = newValidatorStub(privVals[i], int32(i)) @@ -682,6 +687,33 @@ func ensureVote(voteCh <-chan tmpubsub.Message, height int64, round int32, } } +func ensurePrevoteMatch(t *testing.T, voteCh <-chan tmpubsub.Message, height int64, round int32, hash []byte) { + t.Helper() + ensureVoteMatch(t, voteCh, height, round, hash, tmproto.PrevoteType) +} + +func ensureVoteMatch(t *testing.T, voteCh <-chan tmpubsub.Message, height int64, round int32, hash []byte, voteType tmproto.SignedMsgType) { + t.Helper() + select { + case <-time.After(ensureTimeout): + t.Fatal("Timeout expired while waiting for NewVote event") + case msg := <-voteCh: + voteEvent, ok := msg.Data().(types.EventDataVote) + require.True(t, ok, "expected a EventDataVote, got %T. Wrong subscription channel?", + msg.Data()) + + vote := voteEvent.Vote + assert.Equal(t, height, vote.Height, "expected height %d, but got %d", height, vote.Height) + assert.Equal(t, round, vote.Round, "expected round %d, but got %d", round, vote.Round) + assert.Equal(t, voteType, vote.Type, "expected type %s, but got %s", voteType, vote.Type) + if hash == nil { + require.Nil(t, vote.BlockID.Hash, "Expected prevote to be for nil, got %X", vote.BlockID.Hash) + } else { + require.True(t, bytes.Equal(vote.BlockID.Hash, hash), "Expected prevote to be for %X, got %X", hash, vote.BlockID.Hash) + } + } +} + func ensurePrecommitTimeout(ch <-chan tmpubsub.Message) { select { case <-time.After(ensureTimeout): diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index 09cb4ec8e..87321cdda 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -274,3 +274,8 @@ func (app *CounterApplication) PrepareProposal( } return abci.ResponsePrepareProposal{TxRecords: trs} } + +func (app *CounterApplication) ProcessProposal( + req abci.RequestProcessProposal) abci.ResponseProcessProposal { + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} +} diff --git a/consensus/state.go b/consensus/state.go index bce301247..29fb5abca 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1278,11 +1278,36 @@ func (cs *State) defaultDoPrevote(height int64, round int32) { return } - // Validate proposal block + // Validate proposal block, from Tendermint's perspective err := cs.blockExec.ValidateBlock(cs.state, cs.ProposalBlock) if err != nil { // ProposalBlock is invalid, prevote nil. - logger.Error("prevote step: ProposalBlock is invalid", "err", err) + logger.Error("prevote step: consensus deems this block invalid; prevoting nil", + "err", err) + cs.signAddVote(tmproto.PrevoteType, nil, types.PartSetHeader{}) + return + } + + /* + Before prevoting on the block received from the proposer for the current round and height, + we request the Application, via `ProcessProposal` ABCI call, to confirm that the block is + valid. If the Application does not accept the block, Tendermint prevotes `nil`. + + WARNING: misuse of block rejection by the Application can seriously compromise Tendermint's + liveness properties. Please see `PrepareProosal`-`ProcessProposal` coherence and determinism + properties in the ABCI++ specification. + */ + isAppValid, err := cs.blockExec.ProcessProposal(cs.ProposalBlock, cs.state) + if err != nil { + panic(fmt.Sprintf( + "state machine returned an error (%v) when calling ProcessProposal", err, + )) + } + + // Vote nil if the Application rejected the block + if !isAppValid { + logger.Error("prevote step: state machine rejected a proposed block; this should not happen:"+ + "the proposer may be misbehaving; prevoting nil", "err", err) cs.signAddVote(tmproto.PrevoteType, nil, types.PartSetHeader{}) return } diff --git a/consensus/state_test.go b/consensus/state_test.go index a551cfd6d..fa3004855 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -8,11 +8,15 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/abci/example/counter" + abci "github.com/tendermint/tendermint/abci/types" + abcimocks "github.com/tendermint/tendermint/abci/types/mocks" cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/crypto/tmhash" + tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" tmrand "github.com/tendermint/tendermint/libs/rand" @@ -1368,6 +1372,55 @@ func TestSetValidBlockOnDelayedProposal(t *testing.T) { assert.True(t, rs.ValidRound == round) } +func TestProcessProposalAccept(t *testing.T) { + for _, testCase := range []struct { + name string + accept bool + expectedNilPrevote bool + }{ + { + name: "accepted block is prevoted", + accept: true, + expectedNilPrevote: false, + }, + { + name: "rejected block is not prevoted", + accept: false, + expectedNilPrevote: true, + }, + } { + t.Run(testCase.name, func(t *testing.T) { + m := abcimocks.NewApplication(t) + status := abci.ResponseProcessProposal_REJECT + if testCase.accept { + status = abci.ResponseProcessProposal_ACCEPT + } + m.On("ProcessProposal", mock.Anything).Return(abci.ResponseProcessProposal{Status: status}) + m.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{}).Maybe() + cs1, _ := randStateWithApp(4, m) + height, round := cs1.Height, cs1.Round + + proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) + newRoundCh := subscribe(cs1.eventBus, types.EventQueryNewRound) + pv1, err := cs1.privValidator.GetPubKey() + require.NoError(t, err) + addr := pv1.Address() + voteCh := subscribeToVoter(cs1, addr) + + startTestRound(cs1, cs1.Height, round) + ensureNewRound(newRoundCh, height, round) + + ensureNewProposal(proposalCh, height, round) + rs := cs1.GetRoundState() + var prevoteHash tmbytes.HexBytes + if !testCase.expectedNilPrevote { + prevoteHash = rs.ProposalBlock.Hash() + } + ensurePrevoteMatch(t, voteCh, height, round, prevoteHash) + }) + } +} + // 4 vals, 3 Nil Precommits at P0 // What we want: // P0 waits for timeoutPrecommit before starting next round diff --git a/consensus/types/round_state.go b/consensus/types/round_state.go index 9e67b76c0..7bdd1c101 100644 --- a/consensus/types/round_state.go +++ b/consensus/types/round_state.go @@ -80,6 +80,15 @@ type RoundState struct { LockedBlock *types.Block `json:"locked_block"` LockedBlockParts *types.PartSet `json:"locked_block_parts"` + // The variables below starting with "Valid..." derive their name from + // the algorithm presented in this paper: + // [The latest gossip on BFT consensus](https://arxiv.org/abs/1807.04938). + // Therefore, "Valid...": + // * means that the block or round that the variable refers to has + // received 2/3+ non-`nil` prevotes (a.k.a. a *polka*) + // * has nothing to do with whether the Application returned "Accept" in its + // response to `ProcessProposal`, or "Reject" + // Last known round with POL for non-nil valid block. ValidRound int32 `json:"valid_round"` ValidBlock *types.Block `json:"valid_block"` // Last known block of POL mentioned above. @@ -186,8 +195,8 @@ func (rs *RoundState) StringIndented(indent string) string { %s ProposalBlock: %v %v %s LockedRound: %v %s LockedBlock: %v %v -%s ValidRound: %v -%s ValidBlock: %v %v +%s ValidRound: %v +%s ValidBlock: %v %v %s Votes: %v %s LastCommit: %v %s LastValidators:%v diff --git a/evidence/pool_test.go b/evidence/pool_test.go index c5939d43e..f0fba1ac2 100644 --- a/evidence/pool_test.go +++ b/evidence/pool_test.go @@ -406,7 +406,6 @@ func initializeBlockStore(db dbm.DB, state sm.State, valAddr []byte) (*store.Blo for i := int64(1); i <= state.LastBlockHeight; i++ { lastCommit := makeCommit(i-1, valAddr) block := sf.MakeBlock(state, i, lastCommit) - block.Header.Time = defaultEvidenceTime.Add(time.Duration(i) * time.Minute) block.Header.Version = tmversion.Consensus{Block: version.BlockProtocol, App: 1} const parts = 1 diff --git a/internal/test/block.go b/internal/test/block.go new file mode 100644 index 000000000..8b2bff5df --- /dev/null +++ b/internal/test/block.go @@ -0,0 +1,92 @@ +package factory + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/tmhash" + "github.com/tendermint/tendermint/types" + "github.com/tendermint/tendermint/version" +) + +const ( + DefaultTestChainID = "test-chain" +) + +var ( + DefaultTestTime = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) +) + +func RandomAddress() []byte { + return crypto.CRandBytes(crypto.AddressSize) +} + +func RandomHash() []byte { + return crypto.CRandBytes(tmhash.Size) +} + +func MakeBlockID() types.BlockID { + return MakeBlockIDWithHash(RandomHash()) +} + +func MakeBlockIDWithHash(hash []byte) types.BlockID { + return types.BlockID{ + Hash: hash, + PartSetHeader: types.PartSetHeader{ + Total: 100, + Hash: RandomHash(), + }, + } +} + +// MakeHeader fills the rest of the contents of the header such that it passes +// validate basic +func MakeHeader(t *testing.T, h *types.Header) *types.Header { + t.Helper() + if h.Version.Block == 0 { + h.Version.Block = version.BlockProtocol + } + if h.Height == 0 { + h.Height = 1 + } + if h.LastBlockID.IsZero() { + h.LastBlockID = MakeBlockID() + } + if h.ChainID == "" { + h.ChainID = DefaultTestChainID + } + if len(h.LastCommitHash) == 0 { + h.LastCommitHash = RandomHash() + } + if len(h.DataHash) == 0 { + h.DataHash = RandomHash() + } + if len(h.ValidatorsHash) == 0 { + h.ValidatorsHash = RandomHash() + } + if len(h.NextValidatorsHash) == 0 { + h.NextValidatorsHash = RandomHash() + } + if len(h.ConsensusHash) == 0 { + h.ConsensusHash = RandomHash() + } + if len(h.AppHash) == 0 { + h.AppHash = RandomHash() + } + if len(h.LastResultsHash) == 0 { + h.LastResultsHash = RandomHash() + } + if len(h.EvidenceHash) == 0 { + h.EvidenceHash = RandomHash() + } + if len(h.ProposerAddress) == 0 { + h.ProposerAddress = RandomAddress() + } + + require.NoError(t, h.ValidateBasic()) + + return h +} diff --git a/internal/test/doc.go b/internal/test/doc.go new file mode 100644 index 000000000..5b6b313f6 --- /dev/null +++ b/internal/test/doc.go @@ -0,0 +1,6 @@ +/* +Package factory provides generation code for common structs in Tendermint. +It is used primarily for the testing of internal components such as statesync, +consensus, blocksync etc.. +*/ +package factory diff --git a/internal/test/factory_test.go b/internal/test/factory_test.go new file mode 100644 index 000000000..9ef520ff6 --- /dev/null +++ b/internal/test/factory_test.go @@ -0,0 +1,11 @@ +package factory + +import ( + "testing" + + "github.com/tendermint/tendermint/types" +) + +func TestMakeHeader(t *testing.T) { + MakeHeader(t, &types.Header{}) +} diff --git a/internal/test/genesis.go b/internal/test/genesis.go new file mode 100644 index 000000000..a385e51fc --- /dev/null +++ b/internal/test/genesis.go @@ -0,0 +1,34 @@ +package factory + +import ( + "time" + + cfg "github.com/tendermint/tendermint/config" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/types" +) + +func GenesisDoc( + config *cfg.Config, + time time.Time, + validators []*types.Validator, + consensusParams *tmproto.ConsensusParams, +) *types.GenesisDoc { + + genesisValidators := make([]types.GenesisValidator, len(validators)) + + for i := range validators { + genesisValidators[i] = types.GenesisValidator{ + Power: validators[i].VotingPower, + PubKey: validators[i].PubKey, + } + } + + return &types.GenesisDoc{ + GenesisTime: time, + InitialHeight: 1, + ChainID: config.ChainID(), + Validators: genesisValidators, + ConsensusParams: consensusParams, + } +} diff --git a/internal/test/tx.go b/internal/test/tx.go new file mode 100644 index 000000000..725f3c720 --- /dev/null +++ b/internal/test/tx.go @@ -0,0 +1,11 @@ +package factory + +import "github.com/tendermint/tendermint/types" + +func MakeNTxs(height, n int64) []types.Tx { + txs := make([]types.Tx, n) + for i := range txs { + txs[i] = types.Tx([]byte{byte(height), byte(i / 256), byte(i % 256)}) + } + return txs +} diff --git a/internal/test/validator.go b/internal/test/validator.go new file mode 100644 index 000000000..71d35cede --- /dev/null +++ b/internal/test/validator.go @@ -0,0 +1,41 @@ +package factory + +import ( + "context" + "sort" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/tendermint/tendermint/types" +) + +func Validator(ctx context.Context, votingPower int64) (*types.Validator, types.PrivValidator, error) { + privVal := types.NewMockPV() + pubKey, err := privVal.GetPubKey() + if err != nil { + return nil, nil, err + } + + val := types.NewValidator(pubKey, votingPower) + return val, privVal, nil +} + +func ValidatorSet(ctx context.Context, t *testing.T, numValidators int, votingPower int64) (*types.ValidatorSet, []types.PrivValidator) { + var ( + valz = make([]*types.Validator, numValidators) + privValidators = make([]types.PrivValidator, numValidators) + ) + t.Helper() + + for i := 0; i < numValidators; i++ { + val, privValidator, err := Validator(ctx, votingPower) + require.NoError(t, err) + valz[i] = val + privValidators[i] = privValidator + } + + sort.Sort(types.PrivValidatorsByAddress(privValidators)) + + return types.NewValidatorSet(valz), privValidators +} diff --git a/internal/test/vote.go b/internal/test/vote.go new file mode 100644 index 000000000..1339d5258 --- /dev/null +++ b/internal/test/vote.go @@ -0,0 +1,44 @@ +package factory + +import ( + "context" + "time" + + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/types" +) + +func MakeVote( + ctx context.Context, + val types.PrivValidator, + chainID string, + valIndex int32, + height int64, + round int32, + step int, + blockID types.BlockID, + time time.Time, +) (*types.Vote, error) { + pubKey, err := val.GetPubKey() + if err != nil { + return nil, err + } + + v := &types.Vote{ + ValidatorAddress: pubKey.Address(), + ValidatorIndex: valIndex, + Height: height, + Round: round, + Type: tmproto.SignedMsgType(step), + BlockID: blockID, + Timestamp: time, + } + + vpb := v.ToProto() + if err := val.SignVote(chainID, vpb); err != nil { + return nil, err + } + + v.Signature = vpb.Signature + return v, nil +} diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 79435c15d..53f26c952 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -37,6 +37,7 @@ message Request { RequestLoadSnapshotChunk load_snapshot_chunk = 14; RequestApplySnapshotChunk apply_snapshot_chunk = 15; RequestPrepareProposal prepare_proposal = 16; + RequestProcessProposal process_proposal = 17; } } @@ -76,10 +77,10 @@ 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]; + bytes hash = 1; + tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; + CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; } enum CheckTxType { @@ -137,6 +138,19 @@ message RequestPrepareProposal { int64 max_tx_bytes = 6; } +message RequestProcessProposal { + repeated bytes txs = 1; + CommitInfo proposed_last_commit = 2 [(gogoproto.nullable) = false]; + repeated Evidence 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; +} + //---------------------------------------- // Response types @@ -159,7 +173,7 @@ message Response { ResponseLoadSnapshotChunk load_snapshot_chunk = 15; ResponseApplySnapshotChunk apply_snapshot_chunk = 16; ResponsePrepareProposal prepare_proposal = 17; - + ResponseProcessProposal process_proposal = 18; } } @@ -249,7 +263,7 @@ message ResponseDeliverTx { } message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; + repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; ConsensusParams consensus_param_updates = 2; repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; @@ -298,7 +312,17 @@ message ResponseApplySnapshotChunk { } message ResponsePrepareProposal { - repeated TxRecord tx_records = 1; + repeated TxRecord tx_records = 1; +} + +message ResponseProcessProposal { + ProposalStatus status = 1; + + enum ProposalStatus { + UNKNOWN = 0; + ACCEPT = 1; + REJECT = 2; + } } //---------------------------------------- @@ -321,7 +345,7 @@ message BlockParams { int64 max_gas = 2; } -message LastCommitInfo { +message CommitInfo { int32 round = 1; repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; } @@ -456,4 +480,5 @@ service ABCIApplication { rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal); + rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal); } diff --git a/proto/tendermint/consensus/types.pb.go b/proto/tendermint/consensus/types.pb.go index 6372a88d4..98550a3b2 100644 --- a/proto/tendermint/consensus/types.pb.go +++ b/proto/tendermint/consensus/types.pb.go @@ -104,7 +104,7 @@ func (m *NewRoundStep) GetLastCommitRound() int32 { } // NewValidBlock is sent when a validator observes a valid block B in some round r, -//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. +// i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. // In case the block is also committed, then IsCommit flag is set to true. type NewValidBlock struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` diff --git a/proto/tendermint/consensus/types.proto b/proto/tendermint/consensus/types.proto index 6e1f41371..5048f8545 100644 --- a/proto/tendermint/consensus/types.proto +++ b/proto/tendermint/consensus/types.proto @@ -18,7 +18,7 @@ message NewRoundStep { } // NewValidBlock is sent when a validator observes a valid block B in some round r, -//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. +// i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. // In case the block is also committed, then IsCommit flag is set to true. message NewValidBlock { int64 height = 1; diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto index 3b234571b..451b8dca3 100644 --- a/proto/tendermint/types/evidence.proto +++ b/proto/tendermint/types/evidence.proto @@ -17,20 +17,20 @@ message Evidence { // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } message EvidenceList { diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 7f7ea74ca..8d4f00972 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -106,10 +106,10 @@ message Vote { // Commit contains the evidence that a block was committed by a set of validators. message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; } // CommitSig is a part of the Vote included in a Commit. diff --git a/proxy/app_conn.go b/proxy/app_conn.go index 5a08f2d1a..9614767cb 100644 --- a/proxy/app_conn.go +++ b/proxy/app_conn.go @@ -15,8 +15,8 @@ type AppConnConsensus interface { Error() error InitChainSync(types.RequestInitChain) (*types.ResponseInitChain, error) - PrepareProposalSync(types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) + ProcessProposalSync(types.RequestProcessProposal) (*types.ResponseProcessProposal, error) BeginBlockSync(types.RequestBeginBlock) (*types.ResponseBeginBlock, error) DeliverTxAsync(types.RequestDeliverTx) *abcicli.ReqRes EndBlockSync(types.RequestEndBlock) (*types.ResponseEndBlock, error) @@ -85,6 +85,10 @@ func (app *appConnConsensus) PrepareProposalSync( return app.appConn.PrepareProposalSync(req) } +func (app *appConnConsensus) ProcessProposalSync(req types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + return app.appConn.ProcessProposalSync(req) +} + func (app *appConnConsensus) BeginBlockSync(req types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { return app.appConn.BeginBlockSync(req) } diff --git a/proxy/mocks/app_conn_consensus.go b/proxy/mocks/app_conn_consensus.go index 324e4b199..7803a3189 100644 --- a/proxy/mocks/app_conn_consensus.go +++ b/proxy/mocks/app_conn_consensus.go @@ -159,6 +159,29 @@ func (_m *AppConnConsensus) PrepareProposalSync(_a0 types.RequestPrepareProposal return r0, r1 } +// ProcessProposalSync provides a mock function with given fields: _a0 +func (_m *AppConnConsensus) ProcessProposalSync(_a0 types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + ret := _m.Called(_a0) + + var r0 *types.ResponseProcessProposal + if rf, ok := ret.Get(0).(func(types.RequestProcessProposal) *types.ResponseProcessProposal); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseProcessProposal) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(types.RequestProcessProposal) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // SetResponseCallback provides a mock function with given fields: _a0 func (_m *AppConnConsensus) SetResponseCallback(_a0 abcicli.Callback) { _m.Called(_a0) diff --git a/scripts/mockery_generate.sh b/scripts/mockery_generate.sh new file mode 100755 index 000000000..2d6f40e63 --- /dev/null +++ b/scripts/mockery_generate.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Invoke Mockery v2 to update generated mocks for the given type. +# +# This script runs a locally-installed "mockery" if available, otherwise it +# runs the published Docker container. This legerdemain is so that the CI build +# and a local build can work off the same script. +# +if ! which mockery ; then + mockery() { + docker run --rm -v "$PWD":/w --workdir=/w vektra/mockery:v2.12.3 + } +fi + +mockery --disable-version-string --case underscore --name "$@" diff --git a/state/execution.go b/state/execution.go index f9875db81..0d8153e12 100644 --- a/state/execution.go +++ b/state/execution.go @@ -112,7 +112,7 @@ func (blockExec *BlockExecutor) CreateProposalBlock( txs := blockExec.mempool.ReapMaxBytesMaxGas(maxDataBytes, maxGas) block := state.MakeBlock(height, txs, commit, evidence, proposerAddr) - localLastCommit := getBeginBlockValidatorInfo(block, blockExec.store, state.InitialHeight) + localLastCommit := buildLastCommitInfo(block, blockExec.store, state.InitialHeight) rpp, err := blockExec.proxyApp.PrepareProposalSync( abci.RequestPrepareProposal{ Hash: block.Hash(), @@ -149,6 +149,30 @@ func (blockExec *BlockExecutor) CreateProposalBlock( return state.MakeBlock(height, itxs, commit, evidence, proposerAddr), nil } +func (blockExec *BlockExecutor) ProcessProposal( + block *types.Block, + state State, +) (bool, error) { + resp, err := blockExec.proxyApp.ProcessProposalSync(abci.RequestProcessProposal{ + Hash: block.Header.Hash(), + Height: block.Header.Height, + Time: block.Header.Time, + Txs: block.Data.Txs.ToSliceOfBytes(), + 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.IsStatusUnknown() { + panic(fmt.Sprintf("ProcessProposal responded with status %s", resp.Status.String())) + } + + return resp.IsAccepted(), nil +} + // ValidateBlock validates the given block against the given state. // If the block is invalid, it returns an error. // Validation does not mutate state, but does require historical information from the stateDB, @@ -329,12 +353,7 @@ func execBlockOnProxyApp( } proxyAppConn.SetResponseCallback(proxyCb) - commitInfo := getBeginBlockValidatorInfo(block, store, initialHeight) - - byzVals := make([]abci.Evidence, 0) - for _, evidence := range block.Evidence.Evidence { - byzVals = append(byzVals, evidence.ABCI()...) - } + commitInfo := buildLastCommitInfo(block, store, initialHeight) // Begin block var err error @@ -347,7 +366,7 @@ func execBlockOnProxyApp( Hash: block.Hash(), Header: *pbh, LastCommitInfo: commitInfo, - ByzantineValidators: byzVals, + ByzantineValidators: block.Evidence.Evidence.ToABCI(), }) if err != nil { logger.Error("error in proxyAppConn.BeginBlock", "err", err) @@ -373,47 +392,48 @@ 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.LastCommitInfo, votes []*types.Vote) abci.ExtendedCommitInfo { +func extendedCommitInfo(c abci.CommitInfo, votes []*types.Vote) abci.ExtendedCommitInfo { vs := make([]abci.ExtendedVoteInfo, len(c.Votes)) for i := range vs { vs[i] = abci.ExtendedVoteInfo{ diff --git a/state/execution_test.go b/state/execution_test.go index 00bb9b2ed..6a8809cc8 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -245,6 +245,85 @@ func TestBeginBlockByzantineValidators(t *testing.T) { assert.Equal(t, abciEv, app.ByzantineValidators) } +func TestProcessProposal(t *testing.T) { + const height = 2 + txs := factory.MakeNTxs(height, 10) + + logger := log.NewNopLogger() + app := abcimocks.NewBaseMock() + app.On("ProcessProposal", mock.Anything).Return(abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}) + + cc := proxy.NewLocalClientCreator(app) + proxyApp := proxy.NewAppConns(cc) + err := proxyApp.Start() + require.NoError(t, err) + defer proxyApp.Stop() //nolint:errcheck // ignore for tests + + state, stateDB, privVals := makeState(1, height) + stateStore := sm.NewStore(stateDB) + + eventBus := types.NewEventBus() + err = eventBus.Start() + require.NoError(t, err) + + blockExec := sm.NewBlockExecutor( + stateStore, + logger, + proxyApp.Consensus(), + new(mpmocks.Mempool), + sm.EmptyEvidencePool{}, + ) + + block0 := sf.MakeBlock(state, height-1, new(types.Commit)) + lastCommitSig := []types.CommitSig{} + partSet, err := block0.MakePartSet(types.BlockPartSizeBytes) + require.NoError(t, err) + blockID := types.BlockID{Hash: block0.Hash(), PartSetHeader: partSet.Header()} + voteInfos := []abci.VoteInfo{} + for _, privVal := range privVals { + vote, err := types.MakeVote(height, blockID, state.Validators, privVal, block0.Header.ChainID, time.Now()) + require.NoError(t, err) + pk, err := privVal.GetPubKey() + require.NoError(t, err) + addr := pk.Address() + voteInfos = append(voteInfos, + abci.VoteInfo{ + SignedLastBlock: true, + Validator: abci.Validator{ + Address: addr, + Power: 1000, + }, + }) + lastCommitSig = append(lastCommitSig, vote.CommitSig()) + } + + block1 := sf.MakeBlock(state, height, &types.Commit{ + Height: height - 1, + Signatures: lastCommitSig, + }) + block1.Txs = txs + + expectedRpp := abci.RequestProcessProposal{ + Txs: block1.Txs.ToSliceOfBytes(), + Hash: block1.Hash(), + Height: block1.Header.Height, + Time: block1.Header.Time, + Misbehavior: block1.Evidence.Evidence.ToABCI(), + ProposedLastCommit: abci.CommitInfo{ + Round: 0, + Votes: voteInfos, + }, + NextValidatorsHash: block1.NextValidatorsHash, + ProposerAddress: block1.ProposerAddress, + } + + acceptBlock, err := blockExec.ProcessProposal(block1, state) + require.NoError(t, err) + require.True(t, acceptBlock) + app.AssertExpectations(t) + app.AssertCalled(t, "ProcessProposal", expectedRpp) +} + func TestValidateValidatorUpdates(t *testing.T) { pubkey1 := ed25519.GenPrivKey().PubKey() pubkey2 := ed25519.GenPrivKey().PubKey() diff --git a/state/helpers_test.go b/state/helpers_test.go index f9a60845f..35d0c403c 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -170,7 +170,6 @@ func makeHeaderPartsResponsesValPowerChange( ) (types.Header, types.BlockID, *tmstate.ABCIResponses) { block := sf.MakeBlock(state, state.LastBlockHeight+1, new(types.Commit)) - abciResponses := &tmstate.ABCIResponses{ BeginBlock: &abci.ResponseBeginBlock{}, EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, @@ -265,3 +264,12 @@ func (app *testApp) Commit() abci.ResponseCommit { func (app *testApp) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery) { return } + +func (app *testApp) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { + for _, tx := range req.Txs { + if len(tx) == 0 { + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} + } + } + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} +} diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index 00dcc6bf9..ad34fd7e4 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -275,6 +275,18 @@ func (app *Application) PrepareProposal( return abci.ResponsePrepareProposal{TxRecords: trs} } +// ProcessProposal implements part of the Application interface. +// It accepts any proposal that does not contain a malformed transaction. +func (app *Application) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { + for _, tx := range req.Txs { + _, _, err := parseTx(tx) + if err != nil { + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} + } + } + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} +} + func (app *Application) Rollback() error { return app.state.Rollback() }