diff --git a/abci/client/client.go b/abci/client/client.go index 2802ab7d510..dc168b7e50d 100644 --- a/abci/client/client.go +++ b/abci/client/client.go @@ -38,7 +38,14 @@ type Client interface { // for the v0 mempool. We should explore refactoring the // mempool to remove this vestige behavior. SetResponseCallback(Callback) + + CheckTxSync(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error) + BeginRecheckTxSync(context.Context, *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) // Signals the beginning of rechecking + EndRecheckTxSync(context.Context, *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) // Signals the end of rechecking + CheckTxAsync(context.Context, *types.RequestCheckTx) (*ReqRes, error) + BeginRecheckTxAsync(context.Context, *types.RequestBeginRecheckTx) (*ReqRes, error) + EndRecheckTxAsync(context.Context, *types.RequestEndRecheckTx) (*ReqRes, error) } //---------------------------------------- @@ -114,6 +121,13 @@ func (r *ReqRes) InvokeCallback() { r.callbackInvoked = true } +// SetDone marks the ReqRes object as done. +func (r *ReqRes) SetInvoked() { + r.mtx.Lock() + r.callbackInvoked = true + r.mtx.Unlock() +} + // GetCallback returns the configured callback of the ReqRes object which may be // nil. Note, it is not safe to concurrently call this in cases where it is // marked done and SetCallback is called before calling GetCallback as that diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index df78ea34710..49caf1ff3cb 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -66,6 +66,7 @@ func (cli *grpcClient) OnStart() error { cli.mtx.Lock() defer cli.mtx.Unlock() + reqres.SetInvoked() reqres.Done() // Notify client listener if set @@ -161,15 +162,6 @@ func (cli *grpcClient) SetResponseCallback(resCb Callback) { //---------------------------------------- -func (cli *grpcClient) CheckTxAsync(ctx context.Context, req *types.RequestCheckTx) (*ReqRes, error) { - res, err := cli.client.CheckTx(ctx, req, grpc.WaitForReady(true)) - if err != nil { - cli.StopForError(err) - return nil, err - } - return cli.finishAsyncCall(types.ToRequestCheckTx(req), &types.Response{Value: &types.Response_CheckTx{CheckTx: res}}), nil -} - // 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 { @@ -194,10 +186,6 @@ func (cli *grpcClient) Info(ctx context.Context, req *types.RequestInfo) (*types return cli.client.Info(ctx, req, grpc.WaitForReady(true)) } -func (cli *grpcClient) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { - return cli.client.CheckTx(ctx, req, grpc.WaitForReady(true)) -} - func (cli *grpcClient) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) { return cli.client.Query(ctx, types.ToRequestQuery(req).GetQuery(), grpc.WaitForReady(true)) } @@ -245,3 +233,62 @@ func (cli *grpcClient) VerifyVoteExtension(ctx context.Context, req *types.Reque func (cli *grpcClient) FinalizeBlock(ctx context.Context, req *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { return cli.client.FinalizeBlock(ctx, types.ToRequestFinalizeBlock(req).GetFinalizeBlock(), grpc.WaitForReady(true)) } + +func (cli *grpcClient) CheckTxSync(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + return cli.client.CheckTx(ctx, req, grpc.WaitForReady(true)) +} + +func (cli *grpcClient) BeginRecheckTxSync(ctx context.Context, params *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + reqres, _ := cli.BeginRecheckTxAsync(ctx, params) + reqres.Wait() + return reqres.Response.GetBeginRecheckTx(), cli.Error() +} + +func (cli *grpcClient) EndRecheckTxSync(ctx context.Context, params *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + reqres, _ := cli.EndRecheckTxAsync(ctx, params) + reqres.Wait() + return reqres.Response.GetEndRecheckTx(), cli.Error() +} + +func (cli *grpcClient) CheckTxAsync(ctx context.Context, req *types.RequestCheckTx) (*ReqRes, error) { + res, err := cli.client.CheckTx(ctx, req, grpc.WaitForReady(true)) + if err != nil { + cli.StopForError(err) + return nil, err + } + return cli.finishAsyncCall(types.ToRequestCheckTx(req), &types.Response{Value: &types.Response_CheckTx{CheckTx: res}}), nil +} + +func (cli *grpcClient) BeginRecheckTxAsync(ctx context.Context, params *types.RequestBeginRecheckTx) (*ReqRes, error) { + req := types.ToRequestBeginRecheckTx(params) + res, err := cli.client.BeginRecheckTx(ctx, req.GetBeginRecheckTx(), grpc.WaitForReady(true)) + if err != nil { + cli.StopForError(err) + } + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_BeginRecheckTx{BeginRecheckTx: res}}), nil +} + +func (cli *grpcClient) EndRecheckTxAsync(ctx context.Context, params *types.RequestEndRecheckTx) (*ReqRes, error) { + req := types.ToRequestEndRecheckTx(params) + res, err := cli.client.EndRecheckTx(ctx, req.GetEndRecheckTx(), grpc.WaitForReady(true)) + if err != nil { + cli.StopForError(err) + } + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_EndRecheckTx{EndRecheckTx: res}}), nil +} + +func (cli *grpcClient) CheckTxSyncForApp(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + panic("not implemented") +} + +func (cli *grpcClient) CheckTxAsyncForApp(context.Context, *types.RequestCheckTx, types.CheckTxCallback) { + panic("not implemented") +} + +func (cli *grpcClient) BeginRecheckTx(ctx context.Context, params *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + panic("not implemented") +} + +func (cli *grpcClient) EndRecheckTx(ctx context.Context, params *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + panic("not implemented") +} diff --git a/abci/client/local_client.go b/abci/client/local_client.go index 63345a56265..f821d70d00d 100644 --- a/abci/client/local_client.go +++ b/abci/client/local_client.go @@ -44,20 +44,6 @@ func (app *localClient) SetResponseCallback(cb Callback) { app.mtx.Unlock() } -func (app *localClient) CheckTxAsync(ctx context.Context, req *types.RequestCheckTx) (*ReqRes, error) { - app.mtx.Lock() - defer app.mtx.Unlock() - - res, err := app.Application.CheckTx(ctx, req) - if err != nil { - return nil, err - } - return app.callback( - types.ToRequestCheckTx(req), - types.ToResponseCheckTx(res), - ), nil -} - func (app *localClient) callback(req *types.Request, res *types.Response) *ReqRes { app.Callback(req, res) rr := newLocalReqRes(req, res) @@ -92,13 +78,6 @@ func (app *localClient) Info(ctx context.Context, req *types.RequestInfo) (*type return app.Application.Info(ctx, req) } -func (app *localClient) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { - app.mtx.Lock() - defer app.mtx.Unlock() - - return app.Application.CheckTx(ctx, req) -} - func (app *localClient) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) { app.mtx.Lock() defer app.mtx.Unlock() @@ -184,3 +163,83 @@ func (app *localClient) FinalizeBlock(ctx context.Context, req *types.RequestFin return app.Application.FinalizeBlock(ctx, req) } + +func (app *localClient) CheckTxSync(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + // CONTRACT: Application should handle concurrent `CheckTx` + // In this abci client layer, we don't protect `CheckTx` with a mutex for concurrency + // app.mtx.Lock() + // defer app.mtx.Unlock() + return app.Application.CheckTxSyncForApp(ctx, req) +} + +func (app *localClient) BeginRecheckTxSync(ctx context.Context, req *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + // NOTE: commented out for performance. delete all after commenting out all `app.mtx` + // app.mtx.Lock() + // defer app.mtx.Unlock() + + return app.Application.BeginRecheckTx(ctx, req) +} + +func (app *localClient) EndRecheckTxSync(ctx context.Context, req *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + // NOTE: commented out for performance. delete all after commenting out all `app.mtx` + // app.mtx.Lock() + // defer app.mtx.Unlock() + + return app.Application.EndRecheckTx(ctx, req) +} + +func (app *localClient) CheckTxAsync(ctx context.Context, reqCheckTx *types.RequestCheckTx) (*ReqRes, error) { + req := types.ToRequestCheckTx(reqCheckTx) + reqRes := NewReqRes(req) + + app.Application.CheckTxAsyncForApp(ctx, reqCheckTx, func(resCheckTx *types.ResponseCheckTx) { + res := types.ToResponseCheckTx(resCheckTx) + app.Callback(req, res) + reqRes.Response = res + reqRes.SetInvoked() + reqRes.Done() + + // Notify reqRes listener if set + reqRes.InvokeCallback() + }) + + return reqRes, nil +} + +func (app *localClient) BeginRecheckTxAsync(ctx context.Context, req *types.RequestBeginRecheckTx) (*ReqRes, error) { + res, err := app.Application.BeginRecheckTx(ctx, req) + if err != nil { + return nil, err + } + return app.callback( + types.ToRequestBeginRecheckTx(req), + types.ToResponseBeginRecheckTx(res), + ), nil +} + +func (app *localClient) EndRecheckTxAsync(ctx context.Context, req *types.RequestEndRecheckTx) (*ReqRes, error) { + res, err := app.Application.EndRecheckTx(ctx, req) + if err != nil { + return nil, err + } + return app.callback( + types.ToRequestEndRecheckTx(req), + types.ToResponseEndRecheckTx(res), + ), nil +} + +func (app *localClient) CheckTxSyncForApp(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + panic("not implemented") +} + +func (app *localClient) CheckTxAsyncForApp(context.Context, *types.RequestCheckTx, types.CheckTxCallback) { + panic("not implemented") +} + +func (app *localClient) BeginRecheckTx(ctx context.Context, params *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + panic("not implemented") +} + +func (app *localClient) EndRecheckTx(ctx context.Context, params *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + panic("not implemented") +} diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 18d4d65e736..d4e3aa968fa 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -49,28 +49,88 @@ func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestAppl return r0, r1 } -// CheckTx provides a mock function with given fields: _a0, _a1 -func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { +// BeginRecheckTx provides a mock function with given fields: _a0, _a1 +func (_m *Client) BeginRecheckTx(_a0 context.Context, _a1 *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for CheckTx") + panic("no return value specified for BeginRecheckTx") } - var r0 *types.ResponseCheckTx + var r0 *types.ResponseBeginRecheckTx var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) *types.ResponseCheckTx); ok { + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) *types.ResponseBeginRecheckTx); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseCheckTx) + r0 = ret.Get(0).(*types.ResponseBeginRecheckTx) } } - if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCheckTx) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestBeginRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeginRecheckTxAsync provides a mock function with given fields: _a0, _a1 +func (_m *Client) BeginRecheckTxAsync(_a0 context.Context, _a1 *types.RequestBeginRecheckTx) (*abcicli.ReqRes, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for BeginRecheckTxAsync") + } + + var r0 *abcicli.ReqRes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) (*abcicli.ReqRes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) *abcicli.ReqRes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*abcicli.ReqRes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestBeginRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeginRecheckTxSync provides a mock function with given fields: _a0, _a1 +func (_m *Client) BeginRecheckTxSync(_a0 context.Context, _a1 *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for BeginRecheckTxSync") + } + + var r0 *types.ResponseBeginRecheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) *types.ResponseBeginRecheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseBeginRecheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestBeginRecheckTx) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -109,6 +169,71 @@ func (_m *Client) CheckTxAsync(_a0 context.Context, _a1 *types.RequestCheckTx) ( return r0, r1 } +// CheckTxAsyncForApp provides a mock function with given fields: _a0, _a1, _a2 +func (_m *Client) CheckTxAsyncForApp(_a0 context.Context, _a1 *types.RequestCheckTx, _a2 types.CheckTxCallback) { + _m.Called(_a0, _a1, _a2) +} + +// CheckTxSync provides a mock function with given fields: _a0, _a1 +func (_m *Client) CheckTxSync(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CheckTxSync") + } + + var r0 *types.ResponseCheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) *types.ResponseCheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseCheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CheckTxSyncForApp provides a mock function with given fields: _a0, _a1 +func (_m *Client) CheckTxSyncForApp(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CheckTxSyncForApp") + } + + var r0 *types.ResponseCheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) *types.ResponseCheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseCheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // Commit provides a mock function with given fields: _a0, _a1 func (_m *Client) Commit(_a0 context.Context, _a1 *types.RequestCommit) (*types.ResponseCommit, error) { ret := _m.Called(_a0, _a1) @@ -169,7 +294,97 @@ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, er return r0, r1 } -// Error provides a mock function with given fields: +// EndRecheckTx provides a mock function with given fields: _a0, _a1 +func (_m *Client) EndRecheckTx(_a0 context.Context, _a1 *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for EndRecheckTx") + } + + var r0 *types.ResponseEndRecheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) *types.ResponseEndRecheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseEndRecheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestEndRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EndRecheckTxAsync provides a mock function with given fields: _a0, _a1 +func (_m *Client) EndRecheckTxAsync(_a0 context.Context, _a1 *types.RequestEndRecheckTx) (*abcicli.ReqRes, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for EndRecheckTxAsync") + } + + var r0 *abcicli.ReqRes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) (*abcicli.ReqRes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) *abcicli.ReqRes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*abcicli.ReqRes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestEndRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EndRecheckTxSync provides a mock function with given fields: _a0, _a1 +func (_m *Client) EndRecheckTxSync(_a0 context.Context, _a1 *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for EndRecheckTxSync") + } + + var r0 *types.ResponseEndRecheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) *types.ResponseEndRecheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseEndRecheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestEndRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Error provides a mock function with no fields func (_m *Client) Error() error { ret := _m.Called() @@ -325,7 +540,7 @@ func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (* return r0, r1 } -// IsRunning provides a mock function with given fields: +// IsRunning provides a mock function with no fields func (_m *Client) IsRunning() bool { ret := _m.Called() @@ -433,7 +648,7 @@ func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnap return r0, r1 } -// OnReset provides a mock function with given fields: +// OnReset provides a mock function with no fields func (_m *Client) OnReset() error { ret := _m.Called() @@ -451,7 +666,7 @@ func (_m *Client) OnReset() error { return r0 } -// OnStart provides a mock function with given fields: +// OnStart provides a mock function with no fields func (_m *Client) OnStart() error { ret := _m.Called() @@ -469,7 +684,7 @@ func (_m *Client) OnStart() error { return r0 } -// OnStop provides a mock function with given fields: +// OnStop provides a mock function with no fields func (_m *Client) OnStop() { _m.Called() } @@ -564,7 +779,7 @@ func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.Re return r0, r1 } -// Quit provides a mock function with given fields: +// Quit provides a mock function with no fields func (_m *Client) Quit() <-chan struct{} { ret := _m.Called() @@ -584,7 +799,7 @@ func (_m *Client) Quit() <-chan struct{} { return r0 } -// Reset provides a mock function with given fields: +// Reset provides a mock function with no fields func (_m *Client) Reset() error { ret := _m.Called() @@ -612,7 +827,7 @@ func (_m *Client) SetResponseCallback(_a0 abcicli.Callback) { _m.Called(_a0) } -// Start provides a mock function with given fields: +// Start provides a mock function with no fields func (_m *Client) Start() error { ret := _m.Called() @@ -630,7 +845,7 @@ func (_m *Client) Start() error { return r0 } -// Stop provides a mock function with given fields: +// Stop provides a mock function with no fields func (_m *Client) Stop() error { ret := _m.Called() @@ -648,7 +863,7 @@ func (_m *Client) Stop() error { return r0 } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *Client) String() string { ret := _m.Called() diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index 47382e31292..20ed23edb7e 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -42,6 +42,7 @@ type socketClient struct { err error reqSent *list.List // list of requests sent, waiting for response resCb func(*types.Request, *types.Response) // called on all requests, if set. + resMtx sync.Mutex } var _ Client = (*socketClient)(nil) @@ -115,13 +116,16 @@ func (cli *socketClient) Error() error { // // NOTE: callback may get internally generated flush responses. func (cli *socketClient) SetResponseCallback(resCb Callback) { - cli.mtx.Lock() + cli.resMtx.Lock() cli.resCb = resCb - cli.mtx.Unlock() + cli.resMtx.Unlock() } -func (cli *socketClient) CheckTxAsync(ctx context.Context, req *types.RequestCheckTx) (*ReqRes, error) { - return cli.queueRequest(ctx, types.ToRequestCheckTx(req)) +func (cli *socketClient) GetResponseCallback() Callback { + cli.resMtx.Lock() + cb := cli.resCb + cli.resMtx.Unlock() + return cb } //---------------------------------------- @@ -219,12 +223,13 @@ func (cli *socketClient) didRecvResponse(res *types.Response) error { } reqres.Response = res + reqres.SetInvoked() reqres.Done() // release waiters cli.reqSent.Remove(next) // pop first item from linked list // Notify client listener if set (global callback). - if cli.resCb != nil { - cli.resCb(reqres.Request, res) + if cb := cli.GetResponseCallback(); cb != nil { + cb(reqres.Request, res) } // Notify reqRes listener if set (request specific callback). @@ -269,17 +274,6 @@ func (cli *socketClient) Info(ctx context.Context, req *types.RequestInfo) (*typ return reqRes.Response.GetInfo(), cli.Error() } -func (cli *socketClient) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { - reqRes, err := cli.queueRequest(ctx, types.ToRequestCheckTx(req)) - if err != nil { - return nil, err - } - if err := cli.Flush(ctx); err != nil { - return nil, err - } - return reqRes.Response.GetCheckTx(), cli.Error() -} - func (cli *socketClient) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) { reqRes, err := cli.queueRequest(ctx, types.ToRequestQuery(req)) if err != nil { @@ -412,6 +406,67 @@ func (cli *socketClient) FinalizeBlock(ctx context.Context, req *types.RequestFi return reqRes.Response.GetFinalizeBlock(), cli.Error() } +func (cli *socketClient) CheckTxSync(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + reqRes, err := cli.queueRequest(ctx, types.ToRequestCheckTx(req)) + if err != nil { + return nil, err + } + if err := cli.Flush(ctx); err != nil { + return nil, err + } + return reqRes.Response.GetCheckTx(), cli.Error() +} + +func (cli *socketClient) BeginRecheckTxSync(ctx context.Context, req *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + reqRes, err := cli.queueRequest(ctx, types.ToRequestBeginRecheckTx(req)) + if err != nil { + return nil, err + } + if err := cli.Flush(ctx); err != nil { + return nil, err + } + return reqRes.Response.GetBeginRecheckTx(), cli.Error() +} + +func (cli *socketClient) EndRecheckTxSync(ctx context.Context, req *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + reqRes, err := cli.queueRequest(ctx, types.ToRequestEndRecheckTx(req)) + if err != nil { + return nil, err + } + if err := cli.Flush(ctx); err != nil { + return nil, err + } + return reqRes.Response.GetEndRecheckTx(), cli.Error() +} + +func (cli *socketClient) CheckTxAsync(ctx context.Context, req *types.RequestCheckTx) (*ReqRes, error) { + return cli.queueRequest(ctx, types.ToRequestCheckTx(req)) +} + +func (cli *socketClient) BeginRecheckTxAsync(ctx context.Context, req *types.RequestBeginRecheckTx) (*ReqRes, error) { + return cli.queueRequest(ctx, types.ToRequestBeginRecheckTx(req)) +} + +func (cli *socketClient) EndRecheckTxAsync(ctx context.Context, req *types.RequestEndRecheckTx) (*ReqRes, error) { + return cli.queueRequest(ctx, types.ToRequestEndRecheckTx(req)) +} + +func (cli *socketClient) CheckTxSyncForApp(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + panic("not implemented") +} + +func (cli *socketClient) CheckTxAsyncForApp(context.Context, *types.RequestCheckTx, types.CheckTxCallback) { + panic("not implemented") +} + +func (cli *socketClient) BeginRecheckTx(ctx context.Context, params *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + panic("not implemented") +} + +func (cli *socketClient) EndRecheckTx(ctx context.Context, params *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + panic("not implemented") +} + func (cli *socketClient) queueRequest(ctx context.Context, req *types.Request) (*ReqRes, error) { reqres := NewReqRes(req) @@ -493,6 +548,10 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) { _, ok = res.Value.(*types.Response_ProcessProposal) case *types.Request_FinalizeBlock: _, ok = res.Value.(*types.Response_FinalizeBlock) + case *types.Request_BeginRecheckTx: + _, ok = res.Value.(*types.Response_BeginRecheckTx) + case *types.Request_EndRecheckTx: + _, ok = res.Value.(*types.Response_EndRecheckTx) } return ok } diff --git a/abci/client/socket_client_test.go b/abci/client/socket_client_test.go index f4bade22934..43144eb142b 100644 --- a/abci/client/socket_client_test.go +++ b/abci/client/socket_client_test.go @@ -200,9 +200,9 @@ type blockedABCIApplication struct { types.BaseApplication } -func (b blockedABCIApplication) CheckTxAsync(ctx context.Context, r *types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (b blockedABCIApplication) CheckTxAsync(ctx context.Context, r *types.RequestCheckTx, cb types.CheckTxCallback) { b.wg.Wait() - return b.BaseApplication.CheckTx(ctx, r) + b.BaseApplication.CheckTxAsyncForApp(ctx, r, cb) } // TestCallbackInvokedWhenSetEarly ensures that the callback is invoked when diff --git a/abci/cmd/abci-cli/abci-cli.go b/abci/cmd/abci-cli/abci-cli.go index 17d9230105d..5a3cd93080e 100644 --- a/abci/cmd/abci-cli/abci-cli.go +++ b/abci/cmd/abci-cli/abci-cli.go @@ -578,7 +578,7 @@ func cmdCheckTx(cmd *cobra.Command, args []string) error { if err != nil { return err } - res, err := client.CheckTx(cmd.Context(), &types.RequestCheckTx{Tx: txBytes}) + res, err := client.CheckTxSync(cmd.Context(), &types.RequestCheckTx{Tx: txBytes}) if err != nil { return err } diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index b403d0c9fa3..f7b9a9dbcc7 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -127,7 +127,16 @@ func (app *Application) InitChain(_ context.Context, req *types.RequestInitChain // - Contains one and only one `=` // - `=` is not the first or last byte. // - if key is `val` that the validator update transaction is also valid -func (app *Application) CheckTx(_ context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (app *Application) CheckTxSyncForApp(_ context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + return app.checkTx(req) +} + +func (app *Application) CheckTxAsyncForApp(_ context.Context, req *types.RequestCheckTx, callback types.CheckTxCallback) { + res, _ := app.checkTx(req) + callback(res) +} + +func (app *Application) checkTx(req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { // If it is a validator update transaction, check that it is correctly formatted if isValidatorTx(req.Tx) { if _, _, _, err := parseValidatorTx(req.Tx); err != nil { @@ -170,7 +179,7 @@ func (app *Application) PrepareProposal(ctx context.Context, req *types.RequestP func (app *Application) formatTxs(ctx context.Context, blockData [][]byte) [][]byte { txs := make([][]byte, 0, len(blockData)) for _, tx := range blockData { - if resp, err := app.CheckTx(ctx, &types.RequestCheckTx{Tx: tx}); err == nil && resp.Code == CodeTypeOK { + if resp, err := app.CheckTxSyncForApp(ctx, &types.RequestCheckTx{Tx: tx}); err == nil && resp.Code == CodeTypeOK { txs = append(txs, bytes.Replace(tx, []byte(":"), []byte("="), 1)) } } @@ -182,7 +191,7 @@ func (app *Application) formatTxs(ctx context.Context, blockData [][]byte) [][]b func (app *Application) ProcessProposal(ctx context.Context, req *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { for _, tx := range req.Txs { // As CheckTx is a full validity check we can simply reuse this - if resp, err := app.CheckTx(ctx, &types.RequestCheckTx{Tx: tx}); err != nil || resp.Code != CodeTypeOK { + if resp, err := app.CheckTxSyncForApp(ctx, &types.RequestCheckTx{Tx: tx}); err != nil || resp.Code != CodeTypeOK { return &types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT}, nil } } diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index 60ef73fe1b8..2bb99520db9 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -33,7 +33,15 @@ func TestKVStoreKV(t *testing.T) { } func testKVStore(ctx context.Context, t *testing.T, app types.Application, tx []byte, key, value string) { - checkTxResp, err := app.CheckTx(ctx, &types.RequestCheckTx{Tx: tx}) + var ( + checkTxResp *types.ResponseCheckTx + err error + ) + if client, ok := app.(abcicli.Client); ok { + checkTxResp, err = client.CheckTxSync(ctx, &types.RequestCheckTx{Tx: tx}) + } else { + checkTxResp, err = app.CheckTxSyncForApp(ctx, &types.RequestCheckTx{Tx: tx}) + } require.NoError(t, err) require.Equal(t, uint32(0), checkTxResp.Code) @@ -84,7 +92,7 @@ func TestPersistentKVStoreEmptyTX(t *testing.T) { kvstore := NewPersistentApplication(t.TempDir()) tx := []byte("") reqCheck := types.RequestCheckTx{Tx: tx} - resCheck, err := kvstore.CheckTx(ctx, &reqCheck) + resCheck, err := kvstore.CheckTxSyncForApp(ctx, &reqCheck) require.NoError(t, err) require.Equal(t, resCheck.Code, CodeTypeInvalidTxFormat) @@ -224,7 +232,7 @@ func TestCheckTx(t *testing.T) { } for idx, tc := range testCases { - resp, err := kvstore.CheckTx(ctx, &types.RequestCheckTx{Tx: tc.tx}) + resp, err := kvstore.CheckTxSyncForApp(ctx, &types.RequestCheckTx{Tx: tc.tx}) require.NoError(t, err, idx) fmt.Println(string(tc.tx)) require.Equal(t, tc.expCode, resp.Code, idx) diff --git a/abci/server/grpc_server.go b/abci/server/grpc_server.go index e0eaefa648e..d61f544807e 100644 --- a/abci/server/grpc_server.go +++ b/abci/server/grpc_server.go @@ -74,3 +74,7 @@ func (app *gRPCApplication) Echo(_ context.Context, req *types.RequestEcho) (*ty func (app *gRPCApplication) Flush(context.Context, *types.RequestFlush) (*types.ResponseFlush, error) { return &types.ResponseFlush{}, nil } + +func (app *gRPCApplication) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + return app.CheckTxSyncForApp(ctx, req) +} diff --git a/abci/server/socket_server.go b/abci/server/socket_server.go index d0b919200c7..d6a500fb71f 100644 --- a/abci/server/socket_server.go +++ b/abci/server/socket_server.go @@ -223,7 +223,7 @@ func (s *SocketServer) handleRequest(ctx context.Context, req *types.Request) (* } return types.ToResponseInfo(res), nil case *types.Request_CheckTx: - res, err := s.app.CheckTx(ctx, r.CheckTx) + res, err := s.app.CheckTxSyncForApp(ctx, r.CheckTx) if err != nil { return nil, err } @@ -300,6 +300,18 @@ func (s *SocketServer) handleRequest(ctx context.Context, req *types.Request) (* return nil, err } return types.ToResponseVerifyVoteExtension(res), nil + case *types.Request_BeginRecheckTx: + res, err := s.app.BeginRecheckTx(ctx, r.BeginRecheckTx) + if err != nil { + return nil, err + } + return types.ToResponseBeginRecheckTx(res), nil + case *types.Request_EndRecheckTx: + res, err := s.app.EndRecheckTx(ctx, r.EndRecheckTx) + if err != nil { + return nil, err + } + return types.ToResponseEndRecheckTx(res), nil default: return nil, fmt.Errorf("unknown request from client: %T", req) } diff --git a/abci/tests/server/client.go b/abci/tests/server/client.go index 9c33c8eb7d2..22aabf22749 100644 --- a/abci/tests/server/client.go +++ b/abci/tests/server/client.go @@ -95,7 +95,7 @@ func ProcessProposal(ctx context.Context, client abcicli.Client, txBytes [][]byt } func CheckTx(ctx context.Context, client abcicli.Client, txBytes []byte, codeExp uint32, dataExp []byte) error { - res, _ := client.CheckTx(ctx, &types.RequestCheckTx{Tx: txBytes}) + res, _ := client.CheckTxSync(ctx, &types.RequestCheckTx{Tx: txBytes}) code, data, log := res.Code, res.Data, res.Log if code != codeExp { fmt.Println("Failed test: CheckTx") diff --git a/abci/types/application.go b/abci/types/application.go index 4ccfd229ebc..9f870202e5e 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -2,6 +2,8 @@ package types import "context" +type CheckTxCallback func(*ResponseCheckTx) + //go:generate ../../scripts/mockery_generate.sh Application // Application is an interface that enables any finite, deterministic state machine @@ -12,7 +14,13 @@ type Application interface { Query(context.Context, *RequestQuery) (*ResponseQuery, error) // Query for state // Mempool Connection - CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) // Validate a tx for the mempool + // The Client interface embeds the Application interface and has CheckTxSync, CheckTxAsync methods. + // For CheckTxAsync, the type is different, so can't use the same naming. + // To distinguish them, added ForApp to the naming in the Application interface. + CheckTxSyncForApp(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) // Validate a tx for the mempool + CheckTxAsyncForApp(context.Context, *RequestCheckTx, CheckTxCallback) // Asynchronously validate a tx for the mempool + BeginRecheckTx(context.Context, *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) // Signals the beginning of rechecking + EndRecheckTx(context.Context, *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) // Signals the end of rechecking // Consensus Connection InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error) // Initialize blockchain w validators/other info from CometBFT @@ -49,10 +57,6 @@ func (BaseApplication) Info(context.Context, *RequestInfo) (*ResponseInfo, error return &ResponseInfo{}, nil } -func (BaseApplication) CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) { - return &ResponseCheckTx{Code: CodeTypeOK}, nil -} - func (BaseApplication) Commit(context.Context, *RequestCommit) (*ResponseCommit, error) { return &ResponseCommit{}, nil } @@ -117,3 +121,17 @@ func (BaseApplication) FinalizeBlock(_ context.Context, req *RequestFinalizeBloc TxResults: txs, }, nil } + +func (BaseApplication) CheckTxSyncForApp(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) { + return &ResponseCheckTx{Code: CodeTypeOK}, nil +} +func (BaseApplication) CheckTxAsyncForApp(_ context.Context, _ *RequestCheckTx, callback CheckTxCallback) { + callback(&ResponseCheckTx{Code: CodeTypeOK}) +} +func (BaseApplication) BeginRecheckTx(context.Context, *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) { + return &ResponseBeginRecheckTx{Code: CodeTypeOK}, nil +} + +func (BaseApplication) EndRecheckTx(context.Context, *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) { + return &ResponseEndRecheckTx{Code: CodeTypeOK}, nil +} diff --git a/abci/types/messages.go b/abci/types/messages.go index 44d2f956838..ce44c85ae55 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -124,6 +124,18 @@ func ToRequestFinalizeBlock(req *RequestFinalizeBlock) *Request { } } +func ToRequestBeginRecheckTx(req *RequestBeginRecheckTx) *Request { + return &Request{ + Value: &Request_BeginRecheckTx{req}, + } +} + +func ToRequestEndRecheckTx(req *RequestEndRecheckTx) *Request { + return &Request{ + Value: &Request_EndRecheckTx{req}, + } +} + //---------------------------------------- func ToResponseException(errStr string) *Response { @@ -227,3 +239,15 @@ func ToResponseFinalizeBlock(res *ResponseFinalizeBlock) *Response { Value: &Response_FinalizeBlock{res}, } } + +func ToResponseBeginRecheckTx(res *ResponseBeginRecheckTx) *Response { + return &Response{ + Value: &Response_BeginRecheckTx{res}, + } +} + +func ToResponseEndRecheckTx(res *ResponseEndRecheckTx) *Response { + return &Response{ + Value: &Response_EndRecheckTx{res}, + } +} diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index 8eefa5568bf..16fe355b6a9 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -44,12 +44,47 @@ func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.Reques return r0, r1 } -// CheckTx provides a mock function with given fields: _a0, _a1 -func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { +// BeginRecheckTx provides a mock function with given fields: _a0, _a1 +func (_m *Application) BeginRecheckTx(_a0 context.Context, _a1 *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for CheckTx") + panic("no return value specified for BeginRecheckTx") + } + + var r0 *types.ResponseBeginRecheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) *types.ResponseBeginRecheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseBeginRecheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestBeginRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CheckTxAsyncForApp provides a mock function with given fields: _a0, _a1, _a2 +func (_m *Application) CheckTxAsyncForApp(_a0 context.Context, _a1 *types.RequestCheckTx, _a2 types.CheckTxCallback) { + _m.Called(_a0, _a1, _a2) +} + +// CheckTxSyncForApp provides a mock function with given fields: _a0, _a1 +func (_m *Application) CheckTxSyncForApp(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CheckTxSyncForApp") } var r0 *types.ResponseCheckTx @@ -104,6 +139,36 @@ func (_m *Application) Commit(_a0 context.Context, _a1 *types.RequestCommit) (*t return r0, r1 } +// EndRecheckTx provides a mock function with given fields: _a0, _a1 +func (_m *Application) EndRecheckTx(_a0 context.Context, _a1 *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for EndRecheckTx") + } + + var r0 *types.ResponseEndRecheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) *types.ResponseEndRecheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseEndRecheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestEndRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // ExtendVote provides a mock function with given fields: _a0, _a1 func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 5b9860d6b7e..4785e726a68 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -121,7 +121,7 @@ func (x ResponseOfferSnapshot_Result) String() string { } func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{27, 0} + return fileDescriptor_252557cfdd89a31a, []int{29, 0} } type ResponseApplySnapshotChunk_Result int32 @@ -158,7 +158,7 @@ func (x ResponseApplySnapshotChunk_Result) String() string { } func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{29, 0} + return fileDescriptor_252557cfdd89a31a, []int{31, 0} } type ResponseProcessProposal_ProposalStatus int32 @@ -186,7 +186,7 @@ func (x ResponseProcessProposal_ProposalStatus) String() string { } func (ResponseProcessProposal_ProposalStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{31, 0} + return fileDescriptor_252557cfdd89a31a, []int{33, 0} } type ResponseVerifyVoteExtension_VerifyStatus int32 @@ -218,7 +218,7 @@ func (x ResponseVerifyVoteExtension_VerifyStatus) String() string { } func (ResponseVerifyVoteExtension_VerifyStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{33, 0} + return fileDescriptor_252557cfdd89a31a, []int{35, 0} } type Request struct { @@ -239,6 +239,8 @@ type Request struct { // *Request_ExtendVote // *Request_VerifyVoteExtension // *Request_FinalizeBlock + // *Request_BeginRecheckTx + // *Request_EndRecheckTx Value isRequest_Value `protobuf_oneof:"value"` } @@ -329,6 +331,12 @@ type Request_VerifyVoteExtension struct { type Request_FinalizeBlock struct { FinalizeBlock *RequestFinalizeBlock `protobuf:"bytes,20,opt,name=finalize_block,json=finalizeBlock,proto3,oneof" json:"finalize_block,omitempty"` } +type Request_BeginRecheckTx struct { + BeginRecheckTx *RequestBeginRecheckTx `protobuf:"bytes,100,opt,name=begin_recheck_tx,json=beginRecheckTx,proto3,oneof" json:"begin_recheck_tx,omitempty"` +} +type Request_EndRecheckTx struct { + EndRecheckTx *RequestEndRecheckTx `protobuf:"bytes,101,opt,name=end_recheck_tx,json=endRecheckTx,proto3,oneof" json:"end_recheck_tx,omitempty"` +} func (*Request_Echo) isRequest_Value() {} func (*Request_Flush) isRequest_Value() {} @@ -346,6 +354,8 @@ func (*Request_ProcessProposal) isRequest_Value() {} func (*Request_ExtendVote) isRequest_Value() {} func (*Request_VerifyVoteExtension) isRequest_Value() {} func (*Request_FinalizeBlock) isRequest_Value() {} +func (*Request_BeginRecheckTx) isRequest_Value() {} +func (*Request_EndRecheckTx) isRequest_Value() {} func (m *Request) GetValue() isRequest_Value { if m != nil { @@ -466,6 +476,20 @@ func (m *Request) GetFinalizeBlock() *RequestFinalizeBlock { return nil } +func (m *Request) GetBeginRecheckTx() *RequestBeginRecheckTx { + if x, ok := m.GetValue().(*Request_BeginRecheckTx); ok { + return x.BeginRecheckTx + } + return nil +} + +func (m *Request) GetEndRecheckTx() *RequestEndRecheckTx { + if x, ok := m.GetValue().(*Request_EndRecheckTx); ok { + return x.EndRecheckTx + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Request) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -485,6 +509,8 @@ func (*Request) XXX_OneofWrappers() []interface{} { (*Request_ExtendVote)(nil), (*Request_VerifyVoteExtension)(nil), (*Request_FinalizeBlock)(nil), + (*Request_BeginRecheckTx)(nil), + (*Request_EndRecheckTx)(nil), } } @@ -1572,6 +1598,94 @@ func (m *RequestFinalizeBlock) GetProposerAddress() []byte { return nil } +type RequestBeginRecheckTx struct { + Header types1.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` +} + +func (m *RequestBeginRecheckTx) Reset() { *m = RequestBeginRecheckTx{} } +func (m *RequestBeginRecheckTx) String() string { return proto.CompactTextString(m) } +func (*RequestBeginRecheckTx) ProtoMessage() {} +func (*RequestBeginRecheckTx) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{17} +} +func (m *RequestBeginRecheckTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestBeginRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestBeginRecheckTx.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 *RequestBeginRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestBeginRecheckTx.Merge(m, src) +} +func (m *RequestBeginRecheckTx) XXX_Size() int { + return m.Size() +} +func (m *RequestBeginRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_RequestBeginRecheckTx.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestBeginRecheckTx proto.InternalMessageInfo + +func (m *RequestBeginRecheckTx) GetHeader() types1.Header { + if m != nil { + return m.Header + } + return types1.Header{} +} + +type RequestEndRecheckTx struct { + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +} + +func (m *RequestEndRecheckTx) Reset() { *m = RequestEndRecheckTx{} } +func (m *RequestEndRecheckTx) String() string { return proto.CompactTextString(m) } +func (*RequestEndRecheckTx) ProtoMessage() {} +func (*RequestEndRecheckTx) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{18} +} +func (m *RequestEndRecheckTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestEndRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestEndRecheckTx.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 *RequestEndRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestEndRecheckTx.Merge(m, src) +} +func (m *RequestEndRecheckTx) XXX_Size() int { + return m.Size() +} +func (m *RequestEndRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_RequestEndRecheckTx.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestEndRecheckTx proto.InternalMessageInfo + +func (m *RequestEndRecheckTx) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + type Response struct { // Types that are valid to be assigned to Value: // @@ -1592,6 +1706,8 @@ type Response struct { // *Response_ExtendVote // *Response_VerifyVoteExtension // *Response_FinalizeBlock + // *Response_BeginRecheckTx + // *Response_EndRecheckTx Value isResponse_Value `protobuf_oneof:"value"` } @@ -1599,7 +1715,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{19} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1685,6 +1801,12 @@ type Response_VerifyVoteExtension struct { type Response_FinalizeBlock struct { FinalizeBlock *ResponseFinalizeBlock `protobuf:"bytes,21,opt,name=finalize_block,json=finalizeBlock,proto3,oneof" json:"finalize_block,omitempty"` } +type Response_BeginRecheckTx struct { + BeginRecheckTx *ResponseBeginRecheckTx `protobuf:"bytes,100,opt,name=begin_recheck_tx,json=beginRecheckTx,proto3,oneof" json:"begin_recheck_tx,omitempty"` +} +type Response_EndRecheckTx struct { + EndRecheckTx *ResponseEndRecheckTx `protobuf:"bytes,101,opt,name=end_recheck_tx,json=endRecheckTx,proto3,oneof" json:"end_recheck_tx,omitempty"` +} func (*Response_Exception) isResponse_Value() {} func (*Response_Echo) isResponse_Value() {} @@ -1703,6 +1825,8 @@ func (*Response_ProcessProposal) isResponse_Value() {} func (*Response_ExtendVote) isResponse_Value() {} func (*Response_VerifyVoteExtension) isResponse_Value() {} func (*Response_FinalizeBlock) isResponse_Value() {} +func (*Response_BeginRecheckTx) isResponse_Value() {} +func (*Response_EndRecheckTx) isResponse_Value() {} func (m *Response) GetValue() isResponse_Value { if m != nil { @@ -1830,6 +1954,20 @@ func (m *Response) GetFinalizeBlock() *ResponseFinalizeBlock { return nil } +func (m *Response) GetBeginRecheckTx() *ResponseBeginRecheckTx { + if x, ok := m.GetValue().(*Response_BeginRecheckTx); ok { + return x.BeginRecheckTx + } + return nil +} + +func (m *Response) GetEndRecheckTx() *ResponseEndRecheckTx { + if x, ok := m.GetValue().(*Response_EndRecheckTx); ok { + return x.EndRecheckTx + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Response) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1850,6 +1988,8 @@ func (*Response) XXX_OneofWrappers() []interface{} { (*Response_ExtendVote)(nil), (*Response_VerifyVoteExtension)(nil), (*Response_FinalizeBlock)(nil), + (*Response_BeginRecheckTx)(nil), + (*Response_EndRecheckTx)(nil), } } @@ -1862,7 +2002,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{20} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1906,7 +2046,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{21} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1949,7 +2089,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{22} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1990,7 +2130,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{23} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2064,7 +2204,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{22} + return fileDescriptor_252557cfdd89a31a, []int{24} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2131,7 +2271,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{23} + return fileDescriptor_252557cfdd89a31a, []int{25} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2238,7 +2378,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{24} + return fileDescriptor_252557cfdd89a31a, []int{26} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2331,7 +2471,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{25} + return fileDescriptor_252557cfdd89a31a, []int{27} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2375,7 +2515,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{26} + return fileDescriptor_252557cfdd89a31a, []int{28} } func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2419,7 +2559,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{27} + return fileDescriptor_252557cfdd89a31a, []int{29} } func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2463,7 +2603,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{28} + return fileDescriptor_252557cfdd89a31a, []int{30} } func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2509,7 +2649,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{29} + return fileDescriptor_252557cfdd89a31a, []int{31} } func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2567,7 +2707,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{30} + return fileDescriptor_252557cfdd89a31a, []int{32} } func (m *ResponsePrepareProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2611,7 +2751,7 @@ 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{31} + return fileDescriptor_252557cfdd89a31a, []int{33} } func (m *ResponseProcessProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2655,7 +2795,7 @@ func (m *ResponseExtendVote) Reset() { *m = ResponseExtendVote{} } func (m *ResponseExtendVote) String() string { return proto.CompactTextString(m) } func (*ResponseExtendVote) ProtoMessage() {} func (*ResponseExtendVote) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{32} + return fileDescriptor_252557cfdd89a31a, []int{34} } func (m *ResponseExtendVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2699,7 +2839,7 @@ func (m *ResponseVerifyVoteExtension) Reset() { *m = ResponseVerifyVoteE func (m *ResponseVerifyVoteExtension) String() string { return proto.CompactTextString(m) } func (*ResponseVerifyVoteExtension) ProtoMessage() {} func (*ResponseVerifyVoteExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{33} + return fileDescriptor_252557cfdd89a31a, []int{35} } func (m *ResponseVerifyVoteExtension) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2754,7 +2894,7 @@ func (m *ResponseFinalizeBlock) Reset() { *m = ResponseFinalizeBlock{} } func (m *ResponseFinalizeBlock) String() string { return proto.CompactTextString(m) } func (*ResponseFinalizeBlock) ProtoMessage() {} func (*ResponseFinalizeBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{34} + return fileDescriptor_252557cfdd89a31a, []int{36} } func (m *ResponseFinalizeBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2818,6 +2958,94 @@ func (m *ResponseFinalizeBlock) GetAppHash() []byte { return nil } +type ResponseBeginRecheckTx struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` +} + +func (m *ResponseBeginRecheckTx) Reset() { *m = ResponseBeginRecheckTx{} } +func (m *ResponseBeginRecheckTx) String() string { return proto.CompactTextString(m) } +func (*ResponseBeginRecheckTx) ProtoMessage() {} +func (*ResponseBeginRecheckTx) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{37} +} +func (m *ResponseBeginRecheckTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseBeginRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseBeginRecheckTx.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 *ResponseBeginRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseBeginRecheckTx.Merge(m, src) +} +func (m *ResponseBeginRecheckTx) XXX_Size() int { + return m.Size() +} +func (m *ResponseBeginRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseBeginRecheckTx.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseBeginRecheckTx proto.InternalMessageInfo + +func (m *ResponseBeginRecheckTx) GetCode() uint32 { + if m != nil { + return m.Code + } + return 0 +} + +type ResponseEndRecheckTx struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` +} + +func (m *ResponseEndRecheckTx) Reset() { *m = ResponseEndRecheckTx{} } +func (m *ResponseEndRecheckTx) String() string { return proto.CompactTextString(m) } +func (*ResponseEndRecheckTx) ProtoMessage() {} +func (*ResponseEndRecheckTx) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{38} +} +func (m *ResponseEndRecheckTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseEndRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseEndRecheckTx.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 *ResponseEndRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseEndRecheckTx.Merge(m, src) +} +func (m *ResponseEndRecheckTx) XXX_Size() int { + return m.Size() +} +func (m *ResponseEndRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseEndRecheckTx.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseEndRecheckTx proto.InternalMessageInfo + +func (m *ResponseEndRecheckTx) GetCode() uint32 { + if m != nil { + return m.Code + } + return 0 +} + 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"` @@ -2827,7 +3055,7 @@ 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{35} + return fileDescriptor_252557cfdd89a31a, []int{39} } func (m *CommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2885,7 +3113,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{36} + return fileDescriptor_252557cfdd89a31a, []int{40} } func (m *ExtendedCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2940,7 +3168,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{37} + return fileDescriptor_252557cfdd89a31a, []int{41} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2994,7 +3222,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{38} + return fileDescriptor_252557cfdd89a31a, []int{42} } func (m *EventAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3062,7 +3290,7 @@ func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } func (*ExecTxResult) ProtoMessage() {} func (*ExecTxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{39} + return fileDescriptor_252557cfdd89a31a, []int{43} } func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3161,7 +3389,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{40} + return fileDescriptor_252557cfdd89a31a, []int{44} } func (m *TxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3228,7 +3456,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{41} + return fileDescriptor_252557cfdd89a31a, []int{45} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3280,7 +3508,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{42} + return fileDescriptor_252557cfdd89a31a, []int{46} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3332,7 +3560,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{43} + return fileDescriptor_252557cfdd89a31a, []int{47} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3390,7 +3618,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{44} + return fileDescriptor_252557cfdd89a31a, []int{48} } func (m *ExtendedVoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3465,7 +3693,7 @@ func (m *Misbehavior) Reset() { *m = Misbehavior{} } func (m *Misbehavior) String() string { return proto.CompactTextString(m) } func (*Misbehavior) ProtoMessage() {} func (*Misbehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{45} + return fileDescriptor_252557cfdd89a31a, []int{49} } func (m *Misbehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3541,7 +3769,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{46} + return fileDescriptor_252557cfdd89a31a, []int{50} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3629,6 +3857,8 @@ func init() { proto.RegisterType((*RequestExtendVote)(nil), "tendermint.abci.RequestExtendVote") proto.RegisterType((*RequestVerifyVoteExtension)(nil), "tendermint.abci.RequestVerifyVoteExtension") proto.RegisterType((*RequestFinalizeBlock)(nil), "tendermint.abci.RequestFinalizeBlock") + proto.RegisterType((*RequestBeginRecheckTx)(nil), "tendermint.abci.RequestBeginRecheckTx") + proto.RegisterType((*RequestEndRecheckTx)(nil), "tendermint.abci.RequestEndRecheckTx") proto.RegisterType((*Response)(nil), "tendermint.abci.Response") proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException") proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho") @@ -3647,6 +3877,8 @@ func init() { proto.RegisterType((*ResponseExtendVote)(nil), "tendermint.abci.ResponseExtendVote") proto.RegisterType((*ResponseVerifyVoteExtension)(nil), "tendermint.abci.ResponseVerifyVoteExtension") proto.RegisterType((*ResponseFinalizeBlock)(nil), "tendermint.abci.ResponseFinalizeBlock") + proto.RegisterType((*ResponseBeginRecheckTx)(nil), "tendermint.abci.ResponseBeginRecheckTx") + proto.RegisterType((*ResponseEndRecheckTx)(nil), "tendermint.abci.ResponseEndRecheckTx") proto.RegisterType((*CommitInfo)(nil), "tendermint.abci.CommitInfo") proto.RegisterType((*ExtendedCommitInfo)(nil), "tendermint.abci.ExtendedCommitInfo") proto.RegisterType((*Event)(nil), "tendermint.abci.Event") @@ -3664,205 +3896,215 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3167 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcb, 0x73, 0x23, 0xd5, - 0xd5, 0x57, 0xeb, 0xad, 0xa3, 0x87, 0xdb, 0xd7, 0x9e, 0x41, 0x23, 0x06, 0xdb, 0x34, 0x05, 0x0c, - 0x03, 0xd8, 0x7c, 0x9e, 0x6f, 0x78, 0xd4, 0xc0, 0x57, 0x25, 0x6b, 0x34, 0x9f, 0xec, 0x31, 0xb6, - 0x69, 0xcb, 0x43, 0x91, 0x07, 0x4d, 0x5b, 0xba, 0xb2, 0x9a, 0x91, 0xd4, 0x4d, 0xf7, 0x95, 0x91, - 0x59, 0xa5, 0x42, 0x52, 0x95, 0x62, 0x45, 0x55, 0xb2, 0x60, 0x11, 0x16, 0x59, 0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0xd7, - 0xbc, 0xb0, 0xb0, 0xca, 0x38, 0x95, 0x25, 0x28, 0x86, 0x72, 0x82, 0x72, 0x15, 0x56, 0xa7, 0x85, - 0x78, 0xa5, 0xeb, 0xd1, 0x43, 0xa1, 0x1a, 0xdd, 0x86, 0xac, 0x17, 0xe3, 0xb9, 0xe3, 0x5c, 0x9b, - 0x98, 0xd6, 0x65, 0x56, 0x3d, 0x56, 0xea, 0x31, 0x74, 0x03, 0xba, 0xba, 0xc8, 0xe8, 0x05, 0x35, - 0xa3, 0x5b, 0x56, 0x43, 0x77, 0xba, 0xca, 0x7b, 0x50, 0x8e, 0x8a, 0xdf, 0x01, 0x83, 0x49, 0xcc, - 0xed, 0x5d, 0x83, 0x5d, 0x85, 0x74, 0xc7, 0xb4, 0xfb, 0x3a, 0x61, 0xca, 0x8a, 0xaa, 0x18, 0x51, - 0x43, 0xf2, 0x58, 0x9e, 0x60, 0x64, 0x3e, 0x50, 0x34, 0xb8, 0x16, 0x19, 0xc3, 0xa9, 0x88, 0x31, - 0x68, 0x63, 0x6e, 0xd6, 0xa2, 0xca, 0x07, 0xbe, 0x22, 0xfe, 0xb1, 0x7c, 0x40, 0xa7, 0x75, 0xd8, - 0x5a, 0x99, 0xfe, 0x9c, 0x2a, 0x46, 0xca, 0x67, 0x09, 0xb8, 0x3a, 0x3d, 0x92, 0xa3, 0x0d, 0x28, - 0xf4, 0xf5, 0x91, 0x46, 0x46, 0xc2, 0xed, 0x24, 0xb6, 0xf1, 0xd0, 0xd7, 0x47, 0xcd, 0x11, 0xf7, - 0x39, 0x19, 0x12, 0x64, 0xe4, 0x94, 0xe3, 0x1b, 0x89, 0x1b, 0x05, 0x95, 0x3e, 0xa2, 0x13, 0x58, - 0xee, 0x99, 0x2d, 0xbd, 0xa7, 0xf5, 0x74, 0x87, 0x68, 0x22, 0xc5, 0xf3, 0x43, 0xf4, 0xd4, 0x84, - 0xb1, 0x79, 0x4c, 0xc6, 0x6d, 0xbe, 0x9f, 0x34,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d, 0xcf, - 0xc3, 0xb2, 0xf7, 0x29, 0x9e, 0x7a, 0x1e, 0x18, 0x65, 0xef, 0x85, 0xd0, 0x1f, 0x99, 0xe3, 0x9e, - 0x86, 0xd2, 0x58, 0x6d, 0xc8, 0x5d, 0xb9, 0x78, 0x1e, 0x9c, 0x5f, 0xf9, 0x59, 0xc2, 0x4b, 0x3c, - 0xa1, 0x02, 0x6e, 0xca, 0x69, 0x7d, 0x0b, 0x56, 0xda, 0xb8, 0x65, 0xb4, 0x1f, 0xf5, 0xb0, 0x2e, - 0x0b, 0xe9, 0xff, 0x9e, 0xd5, 0x49, 0x2f, 0xf9, 0x15, 0x40, 0x56, 0xc5, 0x8e, 0x45, 0xeb, 0x31, - 0xb4, 0x03, 0x39, 0x3c, 0x6a, 0x61, 0x8b, 0xb8, 0x25, 0xec, 0xf4, 0x16, 0x81, 0x73, 0xd7, 0x5d, - 0x4e, 0xda, 0x20, 0x7b, 0x62, 0xe8, 0x96, 0xc0, 0x00, 0xa2, 0xdb, 0x79, 0x21, 0x1e, 0x04, 0x01, - 0x5e, 0x76, 0x41, 0x80, 0x44, 0x64, 0x7f, 0xcb, 0xa5, 0xc6, 0x50, 0x80, 0x5b, 0x02, 0x05, 0x48, - 0xce, 0x98, 0x2c, 0x04, 0x03, 0xd4, 0x42, 0x30, 0x40, 0x7a, 0xc6, 0x32, 0x23, 0x70, 0x80, 0x97, - 0x5d, 0x1c, 0x20, 0x33, 0xe3, 0x8b, 0xc7, 0x80, 0x80, 0x37, 0x02, 0x40, 0x40, 0x8e, 0x89, 0x6e, - 0x44, 0x8a, 0x4e, 0x41, 0x02, 0x5e, 0xf3, 0x90, 0x80, 0x42, 0x24, 0x8a, 0x20, 0x84, 0xc7, 0xa1, - 0x80, 0xc3, 0x09, 0x28, 0x80, 0xb7, 0xee, 0xcf, 0x44, 0xaa, 0x98, 0x81, 0x05, 0x1c, 0x4e, 0x60, - 0x01, 0xa5, 0x19, 0x0a, 0x67, 0x80, 0x01, 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xf7, 0xce, 0x77, 0x0b, 0xad, 0x32, 0x27, 0x40, - 0x8d, 0xde, 0x87, 0xe5, 0xc9, 0xbe, 0x74, 0xfe, 0x4b, 0x69, 0x95, 0x05, 0x20, 0x6b, 0xd4, 0x07, - 0x34, 0xa5, 0x9f, 0x5d, 0xe0, 0x8e, 0x5a, 0x65, 0x11, 0x04, 0x1b, 0xb5, 0x61, 0x69, 0xbc, 0x49, - 0x9c, 0xf7, 0xce, 0x5a, 0x65, 0x6e, 0x34, 0x9b, 0xcf, 0x12, 0x6e, 0x2e, 0xe7, 0xbd, 0xc3, 0x56, - 0x99, 0x1b, 0xdc, 0x46, 0x27, 0x00, 0x81, 0xfe, 0x70, 0x8e, 0x3b, 0x6d, 0x95, 0x79, 0x60, 0x6e, - 0x64, 0xc1, 0xca, 0xb4, 0xc6, 0x71, 0x91, 0x2b, 0x6e, 0x95, 0x85, 0xd0, 0x6f, 0xea, 0xcf, 0xe1, - 0x16, 0x70, 0xbe, 0x2b, 0x6f, 0x95, 0x39, 0x61, 0xf0, 0x9d, 0xea, 0x17, 0x5f, 0xaf, 0x49, 0x5f, - 0x7e, 0xbd, 0x26, 0xfd, 0xed, 0xeb, 0x35, 0xe9, 0xd3, 0x6f, 0xd6, 0x62, 0x5f, 0x7e, 0xb3, 0x16, - 0xfb, 0xcb, 0x37, 0x6b, 0xb1, 0x1f, 0x3c, 0x7b, 0x66, 0x90, 0xee, 0xf0, 0x74, 0xb3, 0x65, 0xf6, - 0xb7, 0x5a, 0x66, 0x1f, 0x93, 0xd3, 0x0e, 0xf1, 0x1f, 0xfc, 0x9b, 0xcb, 0xa7, 0x69, 0x96, 0x41, - 0x6f, 0xfd, 0x33, 0x00, 0x00, 0xff, 0xff, 0x64, 0xd0, 0x90, 0x6e, 0xd9, 0x2c, 0x00, 0x00, + // 3323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 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, 0x49, 0x9b, 0x57, 0xdd, 0xa6, 0x52, 0x86, 0x62, 0xf0, 0xb8, 0x54, 0x3e, + 0x95, 0x3c, 0x49, 0x7a, 0x12, 0x52, 0xc9, 0x13, 0x6c, 0xb3, 0x05, 0x13, 0x92, 0xa2, 0x89, 0x9e, + 0x81, 0x12, 0x33, 0xb6, 0xe6, 0xfe, 0xa7, 0xc7, 0x71, 0x5a, 0x2d, 0x32, 0xe2, 0x43, 0xc1, 0xb4, + 0x02, 0x05, 0x6b, 0xc3, 0xf2, 0x58, 0x52, 0x8c, 0x05, 0xac, 0x0d, 0xcb, 0x65, 0x78, 0x1a, 0x8a, + 0x74, 0xd6, 0x1e, 0x47, 0x9a, 0x75, 0x52, 0xa0, 0x34, 0xc1, 0xa2, 0xfc, 0x21, 0x09, 0xf2, 0xf8, + 0x11, 0x8b, 0x5e, 0x81, 0x34, 0x8d, 0x36, 0x22, 0x70, 0x54, 0xd7, 0x78, 0x28, 0x5a, 0x73, 0x43, + 0xd1, 0x5a, 0xcb, 0x0d, 0x45, 0x9b, 0xb9, 0x2f, 0xbf, 0x5e, 0x49, 0x7c, 0xfa, 0xe7, 0x15, 0x49, + 0x65, 0x12, 0xe8, 0x0a, 0x3d, 0x58, 0x75, 0x63, 0xa8, 0x19, 0x5d, 0x36, 0xe4, 0x3c, 0x3d, 0x35, + 0x75, 0x63, 0xb8, 0xd5, 0x45, 0x3b, 0x20, 0x77, 0xcc, 0xa1, 0x83, 0x87, 0xce, 0xc8, 0xd1, 0x78, + 0xa8, 0x14, 0xe1, 0x22, 0x74, 0xe8, 0xf3, 0x28, 0x59, 0x77, 0x39, 0xf7, 0x19, 0xa3, 0x3a, 0xdf, + 0x09, 0x13, 0xd0, 0x7d, 0x00, 0x2f, 0x62, 0x3a, 0x95, 0xf4, 0x6a, 0xea, 0x46, 0x61, 0x63, 0x75, + 0x62, 0xb9, 0x1f, 0xba, 0x2c, 0x87, 0x56, 0x57, 0x27, 0x78, 0x33, 0x4d, 0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3a, + 0xe9, 0x25, 0x7b, 0x70, 0x29, 0x32, 0x2d, 0x47, 0x2f, 0xd1, 0x79, 0xe8, 0x34, 0x04, 0xf2, 0xe8, + 0x5f, 0x99, 0xcc, 0xea, 0x9a, 0xec, 0xbf, 0x30, 0x8c, 0xe0, 0x56, 0x5e, 0x80, 0xc5, 0x88, 0xac, + 0x7c, 0x2c, 0xc0, 0x7b, 0x66, 0x51, 0xbe, 0x28, 0x40, 0x4e, 0xc5, 0x8e, 0x45, 0xf3, 0x41, 0xb4, + 0x09, 0x79, 0x7c, 0xda, 0xc1, 0x16, 0x71, 0x53, 0xe8, 0xe8, 0x22, 0x8a, 0x73, 0x37, 0x5c, 0xce, + 0x66, 0x42, 0xf5, 0xc5, 0xd0, 0x6d, 0x81, 0x92, 0xc4, 0x03, 0x1e, 0x42, 0x3c, 0x08, 0x93, 0xbc, + 0xe4, 0xc2, 0x24, 0xa9, 0x58, 0x04, 0x80, 0x4b, 0x8d, 0xe1, 0x24, 0xb7, 0x05, 0x4e, 0x92, 0x9e, + 0xd2, 0x59, 0x08, 0x28, 0xa9, 0x87, 0x80, 0x92, 0xec, 0x94, 0x69, 0xc6, 0x20, 0x25, 0x2f, 0xb9, + 0x48, 0xc9, 0xdc, 0x94, 0x11, 0x8f, 0x41, 0x25, 0xaf, 0x07, 0xa0, 0x92, 0x3c, 0x13, 0x5d, 0x8d, + 0x15, 0x8d, 0xc0, 0x4a, 0x5e, 0xf5, 0xb0, 0x92, 0x62, 0x2c, 0xce, 0x22, 0x84, 0xc7, 0xc1, 0x92, + 0xbd, 0x09, 0xb0, 0xa4, 0x14, 0x5b, 0x27, 0x72, 0x15, 0x53, 0xd0, 0x92, 0xbd, 0x09, 0xb4, 0xa4, + 0x3c, 0x45, 0xe1, 0x14, 0xb8, 0xe4, 0x47, 0xd1, 0x70, 0x49, 0x3c, 0xa0, 0x21, 0x86, 0x39, 0x1b, + 0x5e, 0xa2, 0xc5, 0xe0, 0x25, 0x72, 0x6c, 0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 0x51, 0x25, 0xf8, 0x6f, 0x24, 0x78, 0xf2, 0x9c, 0x6c, 0x08, 0xbd, 0x39, + 0x36, 0xc9, 0x57, 0x2f, 0x92, 0x4b, 0xad, 0x71, 0xda, 0xd8, 0x34, 0x6f, 0x43, 0x31, 0x48, 0x9f, + 0x6d, 0x92, 0xdf, 0x25, 0xfd, 0x4d, 0x1c, 0xc6, 0x0a, 0xfc, 0x23, 0x50, 0xfa, 0x9e, 0x47, 0xe0, + 0x6b, 0x00, 0xe4, 0x54, 0xe3, 0x6e, 0xed, 0xc6, 0xd1, 0xa7, 0x22, 0x30, 0x58, 0xdc, 0x69, 0x9d, + 0x8a, 0x4d, 0x90, 0x27, 0xe2, 0xcb, 0x41, 0x07, 0x41, 0xe0, 0x64, 0xc4, 0x62, 0xac, 0x23, 0x40, + 0x85, 0x59, 0x83, 0xb1, 0x0f, 0xb0, 0x70, 0xb2, 0x83, 0xde, 0x86, 0x27, 0xc6, 0x12, 0x05, 0x4f, + 0x75, 0x7a, 0xd6, 0x7c, 0xe1, 0x52, 0x38, 0x5f, 0x70, 0x55, 0x07, 0xa3, 0x7d, 0x26, 0x1c, 0xed, + 0x6f, 0xc1, 0xe5, 0xe8, 0x8c, 0x33, 0x2a, 0xf2, 0x29, 0x37, 0x61, 0x29, 0x2a, 0x99, 0x8c, 0xe4, + 0x7d, 0x1b, 0xc0, 0x87, 0x66, 0xe8, 0xd9, 0x65, 0x9b, 0xa3, 0x61, 0x97, 0xb1, 0x64, 0x54, 0xde, + 0x40, 0x77, 0x20, 0x43, 0x7d, 0xd4, 0x5d, 0x81, 0xc9, 0x43, 0x9e, 0xfa, 0x58, 0x00, 0xda, 0xe1, + 0xdc, 0x8a, 0x01, 0x68, 0x12, 0x1e, 0x8f, 0xe9, 0xe2, 0xf5, 0x70, 0x17, 0x4f, 0xc7, 0x02, 0xed, + 0xd1, 0x5d, 0x7d, 0x04, 0x19, 0xe6, 0x53, 0x74, 0x8a, 0xec, 0x4e, 0x46, 0xe4, 0xa1, 0xf4, 0x1b, + 0xfd, 0x18, 0x40, 0x27, 0xc4, 0x36, 0xda, 0x23, 0xbf, 0x83, 0x95, 0x68, 0x9f, 0xac, 0xb9, 0x7c, + 0x9b, 0x57, 0x85, 0x73, 0x2e, 0xf9, 0xa2, 0x01, 0x07, 0x0d, 0x28, 0x54, 0x76, 0xa1, 0x1c, 0x96, + 0x75, 0x33, 0x27, 0x3e, 0x86, 0x70, 0xe6, 0xc4, 0x13, 0x61, 0x91, 0x39, 0x79, 0x79, 0x57, 0x8a, + 0x5f, 0x3c, 0xb1, 0x86, 0xf2, 0x93, 0x24, 0x14, 0x83, 0x2e, 0xfd, 0xef, 0x97, 0xdc, 0x28, 0x3f, + 0x97, 0x20, 0xe7, 0x4d, 0x3f, 0x06, 0xa4, 0xf2, 0xad, 0x97, 0x0c, 0x5e, 0x1d, 0xf1, 0x4b, 0xba, + 0x94, 0x77, 0x49, 0x77, 0xd7, 0x0b, 0xac, 0x71, 0x70, 0x50, 0xd0, 0xd6, 0x2e, 0x6c, 0x26, 0xf2, + 0x88, 0xbb, 0x90, 0xf7, 0xce, 0x05, 0x5a, 0xce, 0xb8, 0xb0, 0x9d, 0x24, 0x76, 0xa7, 0x00, 0x5d, + 0x97, 0x20, 0x63, 0x99, 0x1f, 0x8a, 0x7b, 0xa9, 0x94, 0xca, 0x1b, 0x4a, 0x17, 0xe6, 0xc7, 0x0e, + 0x15, 0x74, 0x17, 0xe6, 0xac, 0x51, 0x5b, 0x73, 0x9d, 0x63, 0x0c, 0xdc, 0x74, 0x13, 0xe5, 0x51, + 0xbb, 0x6f, 0x74, 0x1e, 0xe0, 0x33, 0x77, 0x30, 0xd6, 0xa8, 0xfd, 0x80, 0xfb, 0x10, 0xef, 0x25, + 0x19, 0xec, 0xe5, 0x97, 0x12, 0xe4, 0xdc, 0x3d, 0x81, 0xfe, 0x17, 0xf2, 0xde, 0x81, 0xe5, 0x5d, + 0x2c, 0xc7, 0x9e, 0x74, 0x42,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0xff, 0xf0, 0xdf, 0xed, 0xb7, 0xb3, 0x2c, 0x03, 0xb8, 0xfd, 0x8f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xbd, 0xb0, 0x00, 0xad, 0xd7, 0x2f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3893,6 +4135,8 @@ type ABCIClient interface { ExtendVote(ctx context.Context, in *RequestExtendVote, opts ...grpc.CallOption) (*ResponseExtendVote, error) VerifyVoteExtension(ctx context.Context, in *RequestVerifyVoteExtension, opts ...grpc.CallOption) (*ResponseVerifyVoteExtension, error) FinalizeBlock(ctx context.Context, in *RequestFinalizeBlock, opts ...grpc.CallOption) (*ResponseFinalizeBlock, error) + BeginRecheckTx(ctx context.Context, in *RequestBeginRecheckTx, opts ...grpc.CallOption) (*ResponseBeginRecheckTx, error) + EndRecheckTx(ctx context.Context, in *RequestEndRecheckTx, opts ...grpc.CallOption) (*ResponseEndRecheckTx, error) } type aBCIClient struct { @@ -4047,6 +4291,24 @@ func (c *aBCIClient) FinalizeBlock(ctx context.Context, in *RequestFinalizeBlock return out, nil } +func (c *aBCIClient) BeginRecheckTx(ctx context.Context, in *RequestBeginRecheckTx, opts ...grpc.CallOption) (*ResponseBeginRecheckTx, error) { + out := new(ResponseBeginRecheckTx) + err := c.cc.Invoke(ctx, "/tendermint.abci.ABCI/BeginRecheckTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBCIClient) EndRecheckTx(ctx context.Context, in *RequestEndRecheckTx, opts ...grpc.CallOption) (*ResponseEndRecheckTx, error) { + out := new(ResponseEndRecheckTx) + err := c.cc.Invoke(ctx, "/tendermint.abci.ABCI/EndRecheckTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ABCIServer is the server API for ABCI service. type ABCIServer interface { Echo(context.Context, *RequestEcho) (*ResponseEcho, error) @@ -4065,6 +4327,8 @@ type ABCIServer interface { ExtendVote(context.Context, *RequestExtendVote) (*ResponseExtendVote, error) VerifyVoteExtension(context.Context, *RequestVerifyVoteExtension) (*ResponseVerifyVoteExtension, error) FinalizeBlock(context.Context, *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) + BeginRecheckTx(context.Context, *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) + EndRecheckTx(context.Context, *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) } // UnimplementedABCIServer can be embedded to have forward compatible implementations. @@ -4119,6 +4383,12 @@ func (*UnimplementedABCIServer) VerifyVoteExtension(ctx context.Context, req *Re func (*UnimplementedABCIServer) FinalizeBlock(ctx context.Context, req *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) { return nil, status.Errorf(codes.Unimplemented, "method FinalizeBlock not implemented") } +func (*UnimplementedABCIServer) BeginRecheckTx(ctx context.Context, req *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) { + return nil, status.Errorf(codes.Unimplemented, "method BeginRecheckTx not implemented") +} +func (*UnimplementedABCIServer) EndRecheckTx(ctx context.Context, req *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) { + return nil, status.Errorf(codes.Unimplemented, "method EndRecheckTx not implemented") +} func RegisterABCIServer(s grpc1.Server, srv ABCIServer) { s.RegisterService(&_ABCI_serviceDesc, srv) @@ -4412,7 +4682,42 @@ func _ABCI_FinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -var ABCI_serviceDesc = _ABCI_serviceDesc +func _ABCI_BeginRecheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestBeginRecheckTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIServer).BeginRecheckTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tendermint.abci.ABCI/BeginRecheckTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIServer).BeginRecheckTx(ctx, req.(*RequestBeginRecheckTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABCI_EndRecheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestEndRecheckTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIServer).EndRecheckTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tendermint.abci.ABCI/EndRecheckTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIServer).EndRecheckTx(ctx, req.(*RequestEndRecheckTx)) + } + return interceptor(ctx, in, info, handler) +} + var _ABCI_serviceDesc = grpc.ServiceDesc{ ServiceName: "tendermint.abci.ABCI", HandlerType: (*ABCIServer)(nil), @@ -4481,6 +4786,14 @@ var _ABCI_serviceDesc = grpc.ServiceDesc{ MethodName: "FinalizeBlock", Handler: _ABCI_FinalizeBlock_Handler, }, + { + MethodName: "BeginRecheckTx", + Handler: _ABCI_BeginRecheckTx_Handler, + }, + { + MethodName: "EndRecheckTx", + Handler: _ABCI_EndRecheckTx_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "tendermint/abci/types.proto", @@ -4864,29 +5177,75 @@ func (m *Request_FinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } -func (m *RequestEcho) 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 *RequestEcho) MarshalTo(dAtA []byte) (int, error) { +func (m *Request_BeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Request_BeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) + if m.BeginRecheckTx != nil { + { + size, err := m.BeginRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xa2 + } + return len(dAtA) - i, nil +} +func (m *Request_EndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Request_EndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.EndRecheckTx != nil { + { + size, err := m.EndRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xaa + } + return len(dAtA) - i, nil +} +func (m *RequestEcho) 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 *RequestEcho) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa @@ -5029,12 +5388,12 @@ func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n18, err18 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err18 != nil { - return 0, err18 + n20, err20 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err20 != nil { + return 0, err20 } - i -= n18 - i = encodeVarintTypes(dAtA, i, uint64(n18)) + i -= n20 + i = encodeVarintTypes(dAtA, i, uint64(n20)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -5329,12 +5688,12 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n20, err20 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err20 != nil { - return 0, err20 + n22, err22 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err22 != nil { + return 0, err22 } - i -= n20 - i = encodeVarintTypes(dAtA, i, uint64(n20)) + i -= n22 + i = encodeVarintTypes(dAtA, i, uint64(n22)) i-- dAtA[i] = 0x32 if m.Height != 0 { @@ -5417,12 +5776,12 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n22, err22 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err22 != nil { - return 0, err22 + n24, err24 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err24 != nil { + return 0, err24 } - i -= n22 - i = encodeVarintTypes(dAtA, i, uint64(n22)) + i -= n24 + i = encodeVarintTypes(dAtA, i, uint64(n24)) i-- dAtA[i] = 0x32 if m.Height != 0 { @@ -5540,12 +5899,12 @@ func (m *RequestExtendVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - n25, err25 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err25 != nil { - return 0, err25 + n27, err27 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err27 != nil { + return 0, err27 } - i -= n25 - i = encodeVarintTypes(dAtA, i, uint64(n25)) + i -= n27 + i = encodeVarintTypes(dAtA, i, uint64(n27)) i-- dAtA[i] = 0x1a if m.Height != 0 { @@ -5646,12 +6005,12 @@ func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - n26, err26 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err26 != nil { - return 0, err26 + n28, err28 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err28 != nil { + return 0, err28 } - i -= n26 - i = encodeVarintTypes(dAtA, i, uint64(n26)) + i -= n28 + i = encodeVarintTypes(dAtA, i, uint64(n28)) i-- dAtA[i] = 0x32 if m.Height != 0 { @@ -5702,6 +6061,67 @@ func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *RequestBeginRecheckTx) 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 *RequestBeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestBeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RequestEndRecheckTx) 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 *RequestEndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestEndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6103,6 +6523,52 @@ func (m *Response_FinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) } return len(dAtA) - i, nil } +func (m *Response_BeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Response_BeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BeginRecheckTx != nil { + { + size, err := m.BeginRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xa2 + } + return len(dAtA) - i, nil +} +func (m *Response_EndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Response_EndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.EndRecheckTx != nil { + { + size, err := m.EndRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xaa + } + return len(dAtA) - i, nil +} func (m *ResponseException) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6614,20 +7080,20 @@ func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, err } } if len(m.RefetchChunks) > 0 { - dAtA48 := make([]byte, len(m.RefetchChunks)*10) - var j47 int + dAtA53 := make([]byte, len(m.RefetchChunks)*10) + var j52 int for _, num := range m.RefetchChunks { for num >= 1<<7 { - dAtA48[j47] = uint8(uint64(num)&0x7f | 0x80) + dAtA53[j52] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j47++ + j52++ } - dAtA48[j47] = uint8(num) - j47++ + dAtA53[j52] = uint8(num) + j52++ } - i -= j47 - copy(dAtA[i:], dAtA48[:j47]) - i = encodeVarintTypes(dAtA, i, uint64(j47)) + i -= j52 + copy(dAtA[i:], dAtA53[:j52]) + i = encodeVarintTypes(dAtA, i, uint64(j52)) i-- dAtA[i] = 0x12 } @@ -6841,6 +7307,62 @@ func (m *ResponseFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ResponseBeginRecheckTx) 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 *ResponseBeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseBeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Code != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ResponseEndRecheckTx) 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 *ResponseEndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseEndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Code != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *CommitInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -7334,12 +7856,12 @@ func (m *Misbehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n54, err54 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err54 != nil { - return 0, err54 + n59, err59 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err59 != nil { + return 0, err59 } - i -= n54 - i = encodeVarintTypes(dAtA, i, uint64(n54)) + i -= n59 + i = encodeVarintTypes(dAtA, i, uint64(n59)) i-- dAtA[i] = 0x22 if m.Height != 0 { @@ -7632,6 +8154,30 @@ func (m *Request_FinalizeBlock) Size() (n int) { } return n } +func (m *Request_BeginRecheckTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BeginRecheckTx != nil { + l = m.BeginRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Request_EndRecheckTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EndRecheckTx != nil { + l = m.EndRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} func (m *RequestEcho) Size() (n int) { if m == nil { return 0 @@ -8004,6 +8550,29 @@ func (m *RequestFinalizeBlock) Size() (n int) { return n } +func (m *RequestBeginRecheckTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *RequestEndRecheckTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + return n +} + func (m *Response) Size() (n int) { if m == nil { return 0 @@ -8220,15 +8789,39 @@ func (m *Response_FinalizeBlock) Size() (n int) { } return n } -func (m *ResponseException) Size() (n int) { +func (m *Response_BeginRecheckTx) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Error) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + if m.BeginRecheckTx != nil { + l = m.BeginRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Response_EndRecheckTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EndRecheckTx != nil { + l = m.EndRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *ResponseException) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Error) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } return n } @@ -8551,6 +9144,30 @@ func (m *ResponseFinalizeBlock) Size() (n int) { return n } +func (m *ResponseBeginRecheckTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovTypes(uint64(m.Code)) + } + return n +} + +func (m *ResponseEndRecheckTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovTypes(uint64(m.Code)) + } + return n +} + func (m *CommitInfo) Size() (n int) { if m == nil { return 0 @@ -9396,6 +10013,76 @@ func (m *Request) Unmarshal(dAtA []byte) error { } m.Value = &Request_FinalizeBlock{v} iNdEx = postIndex + case 100: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeginRecheckTx", 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 := &RequestBeginRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_BeginRecheckTx{v} + iNdEx = postIndex + case 101: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndRecheckTx", 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 := &RequestEndRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_EndRecheckTx{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -12027,6 +12714,158 @@ func (m *RequestFinalizeBlock) Unmarshal(dAtA []byte) error { } return nil } +func (m *RequestBeginRecheckTx) 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: RequestBeginRecheckTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestBeginRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", 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.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestEndRecheckTx) 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: RequestEndRecheckTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestEndRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 + } + } + 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 @@ -12651,6 +13490,76 @@ func (m *Response) Unmarshal(dAtA []byte) error { } m.Value = &Response_FinalizeBlock{v} iNdEx = postIndex + case 100: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeginRecheckTx", 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 := &ResponseBeginRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_BeginRecheckTx{v} + iNdEx = postIndex + case 101: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndRecheckTx", 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 := &ResponseEndRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_EndRecheckTx{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -14813,6 +15722,144 @@ func (m *ResponseFinalizeBlock) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResponseBeginRecheckTx) 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: ResponseBeginRecheckTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseBeginRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= uint32(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 *ResponseEndRecheckTx) 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: ResponseEndRecheckTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseEndRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= uint32(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 *CommitInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index 405ba194b67..79d25fcf552 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -110,7 +110,7 @@ func TestMempoolProgressInHigherRound(t *testing.T) { func deliverTxsRange(t *testing.T, cs *State, start, end int) { // Deliver some txs. for i := start; i < end; i++ { - err := assertMempool(cs.txNotifier).CheckTx(kvstore.NewTx(fmt.Sprintf("%d", i), "true"), nil, mempl.TxInfo{}) + _, err := assertMempool(cs.txNotifier).CheckTxSync(kvstore.NewTx(fmt.Sprintf("%d", i), "true"), nil, mempl.TxInfo{}) require.NoError(t, err) } } @@ -166,7 +166,7 @@ func TestMempoolRmBadTx(t *testing.T) { // CheckTx should not err, but the app should return a bad abci code // and the tx should get removed from the pool invalidTx := []byte("invalidTx") - err := assertMempool(cs.txNotifier).CheckTx(invalidTx, func(r *abci.ResponseCheckTx) { + _, err := assertMempool(cs.txNotifier).CheckTxSync(invalidTx, func(r *abci.ResponseCheckTx) { if r.Code != kvstore.CodeTypeInvalidTxFormat { t.Errorf("expected checktx to return invalid format, got %v", r) return diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index aed400188ac..3c332d2ac01 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -232,7 +232,7 @@ func TestReactorCreatesBlockWhenEmptyBlocksFalse(t *testing.T) { defer stopConsensusNet(log.TestingLogger(), reactors, eventBuses) // send a tx - if err := assertMempool(css[3].txNotifier).CheckTx(kvstore.NewTxFromID(1), func(resp *abci.ResponseCheckTx) { + if _, err := assertMempool(css[3].txNotifier).CheckTxSync(kvstore.NewTxFromID(1), func(resp *abci.ResponseCheckTx) { require.False(t, resp.IsErr()) }, mempl.TxInfo{}); err != nil { t.Error(err) @@ -669,7 +669,7 @@ func waitForAndValidateBlock( // optionally add transactions for the next block for _, tx := range txs { - err := assertMempool(css[j].txNotifier).CheckTx(tx, func(resp *abci.ResponseCheckTx) { + _, err := assertMempool(css[j].txNotifier).CheckTxSync(tx, func(resp *abci.ResponseCheckTx) { require.False(t, resp.IsErr()) fmt.Println(resp) }, mempl.TxInfo{}) diff --git a/consensus/replay_stubs.go b/consensus/replay_stubs.go index 0c55552f036..7a0b55fb1ce 100644 --- a/consensus/replay_stubs.go +++ b/consensus/replay_stubs.go @@ -20,9 +20,10 @@ func (emptyMempool) Lock() {} func (emptyMempool) Unlock() {} func (emptyMempool) Size() int { return 0 } func (emptyMempool) SizeBytes() int64 { return 0 } -func (emptyMempool) CheckTx(types.Tx, func(*abci.ResponseCheckTx), mempl.TxInfo) error { - return nil +func (emptyMempool) CheckTxSync(types.Tx, func(*abci.ResponseCheckTx), mempl.TxInfo) (*abci.ResponseCheckTx, error) { + return nil, nil } +func (emptyMempool) CheckTxAsync(types.Tx, mempl.TxInfo) {} func (txmp emptyMempool) RemoveTxByKey(types.TxKey) error { return nil @@ -31,8 +32,7 @@ func (txmp emptyMempool) RemoveTxByKey(types.TxKey) error { func (emptyMempool) ReapMaxBytesMaxGas(int64, int64) types.Txs { return types.Txs{} } func (emptyMempool) ReapMaxTxs(int) types.Txs { return types.Txs{} } func (emptyMempool) Update( - int64, - types.Txs, + *types.Block, []*abci.ExecTxResult, mempl.PreCheckFunc, mempl.PostCheckFunc, diff --git a/consensus/replay_test.go b/consensus/replay_test.go index bcf74387f36..97cd5a7194c 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -117,7 +117,7 @@ func sendTxs(ctx context.Context, cs *State) { return default: tx := kvstore.NewTxFromID(i) - if err := assertMempool(cs.txNotifier).CheckTx(tx, func(resp *abci.ResponseCheckTx) { + if _, err := assertMempool(cs.txNotifier).CheckTxSync(tx, func(resp *abci.ResponseCheckTx) { if resp.Code != 0 { panic(fmt.Sprintf("Unexpected code: %d, log: %s", resp.Code, resp.Log)) } @@ -369,7 +369,7 @@ func setupChainWithChangingValidators(t *testing.T, name string, nBlocks int) (* valPubKey1ABCI, err := cryptoenc.PubKeyToProto(newValidatorPubKey1) require.NoError(t, err) newValidatorTx1 := kvstore.MakeValSetChangeTx(valPubKey1ABCI, testMinPower) - err = assertMempool(css[0].txNotifier).CheckTx(newValidatorTx1, nil, mempool.TxInfo{}) + _, err = assertMempool(css[0].txNotifier).CheckTxSync(newValidatorTx1, nil, mempool.TxInfo{}) assert.NoError(t, err) propBlock, err := css[0].createProposalBlock(ctx) // changeProposer(t, cs1, vs2) require.NoError(t, err) @@ -401,7 +401,7 @@ func setupChainWithChangingValidators(t *testing.T, name string, nBlocks int) (* updatePubKey1ABCI, err := cryptoenc.PubKeyToProto(updateValidatorPubKey1) require.NoError(t, err) updateValidatorTx1 := kvstore.MakeValSetChangeTx(updatePubKey1ABCI, 25) - err = assertMempool(css[0].txNotifier).CheckTx(updateValidatorTx1, nil, mempool.TxInfo{}) + _, err = assertMempool(css[0].txNotifier).CheckTxSync(updateValidatorTx1, nil, mempool.TxInfo{}) assert.NoError(t, err) propBlock, err = css[0].createProposalBlock(ctx) // changeProposer(t, cs1, vs2) require.NoError(t, err) @@ -433,14 +433,14 @@ func setupChainWithChangingValidators(t *testing.T, name string, nBlocks int) (* newVal2ABCI, err := cryptoenc.PubKeyToProto(newValidatorPubKey2) require.NoError(t, err) newValidatorTx2 := kvstore.MakeValSetChangeTx(newVal2ABCI, testMinPower) - err = assertMempool(css[0].txNotifier).CheckTx(newValidatorTx2, nil, mempool.TxInfo{}) + _, err = assertMempool(css[0].txNotifier).CheckTxSync(newValidatorTx2, nil, mempool.TxInfo{}) require.NoError(t, err) newValidatorPubKey3, err := css[nVals+2].privValidator.GetPubKey() require.NoError(t, err) newVal3ABCI, err := cryptoenc.PubKeyToProto(newValidatorPubKey3) require.NoError(t, err) newValidatorTx3 := kvstore.MakeValSetChangeTx(newVal3ABCI, testMinPower) - err = assertMempool(css[0].txNotifier).CheckTx(newValidatorTx3, nil, mempool.TxInfo{}) + _, err = assertMempool(css[0].txNotifier).CheckTxSync(newValidatorTx3, nil, mempool.TxInfo{}) assert.NoError(t, err) propBlock, err = css[0].createProposalBlock(ctx) // changeProposer(t, cs1, vs2) require.NoError(t, err) @@ -482,7 +482,7 @@ func setupChainWithChangingValidators(t *testing.T, name string, nBlocks int) (* ensureNewProposal(proposalCh, height, round) removeValidatorTx2 := kvstore.MakeValSetChangeTx(newVal2ABCI, 0) - err = assertMempool(css[0].txNotifier).CheckTx(removeValidatorTx2, nil, mempool.TxInfo{}) + _, err = assertMempool(css[0].txNotifier).CheckTxSync(removeValidatorTx2, nil, mempool.TxInfo{}) assert.Nil(t, err) rs = css[0].GetRoundState() @@ -517,7 +517,7 @@ func setupChainWithChangingValidators(t *testing.T, name string, nBlocks int) (* height++ incrementHeight(vss...) removeValidatorTx3 := kvstore.MakeValSetChangeTx(newVal3ABCI, 0) - err = assertMempool(css[0].txNotifier).CheckTx(removeValidatorTx3, nil, mempool.TxInfo{}) + _, err = assertMempool(css[0].txNotifier).CheckTxSync(removeValidatorTx3, nil, mempool.TxInfo{}) assert.NoError(t, err) propBlock, err = css[0].createProposalBlock(ctx) // changeProposer(t, cs1, vs2) require.NoError(t, err) diff --git a/consensus/state_test.go b/consensus/state_test.go index 66169bb3b3d..b8d1737831e 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -1505,6 +1505,10 @@ func TestExtendVoteCalledWhenEnabled(t *testing.T) { } m.On("Commit", mock.Anything, mock.Anything).Return(&abci.ResponseCommit{}, nil).Maybe() m.On("FinalizeBlock", mock.Anything, mock.Anything).Return(&abci.ResponseFinalizeBlock{}, nil).Maybe() + + m.On("BeginRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseBeginRecheckTx{}, nil).Maybe() + m.On("EndRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseEndRecheckTx{}, nil).Maybe() + height := int64(1) if !testCase.enabled { height = 0 @@ -1591,6 +1595,10 @@ func TestVerifyVoteExtensionNotCalledOnAbsentPrecommit(t *testing.T) { }, nil) m.On("FinalizeBlock", mock.Anything, mock.Anything).Return(&abci.ResponseFinalizeBlock{}, nil).Maybe() m.On("Commit", mock.Anything, mock.Anything).Return(&abci.ResponseCommit{}, nil).Maybe() + + m.On("BeginRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseBeginRecheckTx{}, nil).Maybe() + m.On("EndRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseEndRecheckTx{}, nil).Maybe() + cs1, vss := randStateWithApp(4, m) height, round := cs1.Height, cs1.Round cs1.state.ConsensusParams.ABCI.VoteExtensionsEnableHeight = cs1.Height @@ -1677,6 +1685,9 @@ func TestPrepareProposalReceivesVoteExtensions(t *testing.T) { m.On("Commit", mock.Anything, mock.Anything).Return(&abci.ResponseCommit{}, nil).Maybe() m.On("FinalizeBlock", mock.Anything, mock.Anything).Return(&abci.ResponseFinalizeBlock{}, nil) + m.On("BeginRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseBeginRecheckTx{}, nil).Maybe() + m.On("EndRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseEndRecheckTx{}, nil).Maybe() + cs1, vss := randStateWithApp(4, m) height, round := cs1.Height, cs1.Round @@ -1779,6 +1790,9 @@ func TestFinalizeBlockCalled(t *testing.T) { m.On("FinalizeBlock", mock.Anything, mock.Anything).Return(r, nil).Maybe() m.On("Commit", mock.Anything, mock.Anything).Return(&abci.ResponseCommit{}, nil).Maybe() + m.On("BeginRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseBeginRecheckTx{}, nil).Maybe() + m.On("EndRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseEndRecheckTx{}, nil).Maybe() + cs1, vss := randStateWithApp(4, m) height, round := cs1.Height, cs1.Round @@ -1894,6 +1908,10 @@ func TestVoteExtensionEnableHeight(t *testing.T) { } m.On("FinalizeBlock", mock.Anything, mock.Anything).Return(&abci.ResponseFinalizeBlock{}, nil).Maybe() m.On("Commit", mock.Anything, mock.Anything).Return(&abci.ResponseCommit{}, nil).Maybe() + + m.On("BeginRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseBeginRecheckTx{}, nil).Maybe() + m.On("EndRecheckTx", mock.Anything, mock.Anything).Return(&abci.ResponseEndRecheckTx{}, nil).Maybe() + cs1, vss := randStateWithAppWithHeight(numValidators, m, testCase.enableHeight) cs1.state.ConsensusParams.ABCI.VoteExtensionsEnableHeight = testCase.enableHeight height, round := cs1.Height, cs1.Round diff --git a/mempool/bench_test.go b/mempool/bench_test.go index 1e4b6d29970..74f7f2a3859 100644 --- a/mempool/bench_test.go +++ b/mempool/bench_test.go @@ -1,6 +1,7 @@ package mempool import ( + "encoding/binary" "sync/atomic" "testing" @@ -24,7 +25,7 @@ func BenchmarkReap(b *testing.B) { } } -func BenchmarkCheckTx(b *testing.B) { +func BenchmarkCheckTxSync(b *testing.B) { app := kvstore.NewInMemoryApplication() cc := proxy.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) @@ -38,12 +39,12 @@ func BenchmarkCheckTx(b *testing.B) { tx := kvstore.NewTxFromID(i) b.StartTimer() - err := mp.CheckTx(tx, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx, nil, TxInfo{}) require.NoError(b, err, i) } } -func BenchmarkParallelCheckTx(b *testing.B) { +func BenchmarkParallelCheckTxSync(b *testing.B) { app := kvstore.NewInMemoryApplication() cc := proxy.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) @@ -59,13 +60,13 @@ func BenchmarkParallelCheckTx(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { tx := kvstore.NewTxFromID(int(next())) - err := mp.CheckTx(tx, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx, nil, TxInfo{}) require.NoError(b, err, tx) } }) } -func BenchmarkCheckDuplicateTx(b *testing.B) { +func BenchmarkCheckDuplicateTxSync(b *testing.B) { app := kvstore.NewInMemoryApplication() cc := proxy.NewLocalClientCreator(app) mp, cleanup := newMempoolWithApp(cc) @@ -74,7 +75,7 @@ func BenchmarkCheckDuplicateTx(b *testing.B) { mp.config.Size = 2 tx := kvstore.NewTxFromID(1) - if err := mp.CheckTx(tx, nil, TxInfo{}); err != nil { + if _, err := mp.CheckTxSync(tx, nil, TxInfo{}); err != nil { b.Fatal(err) } err := mp.FlushAppConn() @@ -82,7 +83,7 @@ func BenchmarkCheckDuplicateTx(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - err := mp.CheckTx(tx, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx, nil, TxInfo{}) require.ErrorAs(b, err, &ErrTxInCache, "tx should be duplicate") } } @@ -106,6 +107,55 @@ func BenchmarkUpdate(b *testing.B) { } } +func BenchmarkCheckTxAsync(b *testing.B) { + app := kvstore.NewInMemoryApplication() + cc := proxy.NewLocalClientCreator(app) + mp, cleanup := newMempoolWithApp(cc) + defer cleanup() + mp.config.Size = 1000000 + b.ResetTimer() + for i := 0; i < b.N; i++ { + b.StopTimer() + tx := make([]byte, 8) + binary.BigEndian.PutUint64(tx, uint64(i)) + b.StartTimer() + mp.CheckTxAsync(tx, TxInfo{}) + } +} +func BenchmarkParallelCheckTxAsync(b *testing.B) { + app := kvstore.NewInMemoryApplication() + cc := proxy.NewLocalClientCreator(app) + mp, cleanup := newMempoolWithApp(cc) + defer cleanup() + mp.config.Size = 100000000 + var txcnt uint64 + next := func() uint64 { + return atomic.AddUint64(&txcnt, 1) - 1 + } + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + tx := make([]byte, 8) + binary.BigEndian.PutUint64(tx, next()) + mp.CheckTxAsync(tx, TxInfo{}) + } + }) +} + +func BenchmarkCheckDuplicateTxAsync(b *testing.B) { + app := kvstore.NewInMemoryApplication() + cc := proxy.NewLocalClientCreator(app) + mp, cleanup := newMempoolWithApp(cc) + defer cleanup() + mp.config.Size = 1000000 + for i := 0; i < b.N; i++ { + tx := make([]byte, 8) + binary.BigEndian.PutUint64(tx, uint64(i)) + mp.CheckTxAsync(tx, TxInfo{}) + mp.CheckTxAsync(tx, TxInfo{}) + } +} + func BenchmarkUpdateAndRecheck(b *testing.B) { app := kvstore.NewInMemoryApplication() cc := proxy.NewLocalClientCreator(app) @@ -135,7 +185,7 @@ func BenchmarkUpdateRemoteClient(b *testing.B) { for i := 1; i <= b.N; i++ { b.StopTimer() tx := kvstore.NewTxFromID(i) - err := mp.CheckTx(tx, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx, nil, TxInfo{}) require.NoError(b, err) err = mp.FlushAppConn() require.NoError(b, err) diff --git a/mempool/cache_test.go b/mempool/cache_test.go index b71d9c6122e..0d01ce825f7 100644 --- a/mempool/cache_test.go +++ b/mempool/cache_test.go @@ -64,7 +64,7 @@ func TestCacheAfterUpdate(t *testing.T) { for tcIndex, tc := range tests { for i := 0; i < tc.numTxsToCreate; i++ { tx := kvstore.NewTx(fmt.Sprintf("%d", i), "value") - err := mp.CheckTx(tx, func(resp *abci.ResponseCheckTx) { + _, err := mp.CheckTxSync(tx, func(resp *abci.ResponseCheckTx) { require.False(t, resp.IsErr()) }, TxInfo{}) require.NoError(t, err) @@ -75,12 +75,12 @@ func TestCacheAfterUpdate(t *testing.T) { tx := kvstore.NewTx(fmt.Sprintf("%d", v), "value") updateTxs = append(updateTxs, tx) } - err := mp.Update(int64(tcIndex), updateTxs, abciResponses(len(updateTxs), abci.CodeTypeOK), nil, nil) + err := mp.Update(newTestBlock(int64(tcIndex), updateTxs), abciResponses(len(updateTxs), abci.CodeTypeOK), nil, nil) require.NoError(t, err) for _, v := range tc.reAddIndices { tx := kvstore.NewTx(fmt.Sprintf("%d", v), "value") - _ = mp.CheckTx(tx, func(resp *abci.ResponseCheckTx) { + _, _ = mp.CheckTxSync(tx, func(resp *abci.ResponseCheckTx) { require.False(t, resp.IsErr()) }, TxInfo{}) } diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 455cce3ab4e..e6125410be3 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -3,6 +3,7 @@ package mempool import ( "bytes" "context" + "errors" "fmt" "sync" "sync/atomic" @@ -39,6 +40,8 @@ type CListMempool struct { preCheck PreCheckFunc postCheck PostCheckFunc + chReqCheckTx chan *requestCheckTxAsync + txs *clist.CList // concurrent linked-list of good txs proxyAppConn proxy.AppConnMempool @@ -57,6 +60,11 @@ type CListMempool struct { metrics *Metrics } +type requestCheckTxAsync struct { + tx types.Tx + txInfo TxInfo +} + var _ Mempool = &CListMempool{} // CListMempoolOption sets an optional parameter on the mempool. @@ -74,6 +82,7 @@ func NewCListMempool( config: cfg, proxyAppConn: proxyAppConn, txs: clist.New(), + chReqCheckTx: make(chan *requestCheckTxAsync, cfg.Size), recheck: newRecheck(), logger: log.NewNopLogger(), metrics: NopMetrics(), @@ -91,7 +100,7 @@ func NewCListMempool( for _, option := range options { option(mp) } - + go mp.checkTxAsyncReactor() return mp } @@ -213,22 +222,64 @@ func (mem *CListMempool) TxsWaitChan() <-chan struct{} { } // It blocks if we're waiting on Update() or Reap(). -// cb: A callback from the CheckTx command. -// -// It gets called from another goroutine. -// -// CONTRACT: Either cb will get called, or err returned. -// // Safe for concurrent use by multiple goroutines. -func (mem *CListMempool) CheckTx( +func (mem *CListMempool) CheckTxSync( tx types.Tx, cb func(*abci.ResponseCheckTx), txInfo TxInfo, -) error { +) (res *abci.ResponseCheckTx, err error) { mem.updateMtx.RLock() // use defer to unlock mutex because application (*local client*) might panic defer mem.updateMtx.RUnlock() + if err = mem.prepareCheckTx(tx, txInfo); err != nil { + return res, err + } + res, err = mem.proxyAppConn.CheckTxSync(context.TODO(), &abci.RequestCheckTx{Tx: tx}) + if err != nil { + return res, err + } + mem.reqResCb(tx, txInfo, abci.ToResponseCheckTx(res), cb) + return res, err +} + +// Safe for concurrent use by multiple goroutines. +func (mem *CListMempool) CheckTxAsync(tx types.Tx, txInfo TxInfo) { + mem.chReqCheckTx <- &requestCheckTxAsync{tx: tx, txInfo: txInfo} +} + +func (mem *CListMempool) checkTxAsyncReactor() { + for req := range mem.chReqCheckTx { + mem.checkTxAsync(req.tx, req.txInfo) + } +} + +// It blocks if we're waiting on Update() or Reap(). +func (mem *CListMempool) checkTxAsync(tx types.Tx, txInfo TxInfo) { + mem.updateMtx.RLock() + defer func() { + if r := recover(); r != nil { + mem.updateMtx.RUnlock() + panic(r) + } + mem.updateMtx.RUnlock() + }() + err := mem.prepareCheckTx(tx, txInfo) + if err != nil { + return + } + + // CONTRACT: `app.CheckTxAsync()` should check whether `GasWanted` is valid (0 <= GasWanted <= block.masGas) + reqRes, err := mem.proxyAppConn.CheckTxAsync(context.TODO(), &abci.RequestCheckTx{Tx: tx}) + if err != nil { + return + } + reqRes.SetCallback(func(res *abci.Response) { + mem.reqResCb(tx, txInfo, res, nil) + }) +} + +func (mem *CListMempool) prepareCheckTx(tx types.Tx, txInfo TxInfo) error { txSize := len(tx) if err := mem.isFull(txSize); err != nil { @@ -268,12 +319,6 @@ func (mem *CListMempool) CheckTx( return ErrTxInCache } - reqRes, err := mem.proxyAppConn.CheckTxAsync(context.TODO(), &abci.RequestCheckTx{Tx: tx}) - if err != nil { - panic(fmt.Errorf("CheckTx request for tx %s failed: %w", log.NewLazySprintf("%v", tx.Hash()), err)) - } - reqRes.SetCallback(mem.reqResCb(tx, txInfo, cb)) - return nil } @@ -329,24 +374,23 @@ func (mem *CListMempool) globalCb(req *abci.Request, res *abci.Response) { func (mem *CListMempool) reqResCb( tx []byte, txInfo TxInfo, + res *abci.Response, externalCb func(*abci.ResponseCheckTx), -) func(res *abci.Response) { - return func(res *abci.Response) { - if !mem.recheck.done() { - panic(log.NewLazySprintf("rechecking has not finished; cannot check new tx %v", - types.Tx(tx).Hash())) - } +) { + if !mem.recheck.done() { + panic(log.NewLazySprintf("rechecking has not finished; cannot check new tx %v", + types.Tx(tx).Hash())) + } - mem.resCbFirstTime(tx, txInfo, res) + mem.resCbFirstTime(tx, txInfo, res) - // update metrics - mem.metrics.Size.Set(float64(mem.Size())) - mem.metrics.SizeBytes.Set(float64(mem.SizeBytes())) + // update metrics + mem.metrics.Size.Set(float64(mem.Size())) + mem.metrics.SizeBytes.Set(float64(mem.SizeBytes())) - // passed in by the caller of CheckTx, eg. the RPC - if externalCb != nil { - externalCb(res.GetCheckTx()) - } + // passed in by the caller of CheckTx, eg. the RPC + if externalCb != nil { + externalCb(res.GetCheckTx()) } } @@ -580,12 +624,14 @@ func (mem *CListMempool) ReapMaxTxs(max int) types.Txs { // Lock() must be help by the caller during execution. func (mem *CListMempool) Update( - height int64, - txs types.Txs, + block *types.Block, txResults []*abci.ExecTxResult, preCheck PreCheckFunc, postCheck PostCheckFunc, ) error { + height := block.Height + txs := block.Data.Txs + mem.logger.Debug("Update", "height", height, "len(txs)", len(txs)) // Set height @@ -627,7 +673,27 @@ func (mem *CListMempool) Update( // Recheck txs left in the mempool to remove them if they became invalid in the new state. if mem.config.Recheck { - mem.recheckTxs() + mem.logger.Debug("recheck txs", "numtxs", mem.Size(), "height", height) + res, err := mem.proxyAppConn.BeginRecheckTxSync(context.TODO(), &abci.RequestBeginRecheckTx{ + Header: types.TM2PB.Header(&block.Header), + }) + if res != nil && res.Code == abci.CodeTypeOK && err == nil { + mem.recheckTxs() + res2, err2 := mem.proxyAppConn.EndRecheckTxSync(context.TODO(), &abci.RequestEndRecheckTx{Height: height}) + if res2.Code != abci.CodeTypeOK { + return errors.New("the function EndRecheckTxSync does not respond CodeTypeOK") + } + if err2 != nil { + return errors.Join(err2, errors.New("the function EndRecheckTxSync returns an error")) + } + } else { + if res != nil && res.Code != abci.CodeTypeOK { + return errors.New("the function BeginRecheckTxSync does not respond CodeTypeOK") + } + if err != nil { + return errors.Join(err, errors.New("the function BeginRecheckTxSync returns an error")) + } + } } // Notify if there are still txs left in the mempool. diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index 8d676789f3c..f939919f73c 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -101,7 +101,7 @@ func ensureFire(t *testing.T, ch <-chan struct{}, timeoutMS int) { func callCheckTx(t *testing.T, mp Mempool, txs types.Txs, peerID uint16) { txInfo := TxInfo{SenderID: peerID} for i, tx := range txs { - if err := mp.CheckTx(tx, nil, txInfo); err != nil { + if _, err := mp.CheckTxSync(tx, nil, txInfo); err != nil { // Skip invalid txs. // TestMempoolFilters will fail otherwise. It asserts a number of txs // returned. @@ -137,7 +137,7 @@ func addTxs(tb testing.TB, mp Mempool, first, num int) []types.Tx { txs := make([]types.Tx, 0, num) for i := first; i < num; i++ { tx := kvstore.NewTxFromID(i) - err := mp.CheckTx(tx, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx, nil, TxInfo{}) require.NoError(tb, err) txs = append(txs, tx) } @@ -222,7 +222,7 @@ func TestMempoolFilters(t *testing.T) { {10, PreCheckMaxBytes(22), PostCheckMaxGas(0), 0}, } for tcIndex, tt := range tests { - err := mp.Update(1, emptyTxArr, abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, tt.postFilter) + err := mp.Update(newTestBlock(1, emptyTxArr), abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, tt.postFilter) require.NoError(t, err) addRandomTxs(t, mp, tt.numTxsToCreate, UnknownPeerID) require.Equal(t, tt.expectedNumTxs, mp.Size(), "mempool had the incorrect size, on test case %d", tcIndex) @@ -239,9 +239,9 @@ func TestMempoolUpdate(t *testing.T) { // 1. Adds valid txs to the cache { tx1 := kvstore.NewTxFromID(1) - err := mp.Update(1, []types.Tx{tx1}, abciResponses(1, abci.CodeTypeOK), nil, nil) + err := mp.Update(newTestBlock(1, []types.Tx{tx1}), abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) - err = mp.CheckTx(tx1, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx1, nil, TxInfo{}) if assert.Error(t, err) { assert.Equal(t, ErrTxInCache, err) } @@ -250,9 +250,9 @@ func TestMempoolUpdate(t *testing.T) { // 2. Removes valid txs from the mempool { tx2 := kvstore.NewTxFromID(2) - err := mp.CheckTx(tx2, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx2, nil, TxInfo{}) require.NoError(t, err) - err = mp.Update(1, []types.Tx{tx2}, abciResponses(1, abci.CodeTypeOK), nil, nil) + err = mp.Update(newTestBlock(1, []types.Tx{tx2}), abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.Zero(t, mp.Size()) } @@ -260,13 +260,13 @@ func TestMempoolUpdate(t *testing.T) { // 3. Removes invalid transactions from the cache and the mempool (if present) { tx3 := kvstore.NewTxFromID(3) - err := mp.CheckTx(tx3, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx3, nil, TxInfo{}) require.NoError(t, err) - err = mp.Update(1, []types.Tx{tx3}, abciResponses(1, 1), nil, nil) + err = mp.Update(newTestBlock(1, []types.Tx{tx3}), abciResponses(1, 1), nil, nil) require.NoError(t, err) assert.Zero(t, mp.Size()) - err = mp.CheckTx(tx3, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx3, nil, TxInfo{}) require.NoError(t, err) } } @@ -281,6 +281,9 @@ func TestMempoolUpdateDoesNotPanicWhenApplicationMissedTx(t *testing.T) { mockClient.On("SetResponseCallback", mock.MatchedBy(func(cb abciclient.Callback) bool { callback = cb; return true })) mockClient.On("Flush", mock.Anything).Return(nil) + mockClient.On("BeginRecheckTxSync", mock.Anything, mock.Anything).Return(&abci.ResponseBeginRecheckTx{}, nil) + mockClient.On("EndRecheckTxSync", mock.Anything, mock.Anything).Return(&abci.ResponseEndRecheckTx{}, nil) + mp, cleanup, err := newMempoolWithAppMock(mockClient) require.NoError(t, err) defer cleanup() @@ -289,19 +292,24 @@ func TestMempoolUpdateDoesNotPanicWhenApplicationMissedTx(t *testing.T) { txs := []types.Tx{[]byte{0x01}, []byte{0x02}, []byte{0x03}, []byte{0x04}} for _, tx := range txs { reqRes := newReqRes(tx, abci.CodeTypeOK, abci.CheckTxType_New) - mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return(reqRes, nil) - err := mp.CheckTx(tx, nil, TxInfo{}) - require.NoError(t, err) + mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return( + func(ctx context.Context, req *abci.RequestCheckTx) (*abciclient.ReqRes, error) { + reqRes.SetInvoked() + return reqRes, nil + }, + ) + mp.CheckTxAsync(tx, TxInfo{}) // ensure that the callback that the mempool sets on the ReqRes is run. reqRes.InvokeCallback() } + time.Sleep(10 * time.Millisecond) require.Len(t, txs, mp.Size()) require.True(t, mp.recheck.done()) // Calling update to remove the first transaction from the mempool. // This call also triggers the mempool to recheck its remaining transactions. - err = mp.Update(0, []types.Tx{txs[0]}, abciResponses(1, abci.CodeTypeOK), nil, nil) + err = mp.Update(newTestBlock(0, []types.Tx{txs[0]}), abciResponses(1, abci.CodeTypeOK), nil, nil) require.Nil(t, err) // The mempool has now sent its requests off to the client to be rechecked @@ -335,7 +343,7 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { b := make([]byte, 8) binary.BigEndian.PutUint64(b, 1) - err := mp.CheckTx(b, nil, TxInfo{}) + _, err := mp.CheckTxSync(b, nil, TxInfo{}) require.NoError(t, err) // simulate new block @@ -343,18 +351,18 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { Txs: [][]byte{a, b}, }) require.NoError(t, err) - err = mp.Update(1, []types.Tx{a, b}, + err = mp.Update(newTestBlock(1, []types.Tx{a, b}), []*abci.ExecTxResult{{Code: abci.CodeTypeOK}, {Code: 2}}, nil, nil) require.NoError(t, err) // a must be added to the cache - err = mp.CheckTx(a, nil, TxInfo{}) + _, err = mp.CheckTxSync(a, nil, TxInfo{}) if assert.Error(t, err) { assert.Equal(t, ErrTxInCache, err) } // b must remain in the cache - err = mp.CheckTx(b, nil, TxInfo{}) + _, err = mp.CheckTxSync(b, nil, TxInfo{}) if assert.Error(t, err) { assert.Equal(t, ErrTxInCache, err) } @@ -368,7 +376,7 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { // remove a from the cache to test (2) mp.cache.Remove(a) - err := mp.CheckTx(a, nil, TxInfo{}) + _, err := mp.CheckTxSync(a, nil, TxInfo{}) require.NoError(t, err) } } @@ -394,7 +402,7 @@ func TestTxsAvailable(t *testing.T) { // it should fire once now for the new height // since there are still txs left committedTxs, remainingTxs := txs[:50], txs[50:] - if err := mp.Update(1, committedTxs, abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { + if err := mp.Update(newTestBlock(1, committedTxs), abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } ensureFire(t, mp.TxsAvailable(), timeoutMS) @@ -406,7 +414,7 @@ func TestTxsAvailable(t *testing.T) { // now call update with all the txs. it should not fire as there are no txs left committedTxs = append(remainingTxs, moreTxs...) - if err := mp.Update(2, committedTxs, abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { + if err := mp.Update(newTestBlock(2, committedTxs), abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } ensureNoFire(t, mp.TxsAvailable(), timeoutMS) @@ -434,7 +442,7 @@ func TestSerialReap(t *testing.T) { // Deliver some txs. for i := start; i < end; i++ { txBytes := kvstore.NewTx(fmt.Sprintf("%d", i), "true") - err := mp.CheckTx(txBytes, nil, TxInfo{}) + _, err := mp.CheckTxSync(txBytes, nil, TxInfo{}) _, cached := cacheMap[string(txBytes)] if cached { require.NotNil(t, err, "expected error for cached tx") @@ -444,7 +452,7 @@ func TestSerialReap(t *testing.T) { cacheMap[string(txBytes)] = struct{}{} // Duplicates are cached and should return error - err = mp.CheckTx(txBytes, nil, TxInfo{}) + _, err = mp.CheckTxSync(txBytes, nil, TxInfo{}) require.NotNil(t, err, "Expected error after CheckTx on duplicated tx") } } @@ -459,7 +467,7 @@ func TestSerialReap(t *testing.T) { for i := start; i < end; i++ { txs[i-start] = kvstore.NewTx(fmt.Sprintf("%d", i), "true") } - if err := mp.Update(0, txs, abciResponses(len(txs), abci.CodeTypeOK), nil, nil); err != nil { + if err := mp.Update(newTestBlock(0, txs), abciResponses(len(txs), abci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } } @@ -555,7 +563,7 @@ func TestMempool_CheckTxChecksTxSize(t *testing.T) { tx := cmtrand.Bytes(testCase.len) - err := mempl.CheckTx(tx, nil, TxInfo{}) + _, err := mempl.CheckTxSync(tx, nil, TxInfo{}) bv := gogotypes.BytesValue{Value: tx} bz, err2 := bv.Marshal() require.NoError(t, err2) @@ -587,18 +595,18 @@ func TestMempoolTxsBytes(t *testing.T) { // 2. len(tx) after CheckTx tx1 := kvstore.NewRandomTx(10) - err := mp.CheckTx(tx1, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx1, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 10, mp.SizeBytes()) // 3. zero again after tx is removed by Update - err = mp.Update(1, []types.Tx{tx1}, abciResponses(1, abci.CodeTypeOK), nil, nil) + err = mp.Update(newTestBlock(1, []types.Tx{tx1}), abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.EqualValues(t, 0, mp.SizeBytes()) // 4. zero after Flush tx2 := kvstore.NewRandomTx(20) - err = mp.CheckTx(tx2, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx2, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 20, mp.SizeBytes()) @@ -607,11 +615,11 @@ func TestMempoolTxsBytes(t *testing.T) { // 5. ErrMempoolIsFull is returned when/if MaxTxsBytes limit is reached. tx3 := kvstore.NewRandomTx(100) - err = mp.CheckTx(tx3, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx3, nil, TxInfo{}) require.NoError(t, err) tx4 := kvstore.NewRandomTx(10) - err = mp.CheckTx(tx4, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx4, nil, TxInfo{}) if assert.Error(t, err) { assert.IsType(t, ErrMempoolIsFull{}, err) } @@ -625,7 +633,7 @@ func TestMempoolTxsBytes(t *testing.T) { txBytes := kvstore.NewRandomTx(10) - err = mp.CheckTx(txBytes, nil, TxInfo{}) + _, err = mp.CheckTxSync(txBytes, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 10, mp.SizeBytes()) @@ -648,12 +656,12 @@ func TestMempoolTxsBytes(t *testing.T) { require.NoError(t, err) // Pretend like we committed nothing so txBytes gets rechecked and removed. - err = mp.Update(1, []types.Tx{}, abciResponses(0, abci.CodeTypeOK), nil, nil) + err = mp.Update(newTestBlock(1, []types.Tx{}), abciResponses(0, abci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.EqualValues(t, 10, mp.SizeBytes()) // 7. Test RemoveTxByKey function - err = mp.CheckTx(tx1, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx1, nil, TxInfo{}) require.NoError(t, err) assert.EqualValues(t, 20, mp.SizeBytes()) assert.Error(t, mp.RemoveTxByKey(types.Tx([]byte{0x07}).Key())) @@ -668,14 +676,14 @@ func TestMempoolNoCacheOverflow(t *testing.T) { // add tx0 tx0 := kvstore.NewTxFromID(0) - err := mp.CheckTx(tx0, nil, TxInfo{}) + _, err := mp.CheckTxSync(tx0, nil, TxInfo{}) require.NoError(t, err) err = mp.FlushAppConn() require.NoError(t, err) // saturate the cache to remove tx0 for i := 1; i <= mp.config.CacheSize; i++ { - err = mp.CheckTx(kvstore.NewTxFromID(i), nil, TxInfo{}) + _, err = mp.CheckTxSync(kvstore.NewTxFromID(i), nil, TxInfo{}) require.NoError(t, err) } err = mp.FlushAppConn() @@ -683,7 +691,7 @@ func TestMempoolNoCacheOverflow(t *testing.T) { assert.False(t, mp.cache.Has(kvstore.NewTxFromID(0))) // add again tx0 - err = mp.CheckTx(tx0, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx0, nil, TxInfo{}) require.NoError(t, err) err = mp.FlushAppConn() require.NoError(t, err) @@ -723,7 +731,7 @@ func TestMempoolRemoteAppConcurrency(t *testing.T) { tx := txs[txNum] // this will err with ErrTxInCache many times ... - mp.CheckTx(tx, nil, TxInfo{SenderID: uint16(peerID)}) //nolint: errcheck // will error + mp.CheckTxSync(tx, nil, TxInfo{SenderID: uint16(peerID)}) //nolint: errcheck // will error } require.NoError(t, mp.FlushAppConn()) @@ -789,7 +797,7 @@ func TestMempoolNotifyTxsAvailable(t *testing.T) { require.Empty(t, mp.TxsAvailable()) // Updating the pool will remove the tx and set the variable to false - err := mp.Update(1, []types.Tx{tx}, abciResponses(1, abci.CodeTypeOK), nil, nil) + err := mp.Update(newTestBlock(1, []types.Tx{tx}), abciResponses(1, abci.CodeTypeOK), nil, nil) require.NoError(t, err) require.Zero(t, mp.Size()) require.False(t, mp.notifiedTxsAvailable.Load()) @@ -816,7 +824,7 @@ func TestMempoolSyncCheckTxReturnError(t *testing.T) { t.Errorf("CheckTx did not panic") } }() - err = mp.CheckTx(tx, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx, nil, TxInfo{}) require.NoError(t, err) } @@ -836,13 +844,18 @@ func TestMempoolSyncRecheckTxReturnError(t *testing.T) { txs := []types.Tx{[]byte{0x01}, []byte{0x02}} for _, tx := range txs { reqRes := newReqRes(tx, abci.CodeTypeOK, abci.CheckTxType_New) - mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return(reqRes, nil).Once() - err := mp.CheckTx(tx, nil, TxInfo{}) - require.NoError(t, err) + mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return( + func(ctx context.Context, req *abci.RequestCheckTx) (*abciclient.ReqRes, error) { + reqRes.SetInvoked() + return reqRes, nil + }, + ).Once() + mp.CheckTxAsync(tx, TxInfo{}) // ensure that the callback that the mempool sets on the ReqRes is run. reqRes.InvokeCallback() } + time.Sleep(10 * time.Millisecond) require.Len(t, txs, mp.Size()) // The first tx is valid when rechecking and the client will call the callback right after the @@ -880,14 +893,18 @@ func TestMempoolAsyncRecheckTxReturnError(t *testing.T) { txs := []types.Tx{[]byte{0x01}, []byte{0x02}, []byte{0x03}, []byte{0x04}} for _, tx := range txs { reqRes := newReqRes(tx, abci.CodeTypeOK, abci.CheckTxType_New) - mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return(reqRes, nil).Once() - err := mp.CheckTx(tx, nil, TxInfo{}) - require.NoError(t, err) + mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return( + func(ctx context.Context, req *abci.RequestCheckTx) (*abciclient.ReqRes, error) { + reqRes.SetInvoked() + return reqRes, nil + }, + ).Once() + mp.CheckTxAsync(tx, TxInfo{}) // ensure that the callback that the mempool sets on the ReqRes is run. reqRes.InvokeCallback() } - + time.Sleep(10 * time.Millisecond) // The 4 txs are added to the mempool. require.Len(t, txs, mp.Size()) @@ -899,7 +916,13 @@ func TestMempoolAsyncRecheckTxReturnError(t *testing.T) { mockClient.AssertExpectations(t) // One call to CheckTxAsync per tx, for rechecking. - mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return(nil, nil).Times(4) + mockClient.On("CheckTxAsync", mock.Anything, mock.Anything).Return( + func(ctx context.Context, req *abci.RequestCheckTx) (*abciclient.ReqRes, error) { + reqRes := newReqRes(req.Tx, abci.CodeTypeOK, abci.CheckTxType_Recheck) + reqRes.SetInvoked() + return reqRes, nil + }, + ).Times(4) // On the async client, the callbacks are executed when flushing the connection. The app replies // to the request for the first tx (valid) and for the third tx (invalid), so the callback is @@ -936,7 +959,7 @@ func TestMempoolRecheckRace(t *testing.T) { var err error txs := newUniqueTxs(10) for _, tx := range txs { - err = mp.CheckTx(tx, nil, TxInfo{}) + _, err = mp.CheckTxSync(tx, nil, TxInfo{}) require.NoError(t, err) } @@ -949,7 +972,7 @@ func TestMempoolRecheckRace(t *testing.T) { // Add again the same transaction that was updated. Recheck has finished so adding this tx // should not result in a data race on the variable recheck.cursor. - err = mp.CheckTx(txs[:1][0], nil, TxInfo{}) + _, err = mp.CheckTxSync(txs[:1][0], nil, TxInfo{}) require.Equal(t, err, ErrTxInCache) require.Zero(t, mp.recheck.numPendingTxs.Load()) } @@ -981,7 +1004,7 @@ func TestMempoolConcurrentCheckTxAndUpdate(t *testing.T) { // Concurrently, add transactions (one per height). for h := 1; h <= maxHeight; h++ { - err := mp.CheckTx(kvstore.NewTxFromID(h), nil, TxInfo{}) + _, err := mp.CheckTxSync(kvstore.NewTxFromID(h), nil, TxInfo{}) require.NoError(t, err) } @@ -1040,7 +1063,18 @@ func doUpdate(tb testing.TB, mp Mempool, height int64, txs []types.Tx) { mp.Lock() err := mp.FlushAppConn() require.NoError(tb, err) - err = mp.Update(height, txs, abciResponses(len(txs), abci.CodeTypeOK), nil, nil) + err = mp.Update(newTestBlock(height, txs), abciResponses(len(txs), abci.CodeTypeOK), nil, nil) require.NoError(tb, err) mp.Unlock() } + +func newTestBlock(height int64, txs types.Txs) *types.Block { + return &types.Block{ + Header: types.Header{ + Height: height, + }, + Data: types.Data{ + Txs: txs, + }, + } +} diff --git a/mempool/mempool.go b/mempool/mempool.go index 8ab37162641..44d88631833 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -31,7 +31,8 @@ const ( type Mempool interface { // CheckTx executes a new transaction against the application to determine // its validity and whether it should be added to the mempool. - CheckTx(tx types.Tx, callback func(*abci.ResponseCheckTx), txInfo TxInfo) error + CheckTxSync(tx types.Tx, callback func(*abci.ResponseCheckTx), txInfo TxInfo) (*abci.ResponseCheckTx, error) + CheckTxAsync(tx types.Tx, txInfo TxInfo) // RemoveTxByKey removes a transaction, identified by its key, // from the mempool. @@ -66,8 +67,7 @@ type Mempool interface { // 1. This should be called *after* block is committed by consensus. // 2. Lock/Unlock must be managed by the caller. Update( - blockHeight int64, - blockTxs types.Txs, + block *types.Block, deliverTxResponses []*abci.ExecTxResult, newPreFn PreCheckFunc, newPostFn PostCheckFunc, diff --git a/mempool/mocks/mempool.go b/mempool/mocks/mempool.go index 173ac9ec086..2393e752f6a 100644 --- a/mempool/mocks/mempool.go +++ b/mempool/mocks/mempool.go @@ -16,35 +16,52 @@ type Mempool struct { mock.Mock } -// CheckTx provides a mock function with given fields: tx, callback, txInfo -func (_m *Mempool) CheckTx(tx types.Tx, callback func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error { +// CheckTxAsync provides a mock function with given fields: tx, txInfo +func (_m *Mempool) CheckTxAsync(tx types.Tx, txInfo mempool.TxInfo) { + _m.Called(tx, txInfo) +} + +// CheckTxSync provides a mock function with given fields: tx, callback, txInfo +func (_m *Mempool) CheckTxSync(tx types.Tx, callback func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) (*abcitypes.ResponseCheckTx, error) { ret := _m.Called(tx, callback, txInfo) if len(ret) == 0 { - panic("no return value specified for CheckTx") + panic("no return value specified for CheckTxSync") } - var r0 error - if rf, ok := ret.Get(0).(func(types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error); ok { + var r0 *abcitypes.ResponseCheckTx + var r1 error + if rf, ok := ret.Get(0).(func(types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) (*abcitypes.ResponseCheckTx, error)); ok { + return rf(tx, callback, txInfo) + } + if rf, ok := ret.Get(0).(func(types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) *abcitypes.ResponseCheckTx); ok { r0 = rf(tx, callback, txInfo) } else { - r0 = ret.Error(0) + if ret.Get(0) != nil { + r0 = ret.Get(0).(*abcitypes.ResponseCheckTx) + } } - return r0 + if rf, ok := ret.Get(1).(func(types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error); ok { + r1 = rf(tx, callback, txInfo) + } else { + r1 = ret.Error(1) + } + + return r0, r1 } -// EnableTxsAvailable provides a mock function with given fields: +// EnableTxsAvailable provides a mock function with no fields func (_m *Mempool) EnableTxsAvailable() { _m.Called() } -// Flush provides a mock function with given fields: +// Flush provides a mock function with no fields func (_m *Mempool) Flush() { _m.Called() } -// FlushAppConn provides a mock function with given fields: +// FlushAppConn provides a mock function with no fields func (_m *Mempool) FlushAppConn() error { ret := _m.Called() @@ -62,7 +79,7 @@ func (_m *Mempool) FlushAppConn() error { return r0 } -// Lock provides a mock function with given fields: +// Lock provides a mock function with no fields func (_m *Mempool) Lock() { _m.Called() } @@ -125,7 +142,7 @@ func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { return r0 } -// Size provides a mock function with given fields: +// Size provides a mock function with no fields func (_m *Mempool) Size() int { ret := _m.Called() @@ -143,7 +160,7 @@ func (_m *Mempool) Size() int { return r0 } -// SizeBytes provides a mock function with given fields: +// SizeBytes provides a mock function with no fields func (_m *Mempool) SizeBytes() int64 { ret := _m.Called() @@ -161,7 +178,7 @@ func (_m *Mempool) SizeBytes() int64 { return r0 } -// TxsAvailable provides a mock function with given fields: +// TxsAvailable provides a mock function with no fields func (_m *Mempool) TxsAvailable() <-chan struct{} { ret := _m.Called() @@ -181,22 +198,22 @@ func (_m *Mempool) TxsAvailable() <-chan struct{} { return r0 } -// Unlock provides a mock function with given fields: +// Unlock provides a mock function with no fields func (_m *Mempool) Unlock() { _m.Called() } -// Update provides a mock function with given fields: blockHeight, blockTxs, deliverTxResponses, newPreFn, newPostFn -func (_m *Mempool) Update(blockHeight int64, blockTxs types.Txs, deliverTxResponses []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc) error { - ret := _m.Called(blockHeight, blockTxs, deliverTxResponses, newPreFn, newPostFn) +// Update provides a mock function with given fields: block, deliverTxResponses, newPreFn, newPostFn +func (_m *Mempool) Update(block *types.Block, deliverTxResponses []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc) error { + ret := _m.Called(block, deliverTxResponses, newPreFn, newPostFn) if len(ret) == 0 { panic("no return value specified for Update") } var r0 error - if rf, ok := ret.Get(0).(func(int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc) error); ok { - r0 = rf(blockHeight, blockTxs, deliverTxResponses, newPreFn, newPostFn) + if rf, ok := ret.Get(0).(func(*types.Block, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc) error); ok { + r0 = rf(block, deliverTxResponses, newPreFn, newPostFn) } else { r0 = ret.Error(0) } diff --git a/mempool/nop_mempool.go b/mempool/nop_mempool.go index 6bfff3b04d4..cf35c76f69d 100644 --- a/mempool/nop_mempool.go +++ b/mempool/nop_mempool.go @@ -21,10 +21,13 @@ var errNotAllowed = errors.New("not allowed with `nop` mempool") var _ Mempool = &NopMempool{} // CheckTx always returns an error. -func (*NopMempool) CheckTx(types.Tx, func(*abci.ResponseCheckTx), TxInfo) error { - return errNotAllowed +func (*NopMempool) CheckTxSync(types.Tx, func(*abci.ResponseCheckTx), TxInfo) (*abci.ResponseCheckTx, error) { + return nil, errNotAllowed } +// CheckTx always returns an error. +func (*NopMempool) CheckTxAsync(types.Tx, TxInfo) {} + // RemoveTxByKey always returns an error. func (*NopMempool) RemoveTxByKey(types.TxKey) error { return errNotAllowed } @@ -42,8 +45,7 @@ func (*NopMempool) Unlock() {} // Update does nothing. func (*NopMempool) Update( - int64, - types.Txs, + *types.Block, []*abci.ExecTxResult, PreCheckFunc, PostCheckFunc, diff --git a/mempool/nop_mempool_test.go b/mempool/nop_mempool_test.go index 01b169e0695..01b1647314f 100644 --- a/mempool/nop_mempool_test.go +++ b/mempool/nop_mempool_test.go @@ -15,7 +15,7 @@ func TestNopMempool_Basic(t *testing.T) { assert.Equal(t, 0, mem.Size()) assert.Equal(t, int64(0), mem.SizeBytes()) - err := mem.CheckTx(tx, nil, TxInfo{}) + _, err := mem.CheckTxSync(tx, nil, TxInfo{}) assert.Equal(t, errNotAllowed, err) err = mem.RemoveTxByKey(tx.Key()) @@ -30,7 +30,7 @@ func TestNopMempool_Basic(t *testing.T) { err = mem.FlushAppConn() assert.NoError(t, err) - err = mem.Update(0, nil, nil, nil, nil) + err = mem.Update(newTestBlock(0, nil), nil, nil, nil) assert.NoError(t, err) txsAvailable := mem.TxsAvailable() diff --git a/mempool/reactor.go b/mempool/reactor.go index ef3e9a7c382..1a6973df713 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -154,7 +154,7 @@ func (memR *Reactor) Receive(e p2p.Envelope) { var err error for _, tx := range protoTxs { ntx := types.Tx(tx) - err = memR.mempool.CheckTx(ntx, nil, txInfo) + _, err = memR.mempool.CheckTxSync(ntx, nil, txInfo) if err != nil { switch { case errors.Is(err, ErrTxInCache): diff --git a/mempool/reactor_test.go b/mempool/reactor_test.go index f79ed97d6a9..27f2e08b346 100644 --- a/mempool/reactor_test.go +++ b/mempool/reactor_test.go @@ -100,7 +100,7 @@ func TestReactorConcurrency(t *testing.T) { for i := range txs { txResponses[i] = &abci.ExecTxResult{Code: 0} } - err := reactors[0].mempool.Update(1, txs, txResponses, nil, nil) + err := reactors[0].mempool.Update(newTestBlock(1, txs), txResponses, nil, nil) assert.NoError(t, err) }() @@ -112,7 +112,7 @@ func TestReactorConcurrency(t *testing.T) { reactors[1].mempool.Lock() defer reactors[1].mempool.Unlock() - err := reactors[1].mempool.Update(1, []types.Tx{}, make([]*abci.ExecTxResult, 0), nil, nil) + err := reactors[1].mempool.Update(newTestBlock(1, []types.Tx{}), make([]*abci.ExecTxResult, 0), nil, nil) assert.NoError(t, err) }() @@ -168,7 +168,7 @@ func TestMempoolReactorMaxTxBytes(t *testing.T) { // Broadcast a tx, which has the max size // => ensure it's received by the second reactor. tx1 := kvstore.NewRandomTx(config.Mempool.MaxTxBytes) - err := reactors[0].mempool.CheckTx(tx1, func(resp *abci.ResponseCheckTx) { + _, err := reactors[0].mempool.CheckTxSync(tx1, func(resp *abci.ResponseCheckTx) { require.False(t, resp.IsErr()) }, TxInfo{SenderID: UnknownPeerID}) require.NoError(t, err) @@ -180,7 +180,7 @@ func TestMempoolReactorMaxTxBytes(t *testing.T) { // Broadcast a tx, which is beyond the max size // => ensure it's not sent tx2 := kvstore.NewRandomTx(config.Mempool.MaxTxBytes + 1) - err = reactors[0].mempool.CheckTx(tx2, func(resp *abci.ResponseCheckTx) { + _, err = reactors[0].mempool.CheckTxSync(tx2, func(resp *abci.ResponseCheckTx) { require.False(t, resp.IsErr()) }, TxInfo{SenderID: UnknownPeerID}) require.Error(t, err) diff --git a/node/node_test.go b/node/node_test.go index 01d5f0f8fcc..8512953c00e 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -309,7 +309,7 @@ func TestCreateProposalBlock(t *testing.T) { txLength := 100 for i := 0; i <= int(maxBytes)/txLength; i++ { tx := cmtrand.Bytes(txLength) - err := mempool.CheckTx(tx, nil, mempl.TxInfo{}) + _, err := mempool.CheckTxSync(tx, nil, mempl.TxInfo{}) assert.NoError(t, err) } @@ -387,7 +387,7 @@ func TestMaxProposalBlockSize(t *testing.T) { // fill the mempool with one txs just below the maximum size txLength := int(types.MaxDataBytesNoEvidence(maxBytes, 1)) tx := cmtrand.Bytes(txLength - 4) // to account for the varint - err = mempool.CheckTx(tx, nil, mempl.TxInfo{}) + _, err = mempool.CheckTxSync(tx, nil, mempl.TxInfo{}) assert.NoError(t, err) blockExec := sm.NewBlockExecutor( diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 89bafb6cd54..8ce41b2a0b3 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -8,6 +8,7 @@ option go_package = "github.com/cometbft/cometbft/abci/types"; import "tendermint/crypto/proof.proto"; import "tendermint/crypto/keys.proto"; import "tendermint/types/params.proto"; +import "tendermint/types/types.proto"; import "tendermint/types/validator.proto"; import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; @@ -34,6 +35,9 @@ service ABCI { rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote); rpc VerifyVoteExtension(RequestVerifyVoteExtension) returns (ResponseVerifyVoteExtension); rpc FinalizeBlock(RequestFinalizeBlock) returns (ResponseFinalizeBlock); + + rpc BeginRecheckTx(RequestBeginRecheckTx) returns (ResponseBeginRecheckTx); + rpc EndRecheckTx(RequestEndRecheckTx) returns (ResponseEndRecheckTx); } //---------------------------------------- @@ -57,6 +61,9 @@ message Request { RequestExtendVote extend_vote = 18; RequestVerifyVoteExtension verify_vote_extension = 19; RequestFinalizeBlock finalize_block = 20; + + RequestBeginRecheckTx begin_recheck_tx = 100; // 21~99 are reserved for merging original cometbft + RequestEndRecheckTx end_recheck_tx = 101; } reserved 4, 7, 9, 10; // SetOption, BeginBlock, DeliverTx, EndBlock } @@ -193,6 +200,14 @@ message RequestFinalizeBlock { bytes proposer_address = 8; } +message RequestBeginRecheckTx { + tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; +} + +message RequestEndRecheckTx { + int64 height = 1; +} + //---------------------------------------- // Response types @@ -215,6 +230,9 @@ message Response { ResponseExtendVote extend_vote = 19; ResponseVerifyVoteExtension verify_vote_extension = 20; ResponseFinalizeBlock finalize_block = 21; + + ResponseBeginRecheckTx begin_recheck_tx = 100; // 22~99 are reserved for merging original cometbft + ResponseEndRecheckTx end_recheck_tx = 101; } reserved 5, 8, 10, 11; // SetOption, BeginBlock, DeliverTx, EndBlock } @@ -365,6 +383,14 @@ message ResponseFinalizeBlock { bytes app_hash = 5; } +message ResponseBeginRecheckTx { + uint32 code = 1; +} + +message ResponseEndRecheckTx { + uint32 code = 1; +} + //---------------------------------------- // Misc. diff --git a/proxy/app_conn.go b/proxy/app_conn.go index 064f32891ff..4e42ed667c6 100644 --- a/proxy/app_conn.go +++ b/proxy/app_conn.go @@ -30,8 +30,12 @@ type AppConnMempool interface { SetResponseCallback(abcicli.Callback) Error() error - CheckTx(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error) + CheckTxSync(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error) + BeginRecheckTxSync(context.Context, *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) + EndRecheckTxSync(context.Context, *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) + CheckTxAsync(context.Context, *types.RequestCheckTx) (*abcicli.ReqRes, error) + Flush(context.Context) error } @@ -137,9 +141,17 @@ func (app *appConnMempool) Flush(ctx context.Context) error { return app.appConn.Flush(ctx) } -func (app *appConnMempool) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (app *appConnMempool) CheckTxSync(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { defer addTimeSample(app.metrics.MethodTimingSeconds.With("method", "check_tx", "type", "sync"))() - return app.appConn.CheckTx(ctx, req) + return app.appConn.CheckTxSync(ctx, req) +} + +func (app *appConnMempool) BeginRecheckTxSync(ctx context.Context, req *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { + return app.appConn.BeginRecheckTxSync(ctx, req) +} + +func (app *appConnMempool) EndRecheckTxSync(ctx context.Context, req *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + return app.appConn.EndRecheckTxSync(ctx, req) } func (app *appConnMempool) CheckTxAsync(ctx context.Context, req *types.RequestCheckTx) (*abcicli.ReqRes, error) { diff --git a/proxy/app_conn_test.go b/proxy/app_conn_test.go index cbe73d11b7c..10ab9c4ab86 100644 --- a/proxy/app_conn_test.go +++ b/proxy/app_conn_test.go @@ -44,7 +44,7 @@ func TestEcho(t *testing.T) { t.Log("Connected") for i := 0; i < 1000; i++ { - _, err = proxy.CheckTx(context.Background(), &abci.RequestCheckTx{Tx: []byte(fmt.Sprintf("echo-%v", i))}) + _, err = proxy.CheckTxSync(context.Background(), &abci.RequestCheckTx{Tx: []byte(fmt.Sprintf("echo-%v", i))}) if err != nil { t.Fatal(err) } @@ -86,7 +86,7 @@ func BenchmarkEcho(b *testing.B) { b.StartTimer() // Start benchmarking tests for i := 0; i < b.N; i++ { - _, err = proxy.CheckTx(context.Background(), &abci.RequestCheckTx{Tx: []byte("hello")}) + _, err = proxy.CheckTxSync(context.Background(), &abci.RequestCheckTx{Tx: []byte("hello")}) if err != nil { b.Error(err) } diff --git a/proxy/mocks/app_conn_mempool.go b/proxy/mocks/app_conn_mempool.go index 7735e4a9beb..37eb393c390 100644 --- a/proxy/mocks/app_conn_mempool.go +++ b/proxy/mocks/app_conn_mempool.go @@ -17,28 +17,28 @@ type AppConnMempool struct { mock.Mock } -// CheckTx provides a mock function with given fields: _a0, _a1 -func (_m *AppConnMempool) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { +// BeginRecheckTxSync provides a mock function with given fields: _a0, _a1 +func (_m *AppConnMempool) BeginRecheckTxSync(_a0 context.Context, _a1 *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { - panic("no return value specified for CheckTx") + panic("no return value specified for BeginRecheckTxSync") } - var r0 *types.ResponseCheckTx + var r0 *types.ResponseBeginRecheckTx var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) *types.ResponseCheckTx); ok { + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestBeginRecheckTx) *types.ResponseBeginRecheckTx); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseCheckTx) + r0 = ret.Get(0).(*types.ResponseBeginRecheckTx) } } - if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCheckTx) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestBeginRecheckTx) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -77,7 +77,67 @@ func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 *types.RequestCh return r0, r1 } -// Error provides a mock function with given fields: +// CheckTxSync provides a mock function with given fields: _a0, _a1 +func (_m *AppConnMempool) CheckTxSync(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CheckTxSync") + } + + var r0 *types.ResponseCheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) *types.ResponseCheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseCheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EndRecheckTxSync provides a mock function with given fields: _a0, _a1 +func (_m *AppConnMempool) EndRecheckTxSync(_a0 context.Context, _a1 *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for EndRecheckTxSync") + } + + var r0 *types.ResponseEndRecheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestEndRecheckTx) *types.ResponseEndRecheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseEndRecheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestEndRecheckTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Error provides a mock function with no fields func (_m *AppConnMempool) Error() error { ret := _m.Called() diff --git a/rpc/client/rpc_test.go b/rpc/client/rpc_test.go index 8832ef040c1..caec2aa0355 100644 --- a/rpc/client/rpc_test.go +++ b/rpc/client/rpc_test.go @@ -379,7 +379,7 @@ func TestUnconfirmedTxs(t *testing.T) { ch := make(chan *abci.ResponseCheckTx, 1) mempool := node.Mempool() - err := mempool.CheckTx(tx, func(resp *abci.ResponseCheckTx) { ch <- resp }, mempl.TxInfo{}) + _, err := mempool.CheckTxSync(tx, func(resp *abci.ResponseCheckTx) { ch <- resp }, mempl.TxInfo{}) require.NoError(t, err) // wait for tx to arrive in mempoool. @@ -409,7 +409,7 @@ func TestNumUnconfirmedTxs(t *testing.T) { ch := make(chan *abci.ResponseCheckTx, 1) mempool := node.Mempool() - err := mempool.CheckTx(tx, func(resp *abci.ResponseCheckTx) { ch <- resp }, mempl.TxInfo{}) + _, err := mempool.CheckTxSync(tx, func(resp *abci.ResponseCheckTx) { ch <- resp }, mempl.TxInfo{}) require.NoError(t, err) // wait for tx to arrive in mempoool. diff --git a/rpc/core/mempool.go b/rpc/core/mempool.go index 93442dfe765..3c997d1702e 100644 --- a/rpc/core/mempool.go +++ b/rpc/core/mempool.go @@ -20,10 +20,7 @@ import ( // CheckTx nor transaction results. // More: https://docs.cometbft.com/v0.38.x/rpc/#/Tx/broadcast_tx_async func (env *Environment) BroadcastTxAsync(_ *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) { - err := env.Mempool.CheckTx(tx, nil, mempl.TxInfo{}) - if err != nil { - return nil, err - } + env.Mempool.CheckTxAsync(tx, mempl.TxInfo{}) return &ctypes.ResultBroadcastTx{Hash: tx.Hash()}, nil } @@ -32,7 +29,7 @@ func (env *Environment) BroadcastTxAsync(_ *rpctypes.Context, tx types.Tx) (*cty // More: https://docs.cometbft.com/v0.38.x/rpc/#/Tx/broadcast_tx_sync func (env *Environment) BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) { resCh := make(chan *abci.ResponseCheckTx, 1) - err := env.Mempool.CheckTx(tx, func(res *abci.ResponseCheckTx) { + _, err := env.Mempool.CheckTxSync(tx, func(res *abci.ResponseCheckTx) { select { case <-ctx.Context().Done(): case resCh <- res: @@ -85,7 +82,7 @@ func (env *Environment) BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (* // Broadcast tx and wait for CheckTx result checkTxResCh := make(chan *abci.ResponseCheckTx, 1) - err = env.Mempool.CheckTx(tx, func(res *abci.ResponseCheckTx) { + _, err = env.Mempool.CheckTxSync(tx, func(res *abci.ResponseCheckTx) { select { case <-ctx.Context().Done(): case checkTxResCh <- res: @@ -173,7 +170,7 @@ func (env *Environment) NumUnconfirmedTxs(*rpctypes.Context) (*ctypes.ResultUnco // be added to the mempool either. // More: https://docs.cometbft.com/v0.38.x/rpc/#/Tx/check_tx func (env *Environment) CheckTx(_ *rpctypes.Context, tx types.Tx) (*ctypes.ResultCheckTx, error) { - res, err := env.ProxyAppMempool.CheckTx(context.TODO(), &abci.RequestCheckTx{Tx: tx}) + res, err := env.ProxyAppMempool.CheckTxSync(context.TODO(), &abci.RequestCheckTx{Tx: tx}) if err != nil { return nil, err } diff --git a/state/execution.go b/state/execution.go index 4accf1639d6..65da3f7667c 100644 --- a/state/execution.go +++ b/state/execution.go @@ -416,8 +416,7 @@ func (blockExec *BlockExecutor) Commit( // Update mempool. err = blockExec.mempool.Update( - block.Height, - block.Txs, + block, abciResponse.TxResults, TxPreCheck(state), TxPostCheck(state), diff --git a/test/fuzz/mempool/checktx.go b/test/fuzz/mempool/checktx.go index 79865f8fcc3..36ea6ea1524 100644 --- a/test/fuzz/mempool/checktx.go +++ b/test/fuzz/mempool/checktx.go @@ -24,7 +24,7 @@ func init() { } func Fuzz(data []byte) int { - err := mempool.CheckTx(data, nil, mempl.TxInfo{}) + _, err := mempool.CheckTxSync(data, nil, mempl.TxInfo{}) if err != nil { return 0 } diff --git a/test/fuzz/tests/mempool_test.go b/test/fuzz/tests/mempool_test.go index a1b08d83577..5c73d69fd1f 100644 --- a/test/fuzz/tests/mempool_test.go +++ b/test/fuzz/tests/mempool_test.go @@ -27,6 +27,6 @@ func FuzzMempool(f *testing.F) { mp := mempool.NewCListMempool(cfg, conn, 0) f.Fuzz(func(t *testing.T, data []byte) { - _ = mp.CheckTx(data, nil, mempool.TxInfo{}) + _, _ = mp.CheckTxSync(data, nil, mempool.TxInfo{}) }) }