diff --git a/abci/client/client.go b/abci/client/client.go index 47a14d9fc..e535aa028 100644 --- a/abci/client/client.go +++ b/abci/client/client.go @@ -33,14 +33,12 @@ type Client interface { // Asynchronous requests FlushAsync(context.Context) (*ReqRes, error) - DeliverTxAsync(context.Context, types.RequestDeliverTx) (*ReqRes, error) CheckTxAsync(context.Context, types.RequestCheckTx) (*ReqRes, error) // Synchronous requests Flush(context.Context) error Echo(ctx context.Context, msg string) (*types.ResponseEcho, error) Info(context.Context, types.RequestInfo) (*types.ResponseInfo, error) - DeliverTx(context.Context, types.RequestDeliverTx) (*types.ResponseDeliverTx, error) CheckTx(context.Context, types.RequestCheckTx) (*types.ResponseCheckTx, error) Query(context.Context, types.RequestQuery) (*types.ResponseQuery, error) Commit(context.Context) (*types.ResponseCommit, error) @@ -49,8 +47,7 @@ type Client interface { ProcessProposal(context.Context, types.RequestProcessProposal) (*types.ResponseProcessProposal, error) ExtendVote(context.Context, types.RequestExtendVote) (*types.ResponseExtendVote, error) VerifyVoteExtension(context.Context, types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) - BeginBlock(context.Context, types.RequestBeginBlock) (*types.ResponseBeginBlock, error) - EndBlock(context.Context, types.RequestEndBlock) (*types.ResponseEndBlock, error) + FinalizeBlock(context.Context, types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) ListSnapshots(context.Context, types.RequestListSnapshots) (*types.ResponseListSnapshots, error) OfferSnapshot(context.Context, types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) LoadSnapshotChunk(context.Context, types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index 716be6d6a..c4a92aabf 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -193,16 +193,6 @@ func (cli *grpcClient) FlushAsync(ctx context.Context) (*ReqRes, error) { return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_Flush{Flush: res}}) } -// NOTE: call is synchronous, use ctx to break early if needed -func (cli *grpcClient) DeliverTxAsync(ctx context.Context, params types.RequestDeliverTx) (*ReqRes, error) { - req := types.ToRequestDeliverTx(params) - res, err := cli.client.DeliverTx(ctx, req.GetDeliverTx(), grpc.WaitForReady(true)) - if err != nil { - return nil, err - } - return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_DeliverTx{DeliverTx: res}}) -} - // NOTE: call is synchronous, use ctx to break early if needed func (cli *grpcClient) CheckTxAsync(ctx context.Context, params types.RequestCheckTx) (*ReqRes, error) { req := types.ToRequestCheckTx(params) @@ -271,18 +261,6 @@ func (cli *grpcClient) Info( return cli.client.Info(ctx, req.GetInfo(), grpc.WaitForReady(true)) } -func (cli *grpcClient) DeliverTx( - ctx context.Context, - params types.RequestDeliverTx, -) (*types.ResponseDeliverTx, error) { - - reqres, err := cli.DeliverTxAsync(ctx, params) - if err != nil { - return nil, err - } - return cli.finishSyncCall(reqres).GetDeliverTx(), cli.Error() -} - func (cli *grpcClient) CheckTx( ctx context.Context, params types.RequestCheckTx, @@ -317,24 +295,6 @@ func (cli *grpcClient) InitChain( return cli.client.InitChain(ctx, req.GetInitChain(), grpc.WaitForReady(true)) } -func (cli *grpcClient) BeginBlock( - ctx context.Context, - params types.RequestBeginBlock, -) (*types.ResponseBeginBlock, error) { - - req := types.ToRequestBeginBlock(params) - return cli.client.BeginBlock(ctx, req.GetBeginBlock(), grpc.WaitForReady(true)) -} - -func (cli *grpcClient) EndBlock( - ctx context.Context, - params types.RequestEndBlock, -) (*types.ResponseEndBlock, error) { - - req := types.ToRequestEndBlock(params) - return cli.client.EndBlock(ctx, req.GetEndBlock(), grpc.WaitForReady(true)) -} - func (cli *grpcClient) ListSnapshots( ctx context.Context, params types.RequestListSnapshots, @@ -400,3 +360,11 @@ func (cli *grpcClient) VerifyVoteExtension( req := types.ToRequestVerifyVoteExtension(params) return cli.client.VerifyVoteExtension(ctx, req.GetVerifyVoteExtension(), grpc.WaitForReady(true)) } + +func (cli *grpcClient) FinalizeBlock( + ctx context.Context, + params types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { + + req := types.ToRequestFinalizeBlock(params) + return cli.client.FinalizeBlock(ctx, req.GetFinalizeBlock(), grpc.WaitForReady(true)) +} diff --git a/abci/client/local_client.go b/abci/client/local_client.go index 25d8ed90e..d233b7222 100644 --- a/abci/client/local_client.go +++ b/abci/client/local_client.go @@ -58,17 +58,6 @@ func (app *localClient) FlushAsync(ctx context.Context) (*ReqRes, error) { return newLocalReqRes(types.ToRequestFlush(), nil), nil } -func (app *localClient) DeliverTxAsync(ctx context.Context, params types.RequestDeliverTx) (*ReqRes, error) { - app.mtx.Lock() - defer app.mtx.Unlock() - - res := app.Application.DeliverTx(params) - return app.callback( - types.ToRequestDeliverTx(params), - types.ToResponseDeliverTx(res), - ), nil -} - func (app *localClient) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*ReqRes, error) { app.mtx.Lock() defer app.mtx.Unlock() @@ -98,18 +87,6 @@ func (app *localClient) Info(ctx context.Context, req types.RequestInfo) (*types return &res, nil } -func (app *localClient) DeliverTx( - ctx context.Context, - req types.RequestDeliverTx, -) (*types.ResponseDeliverTx, error) { - - app.mtx.Lock() - defer app.mtx.Unlock() - - res := app.Application.DeliverTx(req) - return &res, nil -} - func (app *localClient) CheckTx( ctx context.Context, req types.RequestCheckTx, @@ -152,30 +129,6 @@ func (app *localClient) InitChain( return &res, nil } -func (app *localClient) BeginBlock( - ctx context.Context, - req types.RequestBeginBlock, -) (*types.ResponseBeginBlock, error) { - - app.mtx.Lock() - defer app.mtx.Unlock() - - res := app.Application.BeginBlock(req) - return &res, nil -} - -func (app *localClient) EndBlock( - ctx context.Context, - req types.RequestEndBlock, -) (*types.ResponseEndBlock, error) { - - app.mtx.Lock() - defer app.mtx.Unlock() - - res := app.Application.EndBlock(req) - return &res, nil -} - func (app *localClient) ListSnapshots( ctx context.Context, req types.RequestListSnapshots, @@ -266,6 +219,17 @@ func (app *localClient) VerifyVoteExtension( return &res, nil } +func (app *localClient) FinalizeBlock( + ctx context.Context, + req types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { + + app.mtx.Lock() + defer app.mtx.Unlock() + + res := app.Application.FinalizeBlock(req) + return &res, nil +} + //------------------------------------------------------- func (app *localClient) callback(req *types.Request, res *types.Response) *ReqRes { diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index dac3c43b4..66f22c3ec 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -40,29 +40,6 @@ func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 types.RequestApply return r0, r1 } -// BeginBlock provides a mock function with given fields: _a0, _a1 -func (_m *Client) BeginBlock(_a0 context.Context, _a1 types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseBeginBlock - if rf, ok := ret.Get(0).(func(context.Context, types.RequestBeginBlock) *types.ResponseBeginBlock); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseBeginBlock) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestBeginBlock) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - 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) { ret := _m.Called(_a0, _a1) @@ -132,52 +109,6 @@ func (_m *Client) Commit(_a0 context.Context) (*types.ResponseCommit, error) { return r0, r1 } -// DeliverTx provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeliverTx(_a0 context.Context, _a1 types.RequestDeliverTx) (*types.ResponseDeliverTx, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseDeliverTx - if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *types.ResponseDeliverTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseDeliverTx) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestDeliverTx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DeliverTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) DeliverTxAsync(_a0 context.Context, _a1 types.RequestDeliverTx) (*abciclient.ReqRes, error) { - ret := _m.Called(_a0, _a1) - - var r0 *abciclient.ReqRes - if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *abciclient.ReqRes); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*abciclient.ReqRes) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestDeliverTx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // Echo provides a mock function with given fields: ctx, msg func (_m *Client) Echo(ctx context.Context, msg string) (*types.ResponseEcho, error) { ret := _m.Called(ctx, msg) @@ -201,29 +132,6 @@ func (_m *Client) Echo(ctx context.Context, msg string) (*types.ResponseEcho, er return r0, r1 } -// EndBlock provides a mock function with given fields: _a0, _a1 -func (_m *Client) EndBlock(_a0 context.Context, _a1 types.RequestEndBlock) (*types.ResponseEndBlock, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseEndBlock - if rf, ok := ret.Get(0).(func(context.Context, types.RequestEndBlock) *types.ResponseEndBlock); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseEndBlock) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestEndBlock) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // Error provides a mock function with given fields: func (_m *Client) Error() error { ret := _m.Called() @@ -261,6 +169,29 @@ func (_m *Client) ExtendVote(_a0 context.Context, _a1 types.RequestExtendVote) ( return r0, r1 } +// FinalizeBlock provides a mock function with given fields: _a0, _a1 +func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseFinalizeBlock + if rf, ok := ret.Get(0).(func(context.Context, types.RequestFinalizeBlock) *types.ResponseFinalizeBlock); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseFinalizeBlock) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, types.RequestFinalizeBlock) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // Flush provides a mock function with given fields: _a0 func (_m *Client) Flush(_a0 context.Context) error { ret := _m.Called(_a0) diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index fa0fcf97f..a8e873af3 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -226,10 +226,6 @@ func (cli *socketClient) FlushAsync(ctx context.Context) (*ReqRes, error) { return cli.queueRequestAsync(ctx, types.ToRequestFlush()) } -func (cli *socketClient) DeliverTxAsync(ctx context.Context, req types.RequestDeliverTx) (*ReqRes, error) { - return cli.queueRequestAsync(ctx, types.ToRequestDeliverTx(req)) -} - func (cli *socketClient) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*ReqRes, error) { return cli.queueRequestAsync(ctx, types.ToRequestCheckTx(req)) } @@ -280,18 +276,6 @@ func (cli *socketClient) Info( return reqres.Response.GetInfo(), nil } -func (cli *socketClient) DeliverTx( - ctx context.Context, - req types.RequestDeliverTx, -) (*types.ResponseDeliverTx, error) { - - reqres, err := cli.queueRequestAndFlush(ctx, types.ToRequestDeliverTx(req)) - if err != nil { - return nil, err - } - return reqres.Response.GetDeliverTx(), nil -} - func (cli *socketClient) CheckTx( ctx context.Context, req types.RequestCheckTx, @@ -334,30 +318,6 @@ func (cli *socketClient) InitChain( return reqres.Response.GetInitChain(), nil } -func (cli *socketClient) BeginBlock( - ctx context.Context, - req types.RequestBeginBlock, -) (*types.ResponseBeginBlock, error) { - - reqres, err := cli.queueRequestAndFlush(ctx, types.ToRequestBeginBlock(req)) - if err != nil { - return nil, err - } - return reqres.Response.GetBeginBlock(), nil -} - -func (cli *socketClient) EndBlock( - ctx context.Context, - req types.RequestEndBlock, -) (*types.ResponseEndBlock, error) { - - reqres, err := cli.queueRequestAndFlush(ctx, types.ToRequestEndBlock(req)) - if err != nil { - return nil, err - } - return reqres.Response.GetEndBlock(), nil -} - func (cli *socketClient) ListSnapshots( ctx context.Context, req types.RequestListSnapshots, @@ -449,6 +409,17 @@ func (cli *socketClient) VerifyVoteExtension( return reqres.Response.GetVerifyVoteExtension(), nil } +func (cli *socketClient) FinalizeBlock( + ctx context.Context, + req types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { + + reqres, err := cli.queueRequestAndFlush(ctx, types.ToRequestFinalizeBlock(req)) + if err != nil { + return nil, err + } + return reqres.Response.GetFinalizeBlock(), nil +} + //---------------------------------------- // queueRequest enqueues req onto the queue. If the queue is full, it ether @@ -550,8 +521,6 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) { _, ok = res.Value.(*types.Response_Flush) case *types.Request_Info: _, ok = res.Value.(*types.Response_Info) - case *types.Request_DeliverTx: - _, ok = res.Value.(*types.Response_DeliverTx) case *types.Request_CheckTx: _, ok = res.Value.(*types.Response_CheckTx) case *types.Request_Commit: @@ -566,10 +535,6 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) { _, ok = res.Value.(*types.Response_ExtendVote) case *types.Request_VerifyVoteExtension: _, ok = res.Value.(*types.Response_VerifyVoteExtension) - case *types.Request_BeginBlock: - _, ok = res.Value.(*types.Response_BeginBlock) - case *types.Request_EndBlock: - _, ok = res.Value.(*types.Response_EndBlock) case *types.Request_ApplySnapshotChunk: _, ok = res.Value.(*types.Response_ApplySnapshotChunk) case *types.Request_LoadSnapshotChunk: @@ -578,6 +543,8 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) { _, ok = res.Value.(*types.Response_ListSnapshots) case *types.Request_OfferSnapshot: _, ok = res.Value.(*types.Response_OfferSnapshot) + case *types.Request_FinalizeBlock: + _, ok = res.Value.(*types.Response_FinalizeBlock) } return ok } diff --git a/abci/client/socket_client_test.go b/abci/client/socket_client_test.go index 556f98566..9afcce739 100644 --- a/abci/client/socket_client_test.go +++ b/abci/client/socket_client_test.go @@ -29,7 +29,7 @@ func TestProperSyncCalls(t *testing.T) { resp := make(chan error, 1) go func() { - rsp, err := c.BeginBlock(ctx, types.RequestBeginBlock{}) + rsp, err := c.FinalizeBlock(ctx, types.RequestFinalizeBlock{}) assert.NoError(t, err) assert.NoError(t, c.Flush(ctx)) assert.NotNil(t, rsp) @@ -79,7 +79,7 @@ type slowApp struct { types.BaseApplication } -func (slowApp) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock { +func (slowApp) FinalizeBlock(req types.RequestFinalizeBlock) types.ResponseFinalizeBlock { time.Sleep(200 * time.Millisecond) - return types.ResponseBeginBlock{} + return types.ResponseFinalizeBlock{} } diff --git a/abci/cmd/abci-cli/abci-cli.go b/abci/cmd/abci-cli/abci-cli.go index cffbadfb7..5fea32b4e 100644 --- a/abci/cmd/abci-cli/abci-cli.go +++ b/abci/cmd/abci-cli/abci-cli.go @@ -193,7 +193,7 @@ var deliverTxCmd = &cobra.Command{ Short: "deliver a new transaction to the application", Long: "deliver a new transaction to the application", Args: cobra.ExactArgs(1), - RunE: cmdDeliverTx, + RunE: cmdFinalizeBlock, } var checkTxCmd = &cobra.Command{ @@ -300,17 +300,38 @@ func cmdTest(cmd *cobra.Command, args []string) error { []func() error{ func() error { return servertest.InitChain(ctx, client) }, func() error { return servertest.Commit(ctx, client, nil) }, - func() error { return servertest.DeliverTx(ctx, client, []byte("abc"), code.CodeTypeBadNonce, nil) }, + func() error { + return servertest.FinalizeBlock(ctx, client, [][]byte{ + []byte("abc"), + }, []uint32{ + code.CodeTypeBadNonce, + }, nil) + }, func() error { return servertest.Commit(ctx, client, nil) }, - func() error { return servertest.DeliverTx(ctx, client, []byte{0x00}, code.CodeTypeOK, nil) }, + func() error { + return servertest.FinalizeBlock(ctx, client, [][]byte{ + {0x00}, + }, []uint32{ + code.CodeTypeOK, + }, nil) + }, func() error { return servertest.Commit(ctx, client, []byte{0, 0, 0, 0, 0, 0, 0, 1}) }, - func() error { return servertest.DeliverTx(ctx, client, []byte{0x00}, code.CodeTypeBadNonce, nil) }, - func() error { return servertest.DeliverTx(ctx, client, []byte{0x01}, code.CodeTypeOK, nil) }, - func() error { return servertest.DeliverTx(ctx, client, []byte{0x00, 0x02}, code.CodeTypeOK, nil) }, - func() error { return servertest.DeliverTx(ctx, client, []byte{0x00, 0x03}, code.CodeTypeOK, nil) }, - func() error { return servertest.DeliverTx(ctx, client, []byte{0x00, 0x00, 0x04}, code.CodeTypeOK, nil) }, func() error { - return servertest.DeliverTx(ctx, client, []byte{0x00, 0x00, 0x06}, code.CodeTypeBadNonce, nil) + return servertest.FinalizeBlock(ctx, client, [][]byte{ + {0x00}, + {0x01}, + {0x00, 0x02}, + {0x00, 0x03}, + {0x00, 0x00, 0x04}, + {0x00, 0x00, 0x06}, + }, []uint32{ + code.CodeTypeBadNonce, + code.CodeTypeOK, + code.CodeTypeOK, + code.CodeTypeOK, + code.CodeTypeOK, + code.CodeTypeBadNonce, + }, nil) }, func() error { return servertest.Commit(ctx, client, []byte{0, 0, 0, 0, 0, 0, 0, 5}) }, }) @@ -406,7 +427,7 @@ func muxOnCommands(cmd *cobra.Command, pArgs []string) error { case "commit": return cmdCommit(cmd, actualArgs) case "deliver_tx": - return cmdDeliverTx(cmd, actualArgs) + return cmdFinalizeBlock(cmd, actualArgs) case "echo": return cmdEcho(cmd, actualArgs) case "info": @@ -475,7 +496,7 @@ func cmdInfo(cmd *cobra.Command, args []string) error { const codeBad uint32 = 10 // Append a new tx to application -func cmdDeliverTx(cmd *cobra.Command, args []string) error { +func cmdFinalizeBlock(cmd *cobra.Command, args []string) error { if len(args) == 0 { printResponse(cmd, args, response{ Code: codeBad, @@ -487,16 +508,18 @@ func cmdDeliverTx(cmd *cobra.Command, args []string) error { if err != nil { return err } - res, err := client.DeliverTx(cmd.Context(), types.RequestDeliverTx{Tx: txBytes}) + res, err := client.FinalizeBlock(cmd.Context(), types.RequestFinalizeBlock{Txs: [][]byte{txBytes}}) if err != nil { return err } - printResponse(cmd, args, response{ - Code: res.Code, - Data: res.Data, - Info: res.Info, - Log: res.Log, - }) + for _, tx := range res.Txs { + printResponse(cmd, args, response{ + Code: tx.Code, + Data: tx.Data, + Info: tx.Info, + Log: tx.Log, + }) + } return nil } diff --git a/abci/example/example_test.go b/abci/example/example_test.go index 99c7cc35c..e10feb76c 100644 --- a/abci/example/example_test.go +++ b/abci/example/example_test.go @@ -6,7 +6,6 @@ import ( "math/rand" "net" "os" - "reflect" "testing" "time" @@ -35,7 +34,7 @@ func TestKVStore(t *testing.T) { logger := log.NewTestingLogger(t) logger.Info("### Testing KVStore") - testStream(ctx, t, logger, kvstore.NewApplication()) + testBulk(ctx, t, logger, kvstore.NewApplication()) } func TestBaseApp(t *testing.T) { @@ -44,7 +43,7 @@ func TestBaseApp(t *testing.T) { logger := log.NewTestingLogger(t) logger.Info("### Testing BaseApp") - testStream(ctx, t, logger, types.NewBaseApplication()) + testBulk(ctx, t, logger, types.NewBaseApplication()) } func TestGRPC(t *testing.T) { @@ -57,10 +56,10 @@ func TestGRPC(t *testing.T) { testGRPCSync(ctx, t, logger, types.NewGRPCApplication(types.NewBaseApplication())) } -func testStream(ctx context.Context, t *testing.T, logger log.Logger, app types.Application) { +func testBulk(ctx context.Context, t *testing.T, logger log.Logger, app types.Application) { t.Helper() - const numDeliverTxs = 20000 + const numDeliverTxs = 700000 socketFile := fmt.Sprintf("test-%08x.sock", rand.Int31n(1<<30)) defer os.Remove(socketFile) socket := fmt.Sprintf("unix://%v", socketFile) @@ -77,51 +76,22 @@ func testStream(ctx context.Context, t *testing.T, logger log.Logger, app types. err = client.Start(ctx) require.NoError(t, err) - done := make(chan struct{}) - counter := 0 - client.SetResponseCallback(func(req *types.Request, res *types.Response) { - // Process response - switch r := res.Value.(type) { - case *types.Response_DeliverTx: - counter++ - if r.DeliverTx.Code != code.CodeTypeOK { - t.Error("DeliverTx failed with ret_code", r.DeliverTx.Code) - } - if counter > numDeliverTxs { - t.Fatalf("Too many DeliverTx responses. Got %d, expected %d", counter, numDeliverTxs) - } - if counter == numDeliverTxs { - go func() { - time.Sleep(time.Second * 1) // Wait for a bit to allow counter overflow - close(done) - }() - return - } - case *types.Response_Flush: - // ignore - default: - t.Error("Unexpected response type", reflect.TypeOf(res.Value)) - } - }) - - // Write requests + // Construct request + rfb := types.RequestFinalizeBlock{Txs: make([][]byte, numDeliverTxs)} for counter := 0; counter < numDeliverTxs; counter++ { - // Send request - _, err = client.DeliverTxAsync(ctx, types.RequestDeliverTx{Tx: []byte("test")}) - require.NoError(t, err) - - // Sometimes send flush messages - if counter%128 == 0 { - err = client.Flush(ctx) - require.NoError(t, err) - } + rfb.Txs[counter] = []byte("test") + } + // Send bulk request + res, err := client.FinalizeBlock(ctx, rfb) + require.NoError(t, err) + require.Equal(t, numDeliverTxs, len(res.Txs), "Number of txs doesn't match") + for _, tx := range res.Txs { + require.Equal(t, tx.Code, code.CodeTypeOK, "Tx failed") } // Send final flush message - _, err = client.FlushAsync(ctx) + err = client.Flush(ctx) require.NoError(t, err) - - <-done } //------------------------- @@ -133,7 +103,7 @@ func dialerFunc(ctx context.Context, addr string) (net.Conn, error) { func testGRPCSync(ctx context.Context, t *testing.T, logger log.Logger, app types.ABCIApplicationServer) { t.Helper() - numDeliverTxs := 2000 + numDeliverTxs := 680000 socketFile := fmt.Sprintf("/tmp/test-%08x.sock", rand.Int31n(1<<30)) defer os.Remove(socketFile) socket := fmt.Sprintf("unix://%v", socketFile) @@ -142,7 +112,7 @@ func testGRPCSync(ctx context.Context, t *testing.T, logger log.Logger, app type server := abciserver.NewGRPCServer(logger.With("module", "abci-server"), socket, app) require.NoError(t, server.Start(ctx)) - t.Cleanup(func() { server.Wait() }) + t.Cleanup(server.Wait) // Connect to the socket conn, err := grpc.Dial(socket, @@ -159,25 +129,17 @@ func testGRPCSync(ctx context.Context, t *testing.T, logger log.Logger, app type client := types.NewABCIApplicationClient(conn) - // Write requests + // Construct request + rfb := types.RequestFinalizeBlock{Txs: make([][]byte, numDeliverTxs)} for counter := 0; counter < numDeliverTxs; counter++ { - // Send request - response, err := client.DeliverTx(ctx, &types.RequestDeliverTx{Tx: []byte("test")}) - require.NoError(t, err, "Error in GRPC DeliverTx") - - counter++ - if response.Code != code.CodeTypeOK { - t.Error("DeliverTx failed with ret_code", response.Code) - } - if counter > numDeliverTxs { - t.Fatal("Too many DeliverTx responses") - } - t.Log("response", counter) - if counter == numDeliverTxs { - go func() { - time.Sleep(time.Second * 1) // Wait for a bit to allow counter overflow - }() - } + rfb.Txs[counter] = []byte("test") + } + // Send request + response, err := client.FinalizeBlock(ctx, &rfb) + require.NoError(t, err, "Error in GRPC FinalizeBlock") + require.Equal(t, numDeliverTxs, len(response.Txs), "Number of txs returned via GRPC doesn't match") + for _, tx := range response.Txs { + require.Equal(t, tx.Code, code.CodeTypeOK, "Tx failed") } } diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index b6cbce1d9..9f75fd149 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -86,14 +86,13 @@ func (app *Application) Info(req types.RequestInfo) (resInfo types.ResponseInfo) } // tx is either "key=value" or just arbitrary bytes -func (app *Application) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx { +func (app *Application) HandleTx(tx []byte) *types.ResponseDeliverTx { var key, value string - - parts := bytes.Split(req.Tx, []byte("=")) + parts := bytes.Split(tx, []byte("=")) if len(parts) == 2 { key, value = string(parts[0]), string(parts[1]) } else { - key, value = string(req.Tx), string(req.Tx) + key, value = string(tx), string(tx) } err := app.state.db.Set(prefixKey([]byte(key)), []byte(value)) @@ -114,7 +113,15 @@ func (app *Application) DeliverTx(req types.RequestDeliverTx) types.ResponseDeli }, } - return types.ResponseDeliverTx{Code: code.CodeTypeOK, Events: events} + return &types.ResponseDeliverTx{Code: code.CodeTypeOK, Events: events} +} + +func (app *Application) FinalizeBlock(req types.RequestFinalizeBlock) types.ResponseFinalizeBlock { + txs := make([]*types.ResponseDeliverTx, len(req.Txs)) + for i, tx := range req.Txs { + txs[i] = app.HandleTx(tx) + } + return types.ResponseFinalizeBlock{Txs: txs} } func (app *Application) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx { diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index 4418aa58e..21f54e0fe 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -24,12 +24,14 @@ const ( ) func testKVStore(t *testing.T, app types.Application, tx []byte, key, value string) { - req := types.RequestDeliverTx{Tx: tx} - ar := app.DeliverTx(req) - require.False(t, ar.IsErr(), ar) + req := types.RequestFinalizeBlock{Txs: [][]byte{tx}} + ar := app.FinalizeBlock(req) + require.Equal(t, 1, len(ar.Txs)) + require.False(t, ar.Txs[0].IsErr()) // repeating tx doesn't raise error - ar = app.DeliverTx(req) - require.False(t, ar.IsErr(), ar) + ar = app.FinalizeBlock(req) + require.Equal(t, 1, len(ar.Txs)) + require.False(t, ar.Txs[0].IsErr()) // commit app.Commit() @@ -104,8 +106,7 @@ func TestPersistentKVStoreInfo(t *testing.T) { header := tmproto.Header{ Height: height, } - kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header}) - kvstore.EndBlock(types.RequestEndBlock{Height: header.Height}) + kvstore.FinalizeBlock(types.RequestFinalizeBlock{Hash: hash, Header: header, Height: height}) kvstore.Commit() resInfo = kvstore.Info(types.RequestInfo{}) @@ -194,16 +195,16 @@ func makeApplyBlock( Height: height, } - kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header}) - for _, tx := range txs { - if r := kvstore.DeliverTx(types.RequestDeliverTx{Tx: tx}); r.IsErr() { - t.Fatal(r) - } - } - resEndBlock := kvstore.EndBlock(types.RequestEndBlock{Height: header.Height}) + resFinalizeBlock := kvstore.FinalizeBlock(types.RequestFinalizeBlock{ + Hash: hash, + Header: header, + Height: height, + Txs: txs, + }) + kvstore.Commit() - valsEqual(t, diff, resEndBlock.ValidatorUpdates) + valsEqual(t, diff, resFinalizeBlock.ValidatorUpdates) } @@ -320,13 +321,15 @@ func runClientTests(ctx context.Context, t *testing.T, client abciclient.Client) } func testClient(ctx context.Context, t *testing.T, app abciclient.Client, tx []byte, key, value string) { - ar, err := app.DeliverTx(ctx, types.RequestDeliverTx{Tx: tx}) + ar, err := app.FinalizeBlock(ctx, types.RequestFinalizeBlock{Txs: [][]byte{tx}}) require.NoError(t, err) - require.False(t, ar.IsErr(), ar) - // repeating tx doesn't raise error - ar, err = app.DeliverTx(ctx, types.RequestDeliverTx{Tx: tx}) + require.Equal(t, 1, len(ar.Txs)) + require.False(t, ar.Txs[0].IsErr()) + // repeating FinalizeBlock doesn't raise error + ar, err = app.FinalizeBlock(ctx, types.RequestFinalizeBlock{Txs: [][]byte{tx}}) require.NoError(t, err) - require.False(t, ar.IsErr(), ar) + require.Equal(t, 1, len(ar.Txs)) + require.False(t, ar.Txs[0].IsErr()) // commit _, err = app.Commit(ctx) require.NoError(t, err) diff --git a/abci/example/kvstore/persistent_kvstore.go b/abci/example/kvstore/persistent_kvstore.go index be46665c8..830f93235 100644 --- a/abci/example/kvstore/persistent_kvstore.go +++ b/abci/example/kvstore/persistent_kvstore.go @@ -64,21 +64,21 @@ func (app *PersistentKVStoreApplication) Info(req types.RequestInfo) types.Respo } // tx is either "val:pubkey!power" or "key=value" or just arbitrary bytes -func (app *PersistentKVStoreApplication) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx { +func (app *PersistentKVStoreApplication) HandleTx(tx []byte) *types.ResponseDeliverTx { // if it starts with "val:", update the validator set // format is "val:pubkey!power" - if isValidatorTx(req.Tx) { + if isValidatorTx(tx) { // update validators in the merkle tree // and in app.ValUpdates - return app.execValidatorTx(req.Tx) + return app.execValidatorTx(tx) } - if isPrepareTx(req.Tx) { - return app.execPrepareTx(req.Tx) + if isPrepareTx(tx) { + return app.execPrepareTx(tx) } // otherwise, update the key-value store - return app.app.DeliverTx(req) + return app.app.HandleTx(tx) } func (app *PersistentKVStoreApplication) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx { @@ -121,7 +121,9 @@ func (app *PersistentKVStoreApplication) InitChain(req types.RequestInitChain) t } // Track the block hash and header information -func (app *PersistentKVStoreApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock { +// Execute transactions +// Update the validator set +func (app *PersistentKVStoreApplication) FinalizeBlock(req types.RequestFinalizeBlock) types.ResponseFinalizeBlock { // reset valset changes app.ValUpdates = make([]types.ValidatorUpdate, 0) @@ -143,12 +145,12 @@ func (app *PersistentKVStoreApplication) BeginBlock(req types.RequestBeginBlock) } } - return types.ResponseBeginBlock{} -} + respTxs := make([]*types.ResponseDeliverTx, len(req.Txs)) + for i, tx := range req.Txs { + respTxs[i] = app.HandleTx(tx) + } -// Update the validator set -func (app *PersistentKVStoreApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock { - return types.ResponseEndBlock{ValidatorUpdates: app.ValUpdates} + return types.ResponseFinalizeBlock{Txs: respTxs, ValidatorUpdates: app.ValUpdates} } func (app *PersistentKVStoreApplication) ListSnapshots( @@ -238,13 +240,13 @@ func isValidatorTx(tx []byte) bool { // format is "val:pubkey!power" // pubkey is a base64-encoded 32-byte ed25519 key -func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) types.ResponseDeliverTx { +func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) *types.ResponseDeliverTx { tx = tx[len(ValidatorSetChangePrefix):] // get the pubkey and power pubKeyAndPower := strings.Split(string(tx), "!") if len(pubKeyAndPower) != 2 { - return types.ResponseDeliverTx{ + return &types.ResponseDeliverTx{ Code: code.CodeTypeEncodingError, Log: fmt.Sprintf("Expected 'pubkey!power'. Got %v", pubKeyAndPower)} } @@ -253,7 +255,7 @@ func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) types.Respon // decode the pubkey pubkey, err := base64.StdEncoding.DecodeString(pubkeyS) if err != nil { - return types.ResponseDeliverTx{ + return &types.ResponseDeliverTx{ Code: code.CodeTypeEncodingError, Log: fmt.Sprintf("Pubkey (%s) is invalid base64", pubkeyS)} } @@ -261,7 +263,7 @@ func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) types.Respon // decode the power power, err := strconv.ParseInt(powerS, 10, 64) if err != nil { - return types.ResponseDeliverTx{ + return &types.ResponseDeliverTx{ Code: code.CodeTypeEncodingError, Log: fmt.Sprintf("Power (%s) is not an int", powerS)} } @@ -271,7 +273,7 @@ func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) types.Respon } // add, update, or remove a validator -func (app *PersistentKVStoreApplication) updateValidator(v types.ValidatorUpdate) types.ResponseDeliverTx { +func (app *PersistentKVStoreApplication) updateValidator(v types.ValidatorUpdate) *types.ResponseDeliverTx { pubkey, err := encoding.PubKeyFromProto(v.PubKey) if err != nil { panic(fmt.Errorf("can't decode public key: %w", err)) @@ -286,7 +288,7 @@ func (app *PersistentKVStoreApplication) updateValidator(v types.ValidatorUpdate } if !hasKey { pubStr := base64.StdEncoding.EncodeToString(pubkey.Bytes()) - return types.ResponseDeliverTx{ + return &types.ResponseDeliverTx{ Code: code.CodeTypeUnauthorized, Log: fmt.Sprintf("Cannot remove non-existent validator %s", pubStr)} } @@ -298,7 +300,7 @@ func (app *PersistentKVStoreApplication) updateValidator(v types.ValidatorUpdate // add or update validator value := bytes.NewBuffer(make([]byte, 0)) if err := types.WriteMessage(&v, value); err != nil { - return types.ResponseDeliverTx{ + return &types.ResponseDeliverTx{ Code: code.CodeTypeEncodingError, Log: fmt.Sprintf("error encoding validator: %v", err)} } @@ -311,7 +313,7 @@ func (app *PersistentKVStoreApplication) updateValidator(v types.ValidatorUpdate // we only update the changes array if we successfully updated the tree app.ValUpdates = append(app.ValUpdates, v) - return types.ResponseDeliverTx{Code: code.CodeTypeOK} + return &types.ResponseDeliverTx{Code: code.CodeTypeOK} } // ----------------------------- @@ -324,9 +326,9 @@ func isPrepareTx(tx []byte) bool { // execPrepareTx is noop. tx data is considered as placeholder // and is substitute at the PrepareProposal. -func (app *PersistentKVStoreApplication) execPrepareTx(tx []byte) types.ResponseDeliverTx { +func (app *PersistentKVStoreApplication) execPrepareTx(tx []byte) *types.ResponseDeliverTx { // noop - return types.ResponseDeliverTx{} + return &types.ResponseDeliverTx{} } // substPrepareTx subst all the preparetx in the blockdata diff --git a/abci/server/socket_server.go b/abci/server/socket_server.go index a548755c3..36ff4ef45 100644 --- a/abci/server/socket_server.go +++ b/abci/server/socket_server.go @@ -213,9 +213,6 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types case *types.Request_Info: res := s.app.Info(*r.Info) responses <- types.ToResponseInfo(res) - case *types.Request_DeliverTx: - res := s.app.DeliverTx(*r.DeliverTx) - responses <- types.ToResponseDeliverTx(res) case *types.Request_CheckTx: res := s.app.CheckTx(*r.CheckTx) responses <- types.ToResponseCheckTx(res) @@ -228,12 +225,6 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types case *types.Request_InitChain: res := s.app.InitChain(*r.InitChain) responses <- types.ToResponseInitChain(res) - case *types.Request_BeginBlock: - res := s.app.BeginBlock(*r.BeginBlock) - responses <- types.ToResponseBeginBlock(res) - case *types.Request_EndBlock: - res := s.app.EndBlock(*r.EndBlock) - responses <- types.ToResponseEndBlock(res) case *types.Request_ListSnapshots: res := s.app.ListSnapshots(*r.ListSnapshots) responses <- types.ToResponseListSnapshots(res) @@ -258,6 +249,9 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types case *types.Request_VerifyVoteExtension: res := s.app.VerifyVoteExtension(*r.VerifyVoteExtension) responses <- types.ToResponseVerifyVoteExtension(res) + case *types.Request_FinalizeBlock: + res := s.app.FinalizeBlock(*r.FinalizeBlock) + responses <- types.ToResponseFinalizeBlock(res) default: responses <- types.ToResponseException("Unknown request") } diff --git a/abci/tests/server/client.go b/abci/tests/server/client.go index 2b2d57961..4bdaf5b0e 100644 --- a/abci/tests/server/client.go +++ b/abci/tests/server/client.go @@ -49,22 +49,24 @@ func Commit(ctx context.Context, client abciclient.Client, hashExp []byte) error return nil } -func DeliverTx(ctx context.Context, client abciclient.Client, txBytes []byte, codeExp uint32, dataExp []byte) error { - res, _ := client.DeliverTx(ctx, types.RequestDeliverTx{Tx: txBytes}) - code, data, log := res.Code, res.Data, res.Log - if code != codeExp { - fmt.Println("Failed test: DeliverTx") - fmt.Printf("DeliverTx response code was unexpected. Got %v expected %v. Log: %v\n", - code, codeExp, log) - return errors.New("deliverTx error") - } - if !bytes.Equal(data, dataExp) { - fmt.Println("Failed test: DeliverTx") - fmt.Printf("DeliverTx response data was unexpected. Got %X expected %X\n", - data, dataExp) - return errors.New("deliverTx error") +func FinalizeBlock(ctx context.Context, client abciclient.Client, txBytes [][]byte, codeExp []uint32, dataExp []byte) error { + res, _ := client.FinalizeBlock(ctx, types.RequestFinalizeBlock{Txs: txBytes}) + for i, tx := range res.Txs { + code, data, log := tx.Code, tx.Data, tx.Log + if code != codeExp[i] { + fmt.Println("Failed test: FinalizeBlock") + fmt.Printf("FinalizeBlock response code was unexpected. Got %v expected %v. Log: %v\n", + code, codeExp, log) + return errors.New("FinalizeBlock error") + } + if !bytes.Equal(data, dataExp) { + fmt.Println("Failed test: FinalizeBlock") + fmt.Printf("FinalizeBlock response data was unexpected. Got %X expected %X\n", + data, dataExp) + return errors.New("FinalizeBlock error") + } } - fmt.Println("Passed test: DeliverTx") + fmt.Println("Passed test: FinalizeBlock") return nil } diff --git a/abci/types/application.go b/abci/types/application.go index 98848bb1e..16ae03546 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -20,18 +20,14 @@ type Application interface { InitChain(RequestInitChain) ResponseInitChain // Initialize blockchain w validators/other info from TendermintCore PrepareProposal(RequestPrepareProposal) ResponsePrepareProposal ProcessProposal(RequestProcessProposal) ResponseProcessProposal - // Signals the beginning of a block - BeginBlock(RequestBeginBlock) ResponseBeginBlock - // Deliver a tx for full processing - DeliverTx(RequestDeliverTx) ResponseDeliverTx - // Signals the end of a block, returns changes to the validator set - EndBlock(RequestEndBlock) ResponseEndBlock // Commit the state and return the application Merkle root hash Commit() ResponseCommit // Create application specific vote extension ExtendVote(RequestExtendVote) ResponseExtendVote // Verify application's vote extension data VerifyVoteExtension(RequestVerifyVoteExtension) ResponseVerifyVoteExtension + // Deliver the decided block with its txs to the Application + FinalizeBlock(RequestFinalizeBlock) ResponseFinalizeBlock // State Sync Connection ListSnapshots(RequestListSnapshots) ResponseListSnapshots // List available snapshots @@ -56,10 +52,6 @@ func (BaseApplication) Info(req RequestInfo) ResponseInfo { return ResponseInfo{} } -func (BaseApplication) DeliverTx(req RequestDeliverTx) ResponseDeliverTx { - return ResponseDeliverTx{Code: CodeTypeOK} -} - func (BaseApplication) CheckTx(req RequestCheckTx) ResponseCheckTx { return ResponseCheckTx{Code: CodeTypeOK} } @@ -86,14 +78,6 @@ func (BaseApplication) InitChain(req RequestInitChain) ResponseInitChain { return ResponseInitChain{} } -func (BaseApplication) BeginBlock(req RequestBeginBlock) ResponseBeginBlock { - return ResponseBeginBlock{} -} - -func (BaseApplication) EndBlock(req RequestEndBlock) ResponseEndBlock { - return ResponseEndBlock{} -} - func (BaseApplication) ListSnapshots(req RequestListSnapshots) ResponseListSnapshots { return ResponseListSnapshots{} } @@ -118,6 +102,16 @@ func (BaseApplication) ProcessProposal(req RequestProcessProposal) ResponseProce return ResponseProcessProposal{} } +func (BaseApplication) FinalizeBlock(req RequestFinalizeBlock) ResponseFinalizeBlock { + txs := make([]*ResponseDeliverTx, len(req.Txs)) + for i := range req.Txs { + txs[i] = &ResponseDeliverTx{Code: CodeTypeOK} + } + return ResponseFinalizeBlock{ + Txs: txs, + } +} + //------------------------------------------------------- // GRPCApplication is a GRPC wrapper for Application @@ -142,11 +136,6 @@ func (app *GRPCApplication) Info(ctx context.Context, req *RequestInfo) (*Respon return &res, nil } -func (app *GRPCApplication) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) { - res := app.app.DeliverTx(*req) - return &res, nil -} - func (app *GRPCApplication) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) { res := app.app.CheckTx(*req) return &res, nil @@ -167,16 +156,6 @@ func (app *GRPCApplication) InitChain(ctx context.Context, req *RequestInitChain return &res, nil } -func (app *GRPCApplication) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) { - res := app.app.BeginBlock(*req) - return &res, nil -} - -func (app *GRPCApplication) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) { - res := app.app.EndBlock(*req) - return &res, nil -} - func (app *GRPCApplication) ListSnapshots( ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) { res := app.app.ListSnapshots(*req) @@ -224,3 +203,9 @@ func (app *GRPCApplication) ProcessProposal( res := app.app.ProcessProposal(*req) return &res, nil } + +func (app *GRPCApplication) FinalizeBlock( + ctx context.Context, req *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) { + res := app.app.FinalizeBlock(*req) + return &res, nil +} diff --git a/abci/types/messages.go b/abci/types/messages.go index 90cbfcc22..74d9b9d1a 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -4,6 +4,7 @@ import ( "io" "github.com/gogo/protobuf/proto" + "github.com/tendermint/tendermint/internal/libs/protoio" ) @@ -44,12 +45,6 @@ func ToRequestInfo(req RequestInfo) *Request { } } -func ToRequestDeliverTx(req RequestDeliverTx) *Request { - return &Request{ - Value: &Request_DeliverTx{&req}, - } -} - func ToRequestCheckTx(req RequestCheckTx) *Request { return &Request{ Value: &Request_CheckTx{&req}, @@ -74,18 +69,6 @@ func ToRequestInitChain(req RequestInitChain) *Request { } } -func ToRequestBeginBlock(req RequestBeginBlock) *Request { - return &Request{ - Value: &Request_BeginBlock{&req}, - } -} - -func ToRequestEndBlock(req RequestEndBlock) *Request { - return &Request{ - Value: &Request_EndBlock{&req}, - } -} - func ToRequestListSnapshots(req RequestListSnapshots) *Request { return &Request{ Value: &Request_ListSnapshots{&req}, @@ -134,6 +117,12 @@ func ToRequestProcessProposal(req RequestProcessProposal) *Request { } } +func ToRequestFinalizeBlock(req RequestFinalizeBlock) *Request { + return &Request{ + Value: &Request_FinalizeBlock{&req}, + } +} + //---------------------------------------- func ToResponseException(errStr string) *Response { @@ -159,11 +148,6 @@ func ToResponseInfo(res ResponseInfo) *Response { Value: &Response_Info{&res}, } } -func ToResponseDeliverTx(res ResponseDeliverTx) *Response { - return &Response{ - Value: &Response_DeliverTx{&res}, - } -} func ToResponseCheckTx(res ResponseCheckTx) *Response { return &Response{ @@ -189,18 +173,6 @@ func ToResponseInitChain(res ResponseInitChain) *Response { } } -func ToResponseBeginBlock(res ResponseBeginBlock) *Response { - return &Response{ - Value: &Response_BeginBlock{&res}, - } -} - -func ToResponseEndBlock(res ResponseEndBlock) *Response { - return &Response{ - Value: &Response_EndBlock{&res}, - } -} - func ToResponseListSnapshots(res ResponseListSnapshots) *Response { return &Response{ Value: &Response_ListSnapshots{&res}, @@ -248,3 +220,9 @@ func ToResponseProcessProposal(res ResponseProcessProposal) *Response { Value: &Response_ProcessProposal{&res}, } } + +func ToResponseFinalizeBlock(res ResponseFinalizeBlock) *Response { + return &Response{ + Value: &Response_FinalizeBlock{&res}, + } +} diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 25f814ba6..bff30eb9c 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -120,7 +120,7 @@ func (x ResponseOfferSnapshot_Result) String() string { } func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{32, 0} + return fileDescriptor_252557cfdd89a31a, []int{28, 0} } type ResponseApplySnapshotChunk_Result int32 @@ -157,7 +157,7 @@ func (x ResponseApplySnapshotChunk_Result) String() string { } func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{34, 0} + return fileDescriptor_252557cfdd89a31a, []int{30, 0} } type ResponseVerifyVoteExtension_Result int32 @@ -188,7 +188,7 @@ func (x ResponseVerifyVoteExtension_Result) String() string { } func (ResponseVerifyVoteExtension_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{37, 0} + return fileDescriptor_252557cfdd89a31a, []int{33, 0} } type ResponseProcessProposal_Result int32 @@ -216,7 +216,7 @@ func (x ResponseProcessProposal_Result) String() string { } func (ResponseProcessProposal_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{38, 0} + return fileDescriptor_252557cfdd89a31a, []int{34, 0} } type Request struct { @@ -226,10 +226,7 @@ type Request struct { // *Request_Info // *Request_InitChain // *Request_Query - // *Request_BeginBlock // *Request_CheckTx - // *Request_DeliverTx - // *Request_EndBlock // *Request_Commit // *Request_ListSnapshots // *Request_OfferSnapshot @@ -239,6 +236,7 @@ type Request struct { // *Request_ProcessProposal // *Request_ExtendVote // *Request_VerifyVoteExtension + // *Request_FinalizeBlock Value isRequest_Value `protobuf_oneof:"value"` } @@ -296,18 +294,9 @@ type Request_InitChain struct { type Request_Query struct { Query *RequestQuery `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"` } -type Request_BeginBlock struct { - BeginBlock *RequestBeginBlock `protobuf:"bytes,6,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"` -} type Request_CheckTx struct { CheckTx *RequestCheckTx `protobuf:"bytes,7,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"` } -type Request_DeliverTx struct { - DeliverTx *RequestDeliverTx `protobuf:"bytes,8,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"` -} -type Request_EndBlock struct { - EndBlock *RequestEndBlock `protobuf:"bytes,9,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"` -} type Request_Commit struct { Commit *RequestCommit `protobuf:"bytes,10,opt,name=commit,proto3,oneof" json:"commit,omitempty"` } @@ -335,16 +324,16 @@ type Request_ExtendVote struct { type Request_VerifyVoteExtension struct { VerifyVoteExtension *RequestVerifyVoteExtension `protobuf:"bytes,18,opt,name=verify_vote_extension,json=verifyVoteExtension,proto3,oneof" json:"verify_vote_extension,omitempty"` } +type Request_FinalizeBlock struct { + FinalizeBlock *RequestFinalizeBlock `protobuf:"bytes,19,opt,name=finalize_block,json=finalizeBlock,proto3,oneof" json:"finalize_block,omitempty"` +} func (*Request_Echo) isRequest_Value() {} func (*Request_Flush) isRequest_Value() {} func (*Request_Info) isRequest_Value() {} func (*Request_InitChain) isRequest_Value() {} func (*Request_Query) isRequest_Value() {} -func (*Request_BeginBlock) isRequest_Value() {} func (*Request_CheckTx) isRequest_Value() {} -func (*Request_DeliverTx) isRequest_Value() {} -func (*Request_EndBlock) isRequest_Value() {} func (*Request_Commit) isRequest_Value() {} func (*Request_ListSnapshots) isRequest_Value() {} func (*Request_OfferSnapshot) isRequest_Value() {} @@ -354,6 +343,7 @@ func (*Request_PrepareProposal) isRequest_Value() {} func (*Request_ProcessProposal) isRequest_Value() {} func (*Request_ExtendVote) isRequest_Value() {} func (*Request_VerifyVoteExtension) isRequest_Value() {} +func (*Request_FinalizeBlock) isRequest_Value() {} func (m *Request) GetValue() isRequest_Value { if m != nil { @@ -397,13 +387,6 @@ func (m *Request) GetQuery() *RequestQuery { return nil } -func (m *Request) GetBeginBlock() *RequestBeginBlock { - if x, ok := m.GetValue().(*Request_BeginBlock); ok { - return x.BeginBlock - } - return nil -} - func (m *Request) GetCheckTx() *RequestCheckTx { if x, ok := m.GetValue().(*Request_CheckTx); ok { return x.CheckTx @@ -411,20 +394,6 @@ func (m *Request) GetCheckTx() *RequestCheckTx { return nil } -func (m *Request) GetDeliverTx() *RequestDeliverTx { - if x, ok := m.GetValue().(*Request_DeliverTx); ok { - return x.DeliverTx - } - return nil -} - -func (m *Request) GetEndBlock() *RequestEndBlock { - if x, ok := m.GetValue().(*Request_EndBlock); ok { - return x.EndBlock - } - return nil -} - func (m *Request) GetCommit() *RequestCommit { if x, ok := m.GetValue().(*Request_Commit); ok { return x.Commit @@ -488,6 +457,13 @@ func (m *Request) GetVerifyVoteExtension() *RequestVerifyVoteExtension { return nil } +func (m *Request) GetFinalizeBlock() *RequestFinalizeBlock { + if x, ok := m.GetValue().(*Request_FinalizeBlock); ok { + return x.FinalizeBlock + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Request) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -496,10 +472,7 @@ func (*Request) XXX_OneofWrappers() []interface{} { (*Request_Info)(nil), (*Request_InitChain)(nil), (*Request_Query)(nil), - (*Request_BeginBlock)(nil), (*Request_CheckTx)(nil), - (*Request_DeliverTx)(nil), - (*Request_EndBlock)(nil), (*Request_Commit)(nil), (*Request_ListSnapshots)(nil), (*Request_OfferSnapshot)(nil), @@ -509,6 +482,7 @@ func (*Request) XXX_OneofWrappers() []interface{} { (*Request_ProcessProposal)(nil), (*Request_ExtendVote)(nil), (*Request_VerifyVoteExtension)(nil), + (*Request_FinalizeBlock)(nil), } } @@ -812,74 +786,6 @@ func (m *RequestQuery) GetProve() bool { return false } -type RequestBeginBlock struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` - LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"` - ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` -} - -func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } -func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) } -func (*RequestBeginBlock) ProtoMessage() {} -func (*RequestBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{6} -} -func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestBeginBlock.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 *RequestBeginBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestBeginBlock.Merge(m, src) -} -func (m *RequestBeginBlock) XXX_Size() int { - return m.Size() -} -func (m *RequestBeginBlock) XXX_DiscardUnknown() { - xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo - -func (m *RequestBeginBlock) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *RequestBeginBlock) GetHeader() types1.Header { - if m != nil { - return m.Header - } - return types1.Header{} -} - -func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo { - if m != nil { - return m.LastCommitInfo - } - return LastCommitInfo{} -} - -func (m *RequestBeginBlock) GetByzantineValidators() []Evidence { - if m != nil { - return m.ByzantineValidators - } - return nil -} - type RequestCheckTx struct { Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` Type CheckTxType `protobuf:"varint,2,opt,name=type,proto3,enum=tendermint.abci.CheckTxType" json:"type,omitempty"` @@ -889,7 +795,7 @@ func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} } func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) } func (*RequestCheckTx) ProtoMessage() {} func (*RequestCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{7} + return fileDescriptor_252557cfdd89a31a, []int{6} } func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -932,94 +838,6 @@ func (m *RequestCheckTx) GetType() CheckTxType { return CheckTxType_New } -type RequestDeliverTx struct { - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} } -func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) } -func (*RequestDeliverTx) ProtoMessage() {} -func (*RequestDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{8} -} -func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestDeliverTx.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 *RequestDeliverTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestDeliverTx.Merge(m, src) -} -func (m *RequestDeliverTx) XXX_Size() int { - return m.Size() -} -func (m *RequestDeliverTx) XXX_DiscardUnknown() { - xxx_messageInfo_RequestDeliverTx.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo - -func (m *RequestDeliverTx) GetTx() []byte { - if m != nil { - return m.Tx - } - return nil -} - -type RequestEndBlock struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} } -func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) } -func (*RequestEndBlock) ProtoMessage() {} -func (*RequestEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{9} -} -func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestEndBlock.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 *RequestEndBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestEndBlock.Merge(m, src) -} -func (m *RequestEndBlock) XXX_Size() int { - return m.Size() -} -func (m *RequestEndBlock) XXX_DiscardUnknown() { - xxx_messageInfo_RequestEndBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo - -func (m *RequestEndBlock) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - type RequestCommit struct { } @@ -1027,7 +845,7 @@ func (m *RequestCommit) Reset() { *m = RequestCommit{} } func (m *RequestCommit) String() string { return proto.CompactTextString(m) } func (*RequestCommit) ProtoMessage() {} func (*RequestCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{10} + return fileDescriptor_252557cfdd89a31a, []int{7} } func (m *RequestCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1064,7 +882,7 @@ func (m *RequestListSnapshots) Reset() { *m = RequestListSnapshots{} } func (m *RequestListSnapshots) String() string { return proto.CompactTextString(m) } func (*RequestListSnapshots) ProtoMessage() {} func (*RequestListSnapshots) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{11} + return fileDescriptor_252557cfdd89a31a, []int{8} } func (m *RequestListSnapshots) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1103,7 +921,7 @@ func (m *RequestOfferSnapshot) Reset() { *m = RequestOfferSnapshot{} } func (m *RequestOfferSnapshot) String() string { return proto.CompactTextString(m) } func (*RequestOfferSnapshot) ProtoMessage() {} func (*RequestOfferSnapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{12} + return fileDescriptor_252557cfdd89a31a, []int{9} } func (m *RequestOfferSnapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1157,7 +975,7 @@ func (m *RequestLoadSnapshotChunk) Reset() { *m = RequestLoadSnapshotChu func (m *RequestLoadSnapshotChunk) String() string { return proto.CompactTextString(m) } func (*RequestLoadSnapshotChunk) ProtoMessage() {} func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{13} + return fileDescriptor_252557cfdd89a31a, []int{10} } func (m *RequestLoadSnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1218,7 +1036,7 @@ func (m *RequestApplySnapshotChunk) Reset() { *m = RequestApplySnapshotC func (m *RequestApplySnapshotChunk) String() string { return proto.CompactTextString(m) } func (*RequestApplySnapshotChunk) ProtoMessage() {} func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{14} + return fileDescriptor_252557cfdd89a31a, []int{11} } func (m *RequestApplySnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1281,7 +1099,7 @@ func (m *RequestPrepareProposal) Reset() { *m = RequestPrepareProposal{} func (m *RequestPrepareProposal) String() string { return proto.CompactTextString(m) } func (*RequestPrepareProposal) ProtoMessage() {} func (*RequestPrepareProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{15} + return fileDescriptor_252557cfdd89a31a, []int{12} } func (m *RequestPrepareProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1333,7 +1151,7 @@ func (m *RequestExtendVote) Reset() { *m = RequestExtendVote{} } func (m *RequestExtendVote) String() string { return proto.CompactTextString(m) } func (*RequestExtendVote) ProtoMessage() {} func (*RequestExtendVote) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{16} + return fileDescriptor_252557cfdd89a31a, []int{13} } func (m *RequestExtendVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1378,7 +1196,7 @@ func (m *RequestVerifyVoteExtension) Reset() { *m = RequestVerifyVoteExt func (m *RequestVerifyVoteExtension) String() string { return proto.CompactTextString(m) } func (*RequestVerifyVoteExtension) ProtoMessage() {} func (*RequestVerifyVoteExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{17} + return fileDescriptor_252557cfdd89a31a, []int{14} } func (m *RequestVerifyVoteExtension) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1423,7 +1241,7 @@ func (m *RequestProcessProposal) Reset() { *m = RequestProcessProposal{} func (m *RequestProcessProposal) String() string { return proto.CompactTextString(m) } func (*RequestProcessProposal) ProtoMessage() {} func (*RequestProcessProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{18} + return fileDescriptor_252557cfdd89a31a, []int{15} } func (m *RequestProcessProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1466,6 +1284,90 @@ func (m *RequestProcessProposal) GetTxs() [][]byte { return nil } +type RequestFinalizeBlock struct { + Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Header types1.Header `protobuf:"bytes,4,opt,name=header,proto3" json:"header"` + LastCommitInfo LastCommitInfo `protobuf:"bytes,5,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"` + ByzantineValidators []Evidence `protobuf:"bytes,6,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` +} + +func (m *RequestFinalizeBlock) Reset() { *m = RequestFinalizeBlock{} } +func (m *RequestFinalizeBlock) String() string { return proto.CompactTextString(m) } +func (*RequestFinalizeBlock) ProtoMessage() {} +func (*RequestFinalizeBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{16} +} +func (m *RequestFinalizeBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestFinalizeBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestFinalizeBlock.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 *RequestFinalizeBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestFinalizeBlock.Merge(m, src) +} +func (m *RequestFinalizeBlock) XXX_Size() int { + return m.Size() +} +func (m *RequestFinalizeBlock) XXX_DiscardUnknown() { + xxx_messageInfo_RequestFinalizeBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestFinalizeBlock proto.InternalMessageInfo + +func (m *RequestFinalizeBlock) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *RequestFinalizeBlock) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *RequestFinalizeBlock) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *RequestFinalizeBlock) GetHeader() types1.Header { + if m != nil { + return m.Header + } + return types1.Header{} +} + +func (m *RequestFinalizeBlock) GetLastCommitInfo() LastCommitInfo { + if m != nil { + return m.LastCommitInfo + } + return LastCommitInfo{} +} + +func (m *RequestFinalizeBlock) GetByzantineValidators() []Evidence { + if m != nil { + return m.ByzantineValidators + } + return nil +} + type Response struct { // Types that are valid to be assigned to Value: // *Response_Exception @@ -1474,10 +1376,7 @@ type Response struct { // *Response_Info // *Response_InitChain // *Response_Query - // *Response_BeginBlock // *Response_CheckTx - // *Response_DeliverTx - // *Response_EndBlock // *Response_Commit // *Response_ListSnapshots // *Response_OfferSnapshot @@ -1487,6 +1386,7 @@ type Response struct { // *Response_ProcessProposal // *Response_ExtendVote // *Response_VerifyVoteExtension + // *Response_FinalizeBlock Value isResponse_Value `protobuf_oneof:"value"` } @@ -1494,7 +1394,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{19} + return fileDescriptor_252557cfdd89a31a, []int{17} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1547,18 +1447,9 @@ type Response_InitChain struct { type Response_Query struct { Query *ResponseQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"` } -type Response_BeginBlock struct { - BeginBlock *ResponseBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"` -} type Response_CheckTx struct { CheckTx *ResponseCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"` } -type Response_DeliverTx struct { - DeliverTx *ResponseDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"` -} -type Response_EndBlock struct { - EndBlock *ResponseEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"` -} type Response_Commit struct { Commit *ResponseCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"` } @@ -1586,6 +1477,9 @@ type Response_ExtendVote struct { type Response_VerifyVoteExtension struct { VerifyVoteExtension *ResponseVerifyVoteExtension `protobuf:"bytes,19,opt,name=verify_vote_extension,json=verifyVoteExtension,proto3,oneof" json:"verify_vote_extension,omitempty"` } +type Response_FinalizeBlock struct { + FinalizeBlock *ResponseFinalizeBlock `protobuf:"bytes,20,opt,name=finalize_block,json=finalizeBlock,proto3,oneof" json:"finalize_block,omitempty"` +} func (*Response_Exception) isResponse_Value() {} func (*Response_Echo) isResponse_Value() {} @@ -1593,10 +1487,7 @@ func (*Response_Flush) isResponse_Value() {} func (*Response_Info) isResponse_Value() {} func (*Response_InitChain) isResponse_Value() {} func (*Response_Query) isResponse_Value() {} -func (*Response_BeginBlock) isResponse_Value() {} func (*Response_CheckTx) isResponse_Value() {} -func (*Response_DeliverTx) isResponse_Value() {} -func (*Response_EndBlock) isResponse_Value() {} func (*Response_Commit) isResponse_Value() {} func (*Response_ListSnapshots) isResponse_Value() {} func (*Response_OfferSnapshot) isResponse_Value() {} @@ -1606,6 +1497,7 @@ func (*Response_PrepareProposal) isResponse_Value() {} func (*Response_ProcessProposal) isResponse_Value() {} func (*Response_ExtendVote) isResponse_Value() {} func (*Response_VerifyVoteExtension) isResponse_Value() {} +func (*Response_FinalizeBlock) isResponse_Value() {} func (m *Response) GetValue() isResponse_Value { if m != nil { @@ -1656,13 +1548,6 @@ func (m *Response) GetQuery() *ResponseQuery { return nil } -func (m *Response) GetBeginBlock() *ResponseBeginBlock { - if x, ok := m.GetValue().(*Response_BeginBlock); ok { - return x.BeginBlock - } - return nil -} - func (m *Response) GetCheckTx() *ResponseCheckTx { if x, ok := m.GetValue().(*Response_CheckTx); ok { return x.CheckTx @@ -1670,20 +1555,6 @@ func (m *Response) GetCheckTx() *ResponseCheckTx { return nil } -func (m *Response) GetDeliverTx() *ResponseDeliverTx { - if x, ok := m.GetValue().(*Response_DeliverTx); ok { - return x.DeliverTx - } - return nil -} - -func (m *Response) GetEndBlock() *ResponseEndBlock { - if x, ok := m.GetValue().(*Response_EndBlock); ok { - return x.EndBlock - } - return nil -} - func (m *Response) GetCommit() *ResponseCommit { if x, ok := m.GetValue().(*Response_Commit); ok { return x.Commit @@ -1747,6 +1618,13 @@ func (m *Response) GetVerifyVoteExtension() *ResponseVerifyVoteExtension { return nil } +func (m *Response) GetFinalizeBlock() *ResponseFinalizeBlock { + if x, ok := m.GetValue().(*Response_FinalizeBlock); ok { + return x.FinalizeBlock + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Response) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1756,10 +1634,7 @@ func (*Response) XXX_OneofWrappers() []interface{} { (*Response_Info)(nil), (*Response_InitChain)(nil), (*Response_Query)(nil), - (*Response_BeginBlock)(nil), (*Response_CheckTx)(nil), - (*Response_DeliverTx)(nil), - (*Response_EndBlock)(nil), (*Response_Commit)(nil), (*Response_ListSnapshots)(nil), (*Response_OfferSnapshot)(nil), @@ -1769,6 +1644,7 @@ func (*Response) XXX_OneofWrappers() []interface{} { (*Response_ProcessProposal)(nil), (*Response_ExtendVote)(nil), (*Response_VerifyVoteExtension)(nil), + (*Response_FinalizeBlock)(nil), } } @@ -1781,7 +1657,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{20} + return fileDescriptor_252557cfdd89a31a, []int{18} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1825,7 +1701,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{21} + return fileDescriptor_252557cfdd89a31a, []int{19} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1868,7 +1744,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{22} + return fileDescriptor_252557cfdd89a31a, []int{20} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1910,7 +1786,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{23} + return fileDescriptor_252557cfdd89a31a, []int{21} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1984,7 +1860,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{24} + return fileDescriptor_252557cfdd89a31a, []int{22} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2051,7 +1927,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{25} + return fileDescriptor_252557cfdd89a31a, []int{23} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2143,71 +2019,27 @@ func (m *ResponseQuery) GetCodespace() string { return "" } -type ResponseBeginBlock struct { - Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` +type ResponseCheckTx struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` + Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` + Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` + Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"` + Priority int64 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` + // mempool_error is set by Tendermint. + // ABCI applications creating a ResponseCheckTX should not set mempool_error. + MempoolError string `protobuf:"bytes,11,opt,name=mempool_error,json=mempoolError,proto3" json:"mempool_error,omitempty"` } -func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} } -func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) } -func (*ResponseBeginBlock) ProtoMessage() {} -func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{26} -} -func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseBeginBlock.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 *ResponseBeginBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseBeginBlock.Merge(m, src) -} -func (m *ResponseBeginBlock) XXX_Size() int { - return m.Size() -} -func (m *ResponseBeginBlock) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo - -func (m *ResponseBeginBlock) GetEvents() []Event { - if m != nil { - return m.Events - } - return nil -} - -type ResponseCheckTx struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` - Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` - Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"` - Priority int64 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` - // mempool_error is set by Tendermint. - // ABCI applications creating a ResponseCheckTX should not set mempool_error. - MempoolError string `protobuf:"bytes,11,opt,name=mempool_error,json=mempoolError,proto3" json:"mempool_error,omitempty"` -} - -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{27} +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} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2328,7 +2160,7 @@ func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} } func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) } func (*ResponseDeliverTx) ProtoMessage() {} func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{28} + return fileDescriptor_252557cfdd89a31a, []int{25} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2413,66 +2245,6 @@ func (m *ResponseDeliverTx) GetCodespace() string { return "" } -type ResponseEndBlock struct { - ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"` - ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` - Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` -} - -func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} } -func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) } -func (*ResponseEndBlock) ProtoMessage() {} -func (*ResponseEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{29} -} -func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseEndBlock.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 *ResponseEndBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseEndBlock.Merge(m, src) -} -func (m *ResponseEndBlock) XXX_Size() int { - return m.Size() -} -func (m *ResponseEndBlock) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo - -func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate { - if m != nil { - return m.ValidatorUpdates - } - return nil -} - -func (m *ResponseEndBlock) GetConsensusParamUpdates() *types1.ConsensusParams { - if m != nil { - return m.ConsensusParamUpdates - } - return nil -} - -func (m *ResponseEndBlock) GetEvents() []Event { - if m != nil { - return m.Events - } - return nil -} - type ResponseCommit struct { // reserve 1 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` @@ -2483,7 +2255,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{30} + return fileDescriptor_252557cfdd89a31a, []int{26} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2534,7 +2306,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{31} + return fileDescriptor_252557cfdd89a31a, []int{27} } func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2578,7 +2350,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{32} + return fileDescriptor_252557cfdd89a31a, []int{28} } func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2622,7 +2394,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{33} + return fileDescriptor_252557cfdd89a31a, []int{29} } func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2668,7 +2440,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{34} + return fileDescriptor_252557cfdd89a31a, []int{30} } func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2726,7 +2498,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{35} + return fileDescriptor_252557cfdd89a31a, []int{31} } func (m *ResponsePrepareProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2770,7 +2542,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{36} + return fileDescriptor_252557cfdd89a31a, []int{32} } func (m *ResponseExtendVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2814,7 +2586,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{37} + return fileDescriptor_252557cfdd89a31a, []int{33} } func (m *ResponseVerifyVoteExtension) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2859,7 +2631,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{38} + return fileDescriptor_252557cfdd89a31a, []int{34} } func (m *ResponseProcessProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2902,6 +2674,74 @@ func (m *ResponseProcessProposal) GetEvidence() [][]byte { return nil } +type ResponseFinalizeBlock struct { + Txs []*ResponseDeliverTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,2,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"` + ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,3,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` + Events []Event `protobuf:"bytes,4,rep,name=events,proto3" json:"events,omitempty"` +} + +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{35} +} +func (m *ResponseFinalizeBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseFinalizeBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseFinalizeBlock.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 *ResponseFinalizeBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseFinalizeBlock.Merge(m, src) +} +func (m *ResponseFinalizeBlock) XXX_Size() int { + return m.Size() +} +func (m *ResponseFinalizeBlock) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseFinalizeBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseFinalizeBlock proto.InternalMessageInfo + +func (m *ResponseFinalizeBlock) GetTxs() []*ResponseDeliverTx { + if m != nil { + return m.Txs + } + return nil +} + +func (m *ResponseFinalizeBlock) GetValidatorUpdates() []ValidatorUpdate { + if m != nil { + return m.ValidatorUpdates + } + return nil +} + +func (m *ResponseFinalizeBlock) GetConsensusParamUpdates() *types1.ConsensusParams { + if m != nil { + return m.ConsensusParamUpdates + } + return nil +} + +func (m *ResponseFinalizeBlock) GetEvents() []Event { + if m != nil { + return m.Events + } + return nil +} + type LastCommitInfo struct { Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"` @@ -2911,7 +2751,7 @@ func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} } func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) } func (*LastCommitInfo) ProtoMessage() {} func (*LastCommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{39} + return fileDescriptor_252557cfdd89a31a, []int{36} } func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2966,7 +2806,7 @@ func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{40} + return fileDescriptor_252557cfdd89a31a, []int{37} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3020,7 +2860,7 @@ func (m *EventAttribute) Reset() { *m = EventAttribute{} } func (m *EventAttribute) String() string { return proto.CompactTextString(m) } func (*EventAttribute) ProtoMessage() {} func (*EventAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{41} + return fileDescriptor_252557cfdd89a31a, []int{38} } func (m *EventAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3084,7 +2924,7 @@ func (m *TxResult) Reset() { *m = TxResult{} } func (m *TxResult) String() string { return proto.CompactTextString(m) } func (*TxResult) ProtoMessage() {} func (*TxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{42} + return fileDescriptor_252557cfdd89a31a, []int{39} } func (m *TxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3152,7 +2992,7 @@ func (m *Validator) Reset() { *m = Validator{} } func (m *Validator) String() string { return proto.CompactTextString(m) } func (*Validator) ProtoMessage() {} func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{43} + return fileDescriptor_252557cfdd89a31a, []int{40} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3205,7 +3045,7 @@ func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} } func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) } func (*ValidatorUpdate) ProtoMessage() {} func (*ValidatorUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{44} + return fileDescriptor_252557cfdd89a31a, []int{41} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3258,7 +3098,7 @@ func (m *VoteInfo) Reset() { *m = VoteInfo{} } func (m *VoteInfo) String() string { return proto.CompactTextString(m) } func (*VoteInfo) ProtoMessage() {} func (*VoteInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{45} + return fileDescriptor_252557cfdd89a31a, []int{42} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3319,7 +3159,7 @@ func (m *Evidence) Reset() { *m = Evidence{} } func (m *Evidence) String() string { return proto.CompactTextString(m) } func (*Evidence) ProtoMessage() {} func (*Evidence) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{46} + return fileDescriptor_252557cfdd89a31a, []int{43} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3395,7 +3235,7 @@ func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{47} + return fileDescriptor_252557cfdd89a31a, []int{44} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3472,10 +3312,7 @@ func init() { proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo") proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain") proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery") - proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock") proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx") - proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx") - proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock") proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit") proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots") proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot") @@ -3485,6 +3322,7 @@ func init() { proto.RegisterType((*RequestExtendVote)(nil), "tendermint.abci.RequestExtendVote") proto.RegisterType((*RequestVerifyVoteExtension)(nil), "tendermint.abci.RequestVerifyVoteExtension") proto.RegisterType((*RequestProcessProposal)(nil), "tendermint.abci.RequestProcessProposal") + proto.RegisterType((*RequestFinalizeBlock)(nil), "tendermint.abci.RequestFinalizeBlock") proto.RegisterType((*Response)(nil), "tendermint.abci.Response") proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException") proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho") @@ -3492,10 +3330,8 @@ func init() { proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo") proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain") proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery") - proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock") proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx") proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx") - proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock") proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit") proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots") proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot") @@ -3505,6 +3341,7 @@ func init() { proto.RegisterType((*ResponseExtendVote)(nil), "tendermint.abci.ResponseExtendVote") proto.RegisterType((*ResponseVerifyVoteExtension)(nil), "tendermint.abci.ResponseVerifyVoteExtension") proto.RegisterType((*ResponseProcessProposal)(nil), "tendermint.abci.ResponseProcessProposal") + proto.RegisterType((*ResponseFinalizeBlock)(nil), "tendermint.abci.ResponseFinalizeBlock") proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo") proto.RegisterType((*Event)(nil), "tendermint.abci.Event") proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute") @@ -3519,197 +3356,191 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3029 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xcd, 0x73, 0x23, 0xd5, - 0xb5, 0xd7, 0xa7, 0x2d, 0x1d, 0xeb, 0xcb, 0xd7, 0xc3, 0x20, 0x9a, 0x19, 0x7b, 0xe8, 0x29, 0x60, - 0x18, 0xc0, 0x7e, 0x78, 0x0a, 0xde, 0x50, 0xbc, 0xf7, 0xc0, 0xd2, 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e, 0xd8, 0x33, 0xba, 0x0a, 0x2b, 0xc2, 0x6d, 0x96, 0xb9, - 0x15, 0x2d, 0x74, 0x05, 0xf2, 0xa6, 0x65, 0x4c, 0x08, 0x5b, 0xba, 0x02, 0xe6, 0x0d, 0xf9, 0x17, - 0x19, 0x58, 0x9f, 0xca, 0x2e, 0xd4, 0xef, 0x40, 0xb5, 0x07, 0xee, 0xb7, 0xe8, 0x33, 0x7a, 0x83, - 0xfa, 0x55, 0xfb, 0xc4, 0x12, 0x19, 0xb9, 0x3e, 0x3d, 0xd5, 0x6d, 0xf6, 0x5e, 0x4c, 0x8d, 0xd0, - 0x46, 0xc7, 0x50, 0x1b, 0xaa, 0xb6, 0xa3, 0xf0, 0x68, 0xad, 0x04, 0xb2, 0xf3, 0x74, 0x8e, 0x3a, - 0x54, 0xdd, 0xf8, 0x4e, 0x37, 0xb5, 0x70, 0x54, 0x19, 0x86, 0xa4, 0x08, 0xc3, 0x95, 0xee, 0xe5, - 0x13, 0x55, 0x77, 0x34, 0x9d, 0x28, 0x53, 0x2b, 0xf7, 0xcc, 0x94, 0xd3, 0xd6, 0x44, 0xeb, 0x13, - 0xbd, 0xe7, 0x2e, 0xd9, 0x86, 0x67, 0xec, 0x2d, 0xa9, 0x2d, 0x63, 0xa8, 0x84, 0xf3, 0x23, 0xaa, - 0x40, 0xc6, 0xb9, 0x10, 0x13, 0x90, 0x71, 0x2e, 0xd0, 0x7f, 0x41, 0x8e, 0x0e, 0x92, 0x0d, 0xbe, - 0x32, 0x03, 0x58, 0x08, 0xbb, 0xce, 0xa5, 0x49, 0x30, 0xd3, 0x94, 0x65, 0xef, 0x38, 0x78, 0x39, - 0x33, 0xea, 0x55, 0x7e, 0x09, 0xaa, 0x91, 0xa4, 0x18, 0x58, 0xbf, 0x74, 0x70, 0xfd, 0xe4, 0x2a, - 0x94, 0x43, 0x19, 0x50, 0xbe, 0x0a, 0x57, 0x66, 0x25, 0x34, 0x79, 0xe0, 0xc9, 0x43, 0x89,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x72, 0xe8, 0xa3, 0xfc, 0x0f, 0x80, 0x02, 0x26, 0xb6, 0x49, - 0x63, 0x2c, 0x6a, 0x40, 0x91, 0x5c, 0xf4, 0x88, 0xe9, 0xb8, 0x69, 0x69, 0x76, 0x3a, 0xe6, 0xda, - 0x2d, 0x57, 0x93, 0x02, 0x4b, 0xcf, 0x0c, 0xdd, 0x11, 0xdc, 0x21, 0x9e, 0x06, 0x08, 0xf3, 0x20, - 0x79, 0x78, 0xc3, 0x25, 0x0f, 0xd9, 0x58, 0x2c, 0xc9, 0xad, 0x22, 0xec, 0xe1, 0x8e, 0x60, 0x0f, - 0xb9, 0x05, 0x1f, 0x0b, 0xd1, 0x87, 0x66, 0x88, 0x3e, 0xe4, 0x17, 0x0c, 0x33, 0x86, 0x3f, 0xbc, - 0xe1, 0xf2, 0x87, 0x95, 0x05, 0x3d, 0x8e, 0x10, 0x88, 0xfd, 0x30, 0x81, 0xe0, 0xe0, 0xff, 0x66, - 0xac, 0x75, 0x2c, 0x83, 0xf8, 0xdf, 0x00, 0x83, 0x28, 0xc4, 0xc2, 0x77, 0xee, 0x64, 0x06, 0x85, - 0x68, 0x86, 0x28, 0x44, 0x71, 0xc1, 0x1c, 0xc4, 0x70, 0x88, 0x77, 0x82, 0x1c, 0x02, 0x62, 0x69, - 0x88, 0x58, 0xef, 0x59, 0x24, 0xe2, 0x4d, 0x8f, 0x44, 0xac, 0xc5, 0xb2, 0x20, 0x31, 0x86, 0x28, - 0x8b, 0x38, 0x9e, 0x62, 0x11, 0x1c, 0xf5, 0xbf, 0x10, 0xeb, 0x62, 0x01, 0x8d, 0x38, 0x9e, 0xa2, - 0x11, 0xe5, 0x05, 0x0e, 0x17, 0xf0, 0x88, 0x0f, 0x67, 0xf3, 0x88, 0x78, 0xa4, 0x2f, 0xba, 0x99, - 0x8c, 0x48, 0x28, 0x31, 0x44, 0xa2, 0x1a, 0x0b, 0x7a, 0xb9, 0xfb, 0xc4, 0x4c, 0xe2, 0xc1, 0x0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 0xb5, 0xbc, 0xf4, 0x56, 0x14, 0xd9, 0xcb, 0x03, 0x51, - 0x79, 0x36, 0xc3, 0x02, 0x44, 0xd5, 0x20, 0xfb, 0x98, 0xf0, 0x64, 0x54, 0xc2, 0xf4, 0x91, 0xea, - 0xb1, 0x4d, 0xc6, 0x52, 0x4c, 0x09, 0xf3, 0x06, 0xba, 0x0b, 0x45, 0x56, 0x86, 0x54, 0x0c, 0xd3, - 0x16, 0x79, 0xe3, 0xd9, 0xe0, 0x58, 0x79, 0xb5, 0x71, 0xfb, 0x84, 0xea, 0x1c, 0x9b, 0x36, 0x2e, - 0x98, 0xe2, 0x29, 0x80, 0x0f, 0x8b, 0x21, 0x9a, 0x72, 0x0d, 0x8a, 0xb4, 0xf7, 0xb6, 0xa9, 0xf6, - 0x08, 0x4b, 0x02, 0x45, 0xec, 0x0b, 0xe4, 0x47, 0x80, 0xa6, 0x53, 0x19, 0x6a, 0xc3, 0x0a, 0x99, - 0x10, 0xdd, 0xb1, 0x19, 0x4c, 0x8b, 0xc0, 0x20, 0xc1, 0x01, 0x88, 0xee, 0x34, 0xea, 0x74, 0x92, - 0xff, 0xf6, 0xed, 0x56, 0x8d, 0x6b, 0xbf, 0x62, 0x8c, 0x34, 0x87, 0x8c, 0x4c, 0xe7, 0x12, 0x0b, - 0x7b, 0xf9, 0xcf, 0x19, 0x0a, 0xc8, 0x43, 0x69, 0x6e, 0xe6, 0xdc, 0xba, 0x5b, 0x3e, 0x13, 0x20, - 0x63, 0xc9, 0xe6, 0x7b, 0x13, 0xe0, 0x5c, 0xb5, 0x95, 0xcf, 0x54, 0xdd, 0x21, 0x7d, 0x31, 0xe9, - 0x01, 0x09, 0x92, 0xa0, 0x40, 0x5b, 0x63, 0x9b, 0xf4, 0x05, 0x2f, 0xf4, 0xda, 0x81, 0x71, 0xae, - 0xfe, 0xb8, 0x71, 0x86, 0x67, 0xb9, 0x10, 0x99, 0xe5, 0x00, 0x58, 0x2e, 0x06, 0xc1, 0x32, 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x5b, 0x91, - 0x96, 0x2a, 0x4b, 0x37, 0x5a, 0x5f, 0x7f, 0xb7, 0x99, 0xfe, 0xe6, 0xbb, 0xcd, 0xf4, 0x5f, 0xbf, - 0xdb, 0x4c, 0x7f, 0xf1, 0xfd, 0x66, 0xea, 0x9b, 0xef, 0x37, 0x53, 0x7f, 0xfa, 0x7e, 0x33, 0xf5, - 0xd3, 0x97, 0xcf, 0x35, 0x67, 0x30, 0xee, 0x6e, 0xf7, 0x8c, 0xd1, 0x4e, 0xf0, 0x96, 0xe1, 0xac, - 0x9b, 0x8f, 0xdd, 0x15, 0x96, 0xe9, 0xef, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xe2, 0x4c, - 0x31, 0x19, 0x29, 0x00, 0x00, + // 2944 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x9a, 0xbd, 0x73, 0xe3, 0xc6, + 0x15, 0xc0, 0x09, 0x7e, 0x89, 0x7c, 0xfc, 0xd4, 0xea, 0x2c, 0xd3, 0xf0, 0x9d, 0x24, 0xc3, 0x63, + 0x5b, 0x3e, 0xdb, 0x52, 0xac, 0x8b, 0x9d, 0xf3, 0x38, 0x5f, 0x12, 0x8f, 0x32, 0xe5, 0x53, 0x24, + 0x65, 0xc5, 0x3b, 0x8f, 0x13, 0xdb, 0x30, 0x48, 0xae, 0x44, 0xf8, 0x48, 0x00, 0x06, 0x40, 0x5a, + 0xba, 0x32, 0x33, 0x69, 0x5c, 0xb9, 0x4c, 0xe3, 0x2e, 0x33, 0x49, 0x93, 0x22, 0x5d, 0xaa, 0x54, + 0x99, 0x89, 0x8b, 0x14, 0x2e, 0x53, 0x64, 0x9c, 0x8c, 0xdd, 0xe5, 0x1f, 0x48, 0x93, 0xcc, 0x64, + 0xf6, 0x03, 0x5f, 0x24, 0xc1, 0x8f, 0x24, 0x5d, 0x3a, 0xec, 0xc3, 0x7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, 0x79, 0xe1, 0x2a, 0x2d, 0x7a, 0x00, 0x10, 0xca, 0x2a, 0x16, 0x38, + 0x36, 0x21, 0x2f, 0x52, 0xaf, 0x45, 0x16, 0xac, 0x4d, 0xcb, 0x26, 0x96, 0x39, 0x45, 0x21, 0x2f, + 0x55, 0xc6, 0xa5, 0xf3, 0x39, 0x0a, 0xda, 0x8b, 0x9d, 0xaa, 0x90, 0x17, 0xac, 0xe7, 0x1e, 0x34, + 0xbe, 0xf8, 0x7a, 0x43, 0xfa, 0xf2, 0xeb, 0x0d, 0xe9, 0x6f, 0x5f, 0x6f, 0x48, 0x9f, 0x7d, 0xb3, + 0x91, 0xf8, 0xf2, 0x9b, 0x8d, 0xc4, 0x9f, 0xbf, 0xd9, 0x48, 0xfc, 0xe4, 0xa5, 0x4b, 0xdd, 0xed, + 0x0d, 0xdb, 0x3b, 0x1d, 0x73, 0xb0, 0x1b, 0x3e, 0x88, 0x36, 0xed, 0x70, 0x5c, 0x3b, 0xcb, 0x76, + 0xd3, 0x3b, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x38, 0xc0, 0x71, 0xe9, 0x3c, 0x27, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3727,13 +3558,13 @@ type ABCIApplicationClient interface { Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) - DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) + // rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) - BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) - EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) + // rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); + // rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) @@ -3742,6 +3573,7 @@ type ABCIApplicationClient interface { ProcessProposal(ctx context.Context, in *RequestProcessProposal, opts ...grpc.CallOption) (*ResponseProcessProposal, error) 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) } type aBCIApplicationClient struct { @@ -3779,15 +3611,6 @@ func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts return out, nil } -func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) { - out := new(ResponseDeliverTx) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) { out := new(ResponseCheckTx) err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...) @@ -3824,24 +3647,6 @@ func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitCh return out, nil } -func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) { - out := new(ResponseBeginBlock) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) { - out := new(ResponseEndBlock) - err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) { out := new(ResponseListSnapshots) err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...) @@ -3914,18 +3719,27 @@ func (c *aBCIApplicationClient) VerifyVoteExtension(ctx context.Context, in *Req return out, nil } +func (c *aBCIApplicationClient) FinalizeBlock(ctx context.Context, in *RequestFinalizeBlock, opts ...grpc.CallOption) (*ResponseFinalizeBlock, error) { + out := new(ResponseFinalizeBlock) + err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/FinalizeBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ABCIApplicationServer is the server API for ABCIApplication service. type ABCIApplicationServer interface { Echo(context.Context, *RequestEcho) (*ResponseEcho, error) Flush(context.Context, *RequestFlush) (*ResponseFlush, error) Info(context.Context, *RequestInfo) (*ResponseInfo, error) - DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error) + // rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) Query(context.Context, *RequestQuery) (*ResponseQuery, error) Commit(context.Context, *RequestCommit) (*ResponseCommit, error) InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error) - BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error) - EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error) + // rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); + // rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error) OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) @@ -3934,6 +3748,7 @@ type ABCIApplicationServer interface { ProcessProposal(context.Context, *RequestProcessProposal) (*ResponseProcessProposal, error) ExtendVote(context.Context, *RequestExtendVote) (*ResponseExtendVote, error) VerifyVoteExtension(context.Context, *RequestVerifyVoteExtension) (*ResponseVerifyVoteExtension, error) + FinalizeBlock(context.Context, *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) } // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations. @@ -3949,9 +3764,6 @@ func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *Reque func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") } -func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented") -} func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented") } @@ -3964,12 +3776,6 @@ func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *Requ func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) { return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented") } -func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) { - return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented") -} -func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) { - return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented") -} func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented") } @@ -3994,6 +3800,9 @@ func (*UnimplementedABCIApplicationServer) ExtendVote(ctx context.Context, req * func (*UnimplementedABCIApplicationServer) VerifyVoteExtension(ctx context.Context, req *RequestVerifyVoteExtension) (*ResponseVerifyVoteExtension, error) { return nil, status.Errorf(codes.Unimplemented, "method VerifyVoteExtension not implemented") } +func (*UnimplementedABCIApplicationServer) FinalizeBlock(ctx context.Context, req *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) { + return nil, status.Errorf(codes.Unimplemented, "method FinalizeBlock not implemented") +} func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) { s.RegisterService(&_ABCIApplication_serviceDesc, srv) @@ -4053,24 +3862,6 @@ func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestDeliverTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).DeliverTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx)) - } - return interceptor(ctx, in, info, handler) -} - func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RequestCheckTx) if err := dec(in); err != nil { @@ -4143,42 +3934,6 @@ func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestBeginBlock) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).BeginBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestEndBlock) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).EndBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tendermint.abci.ABCIApplication/EndBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock)) - } - return interceptor(ctx, in, info, handler) -} - func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RequestListSnapshots) if err := dec(in); err != nil { @@ -4323,6 +4078,24 @@ func _ABCIApplication_VerifyVoteExtension_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } +func _ABCIApplication_FinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestFinalizeBlock) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIApplicationServer).FinalizeBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tendermint.abci.ABCIApplication/FinalizeBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).FinalizeBlock(ctx, req.(*RequestFinalizeBlock)) + } + return interceptor(ctx, in, info, handler) +} + var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ ServiceName: "tendermint.abci.ABCIApplication", HandlerType: (*ABCIApplicationServer)(nil), @@ -4339,10 +4112,6 @@ var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ MethodName: "Info", Handler: _ABCIApplication_Info_Handler, }, - { - MethodName: "DeliverTx", - Handler: _ABCIApplication_DeliverTx_Handler, - }, { MethodName: "CheckTx", Handler: _ABCIApplication_CheckTx_Handler, @@ -4359,14 +4128,6 @@ var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ MethodName: "InitChain", Handler: _ABCIApplication_InitChain_Handler, }, - { - MethodName: "BeginBlock", - Handler: _ABCIApplication_BeginBlock_Handler, - }, - { - MethodName: "EndBlock", - Handler: _ABCIApplication_EndBlock_Handler, - }, { MethodName: "ListSnapshots", Handler: _ABCIApplication_ListSnapshots_Handler, @@ -4399,6 +4160,10 @@ var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ MethodName: "VerifyVoteExtension", Handler: _ABCIApplication_VerifyVoteExtension_Handler, }, + { + MethodName: "FinalizeBlock", + Handler: _ABCIApplication_FinalizeBlock_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "tendermint/abci/types.proto", @@ -4541,28 +4306,7 @@ func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } -func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BeginBlock != nil { - { - size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) { +func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } @@ -4583,48 +4327,6 @@ func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } -func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeliverTx != nil { - { - size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.EndBlock != nil { - { - size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -4820,6 +4522,29 @@ func (m *Request_VerifyVoteExtension) MarshalToSizedBuffer(dAtA []byte) (int, er } return len(dAtA) - i, nil } +func (m *Request_FinalizeBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Request_FinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FinalizeBlock != nil { + { + size, err := m.FinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + return len(dAtA) - i, nil +} func (m *RequestEcho) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4985,12 +4710,12 @@ func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n20, err20 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err20 != nil { - return 0, err20 + n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err18 != nil { + return 0, err18 } - i -= n20 - i = encodeVarintTypes(dAtA, i, uint64(n20)) + i -= n18 + i = encodeVarintTypes(dAtA, i, uint64(n18)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -5048,70 +4773,6 @@ func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RequestBeginBlock) 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 *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ByzantineValidators) > 0 { - for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - { - size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5147,64 +4808,6 @@ func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RequestDeliverTx) 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 *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Tx) > 0 { - i -= len(m.Tx) - copy(dAtA[i:], m.Tx) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestEndBlock) 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 *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestEndBlock) 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 *RequestCommit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5522,6 +5125,84 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *RequestFinalizeBlock) 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 *RequestFinalizeBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ByzantineValidators) > 0 { + for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + { + size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5680,27 +5361,6 @@ func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } -func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BeginBlock != nil { - { - size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -5722,48 +5382,6 @@ func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } -func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DeliverTx != nil { - { - size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.EndBlock != nil { - { - size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -5961,6 +5579,29 @@ func (m *Response_VerifyVoteExtension) MarshalToSizedBuffer(dAtA []byte) (int, e } return len(dAtA) - i, nil } +func (m *Response_FinalizeBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Response_FinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FinalizeBlock != nil { + { + size, err := m.FinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + return len(dAtA) - i, nil +} func (m *ResponseException) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6239,43 +5880,6 @@ func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResponseBeginBlock) 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 *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].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 *ResponseCheckTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6455,69 +6059,6 @@ func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResponseEndBlock) 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 *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.ConsensusParamUpdates != nil { - { - size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ValidatorUpdates) > 0 { - for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ValidatorUpdates[iNdEx].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 *ResponseCommit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6678,20 +6219,20 @@ func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, err } } if len(m.RefetchChunks) > 0 { - dAtA50 := make([]byte, len(m.RefetchChunks)*10) - var j49 int + dAtA45 := make([]byte, len(m.RefetchChunks)*10) + var j44 int for _, num := range m.RefetchChunks { for num >= 1<<7 { - dAtA50[j49] = uint8(uint64(num)&0x7f | 0x80) + dAtA45[j44] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j49++ + j44++ } - dAtA50[j49] = uint8(num) - j49++ + dAtA45[j44] = uint8(num) + j44++ } - i -= j49 - copy(dAtA[i:], dAtA50[:j49]) - i = encodeVarintTypes(dAtA, i, uint64(j49)) + i -= j44 + copy(dAtA[i:], dAtA45[:j44]) + i = encodeVarintTypes(dAtA, i, uint64(j44)) i-- dAtA[i] = 0x12 } @@ -6835,6 +6376,83 @@ func (m *ResponseProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *ResponseFinalizeBlock) 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 *ResponseFinalizeBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.ConsensusParamUpdates != nil { + { + size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorUpdates) > 0 { + for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Txs[iNdEx].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 *LastCommitInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -7159,12 +6777,12 @@ func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n55, err55 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err55 != nil { - return 0, err55 + n51, err51 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err51 != nil { + return 0, err51 } - i -= n55 - i = encodeVarintTypes(dAtA, i, uint64(n55)) + i -= n51 + i = encodeVarintTypes(dAtA, i, uint64(n51)) i-- dAtA[i] = 0x22 if m.Height != 0 { @@ -7325,91 +6943,55 @@ func (m *Request_Query) Size() (n int) { } return n } -func (m *Request_BeginBlock) Size() (n int) { +func (m *Request_CheckTx) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.BeginBlock != nil { - l = m.BeginBlock.Size() + if m.CheckTx != nil { + l = m.CheckTx.Size() n += 1 + l + sovTypes(uint64(l)) } return n } -func (m *Request_CheckTx) Size() (n int) { +func (m *Request_Commit) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.CheckTx != nil { - l = m.CheckTx.Size() + if m.Commit != nil { + l = m.Commit.Size() n += 1 + l + sovTypes(uint64(l)) } return n } -func (m *Request_DeliverTx) Size() (n int) { +func (m *Request_ListSnapshots) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.DeliverTx != nil { - l = m.DeliverTx.Size() + if m.ListSnapshots != nil { + l = m.ListSnapshots.Size() n += 1 + l + sovTypes(uint64(l)) } return n } -func (m *Request_EndBlock) Size() (n int) { +func (m *Request_OfferSnapshot) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.EndBlock != nil { - l = m.EndBlock.Size() + if m.OfferSnapshot != nil { + l = m.OfferSnapshot.Size() n += 1 + l + sovTypes(uint64(l)) } return n } -func (m *Request_Commit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Commit != nil { - l = m.Commit.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_ListSnapshots) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ListSnapshots != nil { - l = m.ListSnapshots.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_OfferSnapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OfferSnapshot != nil { - l = m.OfferSnapshot.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_LoadSnapshotChunk) Size() (n int) { +func (m *Request_LoadSnapshotChunk) Size() (n int) { if m == nil { return 0 } @@ -7481,6 +7063,18 @@ func (m *Request_VerifyVoteExtension) Size() (n int) { } return n } +func (m *Request_FinalizeBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FinalizeBlock != nil { + l = m.FinalizeBlock.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} func (m *RequestEcho) Size() (n int) { if m == nil { return 0 @@ -7581,29 +7175,6 @@ func (m *RequestQuery) Size() (n int) { return n } -func (m *RequestBeginBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.LastCommitInfo.Size() - n += 1 + l + sovTypes(uint64(l)) - if len(m.ByzantineValidators) > 0 { - for _, e := range m.ByzantineValidators { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - func (m *RequestCheckTx) Size() (n int) { if m == nil { return 0 @@ -7620,31 +7191,6 @@ func (m *RequestCheckTx) Size() (n int) { return n } -func (m *RequestDeliverTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Tx) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *RequestEndBlock) 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 *RequestCommit) Size() (n int) { if m == nil { return 0 @@ -7779,6 +7325,38 @@ func (m *RequestProcessProposal) Size() (n int) { return n } +func (m *RequestFinalizeBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.LastCommitInfo.Size() + n += 1 + l + sovTypes(uint64(l)) + if len(m.ByzantineValidators) > 0 { + for _, e := range m.ByzantineValidators { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + func (m *Response) Size() (n int) { if m == nil { return 0 @@ -7863,18 +7441,6 @@ func (m *Response_Query) Size() (n int) { } return n } -func (m *Response_BeginBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BeginBlock != nil { - l = m.BeginBlock.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} func (m *Response_CheckTx) Size() (n int) { if m == nil { return 0 @@ -7887,30 +7453,6 @@ func (m *Response_CheckTx) Size() (n int) { } return n } -func (m *Response_DeliverTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DeliverTx != nil { - l = m.DeliverTx.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_EndBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EndBlock != nil { - l = m.EndBlock.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} func (m *Response_Commit) Size() (n int) { if m == nil { return 0 @@ -8019,6 +7561,18 @@ func (m *Response_VerifyVoteExtension) Size() (n int) { } return n } +func (m *Response_FinalizeBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FinalizeBlock != nil { + l = m.FinalizeBlock.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} func (m *ResponseException) Size() (n int) { if m == nil { return 0 @@ -8146,21 +7700,6 @@ func (m *ResponseQuery) Size() (n int) { return n } -func (m *ResponseBeginBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - func (m *ResponseCheckTx) Size() (n int) { if m == nil { return 0 @@ -8252,31 +7791,6 @@ func (m *ResponseDeliverTx) Size() (n int) { return n } -func (m *ResponseEndBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ValidatorUpdates) > 0 { - for _, e := range m.ValidatorUpdates { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.ConsensusParamUpdates != nil { - l = m.ConsensusParamUpdates.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - func (m *ResponseCommit) Size() (n int) { if m == nil { return 0 @@ -8416,6 +7930,37 @@ func (m *ResponseProcessProposal) Size() (n int) { return n } +func (m *ResponseFinalizeBlock) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, e := range m.Txs { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.ValidatorUpdates) > 0 { + for _, e := range m.ValidatorUpdates { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.ConsensusParamUpdates != nil { + l = m.ConsensusParamUpdates.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + func (m *LastCommitInfo) Size() (n int) { if m == nil { return 0 @@ -8796,9 +8341,9 @@ func (m *Request) Unmarshal(dAtA []byte) error { } m.Value = &Request_Query{v} iNdEx = postIndex - case 6: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8825,15 +8370,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestBeginBlock{} + v := &RequestCheckTx{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_BeginBlock{v} + m.Value = &Request_CheckTx{v} iNdEx = postIndex - case 7: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8860,15 +8405,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestCheckTx{} + v := &RequestCommit{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_CheckTx{v} + m.Value = &Request_Commit{v} iNdEx = postIndex - case 8: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8895,15 +8440,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestDeliverTx{} + v := &RequestListSnapshots{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_DeliverTx{v} + m.Value = &Request_ListSnapshots{v} iNdEx = postIndex - case 9: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8930,15 +8475,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestEndBlock{} + v := &RequestOfferSnapshot{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_EndBlock{v} + m.Value = &Request_OfferSnapshot{v} iNdEx = postIndex - case 10: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8965,15 +8510,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestCommit{} + v := &RequestLoadSnapshotChunk{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_Commit{v} + m.Value = &Request_LoadSnapshotChunk{v} iNdEx = postIndex - case 11: + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9000,85 +8545,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestListSnapshots{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_ListSnapshots{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", 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 := &RequestOfferSnapshot{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_OfferSnapshot{v} - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", 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 := &RequestLoadSnapshotChunk{} + v := &RequestApplySnapshotChunk{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_LoadSnapshotChunk{v} + m.Value = &Request_ApplySnapshotChunk{v} iNdEx = postIndex - case 14: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PrepareProposal", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9105,15 +8580,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestApplySnapshotChunk{} + v := &RequestPrepareProposal{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_ApplySnapshotChunk{v} + m.Value = &Request_PrepareProposal{v} iNdEx = postIndex - case 15: + case 16: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrepareProposal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProcessProposal", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9140,15 +8615,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestPrepareProposal{} + v := &RequestProcessProposal{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_PrepareProposal{v} + m.Value = &Request_ProcessProposal{v} iNdEx = postIndex - case 16: + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessProposal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExtendVote", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9175,15 +8650,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestProcessProposal{} + v := &RequestExtendVote{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_ProcessProposal{v} + m.Value = &Request_ExtendVote{v} iNdEx = postIndex - case 17: + case 18: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendVote", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VerifyVoteExtension", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9210,15 +8685,15 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestExtendVote{} + v := &RequestVerifyVoteExtension{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_ExtendVote{v} + m.Value = &Request_VerifyVoteExtension{v} iNdEx = postIndex - case 18: + case 19: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyVoteExtension", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FinalizeBlock", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9245,11 +8720,11 @@ func (m *Request) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &RequestVerifyVoteExtension{} + v := &RequestFinalizeBlock{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Request_VerifyVoteExtension{v} + m.Value = &Request_FinalizeBlock{v} iNdEx = postIndex default: iNdEx = preIndex @@ -9949,7 +9424,7 @@ func (m *RequestQuery) Unmarshal(dAtA []byte) error { } return nil } -func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { +func (m *RequestCheckTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9972,15 +9447,15 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group") + return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -10007,16 +9482,16 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} + m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) + if m.Tx == nil { + m.Tx = []byte{} } iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -10026,92 +9501,61 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Type |= CheckTxType(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 { + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", 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 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", 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 + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestCommit) 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.ByzantineValidators = append(m.ByzantineValidators, Evidence{}) - if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -10133,7 +9577,7 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { } return nil } -func (m *RequestCheckTx) Unmarshal(dAtA []byte) error { +func (m *RequestListSnapshots) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10156,323 +9600,17 @@ func (m *RequestCheckTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group") + return fmt.Errorf("proto: RequestListSnapshots: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) - if m.Tx == nil { - m.Tx = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= CheckTxType(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 *RequestDeliverTx) 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: RequestDeliverTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) - if m.Tx == nil { - m.Tx = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestEndBlock) 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: RequestEndBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestEndBlock: 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 *RequestCommit) 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: RequestCommit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *RequestListSnapshots) 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: RequestListSnapshots: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes @@ -11239,7 +10377,7 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { } return nil } -func (m *Response) Unmarshal(dAtA []byte) error { +func (m *RequestFinalizeBlock) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11262,15 +10400,100 @@ func (m *Response) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Response: wiretype end group for non-group") + return fmt.Errorf("proto: RequestFinalizeBlock: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestFinalizeBlock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11297,15 +10520,13 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseException{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_Exception{v} iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11332,15 +10553,13 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseEcho{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_Echo{v} iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11367,15 +10586,64 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseFlush{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ByzantineValidators = append(m.ByzantineValidators, Evidence{}) + if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_Flush{v} iNdEx = postIndex - case 4: + 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 + 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: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11402,15 +10670,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseInfo{} + v := &ResponseException{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_Info{v} + m.Value = &Response_Exception{v} iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11437,15 +10705,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseInitChain{} + v := &ResponseEcho{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_InitChain{v} + m.Value = &Response_Echo{v} iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11472,15 +10740,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseQuery{} + v := &ResponseFlush{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_Query{v} + m.Value = &Response_Flush{v} iNdEx = postIndex - case 7: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11507,15 +10775,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseBeginBlock{} + v := &ResponseInfo{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_BeginBlock{v} + m.Value = &Response_Info{v} iNdEx = postIndex - case 8: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11542,15 +10810,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseCheckTx{} + v := &ResponseInitChain{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_CheckTx{v} + m.Value = &Response_InitChain{v} iNdEx = postIndex - case 9: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11577,15 +10845,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseDeliverTx{} + v := &ResponseQuery{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_DeliverTx{v} + m.Value = &Response_Query{v} iNdEx = postIndex - case 10: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11612,11 +10880,11 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseEndBlock{} + v := &ResponseCheckTx{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_EndBlock{v} + m.Value = &Response_CheckTx{v} iNdEx = postIndex case 11: if wireType != 2 { @@ -11863,9 +11131,44 @@ func (m *Response) Unmarshal(dAtA []byte) error { } m.Value = &Response_ProcessProposal{v} iNdEx = postIndex - case 18: + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtendVote", 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 := &ResponseExtendVote{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_ExtendVote{v} + iNdEx = postIndex + case 19: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendVote", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VerifyVoteExtension", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11892,15 +11195,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseExtendVote{} + v := &ResponseVerifyVoteExtension{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_ExtendVote{v} + m.Value = &Response_VerifyVoteExtension{v} iNdEx = postIndex - case 19: + case 20: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyVoteExtension", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FinalizeBlock", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11927,11 +11230,11 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseVerifyVoteExtension{} + v := &ResponseFinalizeBlock{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_VerifyVoteExtension{v} + m.Value = &Response_FinalizeBlock{v} iNdEx = postIndex default: iNdEx = preIndex @@ -12815,90 +12118,6 @@ func (m *ResponseQuery) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResponseBeginBlock) 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: ResponseBeginBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -13391,173 +12610,19 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - m.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Codespace = string(dAtA[iNdEx:postIndex]) - 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 *ResponseEndBlock) 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: ResponseEndBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType) + if postIndex < 0 { + return ErrInvalidLengthTypes } - var msglen int + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + } + m.GasWanted = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13567,29 +12632,33 @@ func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.GasWanted |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) } - m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{}) - if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13616,18 +12685,16 @@ func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusParamUpdates == nil { - m.ConsensusParamUpdates = &types1.ConsensusParams{} - } - if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Events = append(m.Events, Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13637,25 +12704,23 @@ func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Events = append(m.Events, Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Codespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -14533,6 +13598,194 @@ func (m *ResponseProcessProposal) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResponseFinalizeBlock) 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: ResponseFinalizeBlock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseFinalizeBlock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, &ResponseDeliverTx{}) + if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{}) + if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", 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 m.ConsensusParamUpdates == nil { + m.ConsensusParamUpdates = &types1.ConsensusParams{} + } + if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *LastCommitInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/cmd/tendermint/commands/key_migrate.go b/cmd/tendermint/commands/key_migrate.go index 1706f8b6a..928821586 100644 --- a/cmd/tendermint/commands/key_migrate.go +++ b/cmd/tendermint/commands/key_migrate.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/spf13/cobra" + cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/scripts/keymigrate" diff --git a/cmd/tendermint/commands/reindex_event.go b/cmd/tendermint/commands/reindex_event.go index 00a1d14b2..5ecbba617 100644 --- a/cmd/tendermint/commands/reindex_event.go +++ b/cmd/tendermint/commands/reindex_event.go @@ -199,10 +199,9 @@ func eventReIndex(cmd *cobra.Command, args eventReIndexArgs) error { } e := types.EventDataNewBlockHeader{ - Header: b.Header, - NumTxs: int64(len(b.Txs)), - ResultBeginBlock: *r.BeginBlock, - ResultEndBlock: *r.EndBlock, + Header: b.Header, + NumTxs: int64(len(b.Txs)), + ResultFinalizeBlock: *r.FinalizeBlock, } var batch *indexer.Batch @@ -214,7 +213,7 @@ func eventReIndex(cmd *cobra.Command, args eventReIndexArgs) error { Height: b.Height, Index: uint32(i), Tx: b.Data.Txs[i], - Result: *(r.DeliverTxs[i]), + Result: *(r.FinalizeBlock.Txs[i]), } _ = batch.Add(&tr) diff --git a/cmd/tendermint/commands/reindex_event_test.go b/cmd/tendermint/commands/reindex_event_test.go index a35307a84..c525d4baa 100644 --- a/cmd/tendermint/commands/reindex_event_test.go +++ b/cmd/tendermint/commands/reindex_event_test.go @@ -9,6 +9,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + abcitypes "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/state/indexer" @@ -16,7 +18,6 @@ import ( "github.com/tendermint/tendermint/libs/log" prototmstate "github.com/tendermint/tendermint/proto/tendermint/state" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" _ "github.com/lib/pq" // for the psql sink ) @@ -154,9 +155,9 @@ func TestReIndexEvent(t *testing.T) { dtx := abcitypes.ResponseDeliverTx{} abciResp := &prototmstate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{&dtx}, - EndBlock: &abcitypes.ResponseEndBlock{}, - BeginBlock: &abcitypes.ResponseBeginBlock{}, + FinalizeBlock: &abcitypes.ResponseFinalizeBlock{ + Txs: []*abcitypes.ResponseDeliverTx{&dtx}, + }, } mockStateStore. diff --git a/cmd/tendermint/commands/replay.go b/cmd/tendermint/commands/replay.go index 15520c469..fb6f19e55 100644 --- a/cmd/tendermint/commands/replay.go +++ b/cmd/tendermint/commands/replay.go @@ -2,6 +2,7 @@ package commands import ( "github.com/spf13/cobra" + "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/consensus" "github.com/tendermint/tendermint/libs/log" diff --git a/cmd/tendermint/commands/show_node_id.go b/cmd/tendermint/commands/show_node_id.go index 9183a7c5e..ffc6c4d5e 100644 --- a/cmd/tendermint/commands/show_node_id.go +++ b/cmd/tendermint/commands/show_node_id.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/spf13/cobra" + "github.com/tendermint/tendermint/config" ) diff --git a/crypto/ed25519/bench_test.go b/crypto/ed25519/bench_test.go index e57cd393f..49fcd1504 100644 --- a/crypto/ed25519/bench_test.go +++ b/crypto/ed25519/bench_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/internal/benchmarking" ) diff --git a/crypto/secp256k1/secp256k1.go b/crypto/secp256k1/secp256k1.go index 193c0fac1..575eba36d 100644 --- a/crypto/secp256k1/secp256k1.go +++ b/crypto/secp256k1/secp256k1.go @@ -9,6 +9,7 @@ import ( "math/big" secp256k1 "github.com/btcsuite/btcd/btcec" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/internal/jsontypes" diff --git a/crypto/sr25519/bench_test.go b/crypto/sr25519/bench_test.go index 559bd0576..086a899c0 100644 --- a/crypto/sr25519/bench_test.go +++ b/crypto/sr25519/bench_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/internal/benchmarking" ) diff --git a/internal/consensus/invalid_test.go b/internal/consensus/invalid_test.go index 541b1bbc4..a3e865c68 100644 --- a/internal/consensus/invalid_test.go +++ b/internal/consensus/invalid_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/eventbus" "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/bytes" diff --git a/internal/consensus/mempool_test.go b/internal/consensus/mempool_test.go index cef661592..6d0d0d81b 100644 --- a/internal/consensus/mempool_test.go +++ b/internal/consensus/mempool_test.go @@ -192,8 +192,8 @@ func TestMempoolRmBadTx(t *testing.T) { txBytes := make([]byte, 8) binary.BigEndian.PutUint64(txBytes, uint64(0)) - resDeliver := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) - assert.False(t, resDeliver.IsErr(), fmt.Sprintf("expected no error. got %v", resDeliver)) + resDeliver := app.FinalizeBlock(abci.RequestFinalizeBlock{Txs: [][]byte{txBytes}}) + assert.False(t, resDeliver.Txs[0].IsErr(), fmt.Sprintf("expected no error. got %v", resDeliver)) resCommit := app.Commit() assert.True(t, len(resCommit.Data) > 0) @@ -264,15 +264,21 @@ func (app *CounterApplication) Info(req abci.RequestInfo) abci.ResponseInfo { return abci.ResponseInfo{Data: fmt.Sprintf("txs:%v", app.txCount)} } -func (app *CounterApplication) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx { - txValue := txAsUint64(req.Tx) - if txValue != uint64(app.txCount) { - return abci.ResponseDeliverTx{ - Code: code.CodeTypeBadNonce, - Log: fmt.Sprintf("Invalid nonce. Expected %v, got %v", app.txCount, txValue)} +func (app *CounterApplication) FinalizeBlock(req abci.RequestFinalizeBlock) abci.ResponseFinalizeBlock { + respTxs := make([]*abci.ResponseDeliverTx, len(req.Txs)) + for i, tx := range req.Txs { + txValue := txAsUint64(tx) + if txValue != uint64(app.txCount) { + respTxs[i] = &abci.ResponseDeliverTx{ + Code: code.CodeTypeBadNonce, + Log: fmt.Sprintf("Invalid nonce. Expected %d, got %d", app.txCount, txValue), + } + continue + } + app.txCount++ + respTxs[i] = &abci.ResponseDeliverTx{Code: code.CodeTypeOK} } - app.txCount++ - return abci.ResponseDeliverTx{Code: code.CodeTypeOK} + return abci.ResponseFinalizeBlock{Txs: respTxs} } func (app *CounterApplication) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { diff --git a/internal/consensus/metrics.go b/internal/consensus/metrics.go index cf99fa0e4..7526518dc 100644 --- a/internal/consensus/metrics.go +++ b/internal/consensus/metrics.go @@ -3,6 +3,7 @@ package consensus import ( "github.com/go-kit/kit/metrics" "github.com/go-kit/kit/metrics/discard" + "github.com/tendermint/tendermint/types" prometheus "github.com/go-kit/kit/metrics/prometheus" diff --git a/internal/consensus/mocks/cons_sync_reactor.go b/internal/consensus/mocks/cons_sync_reactor.go index 5ac592f0d..b254fc701 100644 --- a/internal/consensus/mocks/cons_sync_reactor.go +++ b/internal/consensus/mocks/cons_sync_reactor.go @@ -4,6 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" + state "github.com/tendermint/tendermint/internal/state" ) diff --git a/internal/consensus/mocks/fast_sync_reactor.go b/internal/consensus/mocks/fast_sync_reactor.go index 9da851065..06886de27 100644 --- a/internal/consensus/mocks/fast_sync_reactor.go +++ b/internal/consensus/mocks/fast_sync_reactor.go @@ -4,6 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" + state "github.com/tendermint/tendermint/internal/state" time "time" diff --git a/internal/consensus/replay_stubs.go b/internal/consensus/replay_stubs.go index ec16ed556..fc0ec312f 100644 --- a/internal/consensus/replay_stubs.go +++ b/internal/consensus/replay_stubs.go @@ -87,20 +87,15 @@ type mockProxyApp struct { abciResponses *tmstate.ABCIResponses } -func (mock *mockProxyApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx { - r := mock.abciResponses.DeliverTxs[mock.txCount] +func (mock *mockProxyApp) FinalizeBlock(req abci.RequestFinalizeBlock) abci.ResponseFinalizeBlock { + r := mock.abciResponses.FinalizeBlock mock.txCount++ if r == nil { - return abci.ResponseDeliverTx{} + return abci.ResponseFinalizeBlock{} } return *r } -func (mock *mockProxyApp) EndBlock(req abci.RequestEndBlock) abci.ResponseEndBlock { - mock.txCount = 0 - return *mock.abciResponses.EndBlock -} - func (mock *mockProxyApp) Commit() abci.ResponseCommit { return abci.ResponseCommit{Data: mock.appHash} } diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 607fdd5a0..c39f36611 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -665,12 +665,13 @@ func TestMockProxyApp(t *testing.T) { logger := log.TestingLogger() var validTxs, invalidTxs = 0, 0 - txIndex := 0 + txCount := 0 assert.NotPanics(t, func() { abciResWithEmptyDeliverTx := new(tmstate.ABCIResponses) - abciResWithEmptyDeliverTx.DeliverTxs = make([]*abci.ResponseDeliverTx, 0) - abciResWithEmptyDeliverTx.DeliverTxs = append(abciResWithEmptyDeliverTx.DeliverTxs, &abci.ResponseDeliverTx{}) + abciResWithEmptyDeliverTx.FinalizeBlock = new(abci.ResponseFinalizeBlock) + abciResWithEmptyDeliverTx.FinalizeBlock.Txs = make([]*abci.ResponseDeliverTx, 0) + abciResWithEmptyDeliverTx.FinalizeBlock.Txs = append(abciResWithEmptyDeliverTx.FinalizeBlock.Txs, &abci.ResponseDeliverTx{}) // called when saveABCIResponses: bytes, err := proto.Marshal(abciResWithEmptyDeliverTx) @@ -685,25 +686,27 @@ func TestMockProxyApp(t *testing.T) { require.NoError(t, err) abciRes := new(tmstate.ABCIResponses) - abciRes.DeliverTxs = make([]*abci.ResponseDeliverTx, len(loadedAbciRes.DeliverTxs)) + abciRes.FinalizeBlock = new(abci.ResponseFinalizeBlock) + abciRes.FinalizeBlock.Txs = make([]*abci.ResponseDeliverTx, len(loadedAbciRes.FinalizeBlock.Txs)) someTx := []byte("tx") - resp, err := mock.DeliverTx(ctx, abci.RequestDeliverTx{Tx: someTx}) + resp, err := mock.FinalizeBlock(ctx, abci.RequestFinalizeBlock{Txs: [][]byte{someTx}}) + require.NoError(t, err) // TODO: make use of res.Log // TODO: make use of this info // Blocks may include invalid txs. - if resp.Code == abci.CodeTypeOK { - validTxs++ - } else { - invalidTxs++ + for _, tx := range resp.Txs { + if tx.Code == abci.CodeTypeOK { + validTxs++ + } else { + invalidTxs++ + } + txCount++ } - abciRes.DeliverTxs[txIndex] = resp - txIndex++ - - assert.NoError(t, err) }) - assert.True(t, validTxs == 1) - assert.True(t, invalidTxs == 0) + require.Equal(t, 1, txCount) + require.Equal(t, 1, validTxs) + require.Zero(t, invalidTxs) } func tempWALWithData(t *testing.T, data []byte) string { diff --git a/internal/consensus/types/height_vote_set_test.go b/internal/consensus/types/height_vote_set_test.go index c95beadb1..671c5f214 100644 --- a/internal/consensus/types/height_vote_set_test.go +++ b/internal/consensus/types/height_vote_set_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/internal/test/factory" diff --git a/internal/consensus/types/peer_round_state_test.go b/internal/consensus/types/peer_round_state_test.go index 393fd2056..6d76750a7 100644 --- a/internal/consensus/types/peer_round_state_test.go +++ b/internal/consensus/types/peer_round_state_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/bits" ) diff --git a/internal/eventbus/event_bus.go b/internal/eventbus/event_bus.go index 3d5f7d82f..5f9ddb39f 100644 --- a/internal/eventbus/event_bus.go +++ b/internal/eventbus/event_bus.go @@ -89,7 +89,7 @@ func (b *EventBus) Publish(ctx context.Context, eventValue string, eventData typ } func (b *EventBus) PublishEventNewBlock(ctx context.Context, data types.EventDataNewBlock) error { - events := append(data.ResultBeginBlock.Events, data.ResultEndBlock.Events...) + events := data.ResultFinalizeBlock.Events // add Tendermint-reserved new block event events = append(events, types.EventNewBlock) @@ -100,7 +100,7 @@ func (b *EventBus) PublishEventNewBlock(ctx context.Context, data types.EventDat func (b *EventBus) PublishEventNewBlockHeader(ctx context.Context, data types.EventDataNewBlockHeader) error { // no explicit deadline for publishing events - events := append(data.ResultBeginBlock.Events, data.ResultEndBlock.Events...) + events := data.ResultFinalizeBlock.Events // add Tendermint-reserved new block header event events = append(events, types.EventNewBlockHeader) diff --git a/internal/eventbus/event_bus_test.go b/internal/eventbus/event_bus_test.go index 8ecd1f08a..6e8c4e288 100644 --- a/internal/eventbus/event_bus_test.go +++ b/internal/eventbus/event_bus_test.go @@ -83,14 +83,12 @@ func TestEventBusPublishEventNewBlock(t *testing.T) { bps, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} - resultBeginBlock := abci.ResponseBeginBlock{ + resultFinalizeBlock := abci.ResponseFinalizeBlock{ Events: []abci.Event{ - {Type: "testType", Attributes: []abci.EventAttribute{{Key: "baz", Value: "1"}}}, - }, - } - resultEndBlock := abci.ResponseEndBlock{ - Events: []abci.Event{ - {Type: "testType", Attributes: []abci.EventAttribute{{Key: "foz", Value: "2"}}}, + {Type: "testType", Attributes: []abci.EventAttribute{ + {Key: "baz", Value: "1"}, + {Key: "foz", Value: "2"}, + }}, }, } @@ -111,15 +109,13 @@ func TestEventBusPublishEventNewBlock(t *testing.T) { edt := msg.Data().(types.EventDataNewBlock) assert.Equal(t, block, edt.Block) assert.Equal(t, blockID, edt.BlockID) - assert.Equal(t, resultBeginBlock, edt.ResultBeginBlock) - assert.Equal(t, resultEndBlock, edt.ResultEndBlock) + assert.Equal(t, resultFinalizeBlock, edt.ResultFinalizeBlock) }() err = eventBus.PublishEventNewBlock(ctx, types.EventDataNewBlock{ - Block: block, - BlockID: blockID, - ResultBeginBlock: resultBeginBlock, - ResultEndBlock: resultEndBlock, + Block: block, + BlockID: blockID, + ResultFinalizeBlock: resultFinalizeBlock, }) assert.NoError(t, err) @@ -256,14 +252,12 @@ func TestEventBusPublishEventNewBlockHeader(t *testing.T) { require.NoError(t, err) block := types.MakeBlock(0, []types.Tx{}, nil, []types.Evidence{}) - resultBeginBlock := abci.ResponseBeginBlock{ - Events: []abci.Event{ - {Type: "testType", Attributes: []abci.EventAttribute{{Key: "baz", Value: "1"}}}, - }, - } - resultEndBlock := abci.ResponseEndBlock{ + resultFinalizeBlock := abci.ResponseFinalizeBlock{ Events: []abci.Event{ - {Type: "testType", Attributes: []abci.EventAttribute{{Key: "foz", Value: "2"}}}, + {Type: "testType", Attributes: []abci.EventAttribute{ + {Key: "baz", Value: "1"}, + {Key: "foz", Value: "2"}, + }}, }, } @@ -283,14 +277,12 @@ func TestEventBusPublishEventNewBlockHeader(t *testing.T) { edt := msg.Data().(types.EventDataNewBlockHeader) assert.Equal(t, block.Header, edt.Header) - assert.Equal(t, resultBeginBlock, edt.ResultBeginBlock) - assert.Equal(t, resultEndBlock, edt.ResultEndBlock) + assert.Equal(t, resultFinalizeBlock, edt.ResultFinalizeBlock) }() err = eventBus.PublishEventNewBlockHeader(ctx, types.EventDataNewBlockHeader{ - Header: block.Header, - ResultBeginBlock: resultBeginBlock, - ResultEndBlock: resultEndBlock, + Header: block.Header, + ResultFinalizeBlock: resultFinalizeBlock, }) assert.NoError(t, err) diff --git a/internal/evidence/mocks/block_store.go b/internal/evidence/mocks/block_store.go index ef3346b2a..5ea8d8344 100644 --- a/internal/evidence/mocks/block_store.go +++ b/internal/evidence/mocks/block_store.go @@ -4,6 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" + types "github.com/tendermint/tendermint/types" ) diff --git a/internal/inspect/inspect_test.go b/internal/inspect/inspect_test.go index f80a2e55a..810706607 100644 --- a/internal/inspect/inspect_test.go +++ b/internal/inspect/inspect_test.go @@ -14,6 +14,7 @@ import ( "github.com/fortytw2/leaktest" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + abcitypes "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/inspect" @@ -263,13 +264,13 @@ func TestBlockResults(t *testing.T) { stateStoreMock := &statemocks.Store{} // tmstate "github.com/tendermint/tendermint/proto/tendermint/state" stateStoreMock.On("LoadABCIResponses", testHeight).Return(&state.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - { - GasUsed: testGasUsed, + FinalizeBlock: &abcitypes.ResponseFinalizeBlock{ + Txs: []*abcitypes.ResponseDeliverTx{ + { + GasUsed: testGasUsed, + }, }, }, - EndBlock: &abcitypes.ResponseEndBlock{}, - BeginBlock: &abcitypes.ResponseBeginBlock{}, }, nil) blockStoreMock := &statemocks.BlockStore{} blockStoreMock.On("Base").Return(int64(0)) diff --git a/internal/mempool/ids_test.go b/internal/mempool/ids_test.go index 006ad5ced..6601706bc 100644 --- a/internal/mempool/ids_test.go +++ b/internal/mempool/ids_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/types" ) diff --git a/internal/mempool/reactor_test.go b/internal/mempool/reactor_test.go index 46b4e8528..9c849cf2a 100644 --- a/internal/mempool/reactor_test.go +++ b/internal/mempool/reactor_test.go @@ -12,6 +12,7 @@ import ( "github.com/fortytw2/leaktest" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" diff --git a/internal/mempool/tx_test.go b/internal/mempool/tx_test.go index b68246076..c6d494b04 100644 --- a/internal/mempool/tx_test.go +++ b/internal/mempool/tx_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/types" ) diff --git a/internal/p2p/channel.go b/internal/p2p/channel.go index 1faa2a6d0..d7dad4d3b 100644 --- a/internal/p2p/channel.go +++ b/internal/p2p/channel.go @@ -6,6 +6,7 @@ import ( "sync" "github.com/gogo/protobuf/proto" + "github.com/tendermint/tendermint/types" ) diff --git a/internal/p2p/metrics_test.go b/internal/p2p/metrics_test.go index 53b3c47bd..839786d91 100644 --- a/internal/p2p/metrics_test.go +++ b/internal/p2p/metrics_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/internal/p2p/p2ptest/util.go b/internal/p2p/p2ptest/util.go index 544e937bb..e0d18caae 100644 --- a/internal/p2p/p2ptest/util.go +++ b/internal/p2p/p2ptest/util.go @@ -2,6 +2,7 @@ package p2ptest import ( gogotypes "github.com/gogo/protobuf/types" + "github.com/tendermint/tendermint/types" ) diff --git a/internal/p2p/pqueue.go b/internal/p2p/pqueue.go index 229fb8203..21c950dfb 100644 --- a/internal/p2p/pqueue.go +++ b/internal/p2p/pqueue.go @@ -9,6 +9,7 @@ import ( "time" "github.com/gogo/protobuf/proto" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/internal/p2p/pqueue_test.go b/internal/p2p/pqueue_test.go index 03841d000..22ecbcecb 100644 --- a/internal/p2p/pqueue_test.go +++ b/internal/p2p/pqueue_test.go @@ -6,6 +6,7 @@ import ( "time" gogotypes "github.com/gogo/protobuf/types" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/internal/p2p/router_filter_test.go b/internal/p2p/router_filter_test.go index cfef6d10b..8915dc888 100644 --- a/internal/p2p/router_filter_test.go +++ b/internal/p2p/router_filter_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/internal/p2p/router_init_test.go b/internal/p2p/router_init_test.go index b2a8fe1a0..19b4aa94c 100644 --- a/internal/p2p/router_init_test.go +++ b/internal/p2p/router_init_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/types" ) diff --git a/internal/p2p/transport_memory_test.go b/internal/p2p/transport_memory_test.go index c4eea65c3..0569faa30 100644 --- a/internal/p2p/transport_memory_test.go +++ b/internal/p2p/transport_memory_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/types" diff --git a/internal/proxy/app_conn.go b/internal/proxy/app_conn.go index 4dc86b72c..9342bd75d 100644 --- a/internal/proxy/app_conn.go +++ b/internal/proxy/app_conn.go @@ -5,6 +5,7 @@ import ( "time" "github.com/go-kit/kit/metrics" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/types" ) @@ -24,9 +25,7 @@ type AppConnConsensus interface { ProcessProposal(context.Context, types.RequestProcessProposal) (*types.ResponseProcessProposal, error) ExtendVote(context.Context, types.RequestExtendVote) (*types.ResponseExtendVote, error) VerifyVoteExtension(context.Context, types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) - BeginBlock(context.Context, types.RequestBeginBlock) (*types.ResponseBeginBlock, error) - DeliverTx(context.Context, types.RequestDeliverTx) (*types.ResponseDeliverTx, error) - EndBlock(context.Context, types.RequestEndBlock) (*types.ResponseEndBlock, error) + FinalizeBlock(context.Context, types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) Commit(context.Context) (*types.ResponseCommit, error) } @@ -123,28 +122,12 @@ func (app *appConnConsensus) VerifyVoteExtension( return app.appConn.VerifyVoteExtension(ctx, req) } -func (app *appConnConsensus) BeginBlock( - ctx context.Context, - req types.RequestBeginBlock, -) (*types.ResponseBeginBlock, error) { - defer addTimeSample(app.metrics.MethodTiming.With("method", "begin_block", "type", "sync"))() - return app.appConn.BeginBlock(ctx, req) -} - -func (app *appConnConsensus) DeliverTx( - ctx context.Context, - req types.RequestDeliverTx, -) (*types.ResponseDeliverTx, error) { - defer addTimeSample(app.metrics.MethodTiming.With("method", "deliver_tx", "type", "sync"))() - return app.appConn.DeliverTx(ctx, req) -} - -func (app *appConnConsensus) EndBlock( +func (app *appConnConsensus) FinalizeBlock( ctx context.Context, - req types.RequestEndBlock, -) (*types.ResponseEndBlock, error) { - defer addTimeSample(app.metrics.MethodTiming.With("method", "deliver_tx", "type", "sync"))() - return app.appConn.EndBlock(ctx, req) + req types.RequestFinalizeBlock, +) (*types.ResponseFinalizeBlock, error) { + defer addTimeSample(app.metrics.MethodTiming.With("method", "finalize_block", "type", "sync"))() + return app.appConn.FinalizeBlock(ctx, req) } func (app *appConnConsensus) Commit(ctx context.Context) (*types.ResponseCommit, error) { diff --git a/internal/proxy/app_conn_test.go b/internal/proxy/app_conn_test.go index de8eac35d..22f519657 100644 --- a/internal/proxy/app_conn_test.go +++ b/internal/proxy/app_conn_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" + abciclient "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/abci/server" diff --git a/internal/proxy/mocks/app_conn_consensus.go b/internal/proxy/mocks/app_conn_consensus.go index ba34020cc..38211c190 100644 --- a/internal/proxy/mocks/app_conn_consensus.go +++ b/internal/proxy/mocks/app_conn_consensus.go @@ -17,29 +17,6 @@ type AppConnConsensus struct { mock.Mock } -// BeginBlock provides a mock function with given fields: _a0, _a1 -func (_m *AppConnConsensus) BeginBlock(_a0 context.Context, _a1 types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseBeginBlock - if rf, ok := ret.Get(0).(func(context.Context, types.RequestBeginBlock) *types.ResponseBeginBlock); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseBeginBlock) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestBeginBlock) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // Commit provides a mock function with given fields: _a0 func (_m *AppConnConsensus) Commit(_a0 context.Context) (*types.ResponseCommit, error) { ret := _m.Called(_a0) @@ -63,44 +40,35 @@ func (_m *AppConnConsensus) Commit(_a0 context.Context) (*types.ResponseCommit, return r0, r1 } -// DeliverTx provides a mock function with given fields: _a0, _a1 -func (_m *AppConnConsensus) DeliverTx(_a0 context.Context, _a1 types.RequestDeliverTx) (*types.ResponseDeliverTx, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseDeliverTx - if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *types.ResponseDeliverTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseDeliverTx) - } - } +// Error provides a mock function with given fields: +func (_m *AppConnConsensus) Error() error { + ret := _m.Called() - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestDeliverTx) error); ok { - r1 = rf(_a0, _a1) + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() } else { - r1 = ret.Error(1) + r0 = ret.Error(0) } - return r0, r1 + return r0 } -// EndBlock provides a mock function with given fields: _a0, _a1 -func (_m *AppConnConsensus) EndBlock(_a0 context.Context, _a1 types.RequestEndBlock) (*types.ResponseEndBlock, error) { +// ExtendVote provides a mock function with given fields: _a0, _a1 +func (_m *AppConnConsensus) ExtendVote(_a0 context.Context, _a1 types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) - var r0 *types.ResponseEndBlock - if rf, ok := ret.Get(0).(func(context.Context, types.RequestEndBlock) *types.ResponseEndBlock); ok { + var r0 *types.ResponseExtendVote + if rf, ok := ret.Get(0).(func(context.Context, types.RequestExtendVote) *types.ResponseExtendVote); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseEndBlock) + r0 = ret.Get(0).(*types.ResponseExtendVote) } } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestEndBlock) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, types.RequestExtendVote) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -109,35 +77,21 @@ func (_m *AppConnConsensus) EndBlock(_a0 context.Context, _a1 types.RequestEndBl return r0, r1 } -// Error provides a mock function with given fields: -func (_m *AppConnConsensus) Error() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ExtendVote provides a mock function with given fields: _a0, _a1 -func (_m *AppConnConsensus) ExtendVote(_a0 context.Context, _a1 types.RequestExtendVote) (*types.ResponseExtendVote, error) { +// FinalizeBlock provides a mock function with given fields: _a0, _a1 +func (_m *AppConnConsensus) FinalizeBlock(_a0 context.Context, _a1 types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) - var r0 *types.ResponseExtendVote - if rf, ok := ret.Get(0).(func(context.Context, types.RequestExtendVote) *types.ResponseExtendVote); ok { + var r0 *types.ResponseFinalizeBlock + if rf, ok := ret.Get(0).(func(context.Context, types.RequestFinalizeBlock) *types.ResponseFinalizeBlock); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseExtendVote) + r0 = ret.Get(0).(*types.ResponseFinalizeBlock) } } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestExtendVote) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, types.RequestFinalizeBlock) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) diff --git a/internal/pubsub/pubsub_test.go b/internal/pubsub/pubsub_test.go index 9ba515d70..eee065fbf 100644 --- a/internal/pubsub/pubsub_test.go +++ b/internal/pubsub/pubsub_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/pubsub" "github.com/tendermint/tendermint/internal/pubsub/query" diff --git a/internal/pubsub/subscription.go b/internal/pubsub/subscription.go index 933e62e1c..fd1a23929 100644 --- a/internal/pubsub/subscription.go +++ b/internal/pubsub/subscription.go @@ -5,6 +5,7 @@ import ( "errors" "github.com/google/uuid" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/libs/queue" "github.com/tendermint/tendermint/types" diff --git a/internal/rpc/core/blocks.go b/internal/rpc/core/blocks.go index 9f6c872ca..6258dc060 100644 --- a/internal/rpc/core/blocks.go +++ b/internal/rpc/core/blocks.go @@ -208,18 +208,17 @@ func (env *Environment) BlockResults(ctx context.Context, heightPtr *int64) (*co } var totalGasUsed int64 - for _, tx := range results.GetDeliverTxs() { + for _, tx := range results.FinalizeBlock.GetTxs() { totalGasUsed += tx.GetGasUsed() } return &coretypes.ResultBlockResults{ Height: height, - TxsResults: results.DeliverTxs, + TxsResults: results.FinalizeBlock.Txs, TotalGasUsed: totalGasUsed, - BeginBlockEvents: results.BeginBlock.Events, - EndBlockEvents: results.EndBlock.Events, - ValidatorUpdates: results.EndBlock.ValidatorUpdates, - ConsensusParamUpdates: results.EndBlock.ConsensusParamUpdates, + FinalizeBlockEvents: results.FinalizeBlock.Events, + ValidatorUpdates: results.FinalizeBlock.ValidatorUpdates, + ConsensusParamUpdates: results.FinalizeBlock.ConsensusParamUpdates, }, nil } diff --git a/internal/rpc/core/blocks_test.go b/internal/rpc/core/blocks_test.go index b1746acb7..4baff9d38 100644 --- a/internal/rpc/core/blocks_test.go +++ b/internal/rpc/core/blocks_test.go @@ -71,13 +71,13 @@ func TestBlockchainInfo(t *testing.T) { func TestBlockResults(t *testing.T) { results := &tmstate.ABCIResponses{ - DeliverTxs: []*abci.ResponseDeliverTx{ - {Code: 0, Data: []byte{0x01}, Log: "ok", GasUsed: 10}, - {Code: 0, Data: []byte{0x02}, Log: "ok", GasUsed: 5}, - {Code: 1, Log: "not ok", GasUsed: 0}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + Txs: []*abci.ResponseDeliverTx{ + {Code: 0, Data: []byte{0x01}, Log: "ok", GasUsed: 10}, + {Code: 0, Data: []byte{0x02}, Log: "ok", GasUsed: 5}, + {Code: 1, Log: "not ok", GasUsed: 0}, + }, }, - EndBlock: &abci.ResponseEndBlock{}, - BeginBlock: &abci.ResponseBeginBlock{}, } env := &Environment{} @@ -99,12 +99,11 @@ func TestBlockResults(t *testing.T) { {101, true, nil}, {100, false, &coretypes.ResultBlockResults{ Height: 100, - TxsResults: results.DeliverTxs, + TxsResults: results.FinalizeBlock.Txs, TotalGasUsed: 15, - BeginBlockEvents: results.BeginBlock.Events, - EndBlockEvents: results.EndBlock.Events, - ValidatorUpdates: results.EndBlock.ValidatorUpdates, - ConsensusParamUpdates: results.EndBlock.ConsensusParamUpdates, + FinalizeBlockEvents: results.FinalizeBlock.Events, + ValidatorUpdates: results.FinalizeBlock.ValidatorUpdates, + ConsensusParamUpdates: results.FinalizeBlock.ConsensusParamUpdates, }}, } diff --git a/internal/rpc/core/env.go b/internal/rpc/core/env.go index 448cd85a0..1b046038e 100644 --- a/internal/rpc/core/env.go +++ b/internal/rpc/core/env.go @@ -10,6 +10,7 @@ import ( "time" "github.com/rs/cors" + "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/internal/blocksync" diff --git a/internal/state/execution.go b/internal/state/execution.go index 6da7060a8..380da556e 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -223,7 +223,7 @@ func (blockExec *BlockExecutor) ApplyBlock( } // validate the validator updates and convert to tendermint types - abciValUpdates := abciResponses.EndBlock.ValidatorUpdates + abciValUpdates := abciResponses.FinalizeBlock.ValidatorUpdates err = validateValidatorUpdates(abciValUpdates, state.ConsensusParams.Validator) if err != nil { return state, fmt.Errorf("error in validator updates: %w", err) @@ -244,7 +244,7 @@ func (blockExec *BlockExecutor) ApplyBlock( } // Lock mempool, commit app state, update mempoool. - appHash, retainHeight, err := blockExec.Commit(ctx, state, block, abciResponses.DeliverTxs) + appHash, retainHeight, err := blockExec.Commit(ctx, state, block, abciResponses.FinalizeBlock.Txs) if err != nil { return state, fmt.Errorf("commit failed for application: %w", err) } @@ -372,12 +372,10 @@ func execBlockOnProxyApp( store Store, initialHeight int64, ) (*tmstate.ABCIResponses, error) { - var validTxs, invalidTxs = 0, 0 - - txIndex := 0 abciResponses := new(tmstate.ABCIResponses) + abciResponses.FinalizeBlock = &abci.ResponseFinalizeBlock{} dtxs := make([]*abci.ResponseDeliverTx, len(block.Txs)) - abciResponses.DeliverTxs = dtxs + abciResponses.FinalizeBlock.Txs = dtxs commitInfo := getBeginBlockValidatorInfo(block, store, initialHeight) @@ -393,44 +391,22 @@ func execBlockOnProxyApp( return nil, errors.New("nil header") } - abciResponses.BeginBlock, err = proxyAppConn.BeginBlock( + abciResponses.FinalizeBlock, err = proxyAppConn.FinalizeBlock( ctx, - abci.RequestBeginBlock{ + abci.RequestFinalizeBlock{ Hash: block.Hash(), Header: *pbh, + Height: block.Height, LastCommitInfo: commitInfo, ByzantineValidators: byzVals, + Txs: block.Txs.ToSliceOfBytes(), }, ) if err != nil { - logger.Error("error in proxyAppConn.BeginBlock", "err", err) - return nil, err - } - - // run txs of block - for _, tx := range block.Txs { - resp, err := proxyAppConn.DeliverTx(ctx, abci.RequestDeliverTx{Tx: tx}) - if err != nil { - return nil, err - } - if resp.Code == abci.CodeTypeOK { - validTxs++ - } else { - logger.Debug("invalid tx", "code", resp.Code, "log", resp.Log) - invalidTxs++ - } - - abciResponses.DeliverTxs[txIndex] = resp - txIndex++ - } - - abciResponses.EndBlock, err = proxyAppConn.EndBlock(ctx, abci.RequestEndBlock{Height: block.Height}) - if err != nil { - logger.Error("error in proxyAppConn.EndBlock", "err", err) + logger.Error("error in proxyAppConn.FinalizeBlock", "err", err) return nil, err } - - logger.Info("executed block", "height", block.Height, "num_valid_txs", validTxs, "num_invalid_txs", invalidTxs) + logger.Info("executed block", "height", block.Height) return abciResponses, nil } @@ -529,9 +505,9 @@ func updateState( // Update the params with the latest abciResponses. nextParams := state.ConsensusParams lastHeightParamsChanged := state.LastHeightConsensusParamsChanged - if abciResponses.EndBlock.ConsensusParamUpdates != nil { + if abciResponses.FinalizeBlock.ConsensusParamUpdates != nil { // NOTE: must not mutate s.ConsensusParams - nextParams = state.ConsensusParams.UpdateConsensusParams(abciResponses.EndBlock.ConsensusParamUpdates) + nextParams = state.ConsensusParams.UpdateConsensusParams(abciResponses.FinalizeBlock.ConsensusParamUpdates) err := nextParams.ValidateConsensusParams() if err != nil { return state, fmt.Errorf("error updating consensus params: %w", err) @@ -578,19 +554,17 @@ func fireEvents( validatorUpdates []*types.Validator, ) { if err := eventBus.PublishEventNewBlock(ctx, types.EventDataNewBlock{ - Block: block, - BlockID: blockID, - ResultBeginBlock: *abciResponses.BeginBlock, - ResultEndBlock: *abciResponses.EndBlock, + Block: block, + BlockID: blockID, + ResultFinalizeBlock: *abciResponses.FinalizeBlock, }); err != nil { logger.Error("failed publishing new block", "err", err) } if err := eventBus.PublishEventNewBlockHeader(ctx, types.EventDataNewBlockHeader{ - Header: block.Header, - NumTxs: int64(len(block.Txs)), - ResultBeginBlock: *abciResponses.BeginBlock, - ResultEndBlock: *abciResponses.EndBlock, + Header: block.Header, + NumTxs: int64(len(block.Txs)), + ResultFinalizeBlock: *abciResponses.FinalizeBlock, }); err != nil { logger.Error("failed publishing new block header", "err", err) } @@ -606,13 +580,21 @@ func fireEvents( } } + // sanity check + if len(abciResponses.FinalizeBlock.Txs) != len(block.Data.Txs) { + panic(fmt.Sprintf("number of TXs (%d) and ABCI TX responses (%d) do not match", + len(block.Data.Txs), len(abciResponses.FinalizeBlock.Txs))) + } + for i, tx := range block.Data.Txs { - if err := eventBus.PublishEventTx(ctx, types.EventDataTx{TxResult: abci.TxResult{ - Height: block.Height, - Index: uint32(i), - Tx: tx, - Result: *(abciResponses.DeliverTxs[i]), - }}); err != nil { + if err := eventBus.PublishEventTx(ctx, types.EventDataTx{ + TxResult: abci.TxResult{ + Height: block.Height, + Index: uint32(i), + Tx: tx, + Result: *(abciResponses.FinalizeBlock.Txs[i]), + }, + }); err != nil { logger.Error("failed publishing event TX", "err", err) } } @@ -648,7 +630,7 @@ func ExecCommitBlock( // the BlockExecutor condition is using for the final block replay process. if be != nil { - abciValUpdates := abciResponses.EndBlock.ValidatorUpdates + abciValUpdates := abciResponses.FinalizeBlock.ValidatorUpdates err = validateValidatorUpdates(abciValUpdates, s.ConsensusParams.Validator) if err != nil { logger.Error("err", err) diff --git a/internal/state/helpers_test.go b/internal/state/helpers_test.go index 4bebe1a94..ed69b275b 100644 --- a/internal/state/helpers_test.go +++ b/internal/state/helpers_test.go @@ -156,8 +156,7 @@ func makeHeaderPartsResponsesValPubKeyChange( block, err := sf.MakeBlock(state, state.LastBlockHeight+1, new(types.Commit)) require.NoError(t, err) abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ValidatorUpdates: nil}, } // If the pubkey is new, remove the old and add the new. _, val := state.NextValidators.GetByIndex(0) @@ -167,7 +166,7 @@ func makeHeaderPartsResponsesValPubKeyChange( pbPk, err := encoding.PubKeyToProto(pubkey) require.NoError(t, err) - abciResponses.EndBlock = &abci.ResponseEndBlock{ + abciResponses.FinalizeBlock = &abci.ResponseFinalizeBlock{ ValidatorUpdates: []abci.ValidatorUpdate{ {PubKey: vPbPk, Power: 0}, {PubKey: pbPk, Power: 10}, @@ -189,8 +188,7 @@ func makeHeaderPartsResponsesValPowerChange( require.NoError(t, err) abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ValidatorUpdates: nil}, } // If the pubkey is new, remove the old and add the new. @@ -199,7 +197,7 @@ func makeHeaderPartsResponsesValPowerChange( vPbPk, err := encoding.PubKeyToProto(val.PubKey) require.NoError(t, err) - abciResponses.EndBlock = &abci.ResponseEndBlock{ + abciResponses.FinalizeBlock = &abci.ResponseFinalizeBlock{ ValidatorUpdates: []abci.ValidatorUpdate{ {PubKey: vPbPk, Power: power}, }, @@ -220,8 +218,7 @@ func makeHeaderPartsResponsesParams( require.NoError(t, err) pbParams := params.ToProto() abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ConsensusParamUpdates: &pbParams}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ConsensusParamUpdates: &pbParams}, } return block.Header, types.BlockID{Hash: block.Hash(), PartSetHeader: types.PartSetHeader{}}, abciResponses } @@ -298,22 +295,29 @@ func (app *testApp) Info(req abci.RequestInfo) (resInfo abci.ResponseInfo) { return abci.ResponseInfo{} } -func (app *testApp) BeginBlock(req abci.RequestBeginBlock) abci.ResponseBeginBlock { +func (app *testApp) FinalizeBlock(req abci.RequestFinalizeBlock) abci.ResponseFinalizeBlock { app.CommitVotes = req.LastCommitInfo.Votes app.ByzantineValidators = req.ByzantineValidators - return abci.ResponseBeginBlock{} -} -func (app *testApp) EndBlock(req abci.RequestEndBlock) abci.ResponseEndBlock { - return abci.ResponseEndBlock{ + resTxs := make([]*abci.ResponseDeliverTx, len(req.Txs)) + for i, tx := range req.Txs { + if len(tx) > 0 { + resTxs[i] = &abci.ResponseDeliverTx{Code: abci.CodeTypeOK} + } else { + resTxs[i] = &abci.ResponseDeliverTx{Code: abci.CodeTypeOK + 10} // error + } + } + + return abci.ResponseFinalizeBlock{ ValidatorUpdates: app.ValidatorUpdates, ConsensusParamUpdates: &tmproto.ConsensusParams{ Version: &tmproto.VersionParams{ - AppVersion: 1}}} -} - -func (app *testApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx { - return abci.ResponseDeliverTx{Events: []abci.Event{}} + AppVersion: 1, + }, + }, + Events: []abci.Event{}, + Txs: resTxs, + } } func (app *testApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { diff --git a/internal/state/indexer/block/kv/kv.go b/internal/state/indexer/block/kv/kv.go index 2ac133bf1..f26eb30bb 100644 --- a/internal/state/indexer/block/kv/kv.go +++ b/internal/state/indexer/block/kv/kv.go @@ -66,13 +66,8 @@ func (idx *BlockerIndexer) Index(bh types.EventDataNewBlockHeader) error { } // 2. index BeginBlock events - if err := idx.indexEvents(batch, bh.ResultBeginBlock.Events, "begin_block", height); err != nil { - return fmt.Errorf("failed to index BeginBlock events: %w", err) - } - - // 3. index EndBlock events - if err := idx.indexEvents(batch, bh.ResultEndBlock.Events, "end_block", height); err != nil { - return fmt.Errorf("failed to index EndBlock events: %w", err) + if err := idx.indexEvents(batch, bh.ResultFinalizeBlock.Events, "finalize_block", height); err != nil { + return fmt.Errorf("failed to index FinalizeBlock events: %w", err) } return batch.WriteSync() diff --git a/internal/state/indexer/block/kv/kv_test.go b/internal/state/indexer/block/kv/kv_test.go index 8878e0f08..eabe981a3 100644 --- a/internal/state/indexer/block/kv/kv_test.go +++ b/internal/state/indexer/block/kv/kv_test.go @@ -20,10 +20,10 @@ func TestBlockIndexer(t *testing.T) { require.NoError(t, indexer.Index(types.EventDataNewBlockHeader{ Header: types.Header{Height: 1}, - ResultBeginBlock: abci.ResponseBeginBlock{ + ResultFinalizeBlock: abci.ResponseFinalizeBlock{ Events: []abci.Event{ { - Type: "begin_event", + Type: "finalize_event1", Attributes: []abci.EventAttribute{ { Key: "proposer", @@ -32,12 +32,8 @@ func TestBlockIndexer(t *testing.T) { }, }, }, - }, - }, - ResultEndBlock: abci.ResponseEndBlock{ - Events: []abci.Event{ { - Type: "end_event", + Type: "finalize_event2", Attributes: []abci.EventAttribute{ { Key: "foo", @@ -55,13 +51,12 @@ func TestBlockIndexer(t *testing.T) { if i%2 == 0 { index = true } - require.NoError(t, indexer.Index(types.EventDataNewBlockHeader{ Header: types.Header{Height: int64(i)}, - ResultBeginBlock: abci.ResponseBeginBlock{ + ResultFinalizeBlock: abci.ResponseFinalizeBlock{ Events: []abci.Event{ { - Type: "begin_event", + Type: "finalize_event1", Attributes: []abci.EventAttribute{ { Key: "proposer", @@ -70,12 +65,8 @@ func TestBlockIndexer(t *testing.T) { }, }, }, - }, - }, - ResultEndBlock: abci.ResponseEndBlock{ - Events: []abci.Event{ { - Type: "end_event", + Type: "finalize_event2", Attributes: []abci.EventAttribute{ { Key: "foo", @@ -102,31 +93,31 @@ func TestBlockIndexer(t *testing.T) { results: []int64{5}, }, "begin_event.key1 = 'value1'": { - q: query.MustCompile(`begin_event.key1 = 'value1'`), + q: query.MustCompile(`finalize_event1.key1 = 'value1'`), results: []int64{}, }, "begin_event.proposer = 'FCAA001'": { - q: query.MustCompile(`begin_event.proposer = 'FCAA001'`), + q: query.MustCompile(`finalize_event1.proposer = 'FCAA001'`), results: []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, }, "end_event.foo <= 5": { - q: query.MustCompile(`end_event.foo <= 5`), + q: query.MustCompile(`finalize_event2.foo <= 5`), results: []int64{2, 4}, }, "end_event.foo >= 100": { - q: query.MustCompile(`end_event.foo >= 100`), + q: query.MustCompile(`finalize_event2.foo >= 100`), results: []int64{1}, }, - "block.height > 2 AND end_event.foo <= 8": { - q: query.MustCompile(`block.height > 2 AND end_event.foo <= 8`), + "block.height > 2 AND finalize_event2.foo <= 8": { + q: query.MustCompile(`block.height > 2 AND finalize_event2.foo <= 8`), results: []int64{4, 6, 8}, }, "begin_event.proposer CONTAINS 'FFFFFFF'": { - q: query.MustCompile(`begin_event.proposer CONTAINS 'FFFFFFF'`), + q: query.MustCompile(`finalize_event1.proposer CONTAINS 'FFFFFFF'`), results: []int64{}, }, "begin_event.proposer CONTAINS 'FCAA001'": { - q: query.MustCompile(`begin_event.proposer CONTAINS 'FCAA001'`), + q: query.MustCompile(`finalize_event1.proposer CONTAINS 'FCAA001'`), results: []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, }, } diff --git a/internal/state/indexer/block/kv/util.go b/internal/state/indexer/block/kv/util.go index 28e22718c..fd6846273 100644 --- a/internal/state/indexer/block/kv/util.go +++ b/internal/state/indexer/block/kv/util.go @@ -6,6 +6,7 @@ import ( "strconv" "github.com/google/orderedcode" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/mocks/event_sink.go b/internal/state/indexer/mocks/event_sink.go index d5555a417..6173480dd 100644 --- a/internal/state/indexer/mocks/event_sink.go +++ b/internal/state/indexer/mocks/event_sink.go @@ -6,6 +6,7 @@ import ( context "context" mock "github.com/stretchr/testify/mock" + indexer "github.com/tendermint/tendermint/internal/state/indexer" query "github.com/tendermint/tendermint/internal/pubsub/query" diff --git a/internal/state/indexer/sink/kv/kv_test.go b/internal/state/indexer/sink/kv/kv_test.go index b6436dafd..b59d55856 100644 --- a/internal/state/indexer/sink/kv/kv_test.go +++ b/internal/state/indexer/sink/kv/kv_test.go @@ -10,6 +10,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" @@ -33,10 +34,10 @@ func TestBlockFuncs(t *testing.T) { require.NoError(t, indexer.IndexBlockEvents(types.EventDataNewBlockHeader{ Header: types.Header{Height: 1}, - ResultBeginBlock: abci.ResponseBeginBlock{ + ResultFinalizeBlock: abci.ResponseFinalizeBlock{ Events: []abci.Event{ { - Type: "begin_event", + Type: "finalize_eventA", Attributes: []abci.EventAttribute{ { Key: "proposer", @@ -45,12 +46,8 @@ func TestBlockFuncs(t *testing.T) { }, }, }, - }, - }, - ResultEndBlock: abci.ResponseEndBlock{ - Events: []abci.Event{ { - Type: "end_event", + Type: "finalize_eventB", Attributes: []abci.EventAttribute{ { Key: "foo", @@ -75,10 +72,10 @@ func TestBlockFuncs(t *testing.T) { require.NoError(t, indexer.IndexBlockEvents(types.EventDataNewBlockHeader{ Header: types.Header{Height: int64(i)}, - ResultBeginBlock: abci.ResponseBeginBlock{ + ResultFinalizeBlock: abci.ResponseFinalizeBlock{ Events: []abci.Event{ { - Type: "begin_event", + Type: "finalize_eventA", Attributes: []abci.EventAttribute{ { Key: "proposer", @@ -87,12 +84,8 @@ func TestBlockFuncs(t *testing.T) { }, }, }, - }, - }, - ResultEndBlock: abci.ResponseEndBlock{ - Events: []abci.Event{ { - Type: "end_event", + Type: "finalize_eventB", Attributes: []abci.EventAttribute{ { Key: "foo", @@ -118,32 +111,32 @@ func TestBlockFuncs(t *testing.T) { q: query.MustCompile(`block.height = 5`), results: []int64{5}, }, - "begin_event.key1 = 'value1'": { - q: query.MustCompile(`begin_event.key1 = 'value1'`), + "finalize_eventA.key1 = 'value1'": { + q: query.MustCompile(`finalize_eventA.key1 = 'value1'`), results: []int64{}, }, - "begin_event.proposer = 'FCAA001'": { - q: query.MustCompile(`begin_event.proposer = 'FCAA001'`), + "finalize_eventA.proposer = 'FCAA001'": { + q: query.MustCompile(`finalize_eventA.proposer = 'FCAA001'`), results: []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, }, - "end_event.foo <= 5": { - q: query.MustCompile(`end_event.foo <= 5`), + "finalize_eventB.foo <= 5": { + q: query.MustCompile(`finalize_eventB.foo <= 5`), results: []int64{2, 4}, }, - "end_event.foo >= 100": { - q: query.MustCompile(`end_event.foo >= 100`), + "finalize_eventB.foo >= 100": { + q: query.MustCompile(`finalize_eventB.foo >= 100`), results: []int64{1}, }, - "block.height > 2 AND end_event.foo <= 8": { - q: query.MustCompile(`block.height > 2 AND end_event.foo <= 8`), + "block.height > 2 AND finalize_eventB.foo <= 8": { + q: query.MustCompile(`block.height > 2 AND finalize_eventB.foo <= 8`), results: []int64{4, 6, 8}, }, - "begin_event.proposer CONTAINS 'FFFFFFF'": { - q: query.MustCompile(`begin_event.proposer CONTAINS 'FFFFFFF'`), + "finalize_eventA.proposer CONTAINS 'FFFFFFF'": { + q: query.MustCompile(`finalize_eventA.proposer CONTAINS 'FFFFFFF'`), results: []int64{}, }, - "begin_event.proposer CONTAINS 'FCAA001'": { - q: query.MustCompile(`begin_event.proposer CONTAINS 'FCAA001'`), + "finalize_eventA.proposer CONTAINS 'FCAA001'": { + q: query.MustCompile(`finalize_eventA.proposer CONTAINS 'FCAA001'`), results: []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, }, } diff --git a/internal/state/indexer/sink/null/null_test.go b/internal/state/indexer/sink/null/null_test.go index 6de7669ce..9af66027f 100644 --- a/internal/state/indexer/sink/null/null_test.go +++ b/internal/state/indexer/sink/null/null_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/sink/psql/psql.go b/internal/state/indexer/sink/psql/psql.go index 1208bca19..c06383264 100644 --- a/internal/state/indexer/sink/psql/psql.go +++ b/internal/state/indexer/sink/psql/psql.go @@ -10,6 +10,7 @@ import ( "time" "github.com/gogo/protobuf/proto" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" @@ -169,11 +170,8 @@ INSERT INTO `+tableBlocks+` (height, chain_id, created_at) return fmt.Errorf("block meta-events: %w", err) } // Insert all the block events. Order is important here, - if err := insertEvents(dbtx, blockID, 0, h.ResultBeginBlock.Events); err != nil { - return fmt.Errorf("begin-block events: %w", err) - } - if err := insertEvents(dbtx, blockID, 0, h.ResultEndBlock.Events); err != nil { - return fmt.Errorf("end-block events: %w", err) + if err := insertEvents(dbtx, blockID, 0, h.ResultFinalizeBlock.Events); err != nil { + return fmt.Errorf("finalize-block events: %w", err) } return nil }) diff --git a/internal/state/indexer/sink/psql/psql_test.go b/internal/state/indexer/sink/psql/psql_test.go index f227ce9e2..9ac541c72 100644 --- a/internal/state/indexer/sink/psql/psql_test.go +++ b/internal/state/indexer/sink/psql/psql_test.go @@ -17,6 +17,7 @@ import ( "github.com/ory/dockertest/docker" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/types" @@ -220,15 +221,11 @@ func TestStop(t *testing.T) { func newTestBlockHeader() types.EventDataNewBlockHeader { return types.EventDataNewBlockHeader{ Header: types.Header{Height: 1}, - ResultBeginBlock: abci.ResponseBeginBlock{ + ResultFinalizeBlock: abci.ResponseFinalizeBlock{ Events: []abci.Event{ - makeIndexedEvent("begin_event.proposer", "FCAA001"), + makeIndexedEvent("finalize_event.proposer", "FCAA001"), makeIndexedEvent("thingy.whatzit", "O.O"), - }, - }, - ResultEndBlock: abci.ResponseEndBlock{ - Events: []abci.Event{ - makeIndexedEvent("end_event.foo", "100"), + makeIndexedEvent("my_event.foo", "100"), makeIndexedEvent("thingy.whatzit", "-.O"), }, }, diff --git a/internal/state/mocks/event_sink.go b/internal/state/mocks/event_sink.go index 97e3aff76..9f2d2daf3 100644 --- a/internal/state/mocks/event_sink.go +++ b/internal/state/mocks/event_sink.go @@ -6,6 +6,7 @@ import ( context "context" mock "github.com/stretchr/testify/mock" + indexer "github.com/tendermint/tendermint/internal/state/indexer" query "github.com/tendermint/tendermint/internal/pubsub/query" diff --git a/internal/state/mocks/evidence_pool.go b/internal/state/mocks/evidence_pool.go index 8bf4a9b64..67127a5fd 100644 --- a/internal/state/mocks/evidence_pool.go +++ b/internal/state/mocks/evidence_pool.go @@ -4,6 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" + state "github.com/tendermint/tendermint/internal/state" types "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go index 02c69d3e0..b7a58e415 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -4,6 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" + state "github.com/tendermint/tendermint/internal/state" tendermintstate "github.com/tendermint/tendermint/proto/tendermint/state" diff --git a/internal/state/state.go b/internal/state/state.go index 20a36a1c4..43cd78fb0 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -8,6 +8,7 @@ import ( "time" "github.com/gogo/protobuf/proto" + tmtime "github.com/tendermint/tendermint/libs/time" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" diff --git a/internal/state/state_test.go b/internal/state/state_test.go index 7a32c38c2..e66cde77a 100644 --- a/internal/state/state_test.go +++ b/internal/state/state_test.go @@ -108,13 +108,14 @@ func TestABCIResponsesSaveLoad1(t *testing.T) { abciResponses := new(tmstate.ABCIResponses) dtxs := make([]*abci.ResponseDeliverTx, 2) - abciResponses.DeliverTxs = dtxs + abciResponses.FinalizeBlock = new(abci.ResponseFinalizeBlock) + abciResponses.FinalizeBlock.Txs = dtxs - abciResponses.DeliverTxs[0] = &abci.ResponseDeliverTx{Data: []byte("foo"), Events: nil} - abciResponses.DeliverTxs[1] = &abci.ResponseDeliverTx{Data: []byte("bar"), Log: "ok", Events: nil} + abciResponses.FinalizeBlock.Txs[0] = &abci.ResponseDeliverTx{Data: []byte("foo"), Events: nil} + abciResponses.FinalizeBlock.Txs[1] = &abci.ResponseDeliverTx{Data: []byte("bar"), Log: "ok", Events: nil} pbpk, err := encoding.PubKeyToProto(ed25519.GenPrivKey().PubKey()) require.NoError(t, err) - abciResponses.EndBlock = &abci.ResponseEndBlock{ValidatorUpdates: []abci.ValidatorUpdate{{PubKey: pbpk, Power: 10}}} + abciResponses.FinalizeBlock.ValidatorUpdates = []abci.ValidatorUpdate{{PubKey: pbpk, Power: 10}} err = stateStore.SaveABCIResponses(block.Height, abciResponses) require.NoError(t, err) @@ -148,7 +149,8 @@ func TestABCIResponsesSaveLoad2(t *testing.T) { }, []*abci.ResponseDeliverTx{ {Code: 32, Data: []byte("Hello")}, - }}, + }, + }, 2: { []*abci.ResponseDeliverTx{ {Code: 383}, @@ -166,7 +168,8 @@ func TestABCIResponsesSaveLoad2(t *testing.T) { {Type: "type1", Attributes: []abci.EventAttribute{{Key: "a", Value: "1"}}}, {Type: "type2", Attributes: []abci.EventAttribute{{Key: "build", Value: "stuff"}}}, }}, - }}, + }, + }, 3: { nil, nil, @@ -188,9 +191,9 @@ func TestABCIResponsesSaveLoad2(t *testing.T) { for i, tc := range cases { h := int64(i + 1) // last block height, one below what we save responses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - DeliverTxs: tc.added, - EndBlock: &abci.ResponseEndBlock{}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + Txs: tc.added, + }, } err := stateStore.SaveABCIResponses(h, responses) require.NoError(t, err) @@ -203,10 +206,12 @@ func TestABCIResponsesSaveLoad2(t *testing.T) { if assert.NoError(t, err, "%d", i) { t.Log(res) responses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - DeliverTxs: tc.expected, - EndBlock: &abci.ResponseEndBlock{}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + Txs: tc.expected, + }, } + sm.ABCIResponsesResultsHash(res) + sm.ABCIResponsesResultsHash(responses) assert.Equal(t, sm.ABCIResponsesResultsHash(responses), sm.ABCIResponsesResultsHash(res), "%d", i) } } @@ -271,7 +276,7 @@ func TestOneValidatorChangesSaveLoad(t *testing.T) { power++ } header, blockID, responses := makeHeaderPartsResponsesValPowerChange(t, state, power) - validatorUpdates, err = types.PB2TM.ValidatorUpdates(responses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(responses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) state, err = sm.UpdateState(state, blockID, &header, responses, validatorUpdates) require.NoError(t, err) @@ -452,10 +457,11 @@ func TestProposerPriorityDoesNotGetResetToZero(t *testing.T) { require.NoError(t, err) blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) updatedState, err := sm.UpdateState(state, blockID, &block.Header, abciResponses, validatorUpdates) assert.NoError(t, err) @@ -570,10 +576,11 @@ func TestProposerPriorityProposerAlternates(t *testing.T) { blockID := types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} // no updates: abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) updatedState, err := sm.UpdateState(state, blockID, &block.Header, abciResponses, validatorUpdates) @@ -633,7 +640,7 @@ func TestProposerPriorityProposerAlternates(t *testing.T) { updatedVal2, ) - validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) updatedState3, err := sm.UpdateState(updatedState2, blockID, &block.Header, abciResponses, validatorUpdates) @@ -673,10 +680,11 @@ func TestProposerPriorityProposerAlternates(t *testing.T) { // -> proposers should alternate: oldState := updatedState3 abciResponses = &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) oldState, err = sm.UpdateState(oldState, blockID, &block.Header, abciResponses, validatorUpdates) @@ -689,10 +697,11 @@ func TestProposerPriorityProposerAlternates(t *testing.T) { for i := 0; i < 1000; i++ { // no validator updates: abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) updatedState, err := sm.UpdateState(oldState, blockID, &block.Header, abciResponses, validatorUpdates) @@ -747,10 +756,11 @@ func TestLargeGenesisValidator(t *testing.T) { for i := 0; i < 10; i++ { // no updates: abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) block, err := statefactory.MakeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) @@ -782,8 +792,9 @@ func TestLargeGenesisValidator(t *testing.T) { validatorUpdates, err := types.PB2TM.ValidatorUpdates([]abci.ValidatorUpdate{firstAddedVal}) assert.NoError(t, err) abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: []abci.ValidatorUpdate{firstAddedVal}}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: []abci.ValidatorUpdate{firstAddedVal}, + }, } block, err := statefactory.MakeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) require.NoError(t, err) @@ -799,10 +810,11 @@ func TestLargeGenesisValidator(t *testing.T) { for i := 0; i < 200; i++ { // no updates: abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) block, err := statefactory.MakeBlock(lastState, lastState.LastBlockHeight+1, new(types.Commit)) @@ -840,8 +852,9 @@ func TestLargeGenesisValidator(t *testing.T) { assert.NoError(t, err) abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: []abci.ValidatorUpdate{addedVal}}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: []abci.ValidatorUpdate{addedVal}, + }, } block, err := statefactory.MakeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) require.NoError(t, err) @@ -859,8 +872,9 @@ func TestLargeGenesisValidator(t *testing.T) { require.NoError(t, err) removeGenesisVal := abci.ValidatorUpdate{PubKey: gp, Power: 0} abciResponses = &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: []abci.ValidatorUpdate{removeGenesisVal}}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: []abci.ValidatorUpdate{removeGenesisVal}, + }, } block, err = statefactory.MakeBlock(oldState, oldState.LastBlockHeight+1, new(types.Commit)) @@ -870,7 +884,7 @@ func TestLargeGenesisValidator(t *testing.T) { require.NoError(t, err) blockID = types.BlockID{Hash: block.Hash(), PartSetHeader: bps.Header()} - validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) updatedState, err = sm.UpdateState(state, blockID, &block.Header, abciResponses, validatorUpdates) require.NoError(t, err) @@ -884,10 +898,11 @@ func TestLargeGenesisValidator(t *testing.T) { isProposerUnchanged := true for isProposerUnchanged { abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) block, err = statefactory.MakeBlock(curState, curState.LastBlockHeight+1, new(types.Commit)) require.NoError(t, err) @@ -913,10 +928,11 @@ func TestLargeGenesisValidator(t *testing.T) { for i := 0; i < 100; i++ { // no updates: abciResponses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: nil}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + ValidatorUpdates: nil, + }, } - validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.EndBlock.ValidatorUpdates) + validatorUpdates, err := types.PB2TM.ValidatorUpdates(abciResponses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) block, err := statefactory.MakeBlock(updatedState, updatedState.LastBlockHeight+1, new(types.Commit)) @@ -984,7 +1000,7 @@ func TestManyValidatorChangesSaveLoad(t *testing.T) { // Save state etc. var validatorUpdates []*types.Validator - validatorUpdates, err = types.PB2TM.ValidatorUpdates(responses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(responses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) state, err = sm.UpdateState(state, blockID, &header, responses, validatorUpdates) require.NoError(t, err) @@ -1062,7 +1078,7 @@ func TestConsensusParamsChangesSaveLoad(t *testing.T) { cp = params[changeIndex] } header, blockID, responses := makeHeaderPartsResponsesParams(t, state, &cp) - validatorUpdates, err = types.PB2TM.ValidatorUpdates(responses.EndBlock.ValidatorUpdates) + validatorUpdates, err = types.PB2TM.ValidatorUpdates(responses.FinalizeBlock.ValidatorUpdates) require.NoError(t, err) state, err = sm.UpdateState(state, blockID, &header, responses, validatorUpdates) diff --git a/internal/state/store.go b/internal/state/store.go index de17be0d7..c8b99b36d 100644 --- a/internal/state/store.go +++ b/internal/state/store.go @@ -401,7 +401,7 @@ func (store dbStore) reverseBatchDelete(batch dbm.Batch, start, end []byte) ([]b // // See merkle.SimpleHashFromByteSlices func ABCIResponsesResultsHash(ar *tmstate.ABCIResponses) []byte { - return types.NewResults(ar.DeliverTxs).Hash() + return types.NewResults(ar.FinalizeBlock.Txs).Hash() } // LoadABCIResponses loads the ABCIResponses for the given height from the @@ -444,13 +444,13 @@ func (store dbStore) SaveABCIResponses(height int64, abciResponses *tmstate.ABCI func (store dbStore) saveABCIResponses(height int64, abciResponses *tmstate.ABCIResponses) error { var dtxs []*abci.ResponseDeliverTx // strip nil values, - for _, tx := range abciResponses.DeliverTxs { + for _, tx := range abciResponses.FinalizeBlock.Txs { if tx != nil { dtxs = append(dtxs, tx) } } - abciResponses.DeliverTxs = dtxs + abciResponses.FinalizeBlock.Txs = dtxs bz, err := abciResponses.Marshal() if err != nil { diff --git a/internal/state/store_test.go b/internal/state/store_test.go index e0e14bf59..fd9c4bf5a 100644 --- a/internal/state/store_test.go +++ b/internal/state/store_test.go @@ -238,10 +238,12 @@ func TestPruneStates(t *testing.T) { require.NoError(t, err) err = stateStore.SaveABCIResponses(h, &tmstate.ABCIResponses{ - DeliverTxs: []*abci.ResponseDeliverTx{ - {Data: []byte{1}}, - {Data: []byte{2}}, - {Data: []byte{3}}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + Txs: []*abci.ResponseDeliverTx{ + {Data: []byte{1}}, + {Data: []byte{2}}, + {Data: []byte{3}}, + }, }, }) require.NoError(t, err) @@ -300,20 +302,20 @@ func TestPruneStates(t *testing.T) { func TestABCIResponsesResultsHash(t *testing.T) { responses := &tmstate.ABCIResponses{ - BeginBlock: &abci.ResponseBeginBlock{}, - DeliverTxs: []*abci.ResponseDeliverTx{ - {Code: 32, Data: []byte("Hello"), Log: "Huh?"}, + FinalizeBlock: &abci.ResponseFinalizeBlock{ + Txs: []*abci.ResponseDeliverTx{ + {Code: 32, Data: []byte("Hello"), Log: "Huh?"}, + }, }, - EndBlock: &abci.ResponseEndBlock{}, } root := sm.ABCIResponsesResultsHash(responses) - // root should be Merkle tree root of DeliverTxs responses - results := types.NewResults(responses.DeliverTxs) + // root should be Merkle tree root of FinalizeBlock tx responses + results := types.NewResults(responses.FinalizeBlock.Txs) assert.Equal(t, root, results.Hash()) - // test we can prove first DeliverTx + // test we can prove first tx in FinalizeBlock proof := results.ProveResult(0) bz, err := results[0].Marshal() require.NoError(t, err) diff --git a/internal/state/test/factory/block.go b/internal/state/test/factory/block.go index 96dba1ec3..5154d170a 100644 --- a/internal/state/test/factory/block.go +++ b/internal/state/test/factory/block.go @@ -6,6 +6,7 @@ import ( "time" "github.com/stretchr/testify/require" + sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/types" diff --git a/internal/state/time_test.go b/internal/state/time_test.go index 893ade7ea..5da97e819 100644 --- a/internal/state/time_test.go +++ b/internal/state/time_test.go @@ -5,6 +5,7 @@ import ( "time" "github.com/stretchr/testify/assert" + tmtime "github.com/tendermint/tendermint/libs/time" ) diff --git a/internal/statesync/mocks/state_provider.go b/internal/statesync/mocks/state_provider.go index b8d681631..b19a6787f 100644 --- a/internal/statesync/mocks/state_provider.go +++ b/internal/statesync/mocks/state_provider.go @@ -6,6 +6,7 @@ import ( context "context" mock "github.com/stretchr/testify/mock" + state "github.com/tendermint/tendermint/internal/state" types "github.com/tendermint/tendermint/types" diff --git a/internal/test/factory/block.go b/internal/test/factory/block.go index 3fd34cdc5..1d5709dcc 100644 --- a/internal/test/factory/block.go +++ b/internal/test/factory/block.go @@ -5,6 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/types" diff --git a/internal/test/factory/p2p.go b/internal/test/factory/p2p.go index 40d8eda9d..e2edcba6a 100644 --- a/internal/test/factory/p2p.go +++ b/internal/test/factory/p2p.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/types" ) diff --git a/internal/test/factory/validator.go b/internal/test/factory/validator.go index 383ba7536..6d8f4f716 100644 --- a/internal/test/factory/validator.go +++ b/internal/test/factory/validator.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/types" ) diff --git a/libs/log/default_test.go b/libs/log/default_test.go index 5e8e18810..6ea723c51 100644 --- a/libs/log/default_test.go +++ b/libs/log/default_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/libs/os/os_test.go b/libs/os/os_test.go index 0f01be315..ca7050156 100644 --- a/libs/os/os_test.go +++ b/libs/os/os_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/stretchr/testify/require" + tmos "github.com/tendermint/tendermint/libs/os" ) diff --git a/libs/service/service_test.go b/libs/service/service_test.go index 5b1e9798f..9b4f84de9 100644 --- a/libs/service/service_test.go +++ b/libs/service/service_test.go @@ -9,6 +9,7 @@ import ( "github.com/fortytw2/leaktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/light/helpers_test.go b/light/helpers_test.go index 9f6147526..37b4b5bf3 100644 --- a/light/helpers_test.go +++ b/light/helpers_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" diff --git a/light/rpc/client.go b/light/rpc/client.go index cfbdaa409..f7f741843 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -446,27 +446,19 @@ func (c *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.Re return nil, err } - // proto-encode BeginBlock events - bbeBytes, err := proto.Marshal(&abci.ResponseBeginBlock{ - Events: res.BeginBlockEvents, + // proto-encode FinalizeBlock events + bbeBytes, err := proto.Marshal(&abci.ResponseFinalizeBlock{ + Events: res.FinalizeBlockEvents, }) if err != nil { return nil, err } - // Build a Merkle tree of proto-encoded DeliverTx results and get a hash. + // Build a Merkle tree of proto-encoded FinalizeBlock tx results and get a hash. results := types.NewResults(res.TxsResults) - // proto-encode EndBlock events. - ebeBytes, err := proto.Marshal(&abci.ResponseEndBlock{ - Events: res.EndBlockEvents, - }) - if err != nil { - return nil, err - } - // Build a Merkle tree out of the above 3 binary slices. - rH := merkle.HashFromByteSlices([][]byte{bbeBytes, results.Hash(), ebeBytes}) + rH := merkle.HashFromByteSlices([][]byte{bbeBytes, results.Hash()}) // Verify block results. if !bytes.Equal(rH, trustedBlock.LastResultsHash) { diff --git a/node/node.go b/node/node.go index d89238d37..62cc2c74f 100644 --- a/node/node.go +++ b/node/node.go @@ -12,6 +12,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" + abciclient "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" diff --git a/privval/grpc/client_test.go b/privval/grpc/client_test.go index 86bf4bb2b..ac7608274 100644 --- a/privval/grpc/client_test.go +++ b/privval/grpc/client_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/log" diff --git a/privval/grpc/util.go b/privval/grpc/util.go index 0361139da..a3ea6c532 100644 --- a/privval/grpc/util.go +++ b/privval/grpc/util.go @@ -10,13 +10,14 @@ import ( grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" - "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/libs/log" - tmnet "github.com/tendermint/tendermint/libs/net" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/keepalive" + + "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/libs/log" + tmnet "github.com/tendermint/tendermint/libs/net" ) // DefaultDialOptions constructs a list of grpc dial options diff --git a/privval/socket_listeners_test.go b/privval/socket_listeners_test.go index 31d089639..e91d111d0 100644 --- a/privval/socket_listeners_test.go +++ b/privval/socket_listeners_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto/ed25519" ) diff --git a/proto/tendermint/state/types.pb.go b/proto/tendermint/state/types.pb.go index 85f38cada..af5c64ecf 100644 --- a/proto/tendermint/state/types.pb.go +++ b/proto/tendermint/state/types.pb.go @@ -34,9 +34,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // of the various ABCI calls during block processing. // It is persisted to disk for each height before calling Commit. type ABCIResponses struct { - DeliverTxs []*types.ResponseDeliverTx `protobuf:"bytes,1,rep,name=deliver_txs,json=deliverTxs,proto3" json:"deliver_txs,omitempty"` - EndBlock *types.ResponseEndBlock `protobuf:"bytes,2,opt,name=end_block,json=endBlock,proto3" json:"end_block,omitempty"` - BeginBlock *types.ResponseBeginBlock `protobuf:"bytes,3,opt,name=begin_block,json=beginBlock,proto3" json:"begin_block,omitempty"` + FinalizeBlock *types.ResponseFinalizeBlock `protobuf:"bytes,2,opt,name=finalize_block,json=finalizeBlock,proto3" json:"finalize_block,omitempty"` } func (m *ABCIResponses) Reset() { *m = ABCIResponses{} } @@ -72,23 +70,9 @@ func (m *ABCIResponses) XXX_DiscardUnknown() { var xxx_messageInfo_ABCIResponses proto.InternalMessageInfo -func (m *ABCIResponses) GetDeliverTxs() []*types.ResponseDeliverTx { +func (m *ABCIResponses) GetFinalizeBlock() *types.ResponseFinalizeBlock { if m != nil { - return m.DeliverTxs - } - return nil -} - -func (m *ABCIResponses) GetEndBlock() *types.ResponseEndBlock { - if m != nil { - return m.EndBlock - } - return nil -} - -func (m *ABCIResponses) GetBeginBlock() *types.ResponseBeginBlock { - if m != nil { - return m.BeginBlock + return m.FinalizeBlock } return nil } @@ -422,55 +406,52 @@ func init() { func init() { proto.RegisterFile("tendermint/state/types.proto", fileDescriptor_ccfacf933f22bf93) } var fileDescriptor_ccfacf933f22bf93 = []byte{ - // 763 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0x6e, 0xe8, 0xb6, 0xb6, 0xce, 0xda, 0x0e, 0x8f, 0x43, 0xd6, 0xb1, 0xb4, 0x2b, 0x3f, 0x34, - 0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x00, 0x00, + // 717 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0x8d, 0x5f, 0x3f, 0x92, 0x4c, 0x9a, 0xa4, 0x6f, 0xfa, 0x16, 0x69, 0xfa, 0xea, 0xe4, 0x45, + 0x8f, 0xaa, 0x62, 0xe1, 0x48, 0xb0, 0x40, 0x6c, 0x90, 0x9a, 0x54, 0x50, 0x4b, 0x05, 0x81, 0x8b, + 0xba, 0x60, 0x81, 0x35, 0x71, 0x26, 0xf6, 0x08, 0xc7, 0xb6, 0x3c, 0x93, 0xf2, 0xb1, 0x67, 0xdf, + 0x2d, 0xff, 0xa8, 0xcb, 0x2e, 0x59, 0x15, 0x48, 0xff, 0x08, 0x9a, 0x0f, 0xdb, 0x93, 0x84, 0x45, + 0x11, 0xbb, 0xcc, 0x3d, 0xe7, 0x9e, 0x7b, 0xe6, 0xce, 0xbd, 0x31, 0xf8, 0x97, 0xe1, 0x68, 0x8c, + 0xd3, 0x29, 0x89, 0x58, 0x9f, 0x32, 0xc4, 0x70, 0x9f, 0x7d, 0x4c, 0x30, 0xb5, 0x92, 0x34, 0x66, + 0x31, 0xdc, 0x2e, 0x50, 0x4b, 0xa0, 0xed, 0x7f, 0xfc, 0xd8, 0x8f, 0x05, 0xd8, 0xe7, 0xbf, 0x24, + 0xaf, 0xbd, 0xa7, 0xa9, 0xa0, 0x91, 0x47, 0x74, 0x91, 0xb6, 0x5e, 0x42, 0xc4, 0x17, 0xd0, 0xee, + 0x0a, 0x7a, 0x81, 0x42, 0x32, 0x46, 0x2c, 0x4e, 0x15, 0x63, 0x7f, 0x85, 0x91, 0xa0, 0x14, 0x4d, + 0x33, 0x01, 0x53, 0x83, 0x2f, 0x70, 0x4a, 0x49, 0x1c, 0x2d, 0x14, 0xe8, 0xf8, 0x71, 0xec, 0x87, + 0xb8, 0x2f, 0x4e, 0xa3, 0xd9, 0xa4, 0xcf, 0xc8, 0x14, 0x53, 0x86, 0xa6, 0x89, 0x24, 0xf4, 0xde, + 0x82, 0xfa, 0xd1, 0x60, 0x68, 0x3b, 0x98, 0x26, 0x71, 0x44, 0x31, 0x85, 0xcf, 0x41, 0x63, 0x42, + 0x22, 0x14, 0x92, 0x4f, 0xd8, 0x1d, 0x85, 0xb1, 0xf7, 0xae, 0xf5, 0x57, 0xd7, 0x38, 0xac, 0x3d, + 0x38, 0xb0, 0xb4, 0x76, 0xf0, 0x6b, 0x5a, 0x59, 0xce, 0x53, 0x45, 0x1f, 0x70, 0xb6, 0x53, 0x9f, + 0xe8, 0xc7, 0xde, 0x67, 0x03, 0x34, 0xce, 0xb3, 0x3b, 0x51, 0x3b, 0x9a, 0xc4, 0x70, 0x08, 0xea, + 0xf9, 0x2d, 0x5d, 0x8a, 0x59, 0xcb, 0x10, 0x05, 0x4c, 0xbd, 0x80, 0xbc, 0x43, 0x9e, 0x78, 0x86, + 0x99, 0xb3, 0x75, 0xa1, 0x9d, 0xa0, 0x05, 0x76, 0x42, 0x44, 0x99, 0x1b, 0x60, 0xe2, 0x07, 0xcc, + 0xf5, 0x02, 0x14, 0xf9, 0x78, 0x2c, 0xbc, 0xae, 0x39, 0x7f, 0x73, 0xe8, 0x44, 0x20, 0x43, 0x09, + 0xf4, 0xbe, 0x18, 0x60, 0x67, 0xc8, 0xdd, 0x46, 0x74, 0x46, 0x5f, 0x8a, 0x16, 0x0a, 0x33, 0x0e, + 0xd8, 0xf6, 0xb2, 0xb0, 0x2b, 0x5b, 0xab, 0xfc, 0xfc, 0xb7, 0xea, 0x67, 0x49, 0x60, 0xb0, 0x7e, + 0x75, 0xd3, 0x29, 0x39, 0x4d, 0x6f, 0x31, 0xfc, 0xdb, 0xde, 0x02, 0x50, 0x3e, 0x97, 0x6f, 0x07, + 0x8f, 0x40, 0x35, 0x57, 0x53, 0x3e, 0xf6, 0x75, 0x1f, 0xea, 0x8d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+ 0x69, 0xbc, 0x1b, 0x3c, 0xad, 0xd8, 0x14, 0xf8, 0x04, 0x00, 0x4d, 0xa3, 0x7c, 0x27, 0x0d, 0x2d, + 0x83, 0x1b, 0x11, 0xd7, 0xd2, 0x44, 0x2a, 0x77, 0x33, 0xc2, 0xd3, 0x34, 0x23, 0x43, 0x60, 0xea, + 0xd3, 0x5c, 0xe8, 0xe5, 0x83, 0x5d, 0x15, 0x8f, 0xb5, 0x57, 0x0c, 0x76, 0x91, 0xad, 0x46, 0xfc, + 0x97, 0x6b, 0x06, 0xfe, 0x70, 0xcd, 0x5e, 0x80, 0xff, 0x17, 0xd6, 0x6c, 0x49, 0x3f, 0xb7, 0x57, + 0x13, 0xf6, 0xba, 0xda, 0xde, 0x2d, 0x0a, 0x65, 0x1e, 0xb3, 0x41, 0x4c, 0x31, 0x9d, 0x85, 0x8c, + 0xba, 0x01, 0xa2, 0x41, 0x6b, 0xab, 0x6b, 0x1c, 0x6e, 0xc9, 0x41, 0x74, 0x64, 0xfc, 0x04, 0xd1, + 0x00, 0xee, 0x82, 0x0a, 0x4a, 0x12, 0x49, 0xa9, 0x0b, 0x4a, 0x19, 0x25, 0x09, 0x87, 0x06, 0xaf, + 0xae, 0xe6, 0xa6, 0x71, 0x3d, 0x37, 0x8d, 0xef, 0x73, 0xd3, 0xb8, 0xbc, 0x35, 0x4b, 0xd7, 0xb7, + 0x66, 0xe9, 0xeb, 0xad, 0x59, 0x7a, 0xf3, 0xc8, 0x27, 0x2c, 0x98, 0x8d, 0x2c, 0x2f, 0x9e, 0xf6, + 0xf5, 0xbf, 0xf5, 0xe2, 0xa7, 0xfc, 0xb6, 0x2c, 0x7f, 0x95, 0x46, 0x9b, 0x22, 0xfe, 0xf0, 0x67, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xe8, 0x4c, 0x4d, 0xb0, 0x06, 0x00, 0x00, } func (m *ABCIResponses) Marshal() (dAtA []byte, err error) { @@ -493,21 +474,9 @@ func (m *ABCIResponses) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.BeginBlock != nil { + if m.FinalizeBlock != nil { { - size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.EndBlock != nil { - { - size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.FinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -517,20 +486,6 @@ func (m *ABCIResponses) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.DeliverTxs) > 0 { - for iNdEx := len(m.DeliverTxs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeliverTxs[iNdEx].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 } @@ -747,12 +702,12 @@ func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) - if err10 != nil { - return 0, err10 + n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) + if err9 != nil { + return 0, err9 } - i -= n10 - i = encodeVarintTypes(dAtA, i, uint64(n10)) + i -= n9 + i = encodeVarintTypes(dAtA, i, uint64(n9)) i-- dAtA[i] = 0x2a { @@ -807,18 +762,8 @@ func (m *ABCIResponses) Size() (n int) { } var l int _ = l - if len(m.DeliverTxs) > 0 { - for _, e := range m.DeliverTxs { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.EndBlock != nil { - l = m.EndBlock.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.BeginBlock != nil { - l = m.BeginBlock.Size() + if m.FinalizeBlock != nil { + l = m.FinalizeBlock.Size() n += 1 + l + sovTypes(uint64(l)) } return n @@ -957,79 +902,9 @@ func (m *ABCIResponses) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: ABCIResponses: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeliverTxs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeliverTxs = append(m.DeliverTxs, &types.ResponseDeliverTx{}) - if err := m.DeliverTxs[len(m.DeliverTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", 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 m.EndBlock == nil { - m.EndBlock = &types.ResponseEndBlock{} - } - if err := m.EndBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FinalizeBlock", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1056,10 +931,10 @@ func (m *ABCIResponses) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.BeginBlock == nil { - m.BeginBlock = &types.ResponseBeginBlock{} + if m.FinalizeBlock == nil { + m.FinalizeBlock = &types.ResponseFinalizeBlock{} } - if err := m.BeginBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/state/types.proto b/proto/tendermint/state/types.proto index 919da91e5..35eab761d 100644 --- a/proto/tendermint/state/types.proto +++ b/proto/tendermint/state/types.proto @@ -15,9 +15,7 @@ import "google/protobuf/timestamp.proto"; // of the various ABCI calls during block processing. // It is persisted to disk for each height before calling Commit. message ABCIResponses { - repeated tendermint.abci.ResponseDeliverTx deliver_txs = 1; - tendermint.abci.ResponseEndBlock end_block = 2; - tendermint.abci.ResponseBeginBlock begin_block = 3; + tendermint.abci.ResponseFinalizeBlock finalize_block = 2; } // ValidatorsInfo represents the latest validator set, or the last height it changed diff --git a/rpc/client/examples_test.go b/rpc/client/examples_test.go index 122090387..1591862cf 100644 --- a/rpc/client/examples_test.go +++ b/rpc/client/examples_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/abci/example/kvstore" rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/tendermint/tendermint/rpc/coretypes" diff --git a/rpc/client/main_test.go b/rpc/client/main_test.go index 066b8490b..9bd52174b 100644 --- a/rpc/client/main_test.go +++ b/rpc/client/main_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" diff --git a/rpc/client/mock/abci.go b/rpc/client/mock/abci.go index 700b08f5e..1d04fa4cd 100644 --- a/rpc/client/mock/abci.go +++ b/rpc/client/mock/abci.go @@ -55,7 +55,8 @@ func (a ABCIApp) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*coretypes if res.CheckTx.IsErr() { return &res, nil } - res.DeliverTx = a.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) + fb := a.App.FinalizeBlock(abci.RequestFinalizeBlock{Txs: [][]byte{tx}}) + res.DeliverTx = *fb.Txs[0] res.Height = -1 // TODO return &res, nil } @@ -64,7 +65,7 @@ func (a ABCIApp) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*coretypes. c := a.App.CheckTx(abci.RequestCheckTx{Tx: tx}) // and this gets written in a background thread... if !c.IsErr() { - go func() { a.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) }() + go func() { a.App.FinalizeBlock(abci.RequestFinalizeBlock{Txs: [][]byte{tx}}) }() } return &coretypes.ResultBroadcastTx{ Code: c.Code, @@ -79,7 +80,7 @@ func (a ABCIApp) BroadcastTxSync(ctx context.Context, tx types.Tx) (*coretypes.R c := a.App.CheckTx(abci.RequestCheckTx{Tx: tx}) // and this gets written in a background thread... if !c.IsErr() { - go func() { a.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) }() + go func() { a.App.FinalizeBlock(abci.RequestFinalizeBlock{Txs: [][]byte{tx}}) }() } return &coretypes.ResultBroadcastTx{ Code: c.Code, diff --git a/rpc/coretypes/responses.go b/rpc/coretypes/responses.go index f3b94693e..c4b1ddd8f 100644 --- a/rpc/coretypes/responses.go +++ b/rpc/coretypes/responses.go @@ -68,8 +68,7 @@ type ResultBlockResults struct { Height int64 `json:"height,string"` TxsResults []*abci.ResponseDeliverTx `json:"txs_results"` TotalGasUsed int64 `json:"total_gas_used,string"` - BeginBlockEvents []abci.Event `json:"begin_block_events"` - EndBlockEvents []abci.Event `json:"end_block_events"` + FinalizeBlockEvents []abci.Event `json:"finalize_block_events"` ValidatorUpdates []abci.ValidatorUpdate `json:"validator_updates"` ConsensusParamUpdates *tmproto.ConsensusParams `json:"consensus_param_updates"` } diff --git a/rpc/coretypes/responses_test.go b/rpc/coretypes/responses_test.go index a85f3f777..d4ced795a 100644 --- a/rpc/coretypes/responses_test.go +++ b/rpc/coretypes/responses_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/types" ) diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index ad840b6a1..a7348ecd9 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -145,24 +145,27 @@ func (app *Application) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { return abci.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1} } -// DeliverTx implements ABCI. -func (app *Application) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx { - key, value, err := parseTx(req.Tx) - if err != nil { - panic(err) // shouldn't happen since we verified it in CheckTx +// FinalizeBlock implements ABCI. +func (app *Application) FinalizeBlock(req abci.RequestFinalizeBlock) abci.ResponseFinalizeBlock { + var txs = make([]*abci.ResponseDeliverTx, len(req.Txs)) + + for i, tx := range req.Txs { + key, value, err := parseTx(tx) + if err != nil { + panic(err) // shouldn't happen since we verified it in CheckTx + } + app.state.Set(key, value) + + txs[i] = &abci.ResponseDeliverTx{Code: code.CodeTypeOK} } - app.state.Set(key, value) - return abci.ResponseDeliverTx{Code: code.CodeTypeOK} -} -// EndBlock implements ABCI. -func (app *Application) EndBlock(req abci.RequestEndBlock) abci.ResponseEndBlock { valUpdates, err := app.validatorUpdates(uint64(req.Height)) if err != nil { panic(err) } - return abci.ResponseEndBlock{ + return abci.ResponseFinalizeBlock{ + Txs: txs, ValidatorUpdates: valUpdates, Events: []abci.Event{ { diff --git a/test/e2e/generator/generate_test.go b/test/e2e/generator/generate_test.go index 0e0e66baa..74233fe66 100644 --- a/test/e2e/generator/generate_test.go +++ b/test/e2e/generator/generate_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/require" + e2e "github.com/tendermint/tendermint/test/e2e/pkg" ) diff --git a/test/fuzz/mempool/fuzz_test.go b/test/fuzz/mempool/fuzz_test.go index 8af0326dd..69f34db64 100644 --- a/test/fuzz/mempool/fuzz_test.go +++ b/test/fuzz/mempool/fuzz_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" + mempool "github.com/tendermint/tendermint/test/fuzz/mempool" ) diff --git a/test/fuzz/p2p/secretconnection/fuzz_test.go b/test/fuzz/p2p/secretconnection/fuzz_test.go index 1f3757aa0..6fe19b03b 100644 --- a/test/fuzz/p2p/secretconnection/fuzz_test.go +++ b/test/fuzz/p2p/secretconnection/fuzz_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/test/fuzz/p2p/secretconnection" ) diff --git a/test/fuzz/rpc/jsonrpc/server/fuzz_test.go b/test/fuzz/rpc/jsonrpc/server/fuzz_test.go index 41911e725..8a34da8a6 100644 --- a/test/fuzz/rpc/jsonrpc/server/fuzz_test.go +++ b/test/fuzz/rpc/jsonrpc/server/fuzz_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/test/fuzz/rpc/jsonrpc/server" ) diff --git a/types/events.go b/types/events.go index bf9d74f53..3a3f64fd0 100644 --- a/types/events.go +++ b/types/events.go @@ -114,8 +114,7 @@ type EventDataNewBlock struct { Block *Block `json:"block"` BlockID BlockID `json:"block_id"` - ResultBeginBlock abci.ResponseBeginBlock `json:"result_begin_block"` - ResultEndBlock abci.ResponseEndBlock `json:"result_end_block"` + ResultFinalizeBlock abci.ResponseFinalizeBlock `json:"result_finalize_block"` } // TypeTag implements the required method of jsontypes.Tagged. @@ -124,9 +123,8 @@ func (EventDataNewBlock) TypeTag() string { return "tendermint/event/NewBlock" } type EventDataNewBlockHeader struct { Header Header `json:"header"` - NumTxs int64 `json:"num_txs,string"` // Number of txs in a block - ResultBeginBlock abci.ResponseBeginBlock `json:"result_begin_block"` - ResultEndBlock abci.ResponseEndBlock `json:"result_end_block"` + NumTxs int64 `json:"num_txs,string"` // Number of txs in a block + ResultFinalizeBlock abci.ResponseFinalizeBlock `json:"result_finalize_block"` } // TypeTag implements the required method of jsontypes.Tagged. diff --git a/types/node_info_test.go b/types/node_info_test.go index d8aebdeb0..110c67fc3 100644 --- a/types/node_info_test.go +++ b/types/node_info_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto/ed25519" tmnet "github.com/tendermint/tendermint/libs/net" "github.com/tendermint/tendermint/version" diff --git a/types/validator_test.go b/types/validator_test.go index 1e29787fd..b19317453 100644 --- a/types/validator_test.go +++ b/types/validator_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" )