diff --git a/Makefile b/Makefile index d8ab48f8d..f1986b9a7 100644 --- a/Makefile +++ b/Makefile @@ -93,6 +93,9 @@ mock-gen: ### Protobuf ### ############################################################################### +containerProtoVer=v0.2 +containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer) + ### # https://github.com/protocolbuffers/protobuf # https://developers.google.com/protocol-buffers/docs/gotutorial @@ -108,7 +111,7 @@ proto-all: proto-gen proto-lint proto-check-breaking proto-gen: @docker pull -q tendermintdev/docker-build-proto @echo "Generating Protobuf files" - @docker run --rm -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./scripts/protocgen.sh + @docker run --rm -v $(shell pwd):/workspace --workdir /workspace $(containerProtoImage) sh ./scripts/protocgen.sh .PHONY: proto-gen proto-lint: diff --git a/abci/client/client.go b/abci/client/client.go index 8ccfc5cb6..54e38939f 100644 --- a/abci/client/client.go +++ b/abci/client/client.go @@ -4,7 +4,9 @@ import ( "fmt" "sync" - "github.com/line/ostracon/abci/types" + "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" ) @@ -36,10 +38,10 @@ type Client interface { QueryAsync(types.RequestQuery, ResponseCallback) *ReqRes CommitAsync(ResponseCallback) *ReqRes InitChainAsync(types.RequestInitChain, ResponseCallback) *ReqRes - BeginBlockAsync(types.RequestBeginBlock, ResponseCallback) *ReqRes + BeginBlockAsync(ocabci.RequestBeginBlock, ResponseCallback) *ReqRes EndBlockAsync(types.RequestEndBlock, ResponseCallback) *ReqRes - BeginRecheckTxAsync(types.RequestBeginRecheckTx, ResponseCallback) *ReqRes - EndRecheckTxAsync(types.RequestEndRecheckTx, ResponseCallback) *ReqRes + BeginRecheckTxAsync(ocabci.RequestBeginRecheckTx, ResponseCallback) *ReqRes + EndRecheckTxAsync(ocabci.RequestEndRecheckTx, ResponseCallback) *ReqRes ListSnapshotsAsync(types.RequestListSnapshots, ResponseCallback) *ReqRes OfferSnapshotAsync(types.RequestOfferSnapshot, ResponseCallback) *ReqRes LoadSnapshotChunkAsync(types.RequestLoadSnapshotChunk, ResponseCallback) *ReqRes @@ -50,14 +52,14 @@ type Client interface { InfoSync(types.RequestInfo) (*types.ResponseInfo, error) SetOptionSync(types.RequestSetOption) (*types.ResponseSetOption, error) DeliverTxSync(types.RequestDeliverTx) (*types.ResponseDeliverTx, error) - CheckTxSync(types.RequestCheckTx) (*types.ResponseCheckTx, error) + CheckTxSync(types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) QuerySync(types.RequestQuery) (*types.ResponseQuery, error) CommitSync() (*types.ResponseCommit, error) InitChainSync(types.RequestInitChain) (*types.ResponseInitChain, error) - BeginBlockSync(types.RequestBeginBlock) (*types.ResponseBeginBlock, error) + BeginBlockSync(ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) EndBlockSync(types.RequestEndBlock) (*types.ResponseEndBlock, error) - BeginRecheckTxSync(types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) - EndRecheckTxSync(types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) + BeginRecheckTxSync(ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) + EndRecheckTxSync(ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) ListSnapshotsSync(types.RequestListSnapshots) (*types.ResponseListSnapshots, error) OfferSnapshotSync(types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) LoadSnapshotChunkSync(types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) @@ -80,12 +82,12 @@ func NewClient(addr, transport string, mustConnect bool) (client Client, err err return } -type GlobalCallback func(*types.Request, *types.Response) -type ResponseCallback func(*types.Response) +type GlobalCallback func(*ocabci.Request, *ocabci.Response) +type ResponseCallback func(*ocabci.Response) type ReqRes struct { - *types.Request - *types.Response // Not set atomically, so be sure to use WaitGroup. + *ocabci.Request + *ocabci.Response // Not set atomically, so be sure to use WaitGroup. mtx tmsync.Mutex wg *sync.WaitGroup @@ -93,7 +95,7 @@ type ReqRes struct { cb ResponseCallback // A single callback that may be set. } -func NewReqRes(req *types.Request, cb ResponseCallback) *ReqRes { +func NewReqRes(req *ocabci.Request, cb ResponseCallback) *ReqRes { return &ReqRes{ Request: req, Response: nil, @@ -115,7 +117,7 @@ func (reqRes *ReqRes) InvokeCallback() { } } -func (reqRes *ReqRes) SetDone(res *types.Response) (set bool) { +func (reqRes *ReqRes) SetDone(res *ocabci.Response) (set bool) { reqRes.mtx.Lock() // TODO should we panic if it's already done? set = !reqRes.done diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index c8c57cae7..456530f92 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -9,7 +9,9 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" - "github.com/line/ostracon/abci/types" + "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" tmnet "github.com/line/ostracon/libs/net" "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" @@ -23,7 +25,7 @@ type grpcClient struct { service.BaseService mustConnect bool - client types.ABCIApplicationClient + client ocabci.ABCIApplicationClient conn *grpc.ClientConn mtx tmsync.Mutex @@ -31,7 +33,7 @@ type grpcClient struct { err error globalCbMtx sync.Mutex - globalCb func(*types.Request, *types.Response) // listens to all callbacks + globalCb func(*ocabci.Request, *ocabci.Response) // listens to all callbacks } func NewGRPCClient(addr string, mustConnect bool) Client { @@ -66,7 +68,7 @@ RETRY_LOOP: } cli.Logger.Info("Dialed server. Waiting for echo.", "addr", cli.addr) - client := types.NewABCIApplicationClient(conn) + client := ocabci.NewABCIApplicationClient(conn) cli.conn = conn ENSURE_CONNECTED: @@ -137,160 +139,160 @@ func (cli *grpcClient) GetGlobalCallback() (cb GlobalCallback) { // but hopefully not :D func (cli *grpcClient) EchoAsync(msg string, cb ResponseCallback) *ReqRes { - req := types.ToRequestEcho(msg) + req := ocabci.ToRequestEcho(msg) res, err := cli.client.Echo(context.Background(), req.GetEcho(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Echo{Echo: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_Echo{Echo: res}}, cb) } func (cli *grpcClient) FlushAsync(cb ResponseCallback) *ReqRes { - req := types.ToRequestFlush() + req := ocabci.ToRequestFlush() res, err := cli.client.Flush(context.Background(), req.GetFlush(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Flush{Flush: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_Flush{Flush: res}}, cb) } func (cli *grpcClient) InfoAsync(params types.RequestInfo, cb ResponseCallback) *ReqRes { - req := types.ToRequestInfo(params) + req := ocabci.ToRequestInfo(params) res, err := cli.client.Info(context.Background(), req.GetInfo(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Info{Info: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_Info{Info: res}}, cb) } func (cli *grpcClient) SetOptionAsync(params types.RequestSetOption, cb ResponseCallback) *ReqRes { - req := types.ToRequestSetOption(params) + req := ocabci.ToRequestSetOption(params) res, err := cli.client.SetOption(context.Background(), req.GetSetOption(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_SetOption{SetOption: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_SetOption{SetOption: res}}, cb) } func (cli *grpcClient) DeliverTxAsync(params types.RequestDeliverTx, cb ResponseCallback) *ReqRes { - req := types.ToRequestDeliverTx(params) + req := ocabci.ToRequestDeliverTx(params) res, err := cli.client.DeliverTx(context.Background(), req.GetDeliverTx(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_DeliverTx{DeliverTx: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_DeliverTx{DeliverTx: res}}, cb) } func (cli *grpcClient) CheckTxAsync(params types.RequestCheckTx, cb ResponseCallback) *ReqRes { - req := types.ToRequestCheckTx(params) + req := ocabci.ToRequestCheckTx(params) res, err := cli.client.CheckTx(context.Background(), req.GetCheckTx(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_CheckTx{CheckTx: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_CheckTx{CheckTx: res}}, cb) } func (cli *grpcClient) QueryAsync(params types.RequestQuery, cb ResponseCallback) *ReqRes { - req := types.ToRequestQuery(params) + req := ocabci.ToRequestQuery(params) res, err := cli.client.Query(context.Background(), req.GetQuery(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Query{Query: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_Query{Query: res}}, cb) } func (cli *grpcClient) CommitAsync(cb ResponseCallback) *ReqRes { - req := types.ToRequestCommit() + req := ocabci.ToRequestCommit() res, err := cli.client.Commit(context.Background(), req.GetCommit(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Commit{Commit: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_Commit{Commit: res}}, cb) } func (cli *grpcClient) InitChainAsync(params types.RequestInitChain, cb ResponseCallback) *ReqRes { - req := types.ToRequestInitChain(params) + req := ocabci.ToRequestInitChain(params) res, err := cli.client.InitChain(context.Background(), req.GetInitChain(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_InitChain{InitChain: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_InitChain{InitChain: res}}, cb) } -func (cli *grpcClient) BeginBlockAsync(params types.RequestBeginBlock, cb ResponseCallback) *ReqRes { - req := types.ToRequestBeginBlock(params) +func (cli *grpcClient) BeginBlockAsync(params ocabci.RequestBeginBlock, cb ResponseCallback) *ReqRes { + req := ocabci.ToRequestBeginBlock(params) res, err := cli.client.BeginBlock(context.Background(), req.GetBeginBlock(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_BeginBlock{BeginBlock: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_BeginBlock{BeginBlock: res}}, cb) } func (cli *grpcClient) EndBlockAsync(params types.RequestEndBlock, cb ResponseCallback) *ReqRes { - req := types.ToRequestEndBlock(params) + req := ocabci.ToRequestEndBlock(params) res, err := cli.client.EndBlock(context.Background(), req.GetEndBlock(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_EndBlock{EndBlock: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_EndBlock{EndBlock: res}}, cb) } -func (cli *grpcClient) BeginRecheckTxAsync(params types.RequestBeginRecheckTx, cb ResponseCallback) *ReqRes { - req := types.ToRequestBeginRecheckTx(params) +func (cli *grpcClient) BeginRecheckTxAsync(params ocabci.RequestBeginRecheckTx, cb ResponseCallback) *ReqRes { + req := ocabci.ToRequestBeginRecheckTx(params) res, err := cli.client.BeginRecheckTx(context.Background(), req.GetBeginRecheckTx(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_BeginRecheckTx{BeginRecheckTx: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_BeginRecheckTx{BeginRecheckTx: res}}, cb) } -func (cli *grpcClient) EndRecheckTxAsync(params types.RequestEndRecheckTx, cb ResponseCallback) *ReqRes { - req := types.ToRequestEndRecheckTx(params) +func (cli *grpcClient) EndRecheckTxAsync(params ocabci.RequestEndRecheckTx, cb ResponseCallback) *ReqRes { + req := ocabci.ToRequestEndRecheckTx(params) res, err := cli.client.EndRecheckTx(context.Background(), req.GetEndRecheckTx(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_EndRecheckTx{EndRecheckTx: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_EndRecheckTx{EndRecheckTx: res}}, cb) } func (cli *grpcClient) ListSnapshotsAsync(params types.RequestListSnapshots, cb ResponseCallback) *ReqRes { - req := types.ToRequestListSnapshots(params) + req := ocabci.ToRequestListSnapshots(params) res, err := cli.client.ListSnapshots(context.Background(), req.GetListSnapshots(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_ListSnapshots{ListSnapshots: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_ListSnapshots{ListSnapshots: res}}, cb) } func (cli *grpcClient) OfferSnapshotAsync(params types.RequestOfferSnapshot, cb ResponseCallback) *ReqRes { - req := types.ToRequestOfferSnapshot(params) + req := ocabci.ToRequestOfferSnapshot(params) res, err := cli.client.OfferSnapshot(context.Background(), req.GetOfferSnapshot(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_OfferSnapshot{OfferSnapshot: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_OfferSnapshot{OfferSnapshot: res}}, cb) } func (cli *grpcClient) LoadSnapshotChunkAsync(params types.RequestLoadSnapshotChunk, cb ResponseCallback) *ReqRes { - req := types.ToRequestLoadSnapshotChunk(params) + req := ocabci.ToRequestLoadSnapshotChunk(params) res, err := cli.client.LoadSnapshotChunk(context.Background(), req.GetLoadSnapshotChunk(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_LoadSnapshotChunk{LoadSnapshotChunk: res}}, cb) + return cli.finishAsyncCall(req, &ocabci.Response{Value: &ocabci.Response_LoadSnapshotChunk{LoadSnapshotChunk: res}}, cb) } func (cli *grpcClient) ApplySnapshotChunkAsync(params types.RequestApplySnapshotChunk, cb ResponseCallback) *ReqRes { - req := types.ToRequestApplySnapshotChunk(params) + req := ocabci.ToRequestApplySnapshotChunk(params) res, err := cli.client.ApplySnapshotChunk(context.Background(), req.GetApplySnapshotChunk(), grpc.WaitForReady(true)) if err != nil { cli.StopForError(err) } return cli.finishAsyncCall(req, - &types.Response{Value: &types.Response_ApplySnapshotChunk{ApplySnapshotChunk: res}}, cb) + &ocabci.Response{Value: &ocabci.Response_ApplySnapshotChunk{ApplySnapshotChunk: res}}, cb) } -func (cli *grpcClient) finishAsyncCall(req *types.Request, res *types.Response, cb ResponseCallback) *ReqRes { +func (cli *grpcClient) finishAsyncCall(req *ocabci.Request, res *ocabci.Response, cb ResponseCallback) *ReqRes { reqRes := NewReqRes(req, cb) // goroutine for callbacks @@ -307,7 +309,7 @@ func (cli *grpcClient) finishAsyncCall(req *types.Request, res *types.Response, return reqRes } -//---------------------------------------- +// ---------------------------------------- func (cli *grpcClient) FlushSync() (*types.ResponseFlush, error) { reqres := cli.FlushAsync(nil) reqres.Wait() @@ -339,7 +341,7 @@ func (cli *grpcClient) DeliverTxSync(params types.RequestDeliverTx) (*types.Resp return reqres.Response.GetDeliverTx(), cli.Error() } -func (cli *grpcClient) CheckTxSync(params types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (cli *grpcClient) CheckTxSync(params types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) { reqres := cli.CheckTxAsync(params, nil) reqres.Wait() return reqres.Response.GetCheckTx(), cli.Error() @@ -363,7 +365,7 @@ func (cli *grpcClient) InitChainSync(params types.RequestInitChain) (*types.Resp return reqres.Response.GetInitChain(), cli.Error() } -func (cli *grpcClient) BeginBlockSync(params types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { +func (cli *grpcClient) BeginBlockSync(params ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) { reqres := cli.BeginBlockAsync(params, nil) reqres.Wait() return reqres.Response.GetBeginBlock(), cli.Error() @@ -375,13 +377,13 @@ func (cli *grpcClient) EndBlockSync(params types.RequestEndBlock) (*types.Respon return reqres.Response.GetEndBlock(), cli.Error() } -func (cli *grpcClient) BeginRecheckTxSync(params types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { +func (cli *grpcClient) BeginRecheckTxSync(params ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) { reqres := cli.BeginRecheckTxAsync(params, nil) reqres.Wait() return reqres.Response.GetBeginRecheckTx(), cli.Error() } -func (cli *grpcClient) EndRecheckTxSync(params types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { +func (cli *grpcClient) EndRecheckTxSync(params ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) { reqres := cli.EndRecheckTxAsync(params, nil) reqres.Wait() return reqres.Response.GetEndRecheckTx(), cli.Error() diff --git a/abci/client/grpc_client_test.go b/abci/client/grpc_client_test.go index 7b1d386ad..56915b77c 100644 --- a/abci/client/grpc_client_test.go +++ b/abci/client/grpc_client_test.go @@ -4,8 +4,10 @@ import ( "fmt" "testing" + "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/abci/server" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/rand" "github.com/stretchr/testify/require" ) @@ -22,7 +24,7 @@ func TestGrpcClientCalls(t *testing.T) { require.NoError(t, err0) c := NewGRPCClient(addr, true) - c.SetGlobalCallback(func(*types.Request, *types.Response) { + c.SetGlobalCallback(func(*ocabci.Request, *ocabci.Response) { }) err0 = c.Start() require.NoError(t, err0) @@ -36,10 +38,10 @@ func TestGrpcClientCalls(t *testing.T) { c.QueryAsync(types.RequestQuery{}, getResponseCallback(t)) c.CommitAsync(getResponseCallback(t)) c.InitChainAsync(types.RequestInitChain{}, getResponseCallback(t)) - c.BeginBlockAsync(types.RequestBeginBlock{}, getResponseCallback(t)) + c.BeginBlockAsync(ocabci.RequestBeginBlock{}, getResponseCallback(t)) c.EndBlockAsync(types.RequestEndBlock{}, getResponseCallback(t)) - c.BeginRecheckTxAsync(types.RequestBeginRecheckTx{}, getResponseCallback(t)) - c.EndRecheckTxAsync(types.RequestEndRecheckTx{}, getResponseCallback(t)) + c.BeginRecheckTxAsync(ocabci.RequestBeginRecheckTx{}, getResponseCallback(t)) + c.EndRecheckTxAsync(ocabci.RequestEndRecheckTx{}, getResponseCallback(t)) c.ListSnapshotsAsync(types.RequestListSnapshots{}, getResponseCallback(t)) c.OfferSnapshotAsync(types.RequestOfferSnapshot{}, getResponseCallback(t)) c.LoadSnapshotChunkAsync(types.RequestLoadSnapshotChunk{}, getResponseCallback(t)) @@ -72,16 +74,16 @@ func TestGrpcClientCalls(t *testing.T) { _, err = c.InitChainSync(types.RequestInitChain{}) require.NoError(t, err) - _, err = c.BeginBlockSync(types.RequestBeginBlock{}) + _, err = c.BeginBlockSync(ocabci.RequestBeginBlock{}) require.NoError(t, err) _, err = c.EndBlockSync(types.RequestEndBlock{}) require.NoError(t, err) - _, err = c.BeginRecheckTxSync(types.RequestBeginRecheckTx{}) + _, err = c.BeginRecheckTxSync(ocabci.RequestBeginRecheckTx{}) require.NoError(t, err) - _, err = c.EndRecheckTxSync(types.RequestEndRecheckTx{}) + _, err = c.EndRecheckTxSync(ocabci.RequestEndRecheckTx{}) require.NoError(t, err) _, err = c.ListSnapshotsSync(types.RequestListSnapshots{}) diff --git a/abci/client/local_client.go b/abci/client/local_client.go index 1b89774dc..a26436f80 100644 --- a/abci/client/local_client.go +++ b/abci/client/local_client.go @@ -1,7 +1,9 @@ package abcicli import ( - types "github.com/line/ostracon/abci/types" + "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" ) @@ -18,7 +20,7 @@ type localClient struct { // TODO: remove `mtx` to increase concurrency. We could remove it because the app should protect itself. mtx *tmsync.Mutex // CONTRACT: The application should protect itself from concurrency as an abci server. - types.Application + ocabci.Application globalCbMtx tmsync.Mutex globalCb GlobalCallback @@ -30,7 +32,7 @@ var _ Client = (*localClient)(nil) // methods of the given app. // // Both Async and Sync methods ignore the given context.Context parameter. -func NewLocalClient(mtx *tmsync.Mutex, app types.Application) Client { +func NewLocalClient(mtx *tmsync.Mutex, app ocabci.Application) Client { if mtx == nil { mtx = new(tmsync.Mutex) } @@ -55,15 +57,15 @@ func (app *localClient) GetGlobalCallback() (cb GlobalCallback) { return cb } -// TODO: change types.Application to include Error()? +// TODO: change abci.Application to include Error()? func (app *localClient) Error() error { return nil } func (app *localClient) FlushAsync(cb ResponseCallback) *ReqRes { // Do nothing - reqRes := NewReqRes(types.ToRequestFlush(), cb) - return app.done(reqRes, types.ToResponseFlush()) + reqRes := NewReqRes(ocabci.ToRequestFlush(), cb) + return app.done(reqRes, ocabci.ToResponseFlush()) } func (app *localClient) EchoAsync(msg string, cb ResponseCallback) *ReqRes { @@ -71,35 +73,35 @@ func (app *localClient) EchoAsync(msg string, cb ResponseCallback) *ReqRes { // app.mtx.Lock() // defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestEcho(msg), cb) - return app.done(reqRes, types.ToResponseEcho(msg)) + reqRes := NewReqRes(ocabci.ToRequestEcho(msg), cb) + return app.done(reqRes, ocabci.ToResponseEcho(msg)) } func (app *localClient) InfoAsync(req types.RequestInfo, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestInfo(req), cb) + reqRes := NewReqRes(ocabci.ToRequestInfo(req), cb) res := app.Application.Info(req) - return app.done(reqRes, types.ToResponseInfo(res)) + return app.done(reqRes, ocabci.ToResponseInfo(res)) } func (app *localClient) SetOptionAsync(req types.RequestSetOption, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestSetOption(req), cb) + reqRes := NewReqRes(ocabci.ToRequestSetOption(req), cb) res := app.Application.SetOption(req) - return app.done(reqRes, types.ToResponseSetOption(res)) + return app.done(reqRes, ocabci.ToResponseSetOption(res)) } func (app *localClient) DeliverTxAsync(req types.RequestDeliverTx, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestDeliverTx(req), cb) + reqRes := NewReqRes(ocabci.ToRequestDeliverTx(req), cb) res := app.Application.DeliverTx(req) - return app.done(reqRes, types.ToResponseDeliverTx(res)) + return app.done(reqRes, ocabci.ToResponseDeliverTx(res)) } func (app *localClient) CheckTxAsync(req types.RequestCheckTx, cb ResponseCallback) *ReqRes { @@ -107,10 +109,10 @@ func (app *localClient) CheckTxAsync(req types.RequestCheckTx, cb ResponseCallba // app.mtx.Lock() // defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestCheckTx(req), cb) + reqRes := NewReqRes(ocabci.ToRequestCheckTx(req), cb) - app.Application.CheckTxAsync(req, func(r types.ResponseCheckTx) { - res := types.ToResponseCheckTx(r) + app.Application.CheckTxAsync(req, func(r ocabci.ResponseCheckTx) { + res := ocabci.ToResponseCheckTx(r) app.done(reqRes, res) }) @@ -121,104 +123,104 @@ func (app *localClient) QueryAsync(req types.RequestQuery, cb ResponseCallback) app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestQuery(req), cb) + reqRes := NewReqRes(ocabci.ToRequestQuery(req), cb) res := app.Application.Query(req) - return app.done(reqRes, types.ToResponseQuery(res)) + return app.done(reqRes, ocabci.ToResponseQuery(res)) } func (app *localClient) CommitAsync(cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestCommit(), cb) + reqRes := NewReqRes(ocabci.ToRequestCommit(), cb) res := app.Application.Commit() - return app.done(reqRes, types.ToResponseCommit(res)) + return app.done(reqRes, ocabci.ToResponseCommit(res)) } func (app *localClient) InitChainAsync(req types.RequestInitChain, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestInitChain(req), cb) + reqRes := NewReqRes(ocabci.ToRequestInitChain(req), cb) res := app.Application.InitChain(req) - return app.done(reqRes, types.ToResponseInitChain(res)) + return app.done(reqRes, ocabci.ToResponseInitChain(res)) } -func (app *localClient) BeginBlockAsync(req types.RequestBeginBlock, cb ResponseCallback) *ReqRes { +func (app *localClient) BeginBlockAsync(req ocabci.RequestBeginBlock, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestBeginBlock(req), cb) + reqRes := NewReqRes(ocabci.ToRequestBeginBlock(req), cb) res := app.Application.BeginBlock(req) - return app.done(reqRes, types.ToResponseBeginBlock(res)) + return app.done(reqRes, ocabci.ToResponseBeginBlock(res)) } func (app *localClient) EndBlockAsync(req types.RequestEndBlock, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestEndBlock(req), cb) + reqRes := NewReqRes(ocabci.ToRequestEndBlock(req), cb) res := app.Application.EndBlock(req) - return app.done(reqRes, types.ToResponseEndBlock(res)) + return app.done(reqRes, ocabci.ToResponseEndBlock(res)) } -func (app *localClient) BeginRecheckTxAsync(req types.RequestBeginRecheckTx, cb ResponseCallback) *ReqRes { +func (app *localClient) BeginRecheckTxAsync(req ocabci.RequestBeginRecheckTx, cb ResponseCallback) *ReqRes { // NOTE: commented out for performance. delete all after commenting out all `app.mtx` // app.mtx.Lock() // defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestBeginRecheckTx(req), cb) + reqRes := NewReqRes(ocabci.ToRequestBeginRecheckTx(req), cb) res := app.Application.BeginRecheckTx(req) - return app.done(reqRes, types.ToResponseBeginRecheckTx(res)) + return app.done(reqRes, ocabci.ToResponseBeginRecheckTx(res)) } -func (app *localClient) EndRecheckTxAsync(req types.RequestEndRecheckTx, cb ResponseCallback) *ReqRes { +func (app *localClient) EndRecheckTxAsync(req ocabci.RequestEndRecheckTx, cb ResponseCallback) *ReqRes { // NOTE: commented out for performance. delete all after commenting out all `app.mtx` // app.mtx.Lock() // defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestEndRecheckTx(req), cb) + reqRes := NewReqRes(ocabci.ToRequestEndRecheckTx(req), cb) res := app.Application.EndRecheckTx(req) - return app.done(reqRes, types.ToResponseEndRecheckTx(res)) + return app.done(reqRes, ocabci.ToResponseEndRecheckTx(res)) } func (app *localClient) ListSnapshotsAsync(req types.RequestListSnapshots, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestListSnapshots(req), cb) + reqRes := NewReqRes(ocabci.ToRequestListSnapshots(req), cb) res := app.Application.ListSnapshots(req) - return app.done(reqRes, types.ToResponseListSnapshots(res)) + return app.done(reqRes, ocabci.ToResponseListSnapshots(res)) } func (app *localClient) OfferSnapshotAsync(req types.RequestOfferSnapshot, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestOfferSnapshot(req), cb) + reqRes := NewReqRes(ocabci.ToRequestOfferSnapshot(req), cb) res := app.Application.OfferSnapshot(req) - return app.done(reqRes, types.ToResponseOfferSnapshot(res)) + return app.done(reqRes, ocabci.ToResponseOfferSnapshot(res)) } func (app *localClient) LoadSnapshotChunkAsync(req types.RequestLoadSnapshotChunk, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestLoadSnapshotChunk(req), cb) + reqRes := NewReqRes(ocabci.ToRequestLoadSnapshotChunk(req), cb) res := app.Application.LoadSnapshotChunk(req) - return app.done(reqRes, types.ToResponseLoadSnapshotChunk(res)) + return app.done(reqRes, ocabci.ToResponseLoadSnapshotChunk(res)) } func (app *localClient) ApplySnapshotChunkAsync(req types.RequestApplySnapshotChunk, cb ResponseCallback) *ReqRes { app.mtx.Lock() defer app.mtx.Unlock() - reqRes := NewReqRes(types.ToRequestApplySnapshotChunk(req), cb) + reqRes := NewReqRes(ocabci.ToRequestApplySnapshotChunk(req), cb) res := app.Application.ApplySnapshotChunk(req) - return app.done(reqRes, types.ToResponseApplySnapshotChunk(res)) + return app.done(reqRes, ocabci.ToResponseApplySnapshotChunk(res)) } -//------------------------------------------------------- +// ------------------------------------------------------- func (app *localClient) FlushSync() (*types.ResponseFlush, error) { return &types.ResponseFlush{}, nil } @@ -255,7 +257,7 @@ func (app *localClient) DeliverTxSync(req types.RequestDeliverTx) (*types.Respon return &res, nil } -func (app *localClient) CheckTxSync(req types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (app *localClient) CheckTxSync(req types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) { // NOTE: commented out for performance. delete all after commenting out all `app.mtx` // app.mtx.Lock() // defer app.mtx.Unlock() @@ -288,7 +290,7 @@ func (app *localClient) InitChainSync(req types.RequestInitChain) (*types.Respon return &res, nil } -func (app *localClient) BeginBlockSync(req types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { +func (app *localClient) BeginBlockSync(req ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) { app.mtx.Lock() defer app.mtx.Unlock() @@ -304,7 +306,7 @@ func (app *localClient) EndBlockSync(req types.RequestEndBlock) (*types.Response return &res, nil } -func (app *localClient) BeginRecheckTxSync(req types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { +func (app *localClient) BeginRecheckTxSync(req ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) { // NOTE: commented out for performance. delete all after commenting out all `app.mtx` // app.mtx.Lock() // defer app.mtx.Unlock() @@ -313,7 +315,7 @@ func (app *localClient) BeginRecheckTxSync(req types.RequestBeginRecheckTx) (*ty return &res, nil } -func (app *localClient) EndRecheckTxSync(req types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { +func (app *localClient) EndRecheckTxSync(req ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) { // NOTE: commented out for performance. delete all after commenting out all `app.mtx` // app.mtx.Lock() // defer app.mtx.Unlock() @@ -358,7 +360,7 @@ func (app *localClient) ApplySnapshotChunkSync( //------------------------------------------------------- -func (app *localClient) done(reqRes *ReqRes, res *types.Response) *ReqRes { +func (app *localClient) done(reqRes *ReqRes, res *ocabci.Response) *ReqRes { set := reqRes.SetDone(res) if set { if globalCb := app.GetGlobalCallback(); globalCb != nil { diff --git a/abci/client/local_client_test.go b/abci/client/local_client_test.go index c8aab0ba1..c1b32e239 100644 --- a/abci/client/local_client_test.go +++ b/abci/client/local_client_test.go @@ -4,12 +4,14 @@ import ( "testing" "time" - "github.com/line/ostracon/abci/types" + "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/stretchr/testify/require" ) type sampleApp struct { - types.BaseApplication + ocabci.BaseApplication } func newDoneChan(t *testing.T) chan struct{} { @@ -27,7 +29,7 @@ func newDoneChan(t *testing.T) chan struct{} { func getResponseCallback(t *testing.T) ResponseCallback { doneChan := newDoneChan(t) - return func(res *types.Response) { + return func(res *ocabci.Response) { require.NotNil(t, res) doneChan <- struct{}{} } @@ -37,7 +39,7 @@ func TestLocalClientCalls(t *testing.T) { app := sampleApp{} c := NewLocalClient(nil, app) - c.SetGlobalCallback(func(*types.Request, *types.Response) { + c.SetGlobalCallback(func(*ocabci.Request, *ocabci.Response) { }) c.EchoAsync("msg", getResponseCallback(t)) @@ -49,10 +51,10 @@ func TestLocalClientCalls(t *testing.T) { c.QueryAsync(types.RequestQuery{}, getResponseCallback(t)) c.CommitAsync(getResponseCallback(t)) c.InitChainAsync(types.RequestInitChain{}, getResponseCallback(t)) - c.BeginBlockAsync(types.RequestBeginBlock{}, getResponseCallback(t)) + c.BeginBlockAsync(ocabci.RequestBeginBlock{}, getResponseCallback(t)) c.EndBlockAsync(types.RequestEndBlock{}, getResponseCallback(t)) - c.BeginRecheckTxAsync(types.RequestBeginRecheckTx{}, getResponseCallback(t)) - c.EndRecheckTxAsync(types.RequestEndRecheckTx{}, getResponseCallback(t)) + c.BeginRecheckTxAsync(ocabci.RequestBeginRecheckTx{}, getResponseCallback(t)) + c.EndRecheckTxAsync(ocabci.RequestEndRecheckTx{}, getResponseCallback(t)) c.ListSnapshotsAsync(types.RequestListSnapshots{}, getResponseCallback(t)) c.OfferSnapshotAsync(types.RequestOfferSnapshot{}, getResponseCallback(t)) c.LoadSnapshotChunkAsync(types.RequestLoadSnapshotChunk{}, getResponseCallback(t)) @@ -85,16 +87,16 @@ func TestLocalClientCalls(t *testing.T) { _, err = c.InitChainSync(types.RequestInitChain{}) require.NoError(t, err) - _, err = c.BeginBlockSync(types.RequestBeginBlock{}) + _, err = c.BeginBlockSync(ocabci.RequestBeginBlock{}) require.NoError(t, err) _, err = c.EndBlockSync(types.RequestEndBlock{}) require.NoError(t, err) - _, err = c.BeginRecheckTxSync(types.RequestBeginRecheckTx{}) + _, err = c.BeginRecheckTxSync(ocabci.RequestBeginRecheckTx{}) require.NoError(t, err) - _, err = c.EndRecheckTxSync(types.RequestEndRecheckTx{}) + _, err = c.EndRecheckTxSync(ocabci.RequestEndRecheckTx{}) require.NoError(t, err) _, err = c.ListSnapshotsSync(types.RequestListSnapshots{}) diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 21b69482c..bfdf6c12e 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -3,12 +3,13 @@ package mocks import ( - abcicli "github.com/line/ostracon/abci/client" - log "github.com/line/ostracon/libs/log" - mock "github.com/stretchr/testify/mock" - types "github.com/line/ostracon/abci/types" + types "github.com/tendermint/tendermint/abci/types" + + abcicli "github.com/line/ostracon/abci/client" + ocabci "github.com/line/ostracon/abci/types" + log "github.com/line/ostracon/libs/log" ) // Client is an autogenerated mock type for the Client type @@ -56,11 +57,11 @@ func (_m *Client) ApplySnapshotChunkSync(_a0 types.RequestApplySnapshotChunk) (* } // BeginBlockAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) BeginBlockAsync(_a0 types.RequestBeginBlock, _a1 abcicli.ResponseCallback) *abcicli.ReqRes { +func (_m *Client) BeginBlockAsync(_a0 ocabci.RequestBeginBlock, _a1 abcicli.ResponseCallback) *abcicli.ReqRes { ret := _m.Called(_a0, _a1) var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(types.RequestBeginBlock, abcicli.ResponseCallback) *abcicli.ReqRes); ok { + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginBlock, abcicli.ResponseCallback) *abcicli.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -72,11 +73,11 @@ func (_m *Client) BeginBlockAsync(_a0 types.RequestBeginBlock, _a1 abcicli.Respo } // BeginBlockSync provides a mock function with given fields: _a0 -func (_m *Client) BeginBlockSync(_a0 types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { +func (_m *Client) BeginBlockSync(_a0 ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) { ret := _m.Called(_a0) var r0 *types.ResponseBeginBlock - if rf, ok := ret.Get(0).(func(types.RequestBeginBlock) *types.ResponseBeginBlock); ok { + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginBlock) *types.ResponseBeginBlock); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { @@ -85,7 +86,7 @@ func (_m *Client) BeginBlockSync(_a0 types.RequestBeginBlock) (*types.ResponseBe } var r1 error - if rf, ok := ret.Get(1).(func(types.RequestBeginBlock) error); ok { + if rf, ok := ret.Get(1).(func(ocabci.RequestBeginBlock) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -95,11 +96,11 @@ func (_m *Client) BeginBlockSync(_a0 types.RequestBeginBlock) (*types.ResponseBe } // BeginRecheckTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) BeginRecheckTxAsync(_a0 types.RequestBeginRecheckTx, _a1 abcicli.ResponseCallback) *abcicli.ReqRes { +func (_m *Client) BeginRecheckTxAsync(_a0 ocabci.RequestBeginRecheckTx, _a1 abcicli.ResponseCallback) *abcicli.ReqRes { ret := _m.Called(_a0, _a1) var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(types.RequestBeginRecheckTx, abcicli.ResponseCallback) *abcicli.ReqRes); ok { + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginRecheckTx, abcicli.ResponseCallback) *abcicli.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -111,20 +112,20 @@ func (_m *Client) BeginRecheckTxAsync(_a0 types.RequestBeginRecheckTx, _a1 abcic } // BeginRecheckTxSync provides a mock function with given fields: _a0 -func (_m *Client) BeginRecheckTxSync(_a0 types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { +func (_m *Client) BeginRecheckTxSync(_a0 ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) { ret := _m.Called(_a0) - var r0 *types.ResponseBeginRecheckTx - if rf, ok := ret.Get(0).(func(types.RequestBeginRecheckTx) *types.ResponseBeginRecheckTx); ok { + var r0 *ocabci.ResponseBeginRecheckTx + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginRecheckTx) *ocabci.ResponseBeginRecheckTx); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseBeginRecheckTx) + r0 = ret.Get(0).(*ocabci.ResponseBeginRecheckTx) } } var r1 error - if rf, ok := ret.Get(1).(func(types.RequestBeginRecheckTx) error); ok { + if rf, ok := ret.Get(1).(func(ocabci.RequestBeginRecheckTx) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -150,15 +151,15 @@ func (_m *Client) CheckTxAsync(_a0 types.RequestCheckTx, _a1 abcicli.ResponseCal } // CheckTxSync provides a mock function with given fields: _a0 -func (_m *Client) CheckTxSync(_a0 types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (_m *Client) CheckTxSync(_a0 types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) { ret := _m.Called(_a0) - var r0 *types.ResponseCheckTx - if rf, ok := ret.Get(0).(func(types.RequestCheckTx) *types.ResponseCheckTx); ok { + var r0 *ocabci.ResponseCheckTx + if rf, ok := ret.Get(0).(func(types.RequestCheckTx) *ocabci.ResponseCheckTx); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseCheckTx) + r0 = ret.Get(0).(*ocabci.ResponseCheckTx) } } @@ -329,11 +330,11 @@ func (_m *Client) EndBlockSync(_a0 types.RequestEndBlock) (*types.ResponseEndBlo } // EndRecheckTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *Client) EndRecheckTxAsync(_a0 types.RequestEndRecheckTx, _a1 abcicli.ResponseCallback) *abcicli.ReqRes { +func (_m *Client) EndRecheckTxAsync(_a0 ocabci.RequestEndRecheckTx, _a1 abcicli.ResponseCallback) *abcicli.ReqRes { ret := _m.Called(_a0, _a1) var r0 *abcicli.ReqRes - if rf, ok := ret.Get(0).(func(types.RequestEndRecheckTx, abcicli.ResponseCallback) *abcicli.ReqRes); ok { + if rf, ok := ret.Get(0).(func(ocabci.RequestEndRecheckTx, abcicli.ResponseCallback) *abcicli.ReqRes); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -345,20 +346,20 @@ func (_m *Client) EndRecheckTxAsync(_a0 types.RequestEndRecheckTx, _a1 abcicli.R } // EndRecheckTxSync provides a mock function with given fields: _a0 -func (_m *Client) EndRecheckTxSync(_a0 types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { +func (_m *Client) EndRecheckTxSync(_a0 ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) { ret := _m.Called(_a0) - var r0 *types.ResponseEndRecheckTx - if rf, ok := ret.Get(0).(func(types.RequestEndRecheckTx) *types.ResponseEndRecheckTx); ok { + var r0 *ocabci.ResponseEndRecheckTx + if rf, ok := ret.Get(0).(func(ocabci.RequestEndRecheckTx) *ocabci.ResponseEndRecheckTx); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseEndRecheckTx) + r0 = ret.Get(0).(*ocabci.ResponseEndRecheckTx) } } var r1 error - if rf, ok := ret.Get(1).(func(types.RequestEndRecheckTx) error); ok { + if rf, ok := ret.Get(1).(func(ocabci.RequestEndRecheckTx) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index 4d63523db..32a2aade5 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -10,7 +10,9 @@ import ( "reflect" "time" - "github.com/line/ostracon/abci/types" + "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" tmnet "github.com/line/ostracon/libs/net" "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" @@ -129,14 +131,14 @@ func (cli *socketClient) sendRequestsRoutine(conn io.Writer) { // cli.Logger.Debug("Sent request", "requestType", reflect.TypeOf(reqres.Request), "request", reqres.Request) cli.willSendReq(reqres) - err := types.WriteMessage(reqres.Request, w) + err := ocabci.WriteMessage(reqres.Request, w) if err != nil { cli.stopForError(fmt.Errorf("write to buffer: %w", err)) return } // If it's a flush request, flush the current buffer. - if _, ok := reqres.Request.Value.(*types.Request_Flush); ok { + if _, ok := reqres.Request.Value.(*ocabci.Request_Flush); ok { err = w.Flush() if err != nil { cli.stopForError(fmt.Errorf("flush buffer: %w", err)) @@ -145,7 +147,7 @@ func (cli *socketClient) sendRequestsRoutine(conn io.Writer) { } case <-cli.flushTimer.Ch: // flush queue select { - case cli.reqQueue <- NewReqRes(types.ToRequestFlush(), nil): + case cli.reqQueue <- NewReqRes(ocabci.ToRequestFlush(), nil): default: // Probably will fill the buffer, or retry later. } @@ -158,8 +160,8 @@ func (cli *socketClient) sendRequestsRoutine(conn io.Writer) { func (cli *socketClient) recvResponseRoutine(conn io.Reader) { r := bufio.NewReader(conn) for { - var res = &types.Response{} - err := types.ReadMessage(r, res) + var res = &ocabci.Response{} + err := ocabci.ReadMessage(r, res) if err != nil { cli.stopForError(fmt.Errorf("read message: %w", err)) return @@ -168,7 +170,7 @@ func (cli *socketClient) recvResponseRoutine(conn io.Reader) { // cli.Logger.Debug("Received response", "responseType", reflect.TypeOf(res), "response", res) switch r := res.Value.(type) { - case *types.Response_Exception: // app responded with error + case *ocabci.Response_Exception: // app responded with error // XXX After setting cli.err, release waiters (e.g. reqres.Done()) cli.stopForError(errors.New(r.Exception.Error)) return @@ -188,7 +190,7 @@ func (cli *socketClient) willSendReq(reqres *ReqRes) { cli.reqSent.PushBack(reqres) } -func (cli *socketClient) didRecvResponse(res *types.Response) error { +func (cli *socketClient) didRecvResponse(res *ocabci.Response) error { cli.mtx.Lock() defer cli.mtx.Unlock() @@ -225,77 +227,77 @@ func (cli *socketClient) didRecvResponse(res *types.Response) error { //---------------------------------------- func (cli *socketClient) EchoAsync(msg string, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestEcho(msg), cb) + return cli.queueRequest(ocabci.ToRequestEcho(msg), cb) } func (cli *socketClient) FlushAsync(cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestFlush(), cb) + return cli.queueRequest(ocabci.ToRequestFlush(), cb) } func (cli *socketClient) InfoAsync(req types.RequestInfo, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestInfo(req), cb) + return cli.queueRequest(ocabci.ToRequestInfo(req), cb) } func (cli *socketClient) SetOptionAsync(req types.RequestSetOption, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestSetOption(req), cb) + return cli.queueRequest(ocabci.ToRequestSetOption(req), cb) } func (cli *socketClient) DeliverTxAsync(req types.RequestDeliverTx, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestDeliverTx(req), cb) + return cli.queueRequest(ocabci.ToRequestDeliverTx(req), cb) } func (cli *socketClient) CheckTxAsync(req types.RequestCheckTx, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestCheckTx(req), cb) + return cli.queueRequest(ocabci.ToRequestCheckTx(req), cb) } func (cli *socketClient) QueryAsync(req types.RequestQuery, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestQuery(req), cb) + return cli.queueRequest(ocabci.ToRequestQuery(req), cb) } func (cli *socketClient) CommitAsync(cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestCommit(), cb) + return cli.queueRequest(ocabci.ToRequestCommit(), cb) } func (cli *socketClient) InitChainAsync(req types.RequestInitChain, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestInitChain(req), cb) + return cli.queueRequest(ocabci.ToRequestInitChain(req), cb) } -func (cli *socketClient) BeginBlockAsync(req types.RequestBeginBlock, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestBeginBlock(req), cb) +func (cli *socketClient) BeginBlockAsync(req ocabci.RequestBeginBlock, cb ResponseCallback) *ReqRes { + return cli.queueRequest(ocabci.ToRequestBeginBlock(req), cb) } func (cli *socketClient) EndBlockAsync(req types.RequestEndBlock, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestEndBlock(req), cb) + return cli.queueRequest(ocabci.ToRequestEndBlock(req), cb) } -func (cli *socketClient) BeginRecheckTxAsync(req types.RequestBeginRecheckTx, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestBeginRecheckTx(req), cb) +func (cli *socketClient) BeginRecheckTxAsync(req ocabci.RequestBeginRecheckTx, cb ResponseCallback) *ReqRes { + return cli.queueRequest(ocabci.ToRequestBeginRecheckTx(req), cb) } -func (cli *socketClient) EndRecheckTxAsync(req types.RequestEndRecheckTx, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestEndRecheckTx(req), cb) +func (cli *socketClient) EndRecheckTxAsync(req ocabci.RequestEndRecheckTx, cb ResponseCallback) *ReqRes { + return cli.queueRequest(ocabci.ToRequestEndRecheckTx(req), cb) } func (cli *socketClient) ListSnapshotsAsync(req types.RequestListSnapshots, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestListSnapshots(req), cb) + return cli.queueRequest(ocabci.ToRequestListSnapshots(req), cb) } func (cli *socketClient) OfferSnapshotAsync(req types.RequestOfferSnapshot, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestOfferSnapshot(req), cb) + return cli.queueRequest(ocabci.ToRequestOfferSnapshot(req), cb) } func (cli *socketClient) LoadSnapshotChunkAsync(req types.RequestLoadSnapshotChunk, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestLoadSnapshotChunk(req), cb) + return cli.queueRequest(ocabci.ToRequestLoadSnapshotChunk(req), cb) } func (cli *socketClient) ApplySnapshotChunkAsync(req types.RequestApplySnapshotChunk, cb ResponseCallback) *ReqRes { - return cli.queueRequest(types.ToRequestApplySnapshotChunk(req), cb) + return cli.queueRequest(ocabci.ToRequestApplySnapshotChunk(req), cb) } //---------------------------------------- func (cli *socketClient) FlushSync() (*types.ResponseFlush, error) { - reqRes := cli.queueRequest(types.ToRequestFlush(), nil) + reqRes := cli.queueRequest(ocabci.ToRequestFlush(), nil) if err := cli.Error(); err != nil { return nil, err } @@ -304,7 +306,7 @@ func (cli *socketClient) FlushSync() (*types.ResponseFlush, error) { } func (cli *socketClient) EchoSync(msg string) (*types.ResponseEcho, error) { - reqres := cli.queueRequest(types.ToRequestEcho(msg), nil) + reqres := cli.queueRequest(ocabci.ToRequestEcho(msg), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -313,7 +315,7 @@ func (cli *socketClient) EchoSync(msg string) (*types.ResponseEcho, error) { } func (cli *socketClient) InfoSync(req types.RequestInfo) (*types.ResponseInfo, error) { - reqres := cli.queueRequest(types.ToRequestInfo(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestInfo(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -322,7 +324,7 @@ func (cli *socketClient) InfoSync(req types.RequestInfo) (*types.ResponseInfo, e } func (cli *socketClient) SetOptionSync(req types.RequestSetOption) (*types.ResponseSetOption, error) { - reqres := cli.queueRequest(types.ToRequestSetOption(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestSetOption(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -331,7 +333,7 @@ func (cli *socketClient) SetOptionSync(req types.RequestSetOption) (*types.Respo } func (cli *socketClient) DeliverTxSync(req types.RequestDeliverTx) (*types.ResponseDeliverTx, error) { - reqres := cli.queueRequest(types.ToRequestDeliverTx(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestDeliverTx(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -339,8 +341,8 @@ func (cli *socketClient) DeliverTxSync(req types.RequestDeliverTx) (*types.Respo return reqres.Response.GetDeliverTx(), cli.Error() } -func (cli *socketClient) CheckTxSync(req types.RequestCheckTx) (*types.ResponseCheckTx, error) { - reqres := cli.queueRequest(types.ToRequestCheckTx(req), nil) +func (cli *socketClient) CheckTxSync(req types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) { + reqres := cli.queueRequest(ocabci.ToRequestCheckTx(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -349,7 +351,7 @@ func (cli *socketClient) CheckTxSync(req types.RequestCheckTx) (*types.ResponseC } func (cli *socketClient) QuerySync(req types.RequestQuery) (*types.ResponseQuery, error) { - reqres := cli.queueRequest(types.ToRequestQuery(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestQuery(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -358,7 +360,7 @@ func (cli *socketClient) QuerySync(req types.RequestQuery) (*types.ResponseQuery } func (cli *socketClient) CommitSync() (*types.ResponseCommit, error) { - reqres := cli.queueRequest(types.ToRequestCommit(), nil) + reqres := cli.queueRequest(ocabci.ToRequestCommit(), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -367,7 +369,7 @@ func (cli *socketClient) CommitSync() (*types.ResponseCommit, error) { } func (cli *socketClient) InitChainSync(req types.RequestInitChain) (*types.ResponseInitChain, error) { - reqres := cli.queueRequest(types.ToRequestInitChain(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestInitChain(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -375,8 +377,8 @@ func (cli *socketClient) InitChainSync(req types.RequestInitChain) (*types.Respo return reqres.Response.GetInitChain(), cli.Error() } -func (cli *socketClient) BeginBlockSync(req types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { - reqres := cli.queueRequest(types.ToRequestBeginBlock(req), nil) +func (cli *socketClient) BeginBlockSync(req ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) { + reqres := cli.queueRequest(ocabci.ToRequestBeginBlock(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -385,7 +387,7 @@ func (cli *socketClient) BeginBlockSync(req types.RequestBeginBlock) (*types.Res } func (cli *socketClient) EndBlockSync(req types.RequestEndBlock) (*types.ResponseEndBlock, error) { - reqres := cli.queueRequest(types.ToRequestEndBlock(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestEndBlock(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -393,8 +395,8 @@ func (cli *socketClient) EndBlockSync(req types.RequestEndBlock) (*types.Respons return reqres.Response.GetEndBlock(), cli.Error() } -func (cli *socketClient) BeginRecheckTxSync(req types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { - reqres := cli.queueRequest(types.ToRequestBeginRecheckTx(req), nil) +func (cli *socketClient) BeginRecheckTxSync(req ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) { + reqres := cli.queueRequest(ocabci.ToRequestBeginRecheckTx(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -402,8 +404,8 @@ func (cli *socketClient) BeginRecheckTxSync(req types.RequestBeginRecheckTx) (*t return reqres.Response.GetBeginRecheckTx(), cli.Error() } -func (cli *socketClient) EndRecheckTxSync(req types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { - reqres := cli.queueRequest(types.ToRequestEndRecheckTx(req), nil) +func (cli *socketClient) EndRecheckTxSync(req ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) { + reqres := cli.queueRequest(ocabci.ToRequestEndRecheckTx(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -412,7 +414,7 @@ func (cli *socketClient) EndRecheckTxSync(req types.RequestEndRecheckTx) (*types } func (cli *socketClient) ListSnapshotsSync(req types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { - reqres := cli.queueRequest(types.ToRequestListSnapshots(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestListSnapshots(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -421,7 +423,7 @@ func (cli *socketClient) ListSnapshotsSync(req types.RequestListSnapshots) (*typ } func (cli *socketClient) OfferSnapshotSync(req types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { - reqres := cli.queueRequest(types.ToRequestOfferSnapshot(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestOfferSnapshot(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -431,7 +433,7 @@ func (cli *socketClient) OfferSnapshotSync(req types.RequestOfferSnapshot) (*typ func (cli *socketClient) LoadSnapshotChunkSync( req types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { - reqres := cli.queueRequest(types.ToRequestLoadSnapshotChunk(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestLoadSnapshotChunk(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -441,7 +443,7 @@ func (cli *socketClient) LoadSnapshotChunkSync( func (cli *socketClient) ApplySnapshotChunkSync( req types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { - reqres := cli.queueRequest(types.ToRequestApplySnapshotChunk(req), nil) + reqres := cli.queueRequest(ocabci.ToRequestApplySnapshotChunk(req), nil) if _, err := cli.FlushSync(); err != nil { return nil, err } @@ -450,7 +452,7 @@ func (cli *socketClient) ApplySnapshotChunkSync( //---------------------------------------- -func (cli *socketClient) queueRequest(req *types.Request, cb ResponseCallback) *ReqRes { +func (cli *socketClient) queueRequest(req *ocabci.Request, cb ResponseCallback) *ReqRes { reqres := NewReqRes(req, cb) // TODO: set cli.err if reqQueue times out @@ -458,7 +460,7 @@ func (cli *socketClient) queueRequest(req *types.Request, cb ResponseCallback) * // Maybe auto-flush, or unset auto-flush switch req.Value.(type) { - case *types.Request_Flush: + case *ocabci.Request_Flush: cli.flushTimer.Unset() default: cli.flushTimer.Set() @@ -491,42 +493,42 @@ LOOP: //---------------------------------------- -func resMatchesReq(req *types.Request, res *types.Response) (ok bool) { +func resMatchesReq(req *ocabci.Request, res *ocabci.Response) (ok bool) { switch req.Value.(type) { - case *types.Request_Echo: - _, ok = res.Value.(*types.Response_Echo) - case *types.Request_Flush: - _, ok = res.Value.(*types.Response_Flush) - case *types.Request_Info: - _, ok = res.Value.(*types.Response_Info) - case *types.Request_SetOption: - _, ok = res.Value.(*types.Response_SetOption) - case *types.Request_DeliverTx: - _, ok = res.Value.(*types.Response_DeliverTx) - case *types.Request_CheckTx: - _, ok = res.Value.(*types.Response_CheckTx) - case *types.Request_Commit: - _, ok = res.Value.(*types.Response_Commit) - case *types.Request_Query: - _, ok = res.Value.(*types.Response_Query) - case *types.Request_InitChain: - _, ok = res.Value.(*types.Response_InitChain) - case *types.Request_BeginBlock: - _, ok = res.Value.(*types.Response_BeginBlock) - case *types.Request_EndBlock: - _, ok = res.Value.(*types.Response_EndBlock) - case *types.Request_BeginRecheckTx: - _, ok = res.Value.(*types.Response_BeginRecheckTx) - case *types.Request_EndRecheckTx: - _, ok = res.Value.(*types.Response_EndRecheckTx) - case *types.Request_ApplySnapshotChunk: - _, ok = res.Value.(*types.Response_ApplySnapshotChunk) - case *types.Request_LoadSnapshotChunk: - _, ok = res.Value.(*types.Response_LoadSnapshotChunk) - case *types.Request_ListSnapshots: - _, ok = res.Value.(*types.Response_ListSnapshots) - case *types.Request_OfferSnapshot: - _, ok = res.Value.(*types.Response_OfferSnapshot) + case *ocabci.Request_Echo: + _, ok = res.Value.(*ocabci.Response_Echo) + case *ocabci.Request_Flush: + _, ok = res.Value.(*ocabci.Response_Flush) + case *ocabci.Request_Info: + _, ok = res.Value.(*ocabci.Response_Info) + case *ocabci.Request_SetOption: + _, ok = res.Value.(*ocabci.Response_SetOption) + case *ocabci.Request_DeliverTx: + _, ok = res.Value.(*ocabci.Response_DeliverTx) + case *ocabci.Request_CheckTx: + _, ok = res.Value.(*ocabci.Response_CheckTx) + case *ocabci.Request_Commit: + _, ok = res.Value.(*ocabci.Response_Commit) + case *ocabci.Request_Query: + _, ok = res.Value.(*ocabci.Response_Query) + case *ocabci.Request_InitChain: + _, ok = res.Value.(*ocabci.Response_InitChain) + case *ocabci.Request_BeginBlock: + _, ok = res.Value.(*ocabci.Response_BeginBlock) + case *ocabci.Request_EndBlock: + _, ok = res.Value.(*ocabci.Response_EndBlock) + case *ocabci.Request_BeginRecheckTx: + _, ok = res.Value.(*ocabci.Response_BeginRecheckTx) + case *ocabci.Request_EndRecheckTx: + _, ok = res.Value.(*ocabci.Response_EndRecheckTx) + case *ocabci.Request_ApplySnapshotChunk: + _, ok = res.Value.(*ocabci.Response_ApplySnapshotChunk) + case *ocabci.Request_LoadSnapshotChunk: + _, ok = res.Value.(*ocabci.Response_LoadSnapshotChunk) + case *ocabci.Request_ListSnapshots: + _, ok = res.Value.(*ocabci.Response_ListSnapshots) + case *ocabci.Request_OfferSnapshot: + _, ok = res.Value.(*ocabci.Response_OfferSnapshot) } return ok } diff --git a/abci/client/socket_client_test.go b/abci/client/socket_client_test.go index 1d7de4d97..356cf09fe 100644 --- a/abci/client/socket_client_test.go +++ b/abci/client/socket_client_test.go @@ -8,9 +8,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/abci/types" + abcicli "github.com/line/ostracon/abci/client" "github.com/line/ostracon/abci/server" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/libs/service" ) @@ -33,7 +35,7 @@ func TestProperSyncCalls(t *testing.T) { resp := make(chan error, 1) go func() { // This is BeginBlockSync unrolled.... - reqres := c.BeginBlockAsync(types.RequestBeginBlock{}, nil) + reqres := c.BeginBlockAsync(ocabci.RequestBeginBlock{}, nil) _, err := c.FlushSync() require.NoError(t, err) res := reqres.Response.GetBeginBlock() @@ -68,7 +70,7 @@ func TestHangingSyncCalls(t *testing.T) { resp := make(chan error, 1) go func() { // Start BeginBlock and flush it - reqres := c.BeginBlockAsync(types.RequestBeginBlock{}, nil) + reqres := c.BeginBlockAsync(ocabci.RequestBeginBlock{}, nil) flush := c.FlushAsync(nil) // wait 20 ms for all events to travel socket, but // no response yet from server @@ -92,7 +94,7 @@ func TestHangingSyncCalls(t *testing.T) { } } -func setupClientServer(t *testing.T, app types.Application) ( +func setupClientServer(t *testing.T, app ocabci.Application) ( service.Service, abcicli.Client) { // some port between 20k and 30k port := 20000 + tmrand.Int32()%10000 @@ -111,10 +113,10 @@ func setupClientServer(t *testing.T, app types.Application) ( } type slowApp struct { - types.BaseApplication + ocabci.BaseApplication } -func (slowApp) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock { +func (slowApp) BeginBlock(req ocabci.RequestBeginBlock) types.ResponseBeginBlock { time.Sleep(200 * time.Millisecond) return types.ResponseBeginBlock{} } @@ -134,7 +136,7 @@ func TestSockerClientCalls(t *testing.T) { } }) - c.SetGlobalCallback(func(*types.Request, *types.Response) { + c.SetGlobalCallback(func(*ocabci.Request, *ocabci.Response) { }) c.EchoAsync("msg", getResponseCallback(t)) @@ -146,10 +148,10 @@ func TestSockerClientCalls(t *testing.T) { c.QueryAsync(types.RequestQuery{}, getResponseCallback(t)) c.CommitAsync(getResponseCallback(t)) c.InitChainAsync(types.RequestInitChain{}, getResponseCallback(t)) - c.BeginBlockAsync(types.RequestBeginBlock{}, getResponseCallback(t)) + c.BeginBlockAsync(ocabci.RequestBeginBlock{}, getResponseCallback(t)) c.EndBlockAsync(types.RequestEndBlock{}, getResponseCallback(t)) - c.BeginRecheckTxAsync(types.RequestBeginRecheckTx{}, getResponseCallback(t)) - c.EndRecheckTxAsync(types.RequestEndRecheckTx{}, getResponseCallback(t)) + c.BeginRecheckTxAsync(ocabci.RequestBeginRecheckTx{}, getResponseCallback(t)) + c.EndRecheckTxAsync(ocabci.RequestEndRecheckTx{}, getResponseCallback(t)) c.ListSnapshotsAsync(types.RequestListSnapshots{}, getResponseCallback(t)) c.OfferSnapshotAsync(types.RequestOfferSnapshot{}, getResponseCallback(t)) c.LoadSnapshotChunkAsync(types.RequestLoadSnapshotChunk{}, getResponseCallback(t)) @@ -182,16 +184,16 @@ func TestSockerClientCalls(t *testing.T) { _, err = c.InitChainSync(types.RequestInitChain{}) require.NoError(t, err) - _, err = c.BeginBlockSync(types.RequestBeginBlock{}) + _, err = c.BeginBlockSync(ocabci.RequestBeginBlock{}) require.NoError(t, err) _, err = c.EndBlockSync(types.RequestEndBlock{}) require.NoError(t, err) - _, err = c.BeginRecheckTxSync(types.RequestBeginRecheckTx{}) + _, err = c.BeginRecheckTxSync(ocabci.RequestBeginRecheckTx{}) require.NoError(t, err) - _, err = c.EndRecheckTxSync(types.RequestEndRecheckTx{}) + _, err = c.EndRecheckTxSync(ocabci.RequestEndRecheckTx{}) require.NoError(t, err) _, err = c.ListSnapshotsSync(types.RequestListSnapshots{}) @@ -208,7 +210,7 @@ func TestSockerClientCalls(t *testing.T) { } type sampleApp struct { - types.BaseApplication + ocabci.BaseApplication } func newDoneChan(t *testing.T) chan struct{} { @@ -226,7 +228,7 @@ func newDoneChan(t *testing.T) chan struct{} { func getResponseCallback(t *testing.T) abcicli.ResponseCallback { doneChan := newDoneChan(t) - return func(res *types.Response) { + return func(res *ocabci.Response) { require.NotNil(t, res) doneChan <- struct{}{} } diff --git a/abci/cmd/abci-cli/abci-cli.go b/abci/cmd/abci-cli/abci-cli.go index 6b0e80fd0..9dff748f2 100644 --- a/abci/cmd/abci-cli/abci-cli.go +++ b/abci/cmd/abci-cli/abci-cli.go @@ -11,12 +11,10 @@ import ( "path/filepath" "strings" - "github.com/line/ostracon/config" - "github.com/spf13/cobra" - "github.com/line/ostracon/libs/log" - tmos "github.com/line/ostracon/libs/os" + "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/proto/tendermint/crypto" abcicli "github.com/line/ostracon/abci/client" "github.com/line/ostracon/abci/example/code" @@ -24,10 +22,12 @@ import ( "github.com/line/ostracon/abci/example/kvstore" "github.com/line/ostracon/abci/server" servertest "github.com/line/ostracon/abci/tests/server" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/abci/version" + "github.com/line/ostracon/config" "github.com/line/ostracon/crypto/encoding" - "github.com/line/ostracon/proto/ostracon/crypto" + "github.com/line/ostracon/libs/log" + tmos "github.com/line/ostracon/libs/os" ) // client is a global variable so it can be reused by the console @@ -682,7 +682,7 @@ func cmdKVStore(cmd *cobra.Command, args []string) error { logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)) // Create the application - in memory or persisted to disk - var app types.Application + var app ocabci.Application if flagPersist == "" { app = kvstore.NewApplication() } else { @@ -758,7 +758,7 @@ func cmdPersistKVStoreMakeValSetChangeTx(cmd *cobra.Command, args []string) erro }) fmt.Printf("original:publicKey:%s\n", publicKey) validatorUpdate := types.ValidatorUpdate{} - err = types.ReadMessage(bytes.NewReader(res.Value), &validatorUpdate) + err = ocabci.ReadMessage(bytes.NewReader(res.Value), &validatorUpdate) if err != nil { panic(err) } @@ -776,7 +776,7 @@ func printResponse(cmd *cobra.Command, args []string, rsp response) { } // Always print the status code. - if rsp.Code == types.CodeTypeOK { + if rsp.Code == ocabci.CodeTypeOK { fmt.Printf("-> code: OK\n") } else { fmt.Printf("-> code: %d\n", rsp.Code) diff --git a/abci/example/counter/counter.go b/abci/example/counter/counter.go index 3c9225e0e..3a460c2bd 100644 --- a/abci/example/counter/counter.go +++ b/abci/example/counter/counter.go @@ -4,12 +4,14 @@ import ( "encoding/binary" "fmt" + "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/abci/example/code" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" ) type Application struct { - types.BaseApplication + ocabci.BaseApplication hashCount int txCount int @@ -62,18 +64,18 @@ func (app *Application) DeliverTx(req types.RequestDeliverTx) types.ResponseDeli return types.ResponseDeliverTx{Code: code.CodeTypeOK} } -func (app *Application) CheckTxSync(req types.RequestCheckTx) types.ResponseCheckTx { +func (app *Application) CheckTxSync(req types.RequestCheckTx) ocabci.ResponseCheckTx { return app.checkTx(req) } -func (app *Application) CheckTxAsync(req types.RequestCheckTx, callback types.CheckTxCallback) { +func (app *Application) CheckTxAsync(req types.RequestCheckTx, callback ocabci.CheckTxCallback) { callback(app.checkTx(req)) } -func (app *Application) checkTx(req types.RequestCheckTx) types.ResponseCheckTx { +func (app *Application) checkTx(req types.RequestCheckTx) ocabci.ResponseCheckTx { if app.serial { if len(req.Tx) > 8 { - return types.ResponseCheckTx{ + return ocabci.ResponseCheckTx{ Code: code.CodeTypeEncodingError, Log: fmt.Sprintf("Max tx size is 8 bytes, got %d", len(req.Tx))} } @@ -81,12 +83,12 @@ func (app *Application) checkTx(req types.RequestCheckTx) types.ResponseCheckTx copy(tx8[len(tx8)-len(req.Tx):], req.Tx) txValue := binary.BigEndian.Uint64(tx8) if txValue < uint64(app.txCount) { - return types.ResponseCheckTx{ + return ocabci.ResponseCheckTx{ Code: code.CodeTypeBadNonce, Log: fmt.Sprintf("Invalid nonce. Expected >= %v, got %v", app.txCount, txValue)} } } - return types.ResponseCheckTx{Code: code.CodeTypeOK} + return ocabci.ResponseCheckTx{Code: code.CodeTypeOK} } func (app *Application) Commit() (resp types.ResponseCommit) { diff --git a/abci/example/example_test.go b/abci/example/example_test.go index a7b98a30c..c7f97122e 100644 --- a/abci/example/example_test.go +++ b/abci/example/example_test.go @@ -15,6 +15,8 @@ import ( "golang.org/x/net/context" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/libs/log" tmnet "github.com/line/ostracon/libs/net" @@ -104,7 +106,7 @@ func testStream(t *testing.T, app types.Application) { // Write requests for counter := 0; counter < numDeliverTxs; counter++ { // Send request - reqRes := client.DeliverTxAsync(types.RequestDeliverTx{Tx: []byte("test")}, nil) + reqRes := client.DeliverTxAsync(abci.RequestDeliverTx{Tx: []byte("test")}, nil) _ = reqRes // check err ? @@ -165,7 +167,7 @@ func testGRPCSync(t *testing.T, app types.ABCIApplicationServer) { // Write requests for counter := 0; counter < numDeliverTxs; counter++ { // Send request - response, err := client.DeliverTx(context.Background(), &types.RequestDeliverTx{Tx: []byte("test")}) + response, err := client.DeliverTx(context.Background(), &abci.RequestDeliverTx{Tx: []byte("test")}) if err != nil { t.Fatalf("Error in GRPC DeliverTx: %v", err.Error()) } diff --git a/abci/example/kvstore/helpers.go b/abci/example/kvstore/helpers.go index 91fe03d37..0ccccb851 100644 --- a/abci/example/kvstore/helpers.go +++ b/abci/example/kvstore/helpers.go @@ -2,14 +2,17 @@ package kvstore import ( "fmt" - "github.com/line/ostracon/abci/types" + "os" + + "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" tmjson "github.com/line/ostracon/libs/json" tmos "github.com/line/ostracon/libs/os" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/privval" - "os" ) // LoadPrivValidatorKeyFile Load private key for use in an example or test. @@ -36,7 +39,7 @@ func GenDefaultPrivKey() crypto.PrivKey { func RandVal(i int) types.ValidatorUpdate { pk := GenDefaultPrivKey().PubKey() power := tmrand.Uint16() + 1 - v := types.NewValidatorUpdate(pk, int64(power)) + v := ocabci.NewValidatorUpdate(pk, int64(power)) return v } diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 884d32c60..ddd896613 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -6,10 +6,11 @@ import ( "encoding/json" "fmt" + "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/abci/example/code" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/version" ) @@ -61,10 +62,10 @@ func prefixKey(key []byte) []byte { //--------------------------------------------------- -var _ types.Application = (*Application)(nil) +var _ ocabci.Application = (*Application)(nil) type Application struct { - types.BaseApplication + ocabci.BaseApplication state State RetainBlocks int64 // blocks to retain after commit (via ResponseCommit.RetainHeight) @@ -116,16 +117,16 @@ func (app *Application) DeliverTx(req types.RequestDeliverTx) types.ResponseDeli return types.ResponseDeliverTx{Code: code.CodeTypeOK, Events: events} } -func (app *Application) CheckTxSync(req types.RequestCheckTx) types.ResponseCheckTx { +func (app *Application) CheckTxSync(req types.RequestCheckTx) ocabci.ResponseCheckTx { return app.checkTx(req) } -func (app *Application) CheckTxAsync(req types.RequestCheckTx, callback types.CheckTxCallback) { +func (app *Application) CheckTxAsync(req types.RequestCheckTx, callback ocabci.CheckTxCallback) { callback(app.checkTx(req)) } -func (app *Application) checkTx(req types.RequestCheckTx) types.ResponseCheckTx { - return types.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1} +func (app *Application) checkTx(req types.RequestCheckTx) ocabci.ResponseCheckTx { + return ocabci.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1} } func (app *Application) Commit() types.ResponseCommit { diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index 969764d98..ee1069786 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -7,17 +7,17 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/line/ostracon/libs/log" - "github.com/line/ostracon/libs/service" + "github.com/tendermint/tendermint/abci/types" abcicli "github.com/line/ostracon/abci/client" "github.com/line/ostracon/abci/example/code" abciserver "github.com/line/ostracon/abci/server" - "github.com/line/ostracon/abci/types" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocabci "github.com/line/ostracon/abci/types" + "github.com/line/ostracon/libs/log" + "github.com/line/ostracon/libs/service" + ocproto "github.com/line/ostracon/proto/ostracon/types" ) const ( @@ -25,7 +25,7 @@ const ( testValue = "def" ) -func testKVStore(t *testing.T, app types.Application, tx []byte, key, value string) { +func testKVStore(t *testing.T, app ocabci.Application, tx []byte, key, value string) { req := types.RequestDeliverTx{Tx: tx} ar := app.DeliverTx(req) require.False(t, ar.IsErr(), ar) @@ -105,10 +105,10 @@ func TestPersistentKVStoreInfo(t *testing.T) { // make and apply block height = int64(1) hash := []byte("foo") - header := tmproto.Header{ + header := ocproto.Header{ Height: height, } - kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header}) + kvstore.BeginBlock(ocabci.RequestBeginBlock{Hash: hash, Header: header}) kvstore.EndBlock(types.RequestEndBlock{Height: header.Height}) kvstore.Commit() @@ -191,18 +191,18 @@ func TestValUpdates(t *testing.T) { func makeApplyBlock( t *testing.T, - kvstore types.Application, + kvstore ocabci.Application, heightInt int, diff []types.ValidatorUpdate, txs ...[]byte) { // make and apply block height := int64(heightInt) hash := []byte("foo") - header := tmproto.Header{ + header := ocproto.Header{ Height: height, } - kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header}) + kvstore.BeginBlock(ocabci.RequestBeginBlock{Hash: hash, Header: header}) for _, tx := range txs { if r := kvstore.DeliverTx(types.RequestDeliverTx{Tx: tx}); r.IsErr() { t.Fatal(r) @@ -215,7 +215,7 @@ func makeApplyBlock( } -func existInPersistStore(t *testing.T, kvstore types.Application, v types.ValidatorUpdate) { +func existInPersistStore(t *testing.T, kvstore ocabci.Application, v types.ValidatorUpdate) { // success pubkeyStr, _ := MakeValSetChangeTxAndMore(v.PubKey, v.Power) resQuery := kvstore.Query(types.RequestQuery{Path: "/val", Data: []byte(pubkeyStr)}) @@ -241,8 +241,8 @@ func valsEqual(t *testing.T, vals1, vals2 []types.ValidatorUpdate) { if len(vals1) != len(vals2) { t.Fatalf("vals dont match in len. got %d, expected %d", len(vals2), len(vals1)) } - sort.Sort(types.ValidatorUpdates(vals1)) - sort.Sort(types.ValidatorUpdates(vals2)) + sort.Sort(ocabci.ValidatorUpdates(vals1)) + sort.Sort(ocabci.ValidatorUpdates(vals2)) for i, v1 := range vals1 { v2 := vals2[i] if !v1.PubKey.Equal(v2.PubKey) || @@ -252,7 +252,7 @@ func valsEqual(t *testing.T, vals1, vals2 []types.ValidatorUpdate) { } } -func makeSocketClientServer(app types.Application, name string) (abcicli.Client, service.Service, error) { +func makeSocketClientServer(app ocabci.Application, name string) (abcicli.Client, service.Service, error) { // Start the listener socket := fmt.Sprintf("unix://%s.sock", name) logger := log.TestingLogger() @@ -276,12 +276,12 @@ func makeSocketClientServer(app types.Application, name string) (abcicli.Client, return client, server, nil } -func makeGRPCClientServer(app types.Application, name string) (abcicli.Client, service.Service, error) { +func makeGRPCClientServer(app ocabci.Application, name string) (abcicli.Client, service.Service, error) { // Start the listener socket := fmt.Sprintf("unix://%s.sock", name) logger := log.TestingLogger() - gapp := types.NewGRPCApplication(app) + gapp := ocabci.NewGRPCApplication(app) server := abciserver.NewGRPCServer(socket, gapp) server.SetLogger(logger.With("module", "abci-server")) if err := server.Start(); err != nil { diff --git a/abci/example/kvstore/persistent_kvstore.go b/abci/example/kvstore/persistent_kvstore.go index f62dfcb7e..dd82ff31c 100644 --- a/abci/example/kvstore/persistent_kvstore.go +++ b/abci/example/kvstore/persistent_kvstore.go @@ -7,13 +7,14 @@ import ( "strconv" "strings" + "github.com/tendermint/tendermint/abci/types" + pc "github.com/tendermint/tendermint/proto/tendermint/crypto" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/abci/example/code" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" cryptoenc "github.com/line/ostracon/crypto/encoding" "github.com/line/ostracon/libs/log" - pc "github.com/line/ostracon/proto/ostracon/crypto" ) const ( @@ -22,7 +23,7 @@ const ( //----------------------------------------- -var _ types.Application = (*PersistentKVStoreApplication)(nil) +var _ ocabci.Application = (*PersistentKVStoreApplication)(nil) type PersistentKVStoreApplication struct { app *Application @@ -80,19 +81,19 @@ func (app *PersistentKVStoreApplication) DeliverTx(req types.RequestDeliverTx) t return app.app.DeliverTx(req) } -func (app *PersistentKVStoreApplication) CheckTxSync(req types.RequestCheckTx) types.ResponseCheckTx { +func (app *PersistentKVStoreApplication) CheckTxSync(req types.RequestCheckTx) ocabci.ResponseCheckTx { return app.app.CheckTxSync(req) } -func (app *PersistentKVStoreApplication) CheckTxAsync(req types.RequestCheckTx, callback types.CheckTxCallback) { +func (app *PersistentKVStoreApplication) CheckTxAsync(req types.RequestCheckTx, callback ocabci.CheckTxCallback) { app.app.CheckTxAsync(req, callback) } -func (app *PersistentKVStoreApplication) BeginRecheckTx(req types.RequestBeginRecheckTx) types.ResponseBeginRecheckTx { +func (app *PersistentKVStoreApplication) BeginRecheckTx(req ocabci.RequestBeginRecheckTx) ocabci.ResponseBeginRecheckTx { return app.app.BeginRecheckTx(req) } -func (app *PersistentKVStoreApplication) EndRecheckTx(req types.RequestEndRecheckTx) types.ResponseEndRecheckTx { +func (app *PersistentKVStoreApplication) EndRecheckTx(req ocabci.RequestEndRecheckTx) ocabci.ResponseEndRecheckTx { return app.app.EndRecheckTx(req) } @@ -132,7 +133,7 @@ func (app *PersistentKVStoreApplication) InitChain(req types.RequestInitChain) t } // Track the block hash and header information -func (app *PersistentKVStoreApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock { +func (app *PersistentKVStoreApplication) BeginBlock(req ocabci.RequestBeginBlock) types.ResponseBeginBlock { // reset valset changes app.ValUpdates = make([]types.ValidatorUpdate, 0) @@ -193,7 +194,7 @@ func (app *PersistentKVStoreApplication) Validators() (validators []types.Valida for ; itr.Valid(); itr.Next() { if isValidatorTx(itr.Key()) { validator := new(types.ValidatorUpdate) - err := types.ReadMessage(bytes.NewBuffer(itr.Value()), validator) + err := ocabci.ReadMessage(bytes.NewBuffer(itr.Value()), validator) if err != nil { panic(err) } @@ -269,7 +270,7 @@ func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) types.Respon } // update - return app.updateValidator(types.NewValidatorUpdate(pubkey, power)) + return app.updateValidator(ocabci.NewValidatorUpdate(pubkey, power)) } // add, update, or remove a validator diff --git a/abci/server/server.go b/abci/server/server.go index 31f03af6c..39bbce361 100644 --- a/abci/server/server.go +++ b/abci/server/server.go @@ -2,9 +2,8 @@ Package server is used to start a new ABCI server. It contains two server implementation: - * gRPC server - * socket server - + - gRPC server + - socket server */ package server diff --git a/abci/tests/server/client.go b/abci/tests/server/client.go index 118a130a9..2c289a5b5 100644 --- a/abci/tests/server/client.go +++ b/abci/tests/server/client.go @@ -5,9 +5,11 @@ import ( "errors" "fmt" + "github.com/tendermint/tendermint/abci/types" + abcicli "github.com/line/ostracon/abci/client" "github.com/line/ostracon/abci/example/kvstore" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" tmrand "github.com/line/ostracon/libs/rand" ) @@ -17,7 +19,7 @@ func InitChain(client abcicli.Client) error { for i := 0; i < total; i++ { pubkey := kvstore.GenDefaultPrivKey().PubKey() power := tmrand.Int() - vals[i] = types.NewValidatorUpdate(pubkey, int64(power)) + vals[i] = ocabci.NewValidatorUpdate(pubkey, int64(power)) } _, err := client.InitChainSync(types.RequestInitChain{ Validators: vals, diff --git a/abci/tests/test_app/app.go b/abci/tests/test_app/app.go index 946096f0e..d3b6fdcf9 100644 --- a/abci/tests/test_app/app.go +++ b/abci/tests/test_app/app.go @@ -5,8 +5,9 @@ import ( "fmt" "os" + "github.com/tendermint/tendermint/abci/types" + abcicli "github.com/line/ostracon/abci/client" - "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" ) diff --git a/abci/types/application.go b/abci/types/application.go index 2e85344f0..e9540b94b 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -2,6 +2,8 @@ package types import ( context "golang.org/x/net/context" + + "github.com/tendermint/tendermint/abci/types" ) //go:generate mockery --case underscore --name Application @@ -14,28 +16,28 @@ type CheckTxCallback func(ResponseCheckTx) // except CheckTx/DeliverTx, which take `tx []byte`, and `Commit`, which takes nothing. type Application interface { // Info/Query Connection - Info(RequestInfo) ResponseInfo // Return application info - SetOption(RequestSetOption) ResponseSetOption // Set application option - Query(RequestQuery) ResponseQuery // Query for state + Info(types.RequestInfo) types.ResponseInfo // Return application info + SetOption(types.RequestSetOption) types.ResponseSetOption // Set application option + Query(types.RequestQuery) types.ResponseQuery // Query for state // Mempool Connection - CheckTxSync(RequestCheckTx) ResponseCheckTx // Validate a tx for the mempool - CheckTxAsync(RequestCheckTx, CheckTxCallback) // Asynchronously validate a tx for the mempool + CheckTxSync(types.RequestCheckTx) ResponseCheckTx // Validate a tx for the mempool + CheckTxAsync(types.RequestCheckTx, CheckTxCallback) // Asynchronously validate a tx for the mempool BeginRecheckTx(RequestBeginRecheckTx) ResponseBeginRecheckTx // Signals the beginning of rechecking EndRecheckTx(RequestEndRecheckTx) ResponseEndRecheckTx // Signals the end of rechecking // Consensus Connection - InitChain(RequestInitChain) ResponseInitChain // Initialize blockchain w validators/other info from OstraconCore - BeginBlock(RequestBeginBlock) ResponseBeginBlock // Signals the beginning of a block - DeliverTx(RequestDeliverTx) ResponseDeliverTx // Deliver a tx for full processing - EndBlock(RequestEndBlock) ResponseEndBlock // Signals the end of a block, returns changes to the validator set - Commit() ResponseCommit // Commit the state and return the application Merkle root hash + InitChain(types.RequestInitChain) types.ResponseInitChain // Initialize blockchain w validators/other info from OstraconCore + BeginBlock(RequestBeginBlock) types.ResponseBeginBlock // Signals the beginning of a block + DeliverTx(types.RequestDeliverTx) types.ResponseDeliverTx // Deliver a tx for full processing + EndBlock(types.RequestEndBlock) types.ResponseEndBlock // Signals the end of a block, returns changes to the validator set + Commit() types.ResponseCommit // Commit the state and return the application Merkle root hash // State Sync Connection - ListSnapshots(RequestListSnapshots) ResponseListSnapshots // List available snapshots - OfferSnapshot(RequestOfferSnapshot) ResponseOfferSnapshot // Offer a snapshot to the application - LoadSnapshotChunk(RequestLoadSnapshotChunk) ResponseLoadSnapshotChunk // Load a snapshot chunk - ApplySnapshotChunk(RequestApplySnapshotChunk) ResponseApplySnapshotChunk // Apply a shapshot chunk + ListSnapshots(types.RequestListSnapshots) types.ResponseListSnapshots // List available snapshots + OfferSnapshot(types.RequestOfferSnapshot) types.ResponseOfferSnapshot // Offer a snapshot to the application + LoadSnapshotChunk(types.RequestLoadSnapshotChunk) types.ResponseLoadSnapshotChunk // Load a snapshot chunk + ApplySnapshotChunk(types.RequestApplySnapshotChunk) types.ResponseApplySnapshotChunk // Apply a shapshot chunk } //------------------------------------------------------- @@ -50,23 +52,23 @@ func NewBaseApplication() *BaseApplication { return &BaseApplication{} } -func (BaseApplication) Info(req RequestInfo) ResponseInfo { - return ResponseInfo{} +func (BaseApplication) Info(req types.RequestInfo) types.ResponseInfo { + return types.ResponseInfo{} } -func (BaseApplication) SetOption(req RequestSetOption) ResponseSetOption { - return ResponseSetOption{} +func (BaseApplication) SetOption(req types.RequestSetOption) types.ResponseSetOption { + return types.ResponseSetOption{} } -func (BaseApplication) DeliverTx(req RequestDeliverTx) ResponseDeliverTx { - return ResponseDeliverTx{Code: CodeTypeOK} +func (BaseApplication) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx { + return types.ResponseDeliverTx{Code: CodeTypeOK} } -func (BaseApplication) CheckTxSync(req RequestCheckTx) ResponseCheckTx { +func (BaseApplication) CheckTxSync(req types.RequestCheckTx) ResponseCheckTx { return ResponseCheckTx{Code: CodeTypeOK} } -func (BaseApplication) CheckTxAsync(req RequestCheckTx, callback CheckTxCallback) { +func (BaseApplication) CheckTxAsync(req types.RequestCheckTx, callback CheckTxCallback) { callback(ResponseCheckTx{Code: CodeTypeOK}) } @@ -78,40 +80,40 @@ func (BaseApplication) EndRecheckTx(req RequestEndRecheckTx) ResponseEndRecheckT return ResponseEndRecheckTx{Code: CodeTypeOK} } -func (BaseApplication) Commit() ResponseCommit { - return ResponseCommit{} +func (BaseApplication) Commit() types.ResponseCommit { + return types.ResponseCommit{} } -func (BaseApplication) Query(req RequestQuery) ResponseQuery { - return ResponseQuery{Code: CodeTypeOK} +func (BaseApplication) Query(req types.RequestQuery) types.ResponseQuery { + return types.ResponseQuery{Code: CodeTypeOK} } -func (BaseApplication) InitChain(req RequestInitChain) ResponseInitChain { - return ResponseInitChain{} +func (BaseApplication) InitChain(req types.RequestInitChain) types.ResponseInitChain { + return types.ResponseInitChain{} } -func (BaseApplication) BeginBlock(req RequestBeginBlock) ResponseBeginBlock { - return ResponseBeginBlock{} +func (BaseApplication) BeginBlock(req RequestBeginBlock) types.ResponseBeginBlock { + return types.ResponseBeginBlock{} } -func (BaseApplication) EndBlock(req RequestEndBlock) ResponseEndBlock { - return ResponseEndBlock{} +func (BaseApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock { + return types.ResponseEndBlock{} } -func (BaseApplication) ListSnapshots(req RequestListSnapshots) ResponseListSnapshots { - return ResponseListSnapshots{} +func (BaseApplication) ListSnapshots(req types.RequestListSnapshots) types.ResponseListSnapshots { + return types.ResponseListSnapshots{} } -func (BaseApplication) OfferSnapshot(req RequestOfferSnapshot) ResponseOfferSnapshot { - return ResponseOfferSnapshot{} +func (BaseApplication) OfferSnapshot(req types.RequestOfferSnapshot) types.ResponseOfferSnapshot { + return types.ResponseOfferSnapshot{} } -func (BaseApplication) LoadSnapshotChunk(req RequestLoadSnapshotChunk) ResponseLoadSnapshotChunk { - return ResponseLoadSnapshotChunk{} +func (BaseApplication) LoadSnapshotChunk(req types.RequestLoadSnapshotChunk) types.ResponseLoadSnapshotChunk { + return types.ResponseLoadSnapshotChunk{} } -func (BaseApplication) ApplySnapshotChunk(req RequestApplySnapshotChunk) ResponseApplySnapshotChunk { - return ResponseApplySnapshotChunk{} +func (BaseApplication) ApplySnapshotChunk(req types.RequestApplySnapshotChunk) types.ResponseApplySnapshotChunk { + return types.ResponseApplySnapshotChunk{} } //------------------------------------------------------- @@ -125,30 +127,30 @@ func NewGRPCApplication(app Application) *GRPCApplication { return &GRPCApplication{app} } -func (app *GRPCApplication) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) { - return &ResponseEcho{Message: req.Message}, nil +func (app *GRPCApplication) Echo(ctx context.Context, req *types.RequestEcho) (*types.ResponseEcho, error) { + return &types.ResponseEcho{Message: req.Message}, nil } -func (app *GRPCApplication) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) { - return &ResponseFlush{}, nil +func (app *GRPCApplication) Flush(ctx context.Context, req *types.RequestFlush) (*types.ResponseFlush, error) { + return &types.ResponseFlush{}, nil } -func (app *GRPCApplication) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) { +func (app *GRPCApplication) Info(ctx context.Context, req *types.RequestInfo) (*types.ResponseInfo, error) { res := app.app.Info(*req) return &res, nil } -func (app *GRPCApplication) SetOption(ctx context.Context, req *RequestSetOption) (*ResponseSetOption, error) { +func (app *GRPCApplication) SetOption(ctx context.Context, req *types.RequestSetOption) (*types.ResponseSetOption, error) { res := app.app.SetOption(*req) return &res, nil } -func (app *GRPCApplication) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) { +func (app *GRPCApplication) DeliverTx(ctx context.Context, req *types.RequestDeliverTx) (*types.ResponseDeliverTx, error) { res := app.app.DeliverTx(*req) return &res, nil } -func (app *GRPCApplication) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) { +func (app *GRPCApplication) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*ResponseCheckTx, error) { res := app.app.CheckTxSync(*req) return &res, nil } @@ -164,51 +166,51 @@ func (app *GRPCApplication) EndRecheckTx(ctx context.Context, req *RequestEndRec return &res, nil } -func (app *GRPCApplication) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) { +func (app *GRPCApplication) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) { res := app.app.Query(*req) return &res, nil } -func (app *GRPCApplication) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) { +func (app *GRPCApplication) Commit(ctx context.Context, req *types.RequestCommit) (*types.ResponseCommit, error) { res := app.app.Commit() return &res, nil } -func (app *GRPCApplication) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) { +func (app *GRPCApplication) InitChain(ctx context.Context, req *types.RequestInitChain) (*types.ResponseInitChain, error) { res := app.app.InitChain(*req) return &res, nil } -func (app *GRPCApplication) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) { +func (app *GRPCApplication) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*types.ResponseBeginBlock, error) { res := app.app.BeginBlock(*req) return &res, nil } -func (app *GRPCApplication) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) { +func (app *GRPCApplication) EndBlock(ctx context.Context, req *types.RequestEndBlock) (*types.ResponseEndBlock, error) { res := app.app.EndBlock(*req) return &res, nil } func (app *GRPCApplication) ListSnapshots( - ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) { + ctx context.Context, req *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { res := app.app.ListSnapshots(*req) return &res, nil } func (app *GRPCApplication) OfferSnapshot( - ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) { + ctx context.Context, req *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { res := app.app.OfferSnapshot(*req) return &res, nil } func (app *GRPCApplication) LoadSnapshotChunk( - ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) { + ctx context.Context, req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { res := app.app.LoadSnapshotChunk(*req) return &res, nil } func (app *GRPCApplication) ApplySnapshotChunk( - ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) { + ctx context.Context, req *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { res := app.app.ApplySnapshotChunk(*req) return &res, nil } diff --git a/abci/types/messages.go b/abci/types/messages.go index e617f8593..6db61a7af 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -6,6 +6,8 @@ import ( "io" "github.com/gogo/protobuf/proto" + + "github.com/tendermint/tendermint/abci/types" ) const ( @@ -71,35 +73,35 @@ func encodeVarint(w io.Writer, i int64) (err error) { func ToRequestEcho(message string) *Request { return &Request{ - Value: &Request_Echo{&RequestEcho{Message: message}}, + Value: &Request_Echo{&types.RequestEcho{Message: message}}, } } func ToRequestFlush() *Request { return &Request{ - Value: &Request_Flush{&RequestFlush{}}, + Value: &Request_Flush{&types.RequestFlush{}}, } } -func ToRequestInfo(req RequestInfo) *Request { +func ToRequestInfo(req types.RequestInfo) *Request { return &Request{ Value: &Request_Info{&req}, } } -func ToRequestSetOption(req RequestSetOption) *Request { +func ToRequestSetOption(req types.RequestSetOption) *Request { return &Request{ Value: &Request_SetOption{&req}, } } -func ToRequestDeliverTx(req RequestDeliverTx) *Request { +func ToRequestDeliverTx(req types.RequestDeliverTx) *Request { return &Request{ Value: &Request_DeliverTx{&req}, } } -func ToRequestCheckTx(req RequestCheckTx) *Request { +func ToRequestCheckTx(req types.RequestCheckTx) *Request { return &Request{ Value: &Request_CheckTx{&req}, } @@ -107,17 +109,17 @@ func ToRequestCheckTx(req RequestCheckTx) *Request { func ToRequestCommit() *Request { return &Request{ - Value: &Request_Commit{&RequestCommit{}}, + Value: &Request_Commit{&types.RequestCommit{}}, } } -func ToRequestQuery(req RequestQuery) *Request { +func ToRequestQuery(req types.RequestQuery) *Request { return &Request{ Value: &Request_Query{&req}, } } -func ToRequestInitChain(req RequestInitChain) *Request { +func ToRequestInitChain(req types.RequestInitChain) *Request { return &Request{ Value: &Request_InitChain{&req}, } @@ -129,7 +131,7 @@ func ToRequestBeginBlock(req RequestBeginBlock) *Request { } } -func ToRequestEndBlock(req RequestEndBlock) *Request { +func ToRequestEndBlock(req types.RequestEndBlock) *Request { return &Request{ Value: &Request_EndBlock{&req}, } @@ -147,25 +149,25 @@ func ToRequestEndRecheckTx(req RequestEndRecheckTx) *Request { } } -func ToRequestListSnapshots(req RequestListSnapshots) *Request { +func ToRequestListSnapshots(req types.RequestListSnapshots) *Request { return &Request{ Value: &Request_ListSnapshots{&req}, } } -func ToRequestOfferSnapshot(req RequestOfferSnapshot) *Request { +func ToRequestOfferSnapshot(req types.RequestOfferSnapshot) *Request { return &Request{ Value: &Request_OfferSnapshot{&req}, } } -func ToRequestLoadSnapshotChunk(req RequestLoadSnapshotChunk) *Request { +func ToRequestLoadSnapshotChunk(req types.RequestLoadSnapshotChunk) *Request { return &Request{ Value: &Request_LoadSnapshotChunk{&req}, } } -func ToRequestApplySnapshotChunk(req RequestApplySnapshotChunk) *Request { +func ToRequestApplySnapshotChunk(req types.RequestApplySnapshotChunk) *Request { return &Request{ Value: &Request_ApplySnapshotChunk{&req}, } @@ -175,35 +177,35 @@ func ToRequestApplySnapshotChunk(req RequestApplySnapshotChunk) *Request { func ToResponseException(errStr string) *Response { return &Response{ - Value: &Response_Exception{&ResponseException{Error: errStr}}, + Value: &Response_Exception{&types.ResponseException{Error: errStr}}, } } func ToResponseEcho(message string) *Response { return &Response{ - Value: &Response_Echo{&ResponseEcho{Message: message}}, + Value: &Response_Echo{&types.ResponseEcho{Message: message}}, } } func ToResponseFlush() *Response { return &Response{ - Value: &Response_Flush{&ResponseFlush{}}, + Value: &Response_Flush{&types.ResponseFlush{}}, } } -func ToResponseInfo(res ResponseInfo) *Response { +func ToResponseInfo(res types.ResponseInfo) *Response { return &Response{ Value: &Response_Info{&res}, } } -func ToResponseSetOption(res ResponseSetOption) *Response { +func ToResponseSetOption(res types.ResponseSetOption) *Response { return &Response{ Value: &Response_SetOption{&res}, } } -func ToResponseDeliverTx(res ResponseDeliverTx) *Response { +func ToResponseDeliverTx(res types.ResponseDeliverTx) *Response { return &Response{ Value: &Response_DeliverTx{&res}, } @@ -215,31 +217,31 @@ func ToResponseCheckTx(res ResponseCheckTx) *Response { } } -func ToResponseCommit(res ResponseCommit) *Response { +func ToResponseCommit(res types.ResponseCommit) *Response { return &Response{ Value: &Response_Commit{&res}, } } -func ToResponseQuery(res ResponseQuery) *Response { +func ToResponseQuery(res types.ResponseQuery) *Response { return &Response{ Value: &Response_Query{&res}, } } -func ToResponseInitChain(res ResponseInitChain) *Response { +func ToResponseInitChain(res types.ResponseInitChain) *Response { return &Response{ Value: &Response_InitChain{&res}, } } -func ToResponseBeginBlock(res ResponseBeginBlock) *Response { +func ToResponseBeginBlock(res types.ResponseBeginBlock) *Response { return &Response{ Value: &Response_BeginBlock{&res}, } } -func ToResponseEndBlock(res ResponseEndBlock) *Response { +func ToResponseEndBlock(res types.ResponseEndBlock) *Response { return &Response{ Value: &Response_EndBlock{&res}, } @@ -257,25 +259,25 @@ func ToResponseEndRecheckTx(res ResponseEndRecheckTx) *Response { } } -func ToResponseListSnapshots(res ResponseListSnapshots) *Response { +func ToResponseListSnapshots(res types.ResponseListSnapshots) *Response { return &Response{ Value: &Response_ListSnapshots{&res}, } } -func ToResponseOfferSnapshot(res ResponseOfferSnapshot) *Response { +func ToResponseOfferSnapshot(res types.ResponseOfferSnapshot) *Response { return &Response{ Value: &Response_OfferSnapshot{&res}, } } -func ToResponseLoadSnapshotChunk(res ResponseLoadSnapshotChunk) *Response { +func ToResponseLoadSnapshotChunk(res types.ResponseLoadSnapshotChunk) *Response { return &Response{ Value: &Response_LoadSnapshotChunk{&res}, } } -func ToResponseApplySnapshotChunk(res ResponseApplySnapshotChunk) *Response { +func ToResponseApplySnapshotChunk(res types.ResponseApplySnapshotChunk) *Response { return &Response{ Value: &Response_ApplySnapshotChunk{&res}, } diff --git a/abci/types/messages_test.go b/abci/types/messages_test.go index df0853cec..edcd37436 100644 --- a/abci/types/messages_test.go +++ b/abci/types/messages_test.go @@ -9,11 +9,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/line/ostracon/proto/ostracon/types" ) func TestMarshalJSON(t *testing.T) { - b, err := json.Marshal(&ResponseDeliverTx{}) + b, err := json.Marshal(&types.ResponseDeliverTx{}) assert.Nil(t, err) // include empty fields. assert.True(t, strings.Contains(string(b), "code")) @@ -21,10 +23,10 @@ func TestMarshalJSON(t *testing.T) { Code: 1, Data: []byte("hello"), GasWanted: 43, - Events: []Event{ + Events: []types.Event{ { Type: "testEvent", - Attributes: []EventAttribute{ + Attributes: []types.EventAttribute{ {Key: []byte("pho"), Value: []byte("bo")}, }, }, @@ -41,7 +43,7 @@ func TestMarshalJSON(t *testing.T) { func TestWriteReadMessageSimple(t *testing.T) { cases := []proto.Message{ - &RequestEcho{ + &types.RequestEcho{ Message: "Hello", }, } @@ -51,7 +53,7 @@ func TestWriteReadMessageSimple(t *testing.T) { err := WriteMessage(c, buf) assert.Nil(t, err) - msg := new(RequestEcho) + msg := new(types.RequestEcho) err = ReadMessage(buf, msg) assert.Nil(t, err) @@ -88,10 +90,10 @@ func TestWriteReadMessage2(t *testing.T) { Data: []byte(phrase), Log: phrase, GasWanted: 10, - Events: []Event{ + Events: []types.Event{ { Type: "testEvent", - Attributes: []EventAttribute{ + Attributes: []types.EventAttribute{ {Key: []byte("abc"), Value: []byte("def")}, }, }, diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index e52f07266..ca92d8dad 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -3,7 +3,9 @@ package mocks import ( - types "github.com/line/ostracon/abci/types" + types "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" mock "github.com/stretchr/testify/mock" ) @@ -27,11 +29,11 @@ func (_m *Application) ApplySnapshotChunk(_a0 types.RequestApplySnapshotChunk) t } // BeginBlock provides a mock function with given fields: _a0 -func (_m *Application) BeginBlock(_a0 types.RequestBeginBlock) types.ResponseBeginBlock { +func (_m *Application) BeginBlock(_a0 ocabci.RequestBeginBlock) types.ResponseBeginBlock { ret := _m.Called(_a0) var r0 types.ResponseBeginBlock - if rf, ok := ret.Get(0).(func(types.RequestBeginBlock) types.ResponseBeginBlock); ok { + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginBlock) types.ResponseBeginBlock); ok { r0 = rf(_a0) } else { r0 = ret.Get(0).(types.ResponseBeginBlock) @@ -41,33 +43,33 @@ func (_m *Application) BeginBlock(_a0 types.RequestBeginBlock) types.ResponseBeg } // BeginRecheckTx provides a mock function with given fields: _a0 -func (_m *Application) BeginRecheckTx(_a0 types.RequestBeginRecheckTx) types.ResponseBeginRecheckTx { +func (_m *Application) BeginRecheckTx(_a0 ocabci.RequestBeginRecheckTx) ocabci.ResponseBeginRecheckTx { ret := _m.Called(_a0) - var r0 types.ResponseBeginRecheckTx - if rf, ok := ret.Get(0).(func(types.RequestBeginRecheckTx) types.ResponseBeginRecheckTx); ok { + var r0 ocabci.ResponseBeginRecheckTx + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginRecheckTx) ocabci.ResponseBeginRecheckTx); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(types.ResponseBeginRecheckTx) + r0 = ret.Get(0).(ocabci.ResponseBeginRecheckTx) } return r0 } // CheckTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *Application) CheckTxAsync(_a0 types.RequestCheckTx, _a1 types.CheckTxCallback) { +func (_m *Application) CheckTxAsync(_a0 types.RequestCheckTx, _a1 ocabci.CheckTxCallback) { _m.Called(_a0, _a1) } // CheckTxSync provides a mock function with given fields: _a0 -func (_m *Application) CheckTxSync(_a0 types.RequestCheckTx) types.ResponseCheckTx { +func (_m *Application) CheckTxSync(_a0 types.RequestCheckTx) ocabci.ResponseCheckTx { ret := _m.Called(_a0) - var r0 types.ResponseCheckTx - if rf, ok := ret.Get(0).(func(types.RequestCheckTx) types.ResponseCheckTx); ok { + var r0 ocabci.ResponseCheckTx + if rf, ok := ret.Get(0).(func(types.RequestCheckTx) ocabci.ResponseCheckTx); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(types.ResponseCheckTx) + r0 = ret.Get(0).(ocabci.ResponseCheckTx) } return r0 @@ -116,14 +118,14 @@ func (_m *Application) EndBlock(_a0 types.RequestEndBlock) types.ResponseEndBloc } // EndRecheckTx provides a mock function with given fields: _a0 -func (_m *Application) EndRecheckTx(_a0 types.RequestEndRecheckTx) types.ResponseEndRecheckTx { +func (_m *Application) EndRecheckTx(_a0 ocabci.RequestEndRecheckTx) ocabci.ResponseEndRecheckTx { ret := _m.Called(_a0) - var r0 types.ResponseEndRecheckTx - if rf, ok := ret.Get(0).(func(types.RequestEndRecheckTx) types.ResponseEndRecheckTx); ok { + var r0 ocabci.ResponseEndRecheckTx + if rf, ok := ret.Get(0).(func(ocabci.RequestEndRecheckTx) ocabci.ResponseEndRecheckTx); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(types.ResponseEndRecheckTx) + r0 = ret.Get(0).(ocabci.ResponseEndRecheckTx) } return r0 diff --git a/abci/types/pubkey.go b/abci/types/pubkey.go index 3ea2e9dd5..f7e366fb5 100644 --- a/abci/types/pubkey.go +++ b/abci/types/pubkey.go @@ -1,17 +1,19 @@ package types import ( + "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/crypto" cryptoenc "github.com/line/ostracon/crypto/encoding" ) -func NewValidatorUpdate(pk crypto.PubKey, power int64) ValidatorUpdate { +func NewValidatorUpdate(pk crypto.PubKey, power int64) types.ValidatorUpdate { pkp, err := cryptoenc.PubKeyToProto(pk) if err != nil { panic(err) } - return ValidatorUpdate{ + return types.ValidatorUpdate{ // Address: PubKey: pkp, Power: power, diff --git a/abci/types/result.go b/abci/types/result.go index 53acdb906..cb7bec4ba 100644 --- a/abci/types/result.go +++ b/abci/types/result.go @@ -3,7 +3,6 @@ package types import ( "bytes" "encoding/json" - "github.com/gogo/protobuf/jsonpb" ) @@ -21,26 +20,6 @@ func (r ResponseCheckTx) IsErr() bool { return r.Code != CodeTypeOK } -// IsOK returns true if Code is OK. -func (r ResponseDeliverTx) IsOK() bool { - return r.Code == CodeTypeOK -} - -// IsErr returns true if Code is something other than OK. -func (r ResponseDeliverTx) IsErr() bool { - return r.Code != CodeTypeOK -} - -// IsOK returns true if Code is OK. -func (r ResponseQuery) IsOK() bool { - return r.Code == CodeTypeOK -} - -// IsErr returns true if Code is something other than OK. -func (r ResponseQuery) IsErr() bool { - return r.Code != CodeTypeOK -} - //--------------------------------------------------------------------------- // override JSON marshaling so we emit defaults (ie. disable omitempty) @@ -52,16 +31,6 @@ var ( jsonpbUnmarshaller = jsonpb.Unmarshaler{} ) -func (r *ResponseSetOption) MarshalJSON() ([]byte, error) { - s, err := jsonpbMarshaller.MarshalToString(r) - return []byte(s), err -} - -func (r *ResponseSetOption) UnmarshalJSON(b []byte) error { - reader := bytes.NewBuffer(b) - return jsonpbUnmarshaller.Unmarshal(reader, r) -} - func (r *ResponseCheckTx) MarshalJSON() ([]byte, error) { s, err := jsonpbMarshaller.MarshalToString(r) return []byte(s), err @@ -72,46 +41,6 @@ func (r *ResponseCheckTx) UnmarshalJSON(b []byte) error { return jsonpbUnmarshaller.Unmarshal(reader, r) } -func (r *ResponseDeliverTx) MarshalJSON() ([]byte, error) { - s, err := jsonpbMarshaller.MarshalToString(r) - return []byte(s), err -} - -func (r *ResponseDeliverTx) UnmarshalJSON(b []byte) error { - reader := bytes.NewBuffer(b) - return jsonpbUnmarshaller.Unmarshal(reader, r) -} - -func (r *ResponseQuery) MarshalJSON() ([]byte, error) { - s, err := jsonpbMarshaller.MarshalToString(r) - return []byte(s), err -} - -func (r *ResponseQuery) UnmarshalJSON(b []byte) error { - reader := bytes.NewBuffer(b) - return jsonpbUnmarshaller.Unmarshal(reader, r) -} - -func (r *ResponseCommit) MarshalJSON() ([]byte, error) { - s, err := jsonpbMarshaller.MarshalToString(r) - return []byte(s), err -} - -func (r *ResponseCommit) UnmarshalJSON(b []byte) error { - reader := bytes.NewBuffer(b) - return jsonpbUnmarshaller.Unmarshal(reader, r) -} - -func (r *EventAttribute) MarshalJSON() ([]byte, error) { - s, err := jsonpbMarshaller.MarshalToString(r) - return []byte(s), err -} - -func (r *EventAttribute) UnmarshalJSON(b []byte) error { - reader := bytes.NewBuffer(b) - return jsonpbUnmarshaller.Unmarshal(reader, r) -} - // Some compile time assertions to ensure we don't // have accidental runtime surprises later on. @@ -122,10 +51,4 @@ type jsonRoundTripper interface { json.Unmarshaler } -var _ jsonRoundTripper = (*ResponseCommit)(nil) -var _ jsonRoundTripper = (*ResponseQuery)(nil) -var _ jsonRoundTripper = (*ResponseDeliverTx)(nil) var _ jsonRoundTripper = (*ResponseCheckTx)(nil) -var _ jsonRoundTripper = (*ResponseSetOption)(nil) - -var _ jsonRoundTripper = (*EventAttribute)(nil) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 743a92be0..bd1e869f1 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -9,23 +9,22 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - crypto "github.com/line/ostracon/proto/ostracon/crypto" types1 "github.com/line/ostracon/proto/ostracon/types" + types "github.com/tendermint/tendermint/abci/types" + _ "github.com/tendermint/tendermint/proto/tendermint/crypto" + _ "github.com/tendermint/tendermint/proto/tendermint/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" io "io" math "math" math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -33,133 +32,6 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type CheckTxType int32 - -const ( - CheckTxType_New CheckTxType = 0 - CheckTxType_Recheck CheckTxType = 1 -) - -var CheckTxType_name = map[int32]string{ - 0: "NEW", - 1: "RECHECK", -} - -var CheckTxType_value = map[string]int32{ - "NEW": 0, - "RECHECK": 1, -} - -func (x CheckTxType) String() string { - return proto.EnumName(CheckTxType_name, int32(x)) -} - -func (CheckTxType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{0} -} - -type EvidenceType int32 - -const ( - EvidenceType_UNKNOWN EvidenceType = 0 - EvidenceType_DUPLICATE_VOTE EvidenceType = 1 - EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2 -) - -var EvidenceType_name = map[int32]string{ - 0: "UNKNOWN", - 1: "DUPLICATE_VOTE", - 2: "LIGHT_CLIENT_ATTACK", -} - -var EvidenceType_value = map[string]int32{ - "UNKNOWN": 0, - "DUPLICATE_VOTE": 1, - "LIGHT_CLIENT_ATTACK": 2, -} - -func (x EvidenceType) String() string { - return proto.EnumName(EvidenceType_name, int32(x)) -} - -func (EvidenceType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{1} -} - -type ResponseOfferSnapshot_Result int32 - -const ( - ResponseOfferSnapshot_UNKNOWN ResponseOfferSnapshot_Result = 0 - ResponseOfferSnapshot_ACCEPT ResponseOfferSnapshot_Result = 1 - ResponseOfferSnapshot_ABORT ResponseOfferSnapshot_Result = 2 - ResponseOfferSnapshot_REJECT ResponseOfferSnapshot_Result = 3 - ResponseOfferSnapshot_REJECT_FORMAT ResponseOfferSnapshot_Result = 4 - ResponseOfferSnapshot_REJECT_SENDER ResponseOfferSnapshot_Result = 5 -) - -var ResponseOfferSnapshot_Result_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ACCEPT", - 2: "ABORT", - 3: "REJECT", - 4: "REJECT_FORMAT", - 5: "REJECT_SENDER", -} - -var ResponseOfferSnapshot_Result_value = map[string]int32{ - "UNKNOWN": 0, - "ACCEPT": 1, - "ABORT": 2, - "REJECT": 3, - "REJECT_FORMAT": 4, - "REJECT_SENDER": 5, -} - -func (x ResponseOfferSnapshot_Result) String() string { - return proto.EnumName(ResponseOfferSnapshot_Result_name, int32(x)) -} - -func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{32, 0} -} - -type ResponseApplySnapshotChunk_Result int32 - -const ( - ResponseApplySnapshotChunk_UNKNOWN ResponseApplySnapshotChunk_Result = 0 - ResponseApplySnapshotChunk_ACCEPT ResponseApplySnapshotChunk_Result = 1 - ResponseApplySnapshotChunk_ABORT ResponseApplySnapshotChunk_Result = 2 - ResponseApplySnapshotChunk_RETRY ResponseApplySnapshotChunk_Result = 3 - ResponseApplySnapshotChunk_RETRY_SNAPSHOT ResponseApplySnapshotChunk_Result = 4 - ResponseApplySnapshotChunk_REJECT_SNAPSHOT ResponseApplySnapshotChunk_Result = 5 -) - -var ResponseApplySnapshotChunk_Result_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ACCEPT", - 2: "ABORT", - 3: "RETRY", - 4: "RETRY_SNAPSHOT", - 5: "REJECT_SNAPSHOT", -} - -var ResponseApplySnapshotChunk_Result_value = map[string]int32{ - "UNKNOWN": 0, - "ACCEPT": 1, - "ABORT": 2, - "RETRY": 3, - "RETRY_SNAPSHOT": 4, - "REJECT_SNAPSHOT": 5, -} - -func (x ResponseApplySnapshotChunk_Result) String() string { - return proto.EnumName(ResponseApplySnapshotChunk_Result_name, int32(x)) -} - -func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{34, 0} -} - type Request struct { // Types that are valid to be assigned to Value: // *Request_Echo @@ -222,49 +94,49 @@ type isRequest_Value interface { } type Request_Echo struct { - Echo *RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof" json:"echo,omitempty"` + Echo *types.RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof" json:"echo,omitempty"` } type Request_Flush struct { - Flush *RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof" json:"flush,omitempty"` + Flush *types.RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof" json:"flush,omitempty"` } type Request_Info struct { - Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"` + Info *types.RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"` } type Request_SetOption struct { - SetOption *RequestSetOption `protobuf:"bytes,4,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"` + SetOption *types.RequestSetOption `protobuf:"bytes,4,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"` } type Request_InitChain struct { - InitChain *RequestInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"` + InitChain *types.RequestInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"` } type Request_Query struct { - Query *RequestQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"` + Query *types.RequestQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"` } type Request_BeginBlock struct { BeginBlock *RequestBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"` } type Request_CheckTx struct { - CheckTx *RequestCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"` + CheckTx *types.RequestCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"` } type Request_DeliverTx struct { - DeliverTx *RequestDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"` + DeliverTx *types.RequestDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"` } type Request_EndBlock struct { - EndBlock *RequestEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"` + EndBlock *types.RequestEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"` } type Request_Commit struct { - Commit *RequestCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"` + Commit *types.RequestCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"` } type Request_ListSnapshots struct { - ListSnapshots *RequestListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"` + ListSnapshots *types.RequestListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"` } type Request_OfferSnapshot struct { - OfferSnapshot *RequestOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"` + OfferSnapshot *types.RequestOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"` } type Request_LoadSnapshotChunk struct { - LoadSnapshotChunk *RequestLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"` + LoadSnapshotChunk *types.RequestLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"` } type Request_ApplySnapshotChunk struct { - ApplySnapshotChunk *RequestApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"` + ApplySnapshotChunk *types.RequestApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"` } type Request_BeginRecheckTx struct { BeginRecheckTx *RequestBeginRecheckTx `protobuf:"bytes,1000,opt,name=begin_recheck_tx,json=beginRecheckTx,proto3,oneof" json:"begin_recheck_tx,omitempty"` @@ -298,42 +170,42 @@ func (m *Request) GetValue() isRequest_Value { return nil } -func (m *Request) GetEcho() *RequestEcho { +func (m *Request) GetEcho() *types.RequestEcho { if x, ok := m.GetValue().(*Request_Echo); ok { return x.Echo } return nil } -func (m *Request) GetFlush() *RequestFlush { +func (m *Request) GetFlush() *types.RequestFlush { if x, ok := m.GetValue().(*Request_Flush); ok { return x.Flush } return nil } -func (m *Request) GetInfo() *RequestInfo { +func (m *Request) GetInfo() *types.RequestInfo { if x, ok := m.GetValue().(*Request_Info); ok { return x.Info } return nil } -func (m *Request) GetSetOption() *RequestSetOption { +func (m *Request) GetSetOption() *types.RequestSetOption { if x, ok := m.GetValue().(*Request_SetOption); ok { return x.SetOption } return nil } -func (m *Request) GetInitChain() *RequestInitChain { +func (m *Request) GetInitChain() *types.RequestInitChain { if x, ok := m.GetValue().(*Request_InitChain); ok { return x.InitChain } return nil } -func (m *Request) GetQuery() *RequestQuery { +func (m *Request) GetQuery() *types.RequestQuery { if x, ok := m.GetValue().(*Request_Query); ok { return x.Query } @@ -347,56 +219,56 @@ func (m *Request) GetBeginBlock() *RequestBeginBlock { return nil } -func (m *Request) GetCheckTx() *RequestCheckTx { +func (m *Request) GetCheckTx() *types.RequestCheckTx { if x, ok := m.GetValue().(*Request_CheckTx); ok { return x.CheckTx } return nil } -func (m *Request) GetDeliverTx() *RequestDeliverTx { +func (m *Request) GetDeliverTx() *types.RequestDeliverTx { if x, ok := m.GetValue().(*Request_DeliverTx); ok { return x.DeliverTx } return nil } -func (m *Request) GetEndBlock() *RequestEndBlock { +func (m *Request) GetEndBlock() *types.RequestEndBlock { if x, ok := m.GetValue().(*Request_EndBlock); ok { return x.EndBlock } return nil } -func (m *Request) GetCommit() *RequestCommit { +func (m *Request) GetCommit() *types.RequestCommit { if x, ok := m.GetValue().(*Request_Commit); ok { return x.Commit } return nil } -func (m *Request) GetListSnapshots() *RequestListSnapshots { +func (m *Request) GetListSnapshots() *types.RequestListSnapshots { if x, ok := m.GetValue().(*Request_ListSnapshots); ok { return x.ListSnapshots } return nil } -func (m *Request) GetOfferSnapshot() *RequestOfferSnapshot { +func (m *Request) GetOfferSnapshot() *types.RequestOfferSnapshot { if x, ok := m.GetValue().(*Request_OfferSnapshot); ok { return x.OfferSnapshot } return nil } -func (m *Request) GetLoadSnapshotChunk() *RequestLoadSnapshotChunk { +func (m *Request) GetLoadSnapshotChunk() *types.RequestLoadSnapshotChunk { if x, ok := m.GetValue().(*Request_LoadSnapshotChunk); ok { return x.LoadSnapshotChunk } return nil } -func (m *Request) GetApplySnapshotChunk() *RequestApplySnapshotChunk { +func (m *Request) GetApplySnapshotChunk() *types.RequestApplySnapshotChunk { if x, ok := m.GetValue().(*Request_ApplySnapshotChunk); ok { return x.ApplySnapshotChunk } @@ -440,22 +312,25 @@ func (*Request) XXX_OneofWrappers() []interface{} { } } -type RequestEcho struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +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 types.LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"` + ByzantineValidators []types.Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"` } -func (m *RequestEcho) Reset() { *m = RequestEcho{} } -func (m *RequestEcho) String() string { return proto.CompactTextString(m) } -func (*RequestEcho) ProtoMessage() {} -func (*RequestEcho) Descriptor() ([]byte, []int) { +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_addf585b2317eb36, []int{1} } -func (m *RequestEcho) XXX_Unmarshal(b []byte) error { +func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RequestEcho.Marshal(b, m, deterministic) + return xxx_messageInfo_RequestBeginBlock.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -465,40 +340,62 @@ func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *RequestEcho) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestEcho.Merge(m, src) +func (m *RequestBeginBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestBeginBlock.Merge(m, src) } -func (m *RequestEcho) XXX_Size() int { +func (m *RequestBeginBlock) XXX_Size() int { return m.Size() } -func (m *RequestEcho) XXX_DiscardUnknown() { - xxx_messageInfo_RequestEcho.DiscardUnknown(m) +func (m *RequestBeginBlock) XXX_DiscardUnknown() { + xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m) } -var xxx_messageInfo_RequestEcho proto.InternalMessageInfo +var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo -func (m *RequestEcho) GetMessage() string { +func (m *RequestBeginBlock) GetHash() []byte { if m != nil { - return m.Message + return m.Hash } - return "" + return nil } -type RequestFlush struct { +func (m *RequestBeginBlock) GetHeader() types1.Header { + if m != nil { + return m.Header + } + return types1.Header{} +} + +func (m *RequestBeginBlock) GetLastCommitInfo() types.LastCommitInfo { + if m != nil { + return m.LastCommitInfo + } + return types.LastCommitInfo{} +} + +func (m *RequestBeginBlock) GetByzantineValidators() []types.Evidence { + if m != nil { + return m.ByzantineValidators + } + return nil } -func (m *RequestFlush) Reset() { *m = RequestFlush{} } -func (m *RequestFlush) String() string { return proto.CompactTextString(m) } -func (*RequestFlush) ProtoMessage() {} -func (*RequestFlush) Descriptor() ([]byte, []int) { +type RequestBeginRecheckTx struct { + Header types1.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` +} + +func (m *RequestBeginRecheckTx) Reset() { *m = RequestBeginRecheckTx{} } +func (m *RequestBeginRecheckTx) String() string { return proto.CompactTextString(m) } +func (*RequestBeginRecheckTx) ProtoMessage() {} +func (*RequestBeginRecheckTx) Descriptor() ([]byte, []int) { return fileDescriptor_addf585b2317eb36, []int{2} } -func (m *RequestFlush) XXX_Unmarshal(b []byte) error { +func (m *RequestBeginRecheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RequestBeginRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RequestFlush.Marshal(b, m, deterministic) + return xxx_messageInfo_RequestBeginRecheckTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -508,36 +405,41 @@ func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *RequestFlush) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestFlush.Merge(m, src) +func (m *RequestBeginRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestBeginRecheckTx.Merge(m, src) } -func (m *RequestFlush) XXX_Size() int { +func (m *RequestBeginRecheckTx) XXX_Size() int { return m.Size() } -func (m *RequestFlush) XXX_DiscardUnknown() { - xxx_messageInfo_RequestFlush.DiscardUnknown(m) +func (m *RequestBeginRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_RequestBeginRecheckTx.DiscardUnknown(m) } -var xxx_messageInfo_RequestFlush proto.InternalMessageInfo +var xxx_messageInfo_RequestBeginRecheckTx proto.InternalMessageInfo + +func (m *RequestBeginRecheckTx) GetHeader() types1.Header { + if m != nil { + return m.Header + } + return types1.Header{} +} -type RequestInfo struct { - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"` - P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"` +type RequestEndRecheckTx struct { + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` } -func (m *RequestInfo) Reset() { *m = RequestInfo{} } -func (m *RequestInfo) String() string { return proto.CompactTextString(m) } -func (*RequestInfo) ProtoMessage() {} -func (*RequestInfo) Descriptor() ([]byte, []int) { +func (m *RequestEndRecheckTx) Reset() { *m = RequestEndRecheckTx{} } +func (m *RequestEndRecheckTx) String() string { return proto.CompactTextString(m) } +func (*RequestEndRecheckTx) ProtoMessage() {} +func (*RequestEndRecheckTx) Descriptor() ([]byte, []int) { return fileDescriptor_addf585b2317eb36, []int{3} } -func (m *RequestInfo) XXX_Unmarshal(b []byte) error { +func (m *RequestEndRecheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RequestEndRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_RequestEndRecheckTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -547,57 +449,60 @@ func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *RequestInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestInfo.Merge(m, src) +func (m *RequestEndRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestEndRecheckTx.Merge(m, src) } -func (m *RequestInfo) XXX_Size() int { +func (m *RequestEndRecheckTx) XXX_Size() int { return m.Size() } -func (m *RequestInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RequestInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestInfo proto.InternalMessageInfo - -func (m *RequestInfo) GetVersion() string { - if m != nil { - return m.Version - } - return "" +func (m *RequestEndRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_RequestEndRecheckTx.DiscardUnknown(m) } -func (m *RequestInfo) GetBlockVersion() uint64 { - if m != nil { - return m.BlockVersion - } - return 0 -} +var xxx_messageInfo_RequestEndRecheckTx proto.InternalMessageInfo -func (m *RequestInfo) GetP2PVersion() uint64 { +func (m *RequestEndRecheckTx) GetHeight() int64 { if m != nil { - return m.P2PVersion + return m.Height } return 0 } -// nondeterministic -type RequestSetOption struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +type Response struct { + // Types that are valid to be assigned to Value: + // *Response_Exception + // *Response_Echo + // *Response_Flush + // *Response_Info + // *Response_SetOption + // *Response_InitChain + // *Response_Query + // *Response_BeginBlock + // *Response_CheckTx + // *Response_DeliverTx + // *Response_EndBlock + // *Response_Commit + // *Response_ListSnapshots + // *Response_OfferSnapshot + // *Response_LoadSnapshotChunk + // *Response_ApplySnapshotChunk + // *Response_BeginRecheckTx + // *Response_EndRecheckTx + Value isResponse_Value `protobuf_oneof:"value"` } -func (m *RequestSetOption) Reset() { *m = RequestSetOption{} } -func (m *RequestSetOption) String() string { return proto.CompactTextString(m) } -func (*RequestSetOption) ProtoMessage() {} -func (*RequestSetOption) Descriptor() ([]byte, []int) { +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_addf585b2317eb36, []int{4} } -func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { +func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RequestSetOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RequestSetOption.Marshal(b, m, deterministic) + return xxx_messageInfo_Response.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -607,203 +512,283 @@ func (m *RequestSetOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *RequestSetOption) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestSetOption.Merge(m, src) +func (m *Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Response.Merge(m, src) } -func (m *RequestSetOption) XXX_Size() int { +func (m *Response) XXX_Size() int { return m.Size() } -func (m *RequestSetOption) XXX_DiscardUnknown() { - xxx_messageInfo_RequestSetOption.DiscardUnknown(m) +func (m *Response) XXX_DiscardUnknown() { + xxx_messageInfo_Response.DiscardUnknown(m) } -var xxx_messageInfo_RequestSetOption proto.InternalMessageInfo +var xxx_messageInfo_Response proto.InternalMessageInfo -func (m *RequestSetOption) GetKey() string { - if m != nil { - return m.Key - } - return "" +type isResponse_Value interface { + isResponse_Value() + MarshalTo([]byte) (int, error) + Size() int } -func (m *RequestSetOption) GetValue() string { - if m != nil { - return m.Value - } - return "" +type Response_Exception struct { + Exception *types.ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof" json:"exception,omitempty"` } - -type RequestInitChain struct { - Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ConsensusParams *ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"` - Validators []ValidatorUpdate `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"` - AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"` - InitialHeight int64 `protobuf:"varint,6,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` +type Response_Echo struct { + Echo *types.ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof" json:"echo,omitempty"` } - -func (m *RequestInitChain) Reset() { *m = RequestInitChain{} } -func (m *RequestInitChain) String() string { return proto.CompactTextString(m) } -func (*RequestInitChain) ProtoMessage() {} -func (*RequestInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{5} +type Response_Flush struct { + Flush *types.ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof" json:"flush,omitempty"` } -func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +type Response_Info struct { + Info *types.ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"` } -func (m *RequestInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestInitChain.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +type Response_SetOption struct { + SetOption *types.ResponseSetOption `protobuf:"bytes,5,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"` } -func (m *RequestInitChain) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestInitChain.Merge(m, src) +type Response_InitChain struct { + InitChain *types.ResponseInitChain `protobuf:"bytes,6,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"` } -func (m *RequestInitChain) XXX_Size() int { - return m.Size() +type Response_Query struct { + Query *types.ResponseQuery `protobuf:"bytes,7,opt,name=query,proto3,oneof" json:"query,omitempty"` +} +type Response_BeginBlock struct { + BeginBlock *types.ResponseBeginBlock `protobuf:"bytes,8,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"` +} +type Response_CheckTx struct { + CheckTx *ResponseCheckTx `protobuf:"bytes,9,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"` +} +type Response_DeliverTx struct { + DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,10,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"` +} +type Response_EndBlock struct { + EndBlock *types.ResponseEndBlock `protobuf:"bytes,11,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"` +} +type Response_Commit struct { + Commit *types.ResponseCommit `protobuf:"bytes,12,opt,name=commit,proto3,oneof" json:"commit,omitempty"` } -func (m *RequestInitChain) XXX_DiscardUnknown() { - xxx_messageInfo_RequestInitChain.DiscardUnknown(m) +type Response_ListSnapshots struct { + ListSnapshots *types.ResponseListSnapshots `protobuf:"bytes,13,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"` +} +type Response_OfferSnapshot struct { + OfferSnapshot *types.ResponseOfferSnapshot `protobuf:"bytes,14,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"` +} +type Response_LoadSnapshotChunk struct { + LoadSnapshotChunk *types.ResponseLoadSnapshotChunk `protobuf:"bytes,15,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"` +} +type Response_ApplySnapshotChunk struct { + ApplySnapshotChunk *types.ResponseApplySnapshotChunk `protobuf:"bytes,16,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"` +} +type Response_BeginRecheckTx struct { + BeginRecheckTx *ResponseBeginRecheckTx `protobuf:"bytes,1000,opt,name=begin_recheck_tx,json=beginRecheckTx,proto3,oneof" json:"begin_recheck_tx,omitempty"` +} +type Response_EndRecheckTx struct { + EndRecheckTx *ResponseEndRecheckTx `protobuf:"bytes,1001,opt,name=end_recheck_tx,json=endRecheckTx,proto3,oneof" json:"end_recheck_tx,omitempty"` } -var xxx_messageInfo_RequestInitChain proto.InternalMessageInfo +func (*Response_Exception) isResponse_Value() {} +func (*Response_Echo) isResponse_Value() {} +func (*Response_Flush) isResponse_Value() {} +func (*Response_Info) isResponse_Value() {} +func (*Response_SetOption) 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() {} +func (*Response_LoadSnapshotChunk) isResponse_Value() {} +func (*Response_ApplySnapshotChunk) isResponse_Value() {} +func (*Response_BeginRecheckTx) isResponse_Value() {} +func (*Response_EndRecheckTx) isResponse_Value() {} -func (m *RequestInitChain) GetTime() time.Time { +func (m *Response) GetValue() isResponse_Value { if m != nil { - return m.Time + return m.Value } - return time.Time{} + return nil } -func (m *RequestInitChain) GetChainId() string { - if m != nil { - return m.ChainId +func (m *Response) GetException() *types.ResponseException { + if x, ok := m.GetValue().(*Response_Exception); ok { + return x.Exception } - return "" + return nil } -func (m *RequestInitChain) GetConsensusParams() *ConsensusParams { - if m != nil { - return m.ConsensusParams +func (m *Response) GetEcho() *types.ResponseEcho { + if x, ok := m.GetValue().(*Response_Echo); ok { + return x.Echo } return nil } -func (m *RequestInitChain) GetValidators() []ValidatorUpdate { - if m != nil { - return m.Validators +func (m *Response) GetFlush() *types.ResponseFlush { + if x, ok := m.GetValue().(*Response_Flush); ok { + return x.Flush } return nil } -func (m *RequestInitChain) GetAppStateBytes() []byte { - if m != nil { - return m.AppStateBytes +func (m *Response) GetInfo() *types.ResponseInfo { + if x, ok := m.GetValue().(*Response_Info); ok { + return x.Info } return nil } -func (m *RequestInitChain) GetInitialHeight() int64 { - if m != nil { - return m.InitialHeight +func (m *Response) GetSetOption() *types.ResponseSetOption { + if x, ok := m.GetValue().(*Response_SetOption); ok { + return x.SetOption } - return 0 + return nil } -type RequestQuery struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"` +func (m *Response) GetInitChain() *types.ResponseInitChain { + if x, ok := m.GetValue().(*Response_InitChain); ok { + return x.InitChain + } + return nil } -func (m *RequestQuery) Reset() { *m = RequestQuery{} } -func (m *RequestQuery) String() string { return proto.CompactTextString(m) } -func (*RequestQuery) ProtoMessage() {} -func (*RequestQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{6} +func (m *Response) GetQuery() *types.ResponseQuery { + if x, ok := m.GetValue().(*Response_Query); ok { + return x.Query + } + return nil } -func (m *RequestQuery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (m *Response) GetBeginBlock() *types.ResponseBeginBlock { + if x, ok := m.GetValue().(*Response_BeginBlock); ok { + return x.BeginBlock + } + return nil } -func (m *RequestQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestQuery.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 *Response) GetCheckTx() *ResponseCheckTx { + if x, ok := m.GetValue().(*Response_CheckTx); ok { + return x.CheckTx } + return nil } -func (m *RequestQuery) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestQuery.Merge(m, src) + +func (m *Response) GetDeliverTx() *types.ResponseDeliverTx { + if x, ok := m.GetValue().(*Response_DeliverTx); ok { + return x.DeliverTx + } + return nil } -func (m *RequestQuery) XXX_Size() int { - return m.Size() + +func (m *Response) GetEndBlock() *types.ResponseEndBlock { + if x, ok := m.GetValue().(*Response_EndBlock); ok { + return x.EndBlock + } + return nil } -func (m *RequestQuery) XXX_DiscardUnknown() { - xxx_messageInfo_RequestQuery.DiscardUnknown(m) + +func (m *Response) GetCommit() *types.ResponseCommit { + if x, ok := m.GetValue().(*Response_Commit); ok { + return x.Commit + } + return nil } -var xxx_messageInfo_RequestQuery proto.InternalMessageInfo +func (m *Response) GetListSnapshots() *types.ResponseListSnapshots { + if x, ok := m.GetValue().(*Response_ListSnapshots); ok { + return x.ListSnapshots + } + return nil +} -func (m *RequestQuery) GetData() []byte { - if m != nil { - return m.Data +func (m *Response) GetOfferSnapshot() *types.ResponseOfferSnapshot { + if x, ok := m.GetValue().(*Response_OfferSnapshot); ok { + return x.OfferSnapshot } return nil } -func (m *RequestQuery) GetPath() string { - if m != nil { - return m.Path +func (m *Response) GetLoadSnapshotChunk() *types.ResponseLoadSnapshotChunk { + if x, ok := m.GetValue().(*Response_LoadSnapshotChunk); ok { + return x.LoadSnapshotChunk } - return "" + return nil } -func (m *RequestQuery) GetHeight() int64 { - if m != nil { - return m.Height +func (m *Response) GetApplySnapshotChunk() *types.ResponseApplySnapshotChunk { + if x, ok := m.GetValue().(*Response_ApplySnapshotChunk); ok { + return x.ApplySnapshotChunk } - return 0 + return nil } -func (m *RequestQuery) GetProve() bool { - if m != nil { - return m.Prove +func (m *Response) GetBeginRecheckTx() *ResponseBeginRecheckTx { + if x, ok := m.GetValue().(*Response_BeginRecheckTx); ok { + return x.BeginRecheckTx } - return false + return nil } -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 *Response) GetEndRecheckTx() *ResponseEndRecheckTx { + if x, ok := m.GetValue().(*Response_EndRecheckTx); ok { + return x.EndRecheckTx + } + return nil } -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_addf585b2317eb36, []int{7} +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Response) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Response_Exception)(nil), + (*Response_Echo)(nil), + (*Response_Flush)(nil), + (*Response_Info)(nil), + (*Response_SetOption)(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), + (*Response_LoadSnapshotChunk)(nil), + (*Response_ApplySnapshotChunk)(nil), + (*Response_BeginRecheckTx)(nil), + (*Response_EndRecheckTx)(nil), + } } -func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { + +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 []types.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 Ostracon. + // ABCI applictions 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_addf585b2317eb36, []int{5} +} +func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RequestBeginBlock.Marshal(b, m, deterministic) + return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -813,158 +798,111 @@ func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *RequestBeginBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestBeginBlock.Merge(m, src) +func (m *ResponseCheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseCheckTx.Merge(m, src) } -func (m *RequestBeginBlock) XXX_Size() int { +func (m *ResponseCheckTx) XXX_Size() int { return m.Size() } -func (m *RequestBeginBlock) XXX_DiscardUnknown() { - xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m) +func (m *ResponseCheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m) } -var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo +var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo -func (m *RequestBeginBlock) GetHash() []byte { +func (m *ResponseCheckTx) GetCode() uint32 { if m != nil { - return m.Hash + return m.Code } - return nil + return 0 } -func (m *RequestBeginBlock) GetHeader() types1.Header { +func (m *ResponseCheckTx) GetData() []byte { if m != nil { - return m.Header + return m.Data } - return types1.Header{} + return nil } -func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo { +func (m *ResponseCheckTx) GetLog() string { if m != nil { - return m.LastCommitInfo + return m.Log } - return LastCommitInfo{} + return "" } -func (m *RequestBeginBlock) GetByzantineValidators() []Evidence { +func (m *ResponseCheckTx) GetInfo() string { if m != nil { - return m.ByzantineValidators + return m.Info } - return nil + return "" } -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=ostracon.abci.CheckTxType" json:"type,omitempty"` +func (m *ResponseCheckTx) GetGasWanted() int64 { + if m != nil { + return m.GasWanted + } + return 0 } -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_addf585b2317eb36, []int{8} -} -func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestCheckTx.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 *ResponseCheckTx) GetGasUsed() int64 { + if m != nil { + return m.GasUsed } + return 0 } -func (m *RequestCheckTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestCheckTx.Merge(m, src) -} -func (m *RequestCheckTx) XXX_Size() int { - return m.Size() -} -func (m *RequestCheckTx) XXX_DiscardUnknown() { - xxx_messageInfo_RequestCheckTx.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestCheckTx proto.InternalMessageInfo -func (m *RequestCheckTx) GetTx() []byte { +func (m *ResponseCheckTx) GetEvents() []types.Event { if m != nil { - return m.Tx + return m.Events } return nil } -func (m *RequestCheckTx) GetType() CheckTxType { +func (m *ResponseCheckTx) GetCodespace() string { if m != nil { - return m.Type + return m.Codespace } - return CheckTxType_New + return "" } -type RequestDeliverTx struct { - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` +func (m *ResponseCheckTx) GetSender() string { + if m != nil { + return m.Sender + } + return "" } -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_addf585b2317eb36, []int{9} -} -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 *ResponseCheckTx) GetPriority() int64 { + if m != nil { + return m.Priority } -} -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) + return 0 } -var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo - -func (m *RequestDeliverTx) GetTx() []byte { +func (m *ResponseCheckTx) GetMempoolError() string { if m != nil { - return m.Tx + return m.MempoolError } - return nil + return "" } -type RequestEndBlock struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +type ResponseBeginRecheckTx struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,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_addf585b2317eb36, []int{10} +func (m *ResponseBeginRecheckTx) Reset() { *m = ResponseBeginRecheckTx{} } +func (m *ResponseBeginRecheckTx) String() string { return proto.CompactTextString(m) } +func (*ResponseBeginRecheckTx) ProtoMessage() {} +func (*ResponseBeginRecheckTx) Descriptor() ([]byte, []int) { + return fileDescriptor_addf585b2317eb36, []int{6} } -func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { +func (m *ResponseBeginRecheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResponseBeginRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RequestEndBlock.Marshal(b, m, deterministic) + return xxx_messageInfo_ResponseBeginRecheckTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -974,40 +912,41 @@ func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *RequestEndBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestEndBlock.Merge(m, src) +func (m *ResponseBeginRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseBeginRecheckTx.Merge(m, src) } -func (m *RequestEndBlock) XXX_Size() int { +func (m *ResponseBeginRecheckTx) XXX_Size() int { return m.Size() } -func (m *RequestEndBlock) XXX_DiscardUnknown() { - xxx_messageInfo_RequestEndBlock.DiscardUnknown(m) +func (m *ResponseBeginRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseBeginRecheckTx.DiscardUnknown(m) } -var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo +var xxx_messageInfo_ResponseBeginRecheckTx proto.InternalMessageInfo -func (m *RequestEndBlock) GetHeight() int64 { +func (m *ResponseBeginRecheckTx) GetCode() uint32 { if m != nil { - return m.Height + return m.Code } return 0 } -type RequestCommit struct { +type ResponseEndRecheckTx struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` } -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_addf585b2317eb36, []int{11} +func (m *ResponseEndRecheckTx) Reset() { *m = ResponseEndRecheckTx{} } +func (m *ResponseEndRecheckTx) String() string { return proto.CompactTextString(m) } +func (*ResponseEndRecheckTx) ProtoMessage() {} +func (*ResponseEndRecheckTx) Descriptor() ([]byte, []int) { + return fileDescriptor_addf585b2317eb36, []int{7} } -func (m *RequestCommit) XXX_Unmarshal(b []byte) error { +func (m *ResponseEndRecheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResponseEndRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RequestCommit.Marshal(b, m, deterministic) + return xxx_messageInfo_ResponseEndRecheckTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1017,11636 +956,2460 @@ func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *RequestCommit) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestCommit.Merge(m, src) +func (m *ResponseEndRecheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseEndRecheckTx.Merge(m, src) } -func (m *RequestCommit) XXX_Size() int { +func (m *ResponseEndRecheckTx) XXX_Size() int { return m.Size() } -func (m *RequestCommit) XXX_DiscardUnknown() { - xxx_messageInfo_RequestCommit.DiscardUnknown(m) +func (m *ResponseEndRecheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseEndRecheckTx.DiscardUnknown(m) } -var xxx_messageInfo_RequestCommit proto.InternalMessageInfo - -// lists available snapshots -type RequestListSnapshots struct { -} +var xxx_messageInfo_ResponseEndRecheckTx proto.InternalMessageInfo -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_addf585b2317eb36, []int{12} -} -func (m *RequestListSnapshots) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestListSnapshots.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *ResponseEndRecheckTx) GetCode() uint32 { + if m != nil { + return m.Code } + return 0 } -func (m *RequestListSnapshots) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestListSnapshots.Merge(m, src) -} -func (m *RequestListSnapshots) XXX_Size() int { - return m.Size() + +func init() { + proto.RegisterType((*Request)(nil), "ostracon.abci.Request") + proto.RegisterType((*RequestBeginBlock)(nil), "ostracon.abci.RequestBeginBlock") + proto.RegisterType((*RequestBeginRecheckTx)(nil), "ostracon.abci.RequestBeginRecheckTx") + proto.RegisterType((*RequestEndRecheckTx)(nil), "ostracon.abci.RequestEndRecheckTx") + proto.RegisterType((*Response)(nil), "ostracon.abci.Response") + proto.RegisterType((*ResponseCheckTx)(nil), "ostracon.abci.ResponseCheckTx") + proto.RegisterType((*ResponseBeginRecheckTx)(nil), "ostracon.abci.ResponseBeginRecheckTx") + proto.RegisterType((*ResponseEndRecheckTx)(nil), "ostracon.abci.ResponseEndRecheckTx") } -func (m *RequestListSnapshots) XXX_DiscardUnknown() { - xxx_messageInfo_RequestListSnapshots.DiscardUnknown(m) + +func init() { proto.RegisterFile("ostracon/abci/types.proto", fileDescriptor_addf585b2317eb36) } + +var fileDescriptor_addf585b2317eb36 = []byte{ + // 1427 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x5b, 0x8f, 0xdb, 0x44, + 0x14, 0xc7, 0x93, 0x26, 0x9b, 0xac, 0xcf, 0x66, 0xd3, 0xed, 0xe9, 0xb2, 0x72, 0x4d, 0x9b, 0x2d, + 0x59, 0x8a, 0x4a, 0x29, 0x1b, 0x69, 0x0b, 0x15, 0x08, 0x10, 0x34, 0x61, 0xab, 0x2c, 0x14, 0x56, + 0x9d, 0x22, 0x90, 0xb8, 0x34, 0x72, 0xec, 0x49, 0x62, 0xd6, 0xf1, 0xb8, 0xf6, 0x64, 0x69, 0x78, + 0x44, 0xe2, 0x9d, 0x6f, 0xc2, 0x23, 0x5f, 0xa1, 0x8f, 0x7d, 0xe4, 0x01, 0x55, 0xa8, 0x7d, 0x01, + 0x3e, 0x05, 0x9a, 0xf1, 0xa5, 0xce, 0xc5, 0xb1, 0xf7, 0x6d, 0x2e, 0xe7, 0xfc, 0xc7, 0x27, 0x3e, + 0x73, 0x7e, 0x3e, 0x81, 0x4b, 0xcc, 0xe7, 0x9e, 0x6e, 0x30, 0xa7, 0xa5, 0xf7, 0x0d, 0xab, 0xc5, + 0xa7, 0x2e, 0xf5, 0xf7, 0x5d, 0x8f, 0x71, 0x86, 0x9b, 0xd1, 0xd6, 0xbe, 0xd8, 0xd2, 0xae, 0x70, + 0xea, 0x98, 0xd4, 0x1b, 0x5b, 0x0e, 0x6f, 0x19, 0xde, 0xd4, 0xe5, 0xac, 0xe5, 0x7a, 0x8c, 0x0d, + 0x02, 0xeb, 0x99, 0x6d, 0xa9, 0xd2, 0x72, 0x75, 0x4f, 0x1f, 0x87, 0x62, 0xda, 0xab, 0x89, 0xed, + 0xf9, 0x93, 0x34, 0x2d, 0x7e, 0x88, 0xc0, 0x33, 0xb9, 0x77, 0x79, 0xf1, 0xd8, 0x13, 0x3a, 0x8d, + 0x76, 0x77, 0x87, 0x8c, 0x0d, 0x6d, 0xda, 0x92, 0xb3, 0xfe, 0x64, 0xd0, 0xe2, 0xd6, 0x98, 0xfa, + 0x5c, 0x1f, 0xbb, 0xa1, 0xc1, 0xf6, 0x90, 0x0d, 0x99, 0x1c, 0xb6, 0xc4, 0x28, 0x58, 0x6d, 0xfe, + 0xae, 0x40, 0x95, 0xd0, 0x47, 0x13, 0xea, 0x73, 0x3c, 0x80, 0x32, 0x35, 0x46, 0x4c, 0x2d, 0x5e, + 0x2d, 0x5e, 0xdf, 0x38, 0xb8, 0xbc, 0xff, 0xf2, 0x3c, 0x19, 0xf7, 0x7e, 0x68, 0x77, 0x68, 0x8c, + 0x58, 0xb7, 0x40, 0xa4, 0x2d, 0xbe, 0x0b, 0x6b, 0x03, 0x7b, 0xe2, 0x8f, 0xd4, 0x73, 0xd2, 0xe9, + 0x4a, 0x9a, 0xd3, 0x5d, 0x61, 0xd4, 0x2d, 0x90, 0xc0, 0x5a, 0x1c, 0x65, 0x39, 0x03, 0xa6, 0x96, + 0x56, 0x1f, 0x75, 0xe4, 0x0c, 0xe4, 0x51, 0xc2, 0x16, 0xdb, 0x00, 0x3e, 0xe5, 0x3d, 0xe6, 0x72, + 0x8b, 0x39, 0x6a, 0x59, 0x7a, 0xbe, 0x96, 0xe6, 0xf9, 0x80, 0xf2, 0x63, 0x69, 0xd8, 0x2d, 0x10, + 0xc5, 0x8f, 0x26, 0x42, 0xc3, 0x72, 0x2c, 0xde, 0x33, 0x46, 0xba, 0xe5, 0xa8, 0x6b, 0xab, 0x35, + 0x8e, 0x1c, 0x8b, 0x77, 0x84, 0xa1, 0xd0, 0xb0, 0xa2, 0x89, 0x08, 0xf9, 0xd1, 0x84, 0x7a, 0x53, + 0xb5, 0xb2, 0x3a, 0xe4, 0xfb, 0xc2, 0x48, 0x84, 0x2c, 0xad, 0xb1, 0x03, 0x1b, 0x7d, 0x3a, 0xb4, + 0x9c, 0x5e, 0xdf, 0x66, 0xc6, 0x89, 0x5a, 0x95, 0xce, 0x57, 0xf7, 0x67, 0x52, 0x2b, 0x72, 0x6d, + 0x0b, 0xc3, 0xb6, 0xb0, 0xeb, 0x16, 0x08, 0xf4, 0xe3, 0x19, 0x7e, 0x08, 0xeb, 0xc6, 0x88, 0x1a, + 0x27, 0x3d, 0xfe, 0x58, 0x5d, 0x97, 0x0a, 0xbb, 0x69, 0xc7, 0x77, 0x84, 0xdd, 0x57, 0x8f, 0xbb, + 0x05, 0x52, 0x35, 0x82, 0xa1, 0x88, 0xde, 0xa4, 0xb6, 0x75, 0x4a, 0x3d, 0xe1, 0xaf, 0xac, 0x8e, + 0xfe, 0xd3, 0xc0, 0x52, 0x2a, 0x28, 0x66, 0x34, 0xc1, 0x8f, 0x41, 0xa1, 0x8e, 0x19, 0x06, 0x01, + 0x61, 0x10, 0x69, 0x99, 0xe2, 0x98, 0x51, 0x10, 0xeb, 0x34, 0x1c, 0xe3, 0x7b, 0x50, 0x31, 0xd8, + 0x78, 0x6c, 0x71, 0x75, 0x43, 0x7a, 0x37, 0x52, 0x03, 0x90, 0x56, 0xdd, 0x02, 0x09, 0xed, 0xf1, + 0x4b, 0xa8, 0xdb, 0x96, 0xcf, 0x7b, 0xbe, 0xa3, 0xbb, 0xfe, 0x88, 0x71, 0x5f, 0xad, 0x49, 0x85, + 0x6b, 0x69, 0x0a, 0xf7, 0x2c, 0x9f, 0x3f, 0x88, 0x8c, 0xbb, 0x05, 0xb2, 0x69, 0x27, 0x17, 0x84, + 0x1e, 0x1b, 0x0c, 0xa8, 0x17, 0x0b, 0xaa, 0x9b, 0xab, 0xf5, 0x8e, 0x85, 0x75, 0xe4, 0x2f, 0xf4, + 0x58, 0x72, 0x01, 0xbf, 0x83, 0x8b, 0x36, 0xd3, 0xcd, 0x58, 0xae, 0x67, 0x8c, 0x26, 0xce, 0x89, + 0x5a, 0x97, 0xa2, 0x6f, 0xa6, 0x3e, 0x24, 0xd3, 0xcd, 0x48, 0xa2, 0x23, 0x1c, 0xba, 0x05, 0x72, + 0xc1, 0x9e, 0x5f, 0xc4, 0x87, 0xb0, 0xad, 0xbb, 0xae, 0x3d, 0x9d, 0x57, 0x3f, 0x2f, 0xd5, 0x6f, + 0xa4, 0xa9, 0xdf, 0x11, 0x3e, 0xf3, 0xf2, 0xa8, 0x2f, 0xac, 0xe2, 0x7d, 0xd8, 0x0a, 0xd2, 0xd3, + 0xa3, 0x71, 0x86, 0xfd, 0x13, 0x24, 0xe9, 0xeb, 0x2b, 0x92, 0x94, 0x50, 0x23, 0xce, 0xb3, 0x7a, + 0x7f, 0x66, 0x05, 0x3f, 0x87, 0xba, 0x48, 0x95, 0x84, 0xe0, 0xbf, 0x81, 0x60, 0x73, 0xb9, 0xe0, + 0xa1, 0x63, 0x26, 0xe5, 0x6a, 0x34, 0x31, 0x6f, 0x57, 0x61, 0xed, 0x54, 0xb7, 0x27, 0xb4, 0xf9, + 0xcb, 0x39, 0xb8, 0xb0, 0x70, 0x4d, 0x10, 0xa1, 0x3c, 0xd2, 0xfd, 0x91, 0xac, 0x5d, 0x35, 0x22, + 0xc7, 0xf8, 0x0e, 0x54, 0x46, 0x54, 0x37, 0xa9, 0x17, 0x16, 0xa7, 0x9d, 0x97, 0xc7, 0x06, 0x75, + 0xb5, 0x2b, 0x77, 0xdb, 0xe5, 0x27, 0xcf, 0x76, 0x0b, 0x24, 0xb4, 0xc5, 0x63, 0xd8, 0xb2, 0x75, + 0x9f, 0xf7, 0x82, 0xa4, 0xeb, 0x25, 0xca, 0xd4, 0xe2, 0x55, 0xbb, 0xa7, 0x47, 0x69, 0x2a, 0x2a, + 0x55, 0x28, 0x54, 0xb7, 0x67, 0x56, 0x91, 0xc0, 0x76, 0x7f, 0xfa, 0xb3, 0xee, 0x70, 0xcb, 0xa1, + 0xbd, 0x53, 0xdd, 0xb6, 0x4c, 0x9d, 0x33, 0xcf, 0x57, 0xcb, 0x57, 0x4b, 0xd7, 0x37, 0x0e, 0x2e, + 0x2d, 0x88, 0x1e, 0x9e, 0x5a, 0x26, 0x75, 0x0c, 0x1a, 0xca, 0x5d, 0x8c, 0x9d, 0xbf, 0x8e, 0x7d, + 0x9b, 0x5f, 0xc0, 0x2b, 0x4b, 0xdf, 0x42, 0x22, 0xe6, 0x62, 0xfe, 0x98, 0x9b, 0x6f, 0xc3, 0xc5, + 0x25, 0xef, 0x00, 0x77, 0x84, 0x98, 0x35, 0x1c, 0x71, 0x29, 0x56, 0x22, 0xe1, 0xac, 0xf9, 0x2b, + 0xc0, 0x3a, 0xa1, 0xbe, 0xcb, 0x1c, 0x9f, 0x62, 0x1b, 0x14, 0xfa, 0xd8, 0xa0, 0x41, 0x55, 0x2e, + 0x86, 0xef, 0x77, 0x31, 0x1b, 0x03, 0xeb, 0xc3, 0xc8, 0x52, 0x14, 0x95, 0xd8, 0x0d, 0x6f, 0x85, + 0xe4, 0x49, 0x87, 0x48, 0xe8, 0x9e, 0x44, 0xcf, 0xed, 0x08, 0x3d, 0xa5, 0xd4, 0x3a, 0x12, 0x78, + 0xcd, 0xb1, 0xe7, 0x56, 0xc8, 0x9e, 0x72, 0xc6, 0x61, 0x33, 0xf0, 0xe9, 0xcc, 0xc0, 0x67, 0x2d, + 0x23, 0xcc, 0x14, 0xfa, 0x74, 0x66, 0xe8, 0x53, 0xc9, 0x10, 0x49, 0xc1, 0xcf, 0xed, 0x08, 0x3f, + 0xd5, 0x8c, 0xb0, 0xe7, 0xf8, 0x73, 0x77, 0x96, 0x3f, 0x01, 0x3d, 0xf6, 0x52, 0xbd, 0x53, 0x11, + 0xf4, 0x41, 0x02, 0x41, 0x4a, 0xf8, 0x08, 0xf3, 0xd7, 0x39, 0x90, 0x58, 0x42, 0xa0, 0xce, 0x0c, + 0x81, 0x20, 0xe3, 0x17, 0x48, 0x41, 0xd0, 0x27, 0x49, 0x04, 0x6d, 0xa4, 0x52, 0x2c, 0x4c, 0x99, + 0x65, 0x0c, 0x7a, 0x3f, 0x66, 0x50, 0x2d, 0x15, 0xa2, 0x61, 0x0c, 0xf3, 0x10, 0x3a, 0x5e, 0x80, + 0x50, 0x00, 0x8d, 0x37, 0x52, 0x25, 0x32, 0x28, 0x74, 0xbc, 0x40, 0xa1, 0x7a, 0x86, 0x60, 0x06, + 0x86, 0xbe, 0x5f, 0x8e, 0xa1, 0x74, 0x50, 0x84, 0x8f, 0x99, 0x8f, 0x43, 0xbd, 0x14, 0x0e, 0x6d, + 0x49, 0xf9, 0xb7, 0x52, 0xe5, 0x73, 0x83, 0x88, 0xa4, 0x83, 0xe8, 0x5a, 0x4a, 0xa2, 0x65, 0x92, + 0xe8, 0x5e, 0x1a, 0x89, 0xf6, 0x52, 0x14, 0xf3, 0xa1, 0xe8, 0xaf, 0x73, 0x70, 0x7e, 0x2e, 0xd9, + 0x05, 0x88, 0x0c, 0x66, 0x52, 0x59, 0x09, 0x37, 0x89, 0x1c, 0x8b, 0x35, 0x53, 0xe7, 0xba, 0x2c, + 0x6f, 0x35, 0x22, 0xc7, 0xb8, 0x05, 0x25, 0x9b, 0x0d, 0x65, 0xed, 0x52, 0x88, 0x18, 0x0a, 0xab, + 0xb8, 0x2e, 0x29, 0x61, 0xd9, 0x69, 0x00, 0x0c, 0x75, 0xbf, 0xf7, 0x93, 0xee, 0x70, 0x6a, 0xca, + 0xb2, 0x53, 0x22, 0x89, 0x15, 0xd4, 0x60, 0x5d, 0xcc, 0x26, 0x3e, 0x35, 0x65, 0x3d, 0x29, 0x91, + 0x78, 0x8e, 0x5d, 0xa8, 0xd0, 0x53, 0xea, 0x70, 0x5f, 0xad, 0x4a, 0xd2, 0xec, 0x2c, 0x21, 0x0d, + 0x75, 0x78, 0x5b, 0x15, 0x28, 0xf8, 0xef, 0xd9, 0xee, 0x56, 0x60, 0x7d, 0x93, 0x8d, 0x2d, 0x4e, + 0xc7, 0x2e, 0x9f, 0x92, 0xd0, 0x1f, 0x2f, 0x83, 0x22, 0xe2, 0xf0, 0x5d, 0xdd, 0xa0, 0xb2, 0x70, + 0x28, 0xe4, 0xe5, 0x82, 0xa0, 0x84, 0x2f, 0x85, 0x65, 0x39, 0x50, 0x48, 0x38, 0x13, 0xcf, 0xe6, + 0x7a, 0x16, 0xf3, 0x2c, 0x3e, 0x95, 0x37, 0xbd, 0x44, 0xe2, 0x39, 0xee, 0xc1, 0xe6, 0x98, 0x8e, + 0x5d, 0xc6, 0xec, 0x1e, 0xf5, 0x3c, 0xe6, 0xc9, 0x6b, 0xac, 0x90, 0x5a, 0xb8, 0x78, 0x28, 0xd6, + 0x9a, 0x37, 0x61, 0x67, 0xf9, 0x1b, 0x5e, 0xf6, 0x23, 0x37, 0x6f, 0xc0, 0xf6, 0xb2, 0xb7, 0xb7, + 0xcc, 0xf6, 0xe0, 0x8f, 0x0d, 0x38, 0x7f, 0xa7, 0xdd, 0x39, 0x12, 0x49, 0x69, 0x19, 0x7a, 0x58, + 0x9c, 0xcb, 0x02, 0x2f, 0xb8, 0xb2, 0xef, 0xd1, 0x56, 0xb3, 0x09, 0xef, 0xc2, 0x9a, 0xa4, 0x0d, + 0xae, 0x6e, 0x84, 0xb4, 0x0c, 0x58, 0x89, 0x87, 0x91, 0xdf, 0x0e, 0x2b, 0x3b, 0x23, 0x6d, 0x35, + 0xbb, 0x90, 0x80, 0x12, 0x83, 0x08, 0xb3, 0x3b, 0x25, 0x2d, 0x07, 0xcf, 0x84, 0x66, 0x5c, 0x95, + 0x31, 0xbb, 0x77, 0xd0, 0x72, 0x14, 0x77, 0xfc, 0x0c, 0xaa, 0xd1, 0xed, 0xc9, 0xea, 0x66, 0xb4, + 0x0c, 0xd6, 0x88, 0x17, 0x20, 0xb9, 0x87, 0xab, 0xdb, 0x32, 0x2d, 0x03, 0x9b, 0x78, 0x04, 0x95, + 0xa0, 0xf4, 0x63, 0x46, 0x7f, 0xa2, 0x65, 0xb1, 0x43, 0xfc, 0x64, 0x31, 0xca, 0x31, 0xbb, 0xd9, + 0xd4, 0x72, 0x7c, 0x11, 0xe0, 0x03, 0x80, 0xc4, 0xc7, 0x6f, 0x66, 0x17, 0xa9, 0xe5, 0xe1, 0x3c, + 0x1e, 0xc3, 0x7a, 0x44, 0x4b, 0xcc, 0xec, 0xe9, 0xb4, 0x6c, 0xe4, 0xe2, 0x43, 0xd8, 0x9c, 0x81, + 0x1f, 0xe6, 0xeb, 0xd4, 0xb4, 0x9c, 0x2c, 0x15, 0xfa, 0x33, 0x2c, 0xc4, 0x7c, 0x9d, 0x9b, 0x96, + 0x13, 0xad, 0xf8, 0x23, 0x5c, 0x58, 0xa0, 0x22, 0xe6, 0x6f, 0xe4, 0xb4, 0x33, 0xc0, 0x16, 0xc7, + 0x80, 0x8b, 0x88, 0xc4, 0x33, 0xf4, 0x75, 0xda, 0x59, 0xd8, 0x8b, 0x3f, 0x40, 0x7d, 0xae, 0xa6, + 0xe6, 0xea, 0xf2, 0xb4, 0x7c, 0x08, 0xc6, 0x6f, 0xa0, 0x36, 0x53, 0x84, 0x73, 0x74, 0x7c, 0x5a, + 0x1e, 0x16, 0xb7, 0x3f, 0x7a, 0xf2, 0xbc, 0x51, 0x7c, 0xfa, 0xbc, 0x51, 0xfc, 0xfb, 0x79, 0xa3, + 0xf8, 0xdb, 0x8b, 0x46, 0xe1, 0xe9, 0x8b, 0x46, 0xe1, 0xcf, 0x17, 0x8d, 0xc2, 0xb7, 0x7b, 0x43, + 0x8b, 0x8f, 0x26, 0xfd, 0x7d, 0x83, 0x8d, 0x5b, 0xb6, 0xe5, 0xd0, 0xd6, 0x92, 0xff, 0xf3, 0xfa, + 0x15, 0xf9, 0xaf, 0xd7, 0xad, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x98, 0xcb, 0x00, 0xed, + 0x13, 0x00, 0x00, } -var xxx_messageInfo_RequestListSnapshots proto.InternalMessageInfo +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 -// offers a snapshot to the application -type RequestOfferSnapshot struct { - Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` +// ABCIApplicationClient is the client API for ABCIApplication service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ABCIApplicationClient interface { + Echo(ctx context.Context, in *types.RequestEcho, opts ...grpc.CallOption) (*types.ResponseEcho, error) + Flush(ctx context.Context, in *types.RequestFlush, opts ...grpc.CallOption) (*types.ResponseFlush, error) + Info(ctx context.Context, in *types.RequestInfo, opts ...grpc.CallOption) (*types.ResponseInfo, error) + SetOption(ctx context.Context, in *types.RequestSetOption, opts ...grpc.CallOption) (*types.ResponseSetOption, error) + DeliverTx(ctx context.Context, in *types.RequestDeliverTx, opts ...grpc.CallOption) (*types.ResponseDeliverTx, error) + CheckTx(ctx context.Context, in *types.RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) + Query(ctx context.Context, in *types.RequestQuery, opts ...grpc.CallOption) (*types.ResponseQuery, error) + Commit(ctx context.Context, in *types.RequestCommit, opts ...grpc.CallOption) (*types.ResponseCommit, error) + InitChain(ctx context.Context, in *types.RequestInitChain, opts ...grpc.CallOption) (*types.ResponseInitChain, error) + BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*types.ResponseBeginBlock, error) + EndBlock(ctx context.Context, in *types.RequestEndBlock, opts ...grpc.CallOption) (*types.ResponseEndBlock, error) + ListSnapshots(ctx context.Context, in *types.RequestListSnapshots, opts ...grpc.CallOption) (*types.ResponseListSnapshots, error) + OfferSnapshot(ctx context.Context, in *types.RequestOfferSnapshot, opts ...grpc.CallOption) (*types.ResponseOfferSnapshot, error) + LoadSnapshotChunk(ctx context.Context, in *types.RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*types.ResponseLoadSnapshotChunk, error) + ApplySnapshotChunk(ctx context.Context, in *types.RequestApplySnapshotChunk, opts ...grpc.CallOption) (*types.ResponseApplySnapshotChunk, error) + BeginRecheckTx(ctx context.Context, in *RequestBeginRecheckTx, opts ...grpc.CallOption) (*ResponseBeginRecheckTx, error) + EndRecheckTx(ctx context.Context, in *RequestEndRecheckTx, opts ...grpc.CallOption) (*ResponseEndRecheckTx, error) } -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_addf585b2317eb36, []int{13} +type aBCIApplicationClient struct { + cc *grpc.ClientConn } -func (m *RequestOfferSnapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient { + return &aBCIApplicationClient{cc} } -func (m *RequestOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestOfferSnapshot.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 (c *aBCIApplicationClient) Echo(ctx context.Context, in *types.RequestEcho, opts ...grpc.CallOption) (*types.ResponseEcho, error) { + out := new(types.ResponseEcho) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Echo", in, out, opts...) + if err != nil { + return nil, err } -} -func (m *RequestOfferSnapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestOfferSnapshot.Merge(m, src) -} -func (m *RequestOfferSnapshot) XXX_Size() int { - return m.Size() -} -func (m *RequestOfferSnapshot) XXX_DiscardUnknown() { - xxx_messageInfo_RequestOfferSnapshot.DiscardUnknown(m) + return out, nil } -var xxx_messageInfo_RequestOfferSnapshot proto.InternalMessageInfo - -func (m *RequestOfferSnapshot) GetSnapshot() *Snapshot { - if m != nil { - return m.Snapshot +func (c *aBCIApplicationClient) Flush(ctx context.Context, in *types.RequestFlush, opts ...grpc.CallOption) (*types.ResponseFlush, error) { + out := new(types.ResponseFlush) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Flush", in, out, opts...) + if err != nil { + return nil, err } - return nil + return out, nil } -func (m *RequestOfferSnapshot) GetAppHash() []byte { - if m != nil { - return m.AppHash +func (c *aBCIApplicationClient) Info(ctx context.Context, in *types.RequestInfo, opts ...grpc.CallOption) (*types.ResponseInfo, error) { + out := new(types.ResponseInfo) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Info", in, out, opts...) + if err != nil { + return nil, err } - return nil + return out, nil } -// loads a snapshot chunk -type RequestLoadSnapshotChunk struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunk uint32 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"` +func (c *aBCIApplicationClient) SetOption(ctx context.Context, in *types.RequestSetOption, opts ...grpc.CallOption) (*types.ResponseSetOption, error) { + out := new(types.ResponseSetOption) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/SetOption", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *RequestLoadSnapshotChunk) Reset() { *m = RequestLoadSnapshotChunk{} } -func (m *RequestLoadSnapshotChunk) String() string { return proto.CompactTextString(m) } -func (*RequestLoadSnapshotChunk) ProtoMessage() {} -func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{14} -} -func (m *RequestLoadSnapshotChunk) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestLoadSnapshotChunk.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 (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *types.RequestDeliverTx, opts ...grpc.CallOption) (*types.ResponseDeliverTx, error) { + out := new(types.ResponseDeliverTx) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/DeliverTx", in, out, opts...) + if err != nil { + return nil, err } + return out, nil } -func (m *RequestLoadSnapshotChunk) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestLoadSnapshotChunk.Merge(m, src) -} -func (m *RequestLoadSnapshotChunk) XXX_Size() int { - return m.Size() -} -func (m *RequestLoadSnapshotChunk) XXX_DiscardUnknown() { - xxx_messageInfo_RequestLoadSnapshotChunk.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestLoadSnapshotChunk proto.InternalMessageInfo -func (m *RequestLoadSnapshotChunk) GetHeight() uint64 { - if m != nil { - return m.Height +func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *types.RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) { + out := new(ResponseCheckTx) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/CheckTx", in, out, opts...) + if err != nil { + return nil, err } - return 0 + return out, nil } -func (m *RequestLoadSnapshotChunk) GetFormat() uint32 { - if m != nil { - return m.Format +func (c *aBCIApplicationClient) Query(ctx context.Context, in *types.RequestQuery, opts ...grpc.CallOption) (*types.ResponseQuery, error) { + out := new(types.ResponseQuery) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Query", in, out, opts...) + if err != nil { + return nil, err } - return 0 + return out, nil } -func (m *RequestLoadSnapshotChunk) GetChunk() uint32 { - if m != nil { - return m.Chunk +func (c *aBCIApplicationClient) Commit(ctx context.Context, in *types.RequestCommit, opts ...grpc.CallOption) (*types.ResponseCommit, error) { + out := new(types.ResponseCommit) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Commit", in, out, opts...) + if err != nil { + return nil, err } - return 0 + return out, nil } -// Applies a snapshot chunk -type RequestApplySnapshotChunk struct { - Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` +func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *types.RequestInitChain, opts ...grpc.CallOption) (*types.ResponseInitChain, error) { + out := new(types.ResponseInitChain) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/InitChain", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *RequestApplySnapshotChunk) Reset() { *m = RequestApplySnapshotChunk{} } -func (m *RequestApplySnapshotChunk) String() string { return proto.CompactTextString(m) } -func (*RequestApplySnapshotChunk) ProtoMessage() {} -func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{15} -} -func (m *RequestApplySnapshotChunk) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestApplySnapshotChunk.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 (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*types.ResponseBeginBlock, error) { + out := new(types.ResponseBeginBlock) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/BeginBlock", in, out, opts...) + if err != nil { + return nil, err } + return out, nil } -func (m *RequestApplySnapshotChunk) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestApplySnapshotChunk.Merge(m, src) + +func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *types.RequestEndBlock, opts ...grpc.CallOption) (*types.ResponseEndBlock, error) { + out := new(types.ResponseEndBlock) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/EndBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *RequestApplySnapshotChunk) XXX_Size() int { - return m.Size() + +func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *types.RequestListSnapshots, opts ...grpc.CallOption) (*types.ResponseListSnapshots, error) { + out := new(types.ResponseListSnapshots) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/ListSnapshots", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *RequestApplySnapshotChunk) XXX_DiscardUnknown() { - xxx_messageInfo_RequestApplySnapshotChunk.DiscardUnknown(m) + +func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *types.RequestOfferSnapshot, opts ...grpc.CallOption) (*types.ResponseOfferSnapshot, error) { + out := new(types.ResponseOfferSnapshot) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/OfferSnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -var xxx_messageInfo_RequestApplySnapshotChunk proto.InternalMessageInfo +func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *types.RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*types.ResponseLoadSnapshotChunk, error) { + out := new(types.ResponseLoadSnapshotChunk) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} -func (m *RequestApplySnapshotChunk) GetIndex() uint32 { - if m != nil { - return m.Index +func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *types.RequestApplySnapshotChunk, opts ...grpc.CallOption) (*types.ResponseApplySnapshotChunk, error) { + out := new(types.ResponseApplySnapshotChunk) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...) + if err != nil { + return nil, err } - return 0 + return out, nil } -func (m *RequestApplySnapshotChunk) GetChunk() []byte { - if m != nil { - return m.Chunk +func (c *aBCIApplicationClient) BeginRecheckTx(ctx context.Context, in *RequestBeginRecheckTx, opts ...grpc.CallOption) (*ResponseBeginRecheckTx, error) { + out := new(ResponseBeginRecheckTx) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/BeginRecheckTx", in, out, opts...) + if err != nil { + return nil, err } - return nil + return out, nil } -func (m *RequestApplySnapshotChunk) GetSender() string { - if m != nil { - return m.Sender +func (c *aBCIApplicationClient) EndRecheckTx(ctx context.Context, in *RequestEndRecheckTx, opts ...grpc.CallOption) (*ResponseEndRecheckTx, error) { + out := new(ResponseEndRecheckTx) + err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/EndRecheckTx", in, out, opts...) + if err != nil { + return nil, err } - return "" + return out, nil } -type RequestBeginRecheckTx struct { - Header types1.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` +// ABCIApplicationServer is the server API for ABCIApplication service. +type ABCIApplicationServer interface { + Echo(context.Context, *types.RequestEcho) (*types.ResponseEcho, error) + Flush(context.Context, *types.RequestFlush) (*types.ResponseFlush, error) + Info(context.Context, *types.RequestInfo) (*types.ResponseInfo, error) + SetOption(context.Context, *types.RequestSetOption) (*types.ResponseSetOption, error) + DeliverTx(context.Context, *types.RequestDeliverTx) (*types.ResponseDeliverTx, error) + CheckTx(context.Context, *types.RequestCheckTx) (*ResponseCheckTx, error) + Query(context.Context, *types.RequestQuery) (*types.ResponseQuery, error) + Commit(context.Context, *types.RequestCommit) (*types.ResponseCommit, error) + InitChain(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error) + BeginBlock(context.Context, *RequestBeginBlock) (*types.ResponseBeginBlock, error) + EndBlock(context.Context, *types.RequestEndBlock) (*types.ResponseEndBlock, 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) + ApplySnapshotChunk(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) + BeginRecheckTx(context.Context, *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) + EndRecheckTx(context.Context, *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) } -func (m *RequestBeginRecheckTx) Reset() { *m = RequestBeginRecheckTx{} } -func (m *RequestBeginRecheckTx) String() string { return proto.CompactTextString(m) } -func (*RequestBeginRecheckTx) ProtoMessage() {} -func (*RequestBeginRecheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{16} +// UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations. +type UnimplementedABCIApplicationServer struct { } -func (m *RequestBeginRecheckTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *types.RequestEcho) (*types.ResponseEcho, error) { + return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") } -func (m *RequestBeginRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestBeginRecheckTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *types.RequestFlush) (*types.ResponseFlush, error) { + return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented") } -func (m *RequestBeginRecheckTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestBeginRecheckTx.Merge(m, src) +func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *types.RequestInfo) (*types.ResponseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") } -func (m *RequestBeginRecheckTx) XXX_Size() int { - return m.Size() +func (*UnimplementedABCIApplicationServer) SetOption(ctx context.Context, req *types.RequestSetOption) (*types.ResponseSetOption, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetOption not implemented") } -func (m *RequestBeginRecheckTx) XXX_DiscardUnknown() { - xxx_messageInfo_RequestBeginRecheckTx.DiscardUnknown(m) +func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *types.RequestDeliverTx) (*types.ResponseDeliverTx, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented") } - -var xxx_messageInfo_RequestBeginRecheckTx proto.InternalMessageInfo - -func (m *RequestBeginRecheckTx) GetHeader() types1.Header { - if m != nil { - return m.Header - } - return types1.Header{} +func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*ResponseCheckTx, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented") } - -type RequestEndRecheckTx struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) { + return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") } - -func (m *RequestEndRecheckTx) Reset() { *m = RequestEndRecheckTx{} } -func (m *RequestEndRecheckTx) String() string { return proto.CompactTextString(m) } -func (*RequestEndRecheckTx) ProtoMessage() {} -func (*RequestEndRecheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{17} +func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *types.RequestCommit) (*types.ResponseCommit, error) { + return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented") } -func (m *RequestEndRecheckTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *types.RequestInitChain) (*types.ResponseInitChain, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented") } -func (m *RequestEndRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestEndRecheckTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RequestEndRecheckTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestEndRecheckTx.Merge(m, src) -} -func (m *RequestEndRecheckTx) XXX_Size() int { - return m.Size() -} -func (m *RequestEndRecheckTx) XXX_DiscardUnknown() { - xxx_messageInfo_RequestEndRecheckTx.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestEndRecheckTx proto.InternalMessageInfo - -func (m *RequestEndRecheckTx) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -type Response struct { - // Types that are valid to be assigned to Value: - // *Response_Exception - // *Response_Echo - // *Response_Flush - // *Response_Info - // *Response_SetOption - // *Response_InitChain - // *Response_Query - // *Response_BeginBlock - // *Response_CheckTx - // *Response_DeliverTx - // *Response_EndBlock - // *Response_Commit - // *Response_ListSnapshots - // *Response_OfferSnapshot - // *Response_LoadSnapshotChunk - // *Response_ApplySnapshotChunk - // *Response_BeginRecheckTx - // *Response_EndRecheckTx - Value isResponse_Value `protobuf_oneof:"value"` +func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*types.ResponseBeginBlock, error) { + return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented") } - -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_addf585b2317eb36, []int{18} +func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *types.RequestEndBlock) (*types.ResponseEndBlock, error) { + return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented") } -func (m *Response) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented") } -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Response.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 (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { + return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented") } -func (m *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(m, src) +func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented") } -func (m *Response) XXX_Size() int { - return m.Size() +func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented") } -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) +func (*UnimplementedABCIApplicationServer) BeginRecheckTx(ctx context.Context, req *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) { + return nil, status.Errorf(codes.Unimplemented, "method BeginRecheckTx not implemented") } - -var xxx_messageInfo_Response proto.InternalMessageInfo - -type isResponse_Value interface { - isResponse_Value() - MarshalTo([]byte) (int, error) - Size() int +func (*UnimplementedABCIApplicationServer) EndRecheckTx(ctx context.Context, req *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) { + return nil, status.Errorf(codes.Unimplemented, "method EndRecheckTx not implemented") } -type Response_Exception struct { - Exception *ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof" json:"exception,omitempty"` -} -type Response_Echo struct { - Echo *ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof" json:"echo,omitempty"` -} -type Response_Flush struct { - Flush *ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof" json:"flush,omitempty"` -} -type Response_Info struct { - Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"` -} -type Response_SetOption struct { - SetOption *ResponseSetOption `protobuf:"bytes,5,opt,name=set_option,json=setOption,proto3,oneof" json:"set_option,omitempty"` -} -type Response_InitChain struct { - InitChain *ResponseInitChain `protobuf:"bytes,6,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"` -} -type Response_Query struct { - Query *ResponseQuery `protobuf:"bytes,7,opt,name=query,proto3,oneof" json:"query,omitempty"` -} -type Response_BeginBlock struct { - BeginBlock *ResponseBeginBlock `protobuf:"bytes,8,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"` -} -type Response_CheckTx struct { - CheckTx *ResponseCheckTx `protobuf:"bytes,9,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"` -} -type Response_DeliverTx struct { - DeliverTx *ResponseDeliverTx `protobuf:"bytes,10,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"` -} -type Response_EndBlock struct { - EndBlock *ResponseEndBlock `protobuf:"bytes,11,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"` -} -type Response_Commit struct { - Commit *ResponseCommit `protobuf:"bytes,12,opt,name=commit,proto3,oneof" json:"commit,omitempty"` -} -type Response_ListSnapshots struct { - ListSnapshots *ResponseListSnapshots `protobuf:"bytes,13,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"` -} -type Response_OfferSnapshot struct { - OfferSnapshot *ResponseOfferSnapshot `protobuf:"bytes,14,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"` -} -type Response_LoadSnapshotChunk struct { - LoadSnapshotChunk *ResponseLoadSnapshotChunk `protobuf:"bytes,15,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"` -} -type Response_ApplySnapshotChunk struct { - ApplySnapshotChunk *ResponseApplySnapshotChunk `protobuf:"bytes,16,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"` -} -type Response_BeginRecheckTx struct { - BeginRecheckTx *ResponseBeginRecheckTx `protobuf:"bytes,1000,opt,name=begin_recheck_tx,json=beginRecheckTx,proto3,oneof" json:"begin_recheck_tx,omitempty"` -} -type Response_EndRecheckTx struct { - EndRecheckTx *ResponseEndRecheckTx `protobuf:"bytes,1001,opt,name=end_recheck_tx,json=endRecheckTx,proto3,oneof" json:"end_recheck_tx,omitempty"` +func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) { + s.RegisterService(&_ABCIApplication_serviceDesc, srv) } -func (*Response_Exception) isResponse_Value() {} -func (*Response_Echo) isResponse_Value() {} -func (*Response_Flush) isResponse_Value() {} -func (*Response_Info) isResponse_Value() {} -func (*Response_SetOption) 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() {} -func (*Response_LoadSnapshotChunk) isResponse_Value() {} -func (*Response_ApplySnapshotChunk) isResponse_Value() {} -func (*Response_BeginRecheckTx) isResponse_Value() {} -func (*Response_EndRecheckTx) isResponse_Value() {} - -func (m *Response) GetValue() isResponse_Value { - if m != nil { - return m.Value +func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestEcho) + if err := dec(in); err != nil { + return nil, err } - return nil -} - -func (m *Response) GetException() *ResponseException { - if x, ok := m.GetValue().(*Response_Exception); ok { - return x.Exception + if interceptor == nil { + return srv.(ABCIApplicationServer).Echo(ctx, in) } - return nil -} - -func (m *Response) GetEcho() *ResponseEcho { - if x, ok := m.GetValue().(*Response_Echo); ok { - return x.Echo + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/Echo", } - return nil -} - -func (m *Response) GetFlush() *ResponseFlush { - if x, ok := m.GetValue().(*Response_Flush); ok { - return x.Flush + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).Echo(ctx, req.(*types.RequestEcho)) } - return nil + return interceptor(ctx, in, info, handler) } -func (m *Response) GetInfo() *ResponseInfo { - if x, ok := m.GetValue().(*Response_Info); ok { - return x.Info +func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestFlush) + if err := dec(in); err != nil { + return nil, err } - return nil -} - -func (m *Response) GetSetOption() *ResponseSetOption { - if x, ok := m.GetValue().(*Response_SetOption); ok { - return x.SetOption + if interceptor == nil { + return srv.(ABCIApplicationServer).Flush(ctx, in) } - return nil -} - -func (m *Response) GetInitChain() *ResponseInitChain { - if x, ok := m.GetValue().(*Response_InitChain); ok { - return x.InitChain + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/Flush", } - return nil -} - -func (m *Response) GetQuery() *ResponseQuery { - if x, ok := m.GetValue().(*Response_Query); ok { - return x.Query + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).Flush(ctx, req.(*types.RequestFlush)) } - return nil + return interceptor(ctx, in, info, handler) } -func (m *Response) GetBeginBlock() *ResponseBeginBlock { - if x, ok := m.GetValue().(*Response_BeginBlock); ok { - return x.BeginBlock +func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestInfo) + if err := dec(in); err != nil { + return nil, err } - return nil -} - -func (m *Response) GetCheckTx() *ResponseCheckTx { - if x, ok := m.GetValue().(*Response_CheckTx); ok { - return x.CheckTx + if interceptor == nil { + return srv.(ABCIApplicationServer).Info(ctx, in) } - return nil -} - -func (m *Response) GetDeliverTx() *ResponseDeliverTx { - if x, ok := m.GetValue().(*Response_DeliverTx); ok { - return x.DeliverTx + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/Info", } - return nil -} - -func (m *Response) GetEndBlock() *ResponseEndBlock { - if x, ok := m.GetValue().(*Response_EndBlock); ok { - return x.EndBlock + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).Info(ctx, req.(*types.RequestInfo)) } - return nil + return interceptor(ctx, in, info, handler) } -func (m *Response) GetCommit() *ResponseCommit { - if x, ok := m.GetValue().(*Response_Commit); ok { - return x.Commit +func _ABCIApplication_SetOption_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestSetOption) + if err := dec(in); err != nil { + return nil, err } - return nil -} - -func (m *Response) GetListSnapshots() *ResponseListSnapshots { - if x, ok := m.GetValue().(*Response_ListSnapshots); ok { - return x.ListSnapshots + if interceptor == nil { + return srv.(ABCIApplicationServer).SetOption(ctx, in) } - return nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/SetOption", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).SetOption(ctx, req.(*types.RequestSetOption)) + } + return interceptor(ctx, in, info, handler) } -func (m *Response) GetOfferSnapshot() *ResponseOfferSnapshot { - if x, ok := m.GetValue().(*Response_OfferSnapshot); ok { - return x.OfferSnapshot - } - return nil +func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.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: "/ostracon.abci.ABCIApplication/DeliverTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*types.RequestDeliverTx)) + } + return interceptor(ctx, in, info, handler) } -func (m *Response) GetLoadSnapshotChunk() *ResponseLoadSnapshotChunk { - if x, ok := m.GetValue().(*Response_LoadSnapshotChunk); ok { - return x.LoadSnapshotChunk +func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestCheckTx) + if err := dec(in); err != nil { + return nil, err } - return nil + if interceptor == nil { + return srv.(ABCIApplicationServer).CheckTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/CheckTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*types.RequestCheckTx)) + } + return interceptor(ctx, in, info, handler) } -func (m *Response) GetApplySnapshotChunk() *ResponseApplySnapshotChunk { - if x, ok := m.GetValue().(*Response_ApplySnapshotChunk); ok { - return x.ApplySnapshotChunk +func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestQuery) + if err := dec(in); err != nil { + return nil, err } - return nil + if interceptor == nil { + return srv.(ABCIApplicationServer).Query(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/Query", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).Query(ctx, req.(*types.RequestQuery)) + } + return interceptor(ctx, in, info, handler) } -func (m *Response) GetBeginRecheckTx() *ResponseBeginRecheckTx { - if x, ok := m.GetValue().(*Response_BeginRecheckTx); ok { - return x.BeginRecheckTx +func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestCommit) + if err := dec(in); err != nil { + return nil, err } - return nil + if interceptor == nil { + return srv.(ABCIApplicationServer).Commit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/Commit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).Commit(ctx, req.(*types.RequestCommit)) + } + return interceptor(ctx, in, info, handler) } -func (m *Response) GetEndRecheckTx() *ResponseEndRecheckTx { - if x, ok := m.GetValue().(*Response_EndRecheckTx); ok { - return x.EndRecheckTx +func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestInitChain) + if err := dec(in); err != nil { + return nil, err } - return nil + if interceptor == nil { + return srv.(ABCIApplicationServer).InitChain(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/InitChain", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).InitChain(ctx, req.(*types.RequestInitChain)) + } + return interceptor(ctx, in, info, handler) } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Response) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Response_Exception)(nil), - (*Response_Echo)(nil), - (*Response_Flush)(nil), - (*Response_Info)(nil), - (*Response_SetOption)(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), - (*Response_LoadSnapshotChunk)(nil), - (*Response_ApplySnapshotChunk)(nil), - (*Response_BeginRecheckTx)(nil), - (*Response_EndRecheckTx)(nil), +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: "/ostracon.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) } -// nondeterministic -type ResponseException struct { - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.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: "/ostracon.abci.ABCIApplication/EndBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*types.RequestEndBlock)) + } + return interceptor(ctx, in, info, handler) } -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_addf585b2317eb36, []int{19} -} -func (m *ResponseException) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseException) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseException.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 _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestListSnapshots) + if err := dec(in); err != nil { + return nil, err } + if interceptor == nil { + return srv.(ABCIApplicationServer).ListSnapshots(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/ListSnapshots", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*types.RequestListSnapshots)) + } + return interceptor(ctx, in, info, handler) } -func (m *ResponseException) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseException.Merge(m, src) -} -func (m *ResponseException) XXX_Size() int { - return m.Size() -} -func (m *ResponseException) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseException.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseException proto.InternalMessageInfo -func (m *ResponseException) GetError() string { - if m != nil { - return m.Error +func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestOfferSnapshot) + if err := dec(in); err != nil { + return nil, err } - return "" + if interceptor == nil { + return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/OfferSnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*types.RequestOfferSnapshot)) + } + return interceptor(ctx, in, info, handler) } -type ResponseEcho struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestLoadSnapshotChunk) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/LoadSnapshotChunk", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*types.RequestLoadSnapshotChunk)) + } + return interceptor(ctx, in, info, handler) } -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_addf585b2317eb36, []int{20} -} -func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseEcho.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 _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.RequestApplySnapshotChunk) + if err := dec(in); err != nil { + return nil, err } + if interceptor == nil { + return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/ApplySnapshotChunk", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*types.RequestApplySnapshotChunk)) + } + return interceptor(ctx, in, info, handler) } -func (m *ResponseEcho) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseEcho.Merge(m, src) -} -func (m *ResponseEcho) XXX_Size() int { - return m.Size() -} -func (m *ResponseEcho) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseEcho.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseEcho proto.InternalMessageInfo -func (m *ResponseEcho) GetMessage() string { - if m != nil { - return m.Message +func _ABCIApplication_BeginRecheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestBeginRecheckTx) + if err := dec(in); err != nil { + return nil, err } - return "" + if interceptor == nil { + return srv.(ABCIApplicationServer).BeginRecheckTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/BeginRecheckTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).BeginRecheckTx(ctx, req.(*RequestBeginRecheckTx)) + } + return interceptor(ctx, in, info, handler) } -type ResponseFlush struct { +func _ABCIApplication_EndRecheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestEndRecheckTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIApplicationServer).EndRecheckTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ostracon.abci.ABCIApplication/EndRecheckTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIApplicationServer).EndRecheckTx(ctx, req.(*RequestEndRecheckTx)) + } + return interceptor(ctx, in, info, handler) } -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_addf585b2317eb36, []int{21} -} -func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseFlush.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 *ResponseFlush) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseFlush.Merge(m, src) -} -func (m *ResponseFlush) XXX_Size() int { - return m.Size() -} -func (m *ResponseFlush) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseFlush.DiscardUnknown(m) +var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ostracon.abci.ABCIApplication", + HandlerType: (*ABCIApplicationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Echo", + Handler: _ABCIApplication_Echo_Handler, + }, + { + MethodName: "Flush", + Handler: _ABCIApplication_Flush_Handler, + }, + { + MethodName: "Info", + Handler: _ABCIApplication_Info_Handler, + }, + { + MethodName: "SetOption", + Handler: _ABCIApplication_SetOption_Handler, + }, + { + MethodName: "DeliverTx", + Handler: _ABCIApplication_DeliverTx_Handler, + }, + { + MethodName: "CheckTx", + Handler: _ABCIApplication_CheckTx_Handler, + }, + { + MethodName: "Query", + Handler: _ABCIApplication_Query_Handler, + }, + { + MethodName: "Commit", + Handler: _ABCIApplication_Commit_Handler, + }, + { + MethodName: "InitChain", + Handler: _ABCIApplication_InitChain_Handler, + }, + { + MethodName: "BeginBlock", + Handler: _ABCIApplication_BeginBlock_Handler, + }, + { + MethodName: "EndBlock", + Handler: _ABCIApplication_EndBlock_Handler, + }, + { + MethodName: "ListSnapshots", + Handler: _ABCIApplication_ListSnapshots_Handler, + }, + { + MethodName: "OfferSnapshot", + Handler: _ABCIApplication_OfferSnapshot_Handler, + }, + { + MethodName: "LoadSnapshotChunk", + Handler: _ABCIApplication_LoadSnapshotChunk_Handler, + }, + { + MethodName: "ApplySnapshotChunk", + Handler: _ABCIApplication_ApplySnapshotChunk_Handler, + }, + { + MethodName: "BeginRecheckTx", + Handler: _ABCIApplication_BeginRecheckTx_Handler, + }, + { + MethodName: "EndRecheckTx", + Handler: _ABCIApplication_EndRecheckTx_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ostracon/abci/types.proto", } -var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo - -type ResponseInfo struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` - LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` - LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"` +func (m *Request) 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 *ResponseInfo) Reset() { *m = ResponseInfo{} } -func (m *ResponseInfo) String() string { return proto.CompactTextString(m) } -func (*ResponseInfo) ProtoMessage() {} -func (*ResponseInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{22} -} -func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *Request) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - return b[:n], nil } + return len(dAtA) - i, nil } -func (m *ResponseInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseInfo.Merge(m, src) -} -func (m *ResponseInfo) XXX_Size() int { - return m.Size() -} -func (m *ResponseInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseInfo proto.InternalMessageInfo -func (m *ResponseInfo) GetData() string { - if m != nil { - return m.Data - } - return "" +func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseInfo) GetVersion() string { - if m != nil { - return m.Version +func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Echo != nil { + { + size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return "" + return len(dAtA) - i, nil } - -func (m *ResponseInfo) GetAppVersion() uint64 { - if m != nil { - return m.AppVersion - } - return 0 +func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseInfo) GetLastBlockHeight() int64 { - if m != nil { - return m.LastBlockHeight +func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Flush != nil { + { + size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return 0 + return len(dAtA) - i, nil +} +func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseInfo) GetLastBlockAppHash() []byte { - if m != nil { - return m.LastBlockAppHash +func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - return nil + return len(dAtA) - i, nil } - -// nondeterministic -type ResponseSetOption struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // bytes data = 2; - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` +func (m *Request_SetOption) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} } -func (m *ResponseSetOption) String() string { return proto.CompactTextString(m) } -func (*ResponseSetOption) ProtoMessage() {} -func (*ResponseSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{23} -} -func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseSetOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseSetOption.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Request_SetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SetOption != nil { + { + size, err := m.SetOption.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x22 } + return len(dAtA) - i, nil } -func (m *ResponseSetOption) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseSetOption.Merge(m, src) -} -func (m *ResponseSetOption) XXX_Size() int { - return m.Size() -} -func (m *ResponseSetOption) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseSetOption.DiscardUnknown(m) +func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseSetOption proto.InternalMessageInfo - -func (m *ResponseSetOption) GetCode() uint32 { - if m != nil { - return m.Code +func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InitChain != nil { + { + size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - return 0 + return len(dAtA) - i, nil } - -func (m *ResponseSetOption) GetLog() string { - if m != nil { - return m.Log - } - return "" +func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseSetOption) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -type ResponseInitChain struct { - ConsensusParams *ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"` - Validators []ValidatorUpdate `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` -} - -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_addf585b2317eb36, []int{24} -} -func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseInitChain.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x32 } + return len(dAtA) - i, nil } -func (m *ResponseInitChain) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseInitChain.Merge(m, src) -} -func (m *ResponseInitChain) XXX_Size() int { - return m.Size() -} -func (m *ResponseInitChain) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseInitChain.DiscardUnknown(m) +func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseInitChain proto.InternalMessageInfo - -func (m *ResponseInitChain) GetConsensusParams() *ConsensusParams { - if m != nil { - return m.ConsensusParams +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] = 0x3a } - return nil + return len(dAtA) - i, nil } - -func (m *ResponseInitChain) GetValidators() []ValidatorUpdate { - if m != nil { - return m.Validators - } - return nil +func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseInitChain) GetAppHash() []byte { - if m != nil { - return m.AppHash +func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.CheckTx != nil { + { + size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 } - return nil + return len(dAtA) - i, nil } - -type ResponseQuery struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // bytes data = 2; // use "value" instead. - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` - ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"` - Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` - Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -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_addf585b2317eb36, []int{25} -} -func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseQuery.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +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)) } - return b[:n], nil + i-- + dAtA[i] = 0x4a } + return len(dAtA) - i, nil } -func (m *ResponseQuery) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseQuery.Merge(m, src) -} -func (m *ResponseQuery) XXX_Size() int { - return m.Size() -} -func (m *ResponseQuery) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseQuery.DiscardUnknown(m) +func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo - -func (m *ResponseQuery) GetCode() uint32 { - if m != nil { - return m.Code +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] = 0x52 } - return 0 + return len(dAtA) - i, nil } - -func (m *ResponseQuery) GetLog() string { - if m != nil { - return m.Log - } - return "" +func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseQuery) GetInfo() string { - if m != nil { - return m.Info +func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Commit != nil { + { + size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a } - return "" + return len(dAtA) - i, nil } - -func (m *ResponseQuery) GetIndex() int64 { - if m != nil { - return m.Index - } - return 0 +func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseQuery) GetKey() []byte { - if m != nil { - return m.Key +func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ListSnapshots != nil { + { + size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 } - return nil + return len(dAtA) - i, nil } - -func (m *ResponseQuery) GetValue() []byte { - if m != nil { - return m.Value - } - return nil +func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseQuery) GetProofOps() *crypto.ProofOps { - if m != nil { - return m.ProofOps +func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.OfferSnapshot != nil { + { + size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a } - return nil + return len(dAtA) - i, nil } - -func (m *ResponseQuery) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 +func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseQuery) GetCodespace() string { - if m != nil { - return m.Codespace +func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.LoadSnapshotChunk != nil { + { + size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 } - return "" + return len(dAtA) - i, nil } - -type ResponseBeginBlock struct { - Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` +func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []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 +func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ApplySnapshotChunk != nil { + { + size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x7a } + return len(dAtA) - i, 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) +func (m *Request_BeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo - -func (m *ResponseBeginBlock) GetEvents() []Event { - if m != nil { - return m.Events +func (m *Request_BeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BeginRecheckTx != nil { + { + size, err := m.BeginRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xc2 } - return nil + return len(dAtA) - i, 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 Ostracon. - // ABCI applictions 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 *Request_EndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []int{27} -} -func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Request_EndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.EndRecheckTx != nil { + { + size, err := m.EndRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xca } + return len(dAtA) - i, nil } -func (m *ResponseCheckTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseCheckTx.Merge(m, src) -} -func (m *ResponseCheckTx) XXX_Size() int { - return m.Size() -} -func (m *ResponseCheckTx) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo - -func (m *ResponseCheckTx) GetCode() uint32 { - if m != nil { - return m.Code +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 0 + return dAtA[:n], nil } -func (m *ResponseCheckTx) GetData() []byte { - if m != nil { - return m.Data - } - return nil +func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseCheckTx) GetLog() string { - if m != nil { - return m.Log +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 + } } - return "" -} - -func (m *ResponseCheckTx) GetInfo() string { - if m != nil { - return m.Info + { + size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return "" + 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 *ResponseCheckTx) GetGasWanted() int64 { - if m != nil { - return m.GasWanted +func (m *RequestBeginRecheckTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return 0 + return dAtA[:n], nil } -func (m *ResponseCheckTx) GetGasUsed() int64 { - if m != nil { - return m.GasUsed - } - return 0 +func (m *RequestBeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseCheckTx) GetEvents() []Event { - if m != nil { - return m.Events +func (m *RequestBeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResponseCheckTx) GetCodespace() string { - if m != nil { - return m.Codespace +func (m *RequestEndRecheckTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return "" + return dAtA[:n], nil } -func (m *ResponseCheckTx) GetSender() string { - if m != nil { - return m.Sender - } - return "" +func (m *RequestEndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseCheckTx) GetPriority() int64 { - if m != nil { - return m.Priority +func (m *RequestEndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 } - return 0 + return len(dAtA) - i, nil } -func (m *ResponseCheckTx) GetMempoolError() string { - if m != nil { - return m.MempoolError +func (m *Response) 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 "" + return dAtA[:n], nil } -type ResponseDeliverTx 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"` +func (m *Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []int{28} -} -func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - return b[:n], nil } + return len(dAtA) - i, nil } -func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseDeliverTx.Merge(m, src) -} -func (m *ResponseDeliverTx) XXX_Size() int { - return m.Size() -} -func (m *ResponseDeliverTx) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo -func (m *ResponseDeliverTx) GetCode() uint32 { - if m != nil { - return m.Code - } - return 0 +func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseDeliverTx) GetData() []byte { - if m != nil { - return m.Data +func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Exception != nil { + { + size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return nil + return len(dAtA) - i, nil } - -func (m *ResponseDeliverTx) GetLog() string { - if m != nil { - return m.Log - } - return "" +func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseDeliverTx) GetInfo() string { - if m != nil { - return m.Info +func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Echo != nil { + { + size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return "" + return len(dAtA) - i, nil } - -func (m *ResponseDeliverTx) GetGasWanted() int64 { - if m != nil { - return m.GasWanted - } - return 0 +func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseDeliverTx) GetGasUsed() int64 { - if m != nil { - return m.GasUsed +func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Flush != nil { + { + size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - return 0 + return len(dAtA) - i, nil } - -func (m *ResponseDeliverTx) GetEvents() []Event { - if m != nil { - return m.Events - } - return nil +func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseDeliverTx) GetCodespace() string { - if m != nil { - return m.Codespace +func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Info != nil { + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - return "" + return len(dAtA) - i, nil } - -type ResponseEndBlock struct { - ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"` - ConsensusParamUpdates *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 *Response_SetOption) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []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 +func (m *Response_SetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SetOption != nil { + { + size, err := m.SetOption.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x2a } + return len(dAtA) - i, 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) +func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo - -func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate { - if m != nil { - return m.ValidatorUpdates +func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.InitChain != nil { + { + size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 } - return nil + return len(dAtA) - i, nil } - -func (m *ResponseEndBlock) GetConsensusParamUpdates() *ConsensusParams { - if m != nil { - return m.ConsensusParamUpdates - } - return nil +func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseEndBlock) GetEvents() []Event { - if m != nil { - return m.Events +func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } - return nil + return len(dAtA) - i, nil } - -type ResponseCommit struct { - // reserve 1 - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"` +func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []int{30} -} -func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +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)) } - return b[:n], nil + i-- + dAtA[i] = 0x42 } + return len(dAtA) - i, nil } -func (m *ResponseCommit) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseCommit.Merge(m, src) -} -func (m *ResponseCommit) XXX_Size() int { - return m.Size() -} -func (m *ResponseCommit) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseCommit.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo - -func (m *ResponseCommit) GetData() []byte { - if m != nil { - return m.Data - } - return nil +func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseCommit) GetRetainHeight() int64 { - if m != nil { - return m.RetainHeight +func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.CheckTx != nil { + { + size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a } - return 0 + return len(dAtA) - i, nil } - -type ResponseListSnapshots struct { - Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` +func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []int{31} -} -func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +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)) } - return b[:n], nil + i-- + dAtA[i] = 0x52 } + return len(dAtA) - i, nil } -func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseListSnapshots.Merge(m, src) -} -func (m *ResponseListSnapshots) XXX_Size() int { - return m.Size() -} -func (m *ResponseListSnapshots) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo - -func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot { - if m != nil { - return m.Snapshots - } - return nil -} - -type ResponseOfferSnapshot struct { - Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=ostracon.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"` +func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []int{32} -} -func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +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)) } - return b[:n], nil + i-- + dAtA[i] = 0x5a } + return len(dAtA) - i, nil } -func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src) -} -func (m *ResponseOfferSnapshot) XXX_Size() int { - return m.Size() -} -func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m) +func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo - -func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result { - if m != nil { - return m.Result +func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Commit != nil { + { + size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 } - return ResponseOfferSnapshot_UNKNOWN + return len(dAtA) - i, nil } - -type ResponseLoadSnapshotChunk struct { - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` +func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} } -func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) } -func (*ResponseLoadSnapshotChunk) ProtoMessage() {} -func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{33} -} -func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ListSnapshots != nil { + { + size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x6a } + return len(dAtA) - i, nil } -func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src) -} -func (m *ResponseLoadSnapshotChunk) XXX_Size() int { - return m.Size() -} -func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m) +func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo - -func (m *ResponseLoadSnapshotChunk) GetChunk() []byte { - if m != nil { - return m.Chunk +func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.OfferSnapshot != nil { + { + size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 } - return nil + return len(dAtA) - i, nil } - -type ResponseApplySnapshotChunk struct { - Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=ostracon.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"` - RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"` - RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"` +func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} } -func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) } -func (*ResponseApplySnapshotChunk) ProtoMessage() {} -func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{34} -} -func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.LoadSnapshotChunk != nil { + { + size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x7a } + return len(dAtA) - i, nil } -func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src) -} -func (m *ResponseApplySnapshotChunk) XXX_Size() int { - return m.Size() -} -func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m) +func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo - -func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result { - if m != nil { - return m.Result +func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ApplySnapshotChunk != nil { + { + size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 } - return ResponseApplySnapshotChunk_UNKNOWN + return len(dAtA) - i, nil } - -func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 { - if m != nil { - return m.RefetchChunks - } - return nil +func (m *Response_BeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string { - if m != nil { - return m.RejectSenders +func (m *Response_BeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BeginRecheckTx != nil { + { + size, err := m.BeginRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xc2 } - return nil + return len(dAtA) - i, nil } - -type ResponseBeginRecheckTx struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` +func (m *Response_EndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseBeginRecheckTx) Reset() { *m = ResponseBeginRecheckTx{} } -func (m *ResponseBeginRecheckTx) String() string { return proto.CompactTextString(m) } -func (*ResponseBeginRecheckTx) ProtoMessage() {} -func (*ResponseBeginRecheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{35} -} -func (m *ResponseBeginRecheckTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseBeginRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseBeginRecheckTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Response_EndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.EndRecheckTx != nil { + { + size, err := m.EndRecheckTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xca } + return len(dAtA) - i, nil } -func (m *ResponseBeginRecheckTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseBeginRecheckTx.Merge(m, src) -} -func (m *ResponseBeginRecheckTx) XXX_Size() int { - return m.Size() -} -func (m *ResponseBeginRecheckTx) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseBeginRecheckTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseBeginRecheckTx proto.InternalMessageInfo - -func (m *ResponseBeginRecheckTx) GetCode() uint32 { - if m != nil { - return m.Code +func (m *ResponseCheckTx) 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 0 + return dAtA[:n], nil } -type ResponseEndRecheckTx struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` +func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseEndRecheckTx) Reset() { *m = ResponseEndRecheckTx{} } -func (m *ResponseEndRecheckTx) String() string { return proto.CompactTextString(m) } -func (*ResponseEndRecheckTx) ProtoMessage() {} -func (*ResponseEndRecheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{36} -} -func (m *ResponseEndRecheckTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseEndRecheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseEndRecheckTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MempoolError) > 0 { + i -= len(m.MempoolError) + copy(dAtA[i:], m.MempoolError) + i = encodeVarintTypes(dAtA, i, uint64(len(m.MempoolError))) + i-- + dAtA[i] = 0x5a } -} -func (m *ResponseEndRecheckTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseEndRecheckTx.Merge(m, src) -} -func (m *ResponseEndRecheckTx) XXX_Size() int { - return m.Size() -} -func (m *ResponseEndRecheckTx) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseEndRecheckTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseEndRecheckTx proto.InternalMessageInfo - -func (m *ResponseEndRecheckTx) GetCode() uint32 { - if m != nil { - return m.Code + if m.Priority != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Priority)) + i-- + dAtA[i] = 0x50 } - return 0 -} - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -type ConsensusParams struct { - Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - Evidence *types1.EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *types1.ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` - Version *types1.VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` -} - -func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } -func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } -func (*ConsensusParams) ProtoMessage() {} -func (*ConsensusParams) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{37} -} -func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x4a + } + if len(m.Codespace) > 0 { + i -= len(m.Codespace) + copy(dAtA[i:], m.Codespace) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace))) + i-- + dAtA[i] = 0x42 + } + 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] = 0x3a } - return b[:n], nil } -} -func (m *ConsensusParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusParams.Merge(m, src) -} -func (m *ConsensusParams) XXX_Size() int { - return m.Size() -} -func (m *ConsensusParams) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo - -func (m *ConsensusParams) GetBlock() *BlockParams { - if m != nil { - return m.Block + if m.GasUsed != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 } - return nil -} - -func (m *ConsensusParams) GetEvidence() *types1.EvidenceParams { - if m != nil { - return m.Evidence + if m.GasWanted != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted)) + i-- + dAtA[i] = 0x28 } - return nil -} - -func (m *ConsensusParams) GetValidator() *types1.ValidatorParams { - if m != nil { - return m.Validator + if len(m.Info) > 0 { + i -= len(m.Info) + copy(dAtA[i:], m.Info) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Info))) + i-- + dAtA[i] = 0x22 } - return nil -} - -func (m *ConsensusParams) GetVersion() *types1.VersionParams { - if m != nil { - return m.Version + if len(m.Log) > 0 { + i -= len(m.Log) + copy(dAtA[i:], m.Log) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Log))) + i-- + dAtA[i] = 0x1a } - return nil -} - -// BlockParams contains limits on the block size. -type BlockParams struct { - // Note: must be greater than 0 - MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` - // Note: must be greater or equal to -1 - MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *BlockParams) Reset() { *m = BlockParams{} } -func (m *BlockParams) String() string { return proto.CompactTextString(m) } -func (*BlockParams) ProtoMessage() {} -func (*BlockParams) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{38} -} -func (m *BlockParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *ResponseBeginRecheckTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } -} -func (m *BlockParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockParams.Merge(m, src) -} -func (m *BlockParams) XXX_Size() int { - return m.Size() -} -func (m *BlockParams) XXX_DiscardUnknown() { - xxx_messageInfo_BlockParams.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_BlockParams proto.InternalMessageInfo +func (m *ResponseBeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} -func (m *BlockParams) GetMaxBytes() int64 { - if m != nil { - return m.MaxBytes +func (m *ResponseBeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Code != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 } - return 0 + return len(dAtA) - i, nil } -func (m *BlockParams) GetMaxGas() int64 { - if m != nil { - return m.MaxGas +func (m *ResponseEndRecheckTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return 0 + return dAtA[:n], 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"` +func (m *ResponseEndRecheckTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -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_addf585b2317eb36, []int{39} -} -func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *ResponseEndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Code != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 } -} -func (m *LastCommitInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_LastCommitInfo.Merge(m, src) -} -func (m *LastCommitInfo) XXX_Size() int { - return m.Size() -} -func (m *LastCommitInfo) XXX_DiscardUnknown() { - xxx_messageInfo_LastCommitInfo.DiscardUnknown(m) + return len(dAtA) - i, nil } -var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo - -func (m *LastCommitInfo) GetRound() int32 { - if m != nil { - return m.Round +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return 0 + dAtA[offset] = uint8(v) + return base } - -func (m *LastCommitInfo) GetVotes() []VoteInfo { - if m != nil { - return m.Votes +func (m *Request) Size() (n int) { + if m == nil { + return 0 } - return nil -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -type Event struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() + } + return n } -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_addf585b2317eb36, []int{40} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.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 *Request_Echo) Size() (n int) { + if m == nil { + return 0 } -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *Event) GetType() string { - if m != nil { - return m.Type + var l int + _ = l + if m.Echo != nil { + l = m.Echo.Size() + n += 1 + l + sovTypes(uint64(l)) } - return "" + return n } - -func (m *Event) GetAttributes() []EventAttribute { - if m != nil { - return m.Attributes +func (m *Request_Flush) Size() (n int) { + if m == nil { + return 0 } - return nil -} - -// EventAttribute is a single key-value pair, associated with an event. -type EventAttribute struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` -} - -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_addf585b2317eb36, []int{41} -} -func (m *EventAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + var l int + _ = l + if m.Flush != nil { + l = m.Flush.Size() + n += 1 + l + sovTypes(uint64(l)) } + return n } -func (m *EventAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAttribute.Merge(m, src) -} -func (m *EventAttribute) XXX_Size() int { - return m.Size() -} -func (m *EventAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_EventAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAttribute proto.InternalMessageInfo - -func (m *EventAttribute) GetKey() []byte { - if m != nil { - return m.Key +func (m *Request_Info) Size() (n int) { + if m == nil { + return 0 } - return nil -} - -func (m *EventAttribute) GetValue() []byte { - if m != nil { - return m.Value + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovTypes(uint64(l)) } - return nil + return n } - -func (m *EventAttribute) GetIndex() bool { - if m != nil { - return m.Index +func (m *Request_SetOption) Size() (n int) { + if m == nil { + return 0 } - return false -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -type TxResult struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` - Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` - Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"` -} - -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_addf585b2317eb36, []int{42} -} -func (m *TxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + var l int + _ = l + if m.SetOption != nil { + l = m.SetOption.Size() + n += 1 + l + sovTypes(uint64(l)) } + return n } -func (m *TxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxResult.Merge(m, src) -} -func (m *TxResult) XXX_Size() int { - return m.Size() -} -func (m *TxResult) XXX_DiscardUnknown() { - xxx_messageInfo_TxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_TxResult proto.InternalMessageInfo - -func (m *TxResult) GetHeight() int64 { - if m != nil { - return m.Height +func (m *Request_InitChain) Size() (n int) { + if m == nil { + return 0 } - return 0 -} - -func (m *TxResult) GetIndex() uint32 { - if m != nil { - return m.Index + var l int + _ = l + if m.InitChain != nil { + l = m.InitChain.Size() + n += 1 + l + sovTypes(uint64(l)) } - return 0 + return n } - -func (m *TxResult) GetTx() []byte { - if m != nil { - return m.Tx +func (m *Request_Query) Size() (n int) { + if m == nil { + return 0 } - return nil -} - -func (m *TxResult) GetResult() ResponseDeliverTx { - if m != nil { - return m.Result + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovTypes(uint64(l)) } - return ResponseDeliverTx{} -} - -// Validator -type Validator struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` -} - -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_addf585b2317eb36, []int{43} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return n } -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validator.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 *Request_BeginBlock) Size() (n int) { + if m == nil { + return 0 } -} -func (m *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(m, src) -} -func (m *Validator) XXX_Size() int { - return m.Size() -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -func (m *Validator) GetAddress() []byte { - if m != nil { - return m.Address + var l int + _ = l + if m.BeginBlock != nil { + l = m.BeginBlock.Size() + n += 1 + l + sovTypes(uint64(l)) } - return nil + return n } - -func (m *Validator) GetPower() int64 { - if m != nil { - return m.Power +func (m *Request_CheckTx) Size() (n int) { + if m == nil { + return 0 } - return 0 -} - -// ValidatorUpdate -type ValidatorUpdate struct { - PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"` - Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` -} - -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_addf585b2317eb36, []int{44} -} -func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + var l int + _ = l + if m.CheckTx != nil { + l = m.CheckTx.Size() + n += 1 + l + sovTypes(uint64(l)) } + return n } -func (m *ValidatorUpdate) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorUpdate.Merge(m, src) -} -func (m *ValidatorUpdate) XXX_Size() int { - return m.Size() -} -func (m *ValidatorUpdate) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo - -func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey { - if m != nil { - return m.PubKey +func (m *Request_DeliverTx) Size() (n int) { + if m == nil { + return 0 } - return crypto.PublicKey{} -} - -func (m *ValidatorUpdate) GetPower() int64 { - if m != nil { - return m.Power + var l int + _ = l + if m.DeliverTx != nil { + l = m.DeliverTx.Size() + n += 1 + l + sovTypes(uint64(l)) } - return 0 -} - -// VoteInfo -type VoteInfo struct { - Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` - SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"` -} - -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_addf585b2317eb36, []int{45} -} -func (m *VoteInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return n } -func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VoteInfo.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 *Request_EndBlock) Size() (n int) { + if m == nil { + return 0 } -} -func (m *VoteInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoteInfo.Merge(m, src) -} -func (m *VoteInfo) XXX_Size() int { - return m.Size() -} -func (m *VoteInfo) XXX_DiscardUnknown() { - xxx_messageInfo_VoteInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_VoteInfo proto.InternalMessageInfo - -func (m *VoteInfo) GetValidator() Validator { - if m != nil { - return m.Validator + var l int + _ = l + if m.EndBlock != nil { + l = m.EndBlock.Size() + n += 1 + l + sovTypes(uint64(l)) } - return Validator{} + return n } - -func (m *VoteInfo) GetSignedLastBlock() bool { - if m != nil { - return m.SignedLastBlock +func (m *Request_Commit) Size() (n int) { + if m == nil { + return 0 } - return false -} - -type Evidence struct { - Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=ostracon.abci.EvidenceType" json:"type,omitempty"` - // The offending validator - Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"` - // The height when the offense occurred - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - // The corresponding time where the offense occurred - Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` -} - -func (m *Evidence) Reset() { *m = Evidence{} } -func (m *Evidence) String() string { return proto.CompactTextString(m) } -func (*Evidence) ProtoMessage() {} -func (*Evidence) Descriptor() ([]byte, []int) { - return fileDescriptor_addf585b2317eb36, []int{46} -} -func (m *Evidence) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + var l int + _ = l + if m.Commit != nil { + l = m.Commit.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n } -func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Evidence.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 *Request_ListSnapshots) Size() (n int) { + if m == nil { + return 0 } -} -func (m *Evidence) XXX_Merge(src proto.Message) { - xxx_messageInfo_Evidence.Merge(m, src) -} -func (m *Evidence) XXX_Size() int { - return m.Size() -} -func (m *Evidence) XXX_DiscardUnknown() { - xxx_messageInfo_Evidence.DiscardUnknown(m) -} - -var xxx_messageInfo_Evidence proto.InternalMessageInfo - -func (m *Evidence) GetType() EvidenceType { - if m != nil { - return m.Type + var l int + _ = l + if m.ListSnapshots != nil { + l = m.ListSnapshots.Size() + n += 1 + l + sovTypes(uint64(l)) } - return EvidenceType_UNKNOWN + return n } - -func (m *Evidence) GetValidator() Validator { - if m != nil { - return m.Validator +func (m *Request_OfferSnapshot) Size() (n int) { + if m == nil { + return 0 } - return Validator{} -} - -func (m *Evidence) GetHeight() int64 { - if m != nil { - return m.Height + var l int + _ = l + if m.OfferSnapshot != nil { + l = m.OfferSnapshot.Size() + n += 1 + l + sovTypes(uint64(l)) } - return 0 + return n } - -func (m *Evidence) GetTime() time.Time { - if m != nil { - return m.Time +func (m *Request_LoadSnapshotChunk) Size() (n int) { + if m == nil { + return 0 } - return time.Time{} -} - -func (m *Evidence) GetTotalVotingPower() int64 { - if m != nil { - return m.TotalVotingPower + var l int + _ = l + if m.LoadSnapshotChunk != nil { + l = m.LoadSnapshotChunk.Size() + n += 1 + l + sovTypes(uint64(l)) } - return 0 -} - -type Snapshot struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` - Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -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_addf585b2317eb36, []int{47} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return n } -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Snapshot.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 *Request_ApplySnapshotChunk) Size() (n int) { + if m == nil { + return 0 } -} -func (m *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(m, src) -} -func (m *Snapshot) XXX_Size() int { - return m.Size() -} -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) -} - -var xxx_messageInfo_Snapshot proto.InternalMessageInfo - -func (m *Snapshot) GetHeight() uint64 { - if m != nil { - return m.Height + var l int + _ = l + if m.ApplySnapshotChunk != nil { + l = m.ApplySnapshotChunk.Size() + n += 1 + l + sovTypes(uint64(l)) } - return 0 + return n } - -func (m *Snapshot) GetFormat() uint32 { - if m != nil { - return m.Format +func (m *Request_BeginRecheckTx) Size() (n int) { + if m == nil { + return 0 } - return 0 -} - -func (m *Snapshot) GetChunks() uint32 { - if m != nil { - return m.Chunks + var l int + _ = l + if m.BeginRecheckTx != nil { + l = m.BeginRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) } - return 0 + return n } - -func (m *Snapshot) GetHash() []byte { - if m != nil { - return m.Hash +func (m *Request_EndRecheckTx) Size() (n int) { + if m == nil { + return 0 } - return nil -} - -func (m *Snapshot) GetMetadata() []byte { - if m != nil { - return m.Metadata + var l int + _ = l + if m.EndRecheckTx != nil { + l = m.EndRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) } - return nil -} - -func init() { - proto.RegisterEnum("ostracon.abci.CheckTxType", CheckTxType_name, CheckTxType_value) - proto.RegisterEnum("ostracon.abci.EvidenceType", EvidenceType_name, EvidenceType_value) - proto.RegisterEnum("ostracon.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value) - proto.RegisterEnum("ostracon.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value) - proto.RegisterType((*Request)(nil), "ostracon.abci.Request") - proto.RegisterType((*RequestEcho)(nil), "ostracon.abci.RequestEcho") - proto.RegisterType((*RequestFlush)(nil), "ostracon.abci.RequestFlush") - proto.RegisterType((*RequestInfo)(nil), "ostracon.abci.RequestInfo") - proto.RegisterType((*RequestSetOption)(nil), "ostracon.abci.RequestSetOption") - proto.RegisterType((*RequestInitChain)(nil), "ostracon.abci.RequestInitChain") - proto.RegisterType((*RequestQuery)(nil), "ostracon.abci.RequestQuery") - proto.RegisterType((*RequestBeginBlock)(nil), "ostracon.abci.RequestBeginBlock") - proto.RegisterType((*RequestCheckTx)(nil), "ostracon.abci.RequestCheckTx") - proto.RegisterType((*RequestDeliverTx)(nil), "ostracon.abci.RequestDeliverTx") - proto.RegisterType((*RequestEndBlock)(nil), "ostracon.abci.RequestEndBlock") - proto.RegisterType((*RequestCommit)(nil), "ostracon.abci.RequestCommit") - proto.RegisterType((*RequestListSnapshots)(nil), "ostracon.abci.RequestListSnapshots") - proto.RegisterType((*RequestOfferSnapshot)(nil), "ostracon.abci.RequestOfferSnapshot") - proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "ostracon.abci.RequestLoadSnapshotChunk") - proto.RegisterType((*RequestApplySnapshotChunk)(nil), "ostracon.abci.RequestApplySnapshotChunk") - proto.RegisterType((*RequestBeginRecheckTx)(nil), "ostracon.abci.RequestBeginRecheckTx") - proto.RegisterType((*RequestEndRecheckTx)(nil), "ostracon.abci.RequestEndRecheckTx") - proto.RegisterType((*Response)(nil), "ostracon.abci.Response") - proto.RegisterType((*ResponseException)(nil), "ostracon.abci.ResponseException") - proto.RegisterType((*ResponseEcho)(nil), "ostracon.abci.ResponseEcho") - proto.RegisterType((*ResponseFlush)(nil), "ostracon.abci.ResponseFlush") - proto.RegisterType((*ResponseInfo)(nil), "ostracon.abci.ResponseInfo") - proto.RegisterType((*ResponseSetOption)(nil), "ostracon.abci.ResponseSetOption") - proto.RegisterType((*ResponseInitChain)(nil), "ostracon.abci.ResponseInitChain") - proto.RegisterType((*ResponseQuery)(nil), "ostracon.abci.ResponseQuery") - proto.RegisterType((*ResponseBeginBlock)(nil), "ostracon.abci.ResponseBeginBlock") - proto.RegisterType((*ResponseCheckTx)(nil), "ostracon.abci.ResponseCheckTx") - proto.RegisterType((*ResponseDeliverTx)(nil), "ostracon.abci.ResponseDeliverTx") - proto.RegisterType((*ResponseEndBlock)(nil), "ostracon.abci.ResponseEndBlock") - proto.RegisterType((*ResponseCommit)(nil), "ostracon.abci.ResponseCommit") - proto.RegisterType((*ResponseListSnapshots)(nil), "ostracon.abci.ResponseListSnapshots") - proto.RegisterType((*ResponseOfferSnapshot)(nil), "ostracon.abci.ResponseOfferSnapshot") - proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "ostracon.abci.ResponseLoadSnapshotChunk") - proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "ostracon.abci.ResponseApplySnapshotChunk") - proto.RegisterType((*ResponseBeginRecheckTx)(nil), "ostracon.abci.ResponseBeginRecheckTx") - proto.RegisterType((*ResponseEndRecheckTx)(nil), "ostracon.abci.ResponseEndRecheckTx") - proto.RegisterType((*ConsensusParams)(nil), "ostracon.abci.ConsensusParams") - proto.RegisterType((*BlockParams)(nil), "ostracon.abci.BlockParams") - proto.RegisterType((*LastCommitInfo)(nil), "ostracon.abci.LastCommitInfo") - proto.RegisterType((*Event)(nil), "ostracon.abci.Event") - proto.RegisterType((*EventAttribute)(nil), "ostracon.abci.EventAttribute") - proto.RegisterType((*TxResult)(nil), "ostracon.abci.TxResult") - proto.RegisterType((*Validator)(nil), "ostracon.abci.Validator") - proto.RegisterType((*ValidatorUpdate)(nil), "ostracon.abci.ValidatorUpdate") - proto.RegisterType((*VoteInfo)(nil), "ostracon.abci.VoteInfo") - proto.RegisterType((*Evidence)(nil), "ostracon.abci.Evidence") - proto.RegisterType((*Snapshot)(nil), "ostracon.abci.Snapshot") -} - -func init() { proto.RegisterFile("ostracon/abci/types.proto", fileDescriptor_addf585b2317eb36) } - -var fileDescriptor_addf585b2317eb36 = []byte{ - // 2914 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0xe3, 0xc6, - 0x11, 0xe6, 0xfb, 0xd1, 0x12, 0x29, 0x6a, 0x56, 0xde, 0xe5, 0x62, 0x6d, 0x69, 0x83, 0x8d, 0x63, - 0x7b, 0x63, 0x4b, 0xf6, 0xae, 0x63, 0xc7, 0x76, 0xec, 0x98, 0xe2, 0xd2, 0xa6, 0x22, 0xad, 0xa4, - 0x85, 0x68, 0xb9, 0xfc, 0x0a, 0x0c, 0x92, 0x23, 0x12, 0x59, 0x12, 0x80, 0x81, 0xa1, 0x2c, 0xe5, - 0x98, 0x54, 0xaa, 0x52, 0x3e, 0xb9, 0x2a, 0x55, 0xb9, 0xf9, 0x7f, 0xe4, 0x90, 0xaa, 0x1c, 0xe3, - 0xa3, 0x8f, 0xa9, 0x1c, 0x9c, 0x94, 0xf7, 0x90, 0xc7, 0x3d, 0x95, 0xca, 0x25, 0x49, 0xcd, 0x03, - 0x4f, 0x01, 0x20, 0xd7, 0xce, 0x2d, 0x37, 0x4c, 0xa3, 0xbb, 0x81, 0x99, 0xe9, 0xf9, 0xfa, 0xeb, - 0x06, 0xe0, 0xaa, 0xe9, 0x10, 0x5b, 0x1b, 0x98, 0xc6, 0x96, 0xd6, 0x1f, 0xe8, 0x5b, 0xe4, 0xdc, - 0xc2, 0xce, 0xa6, 0x65, 0x9b, 0xc4, 0x44, 0x35, 0xf7, 0xd6, 0x26, 0xbd, 0x25, 0x5d, 0xf3, 0x34, - 0x07, 0xf6, 0xb9, 0x45, 0xcc, 0x2d, 0xcb, 0x36, 0xcd, 0x13, 0xae, 0x2b, 0x49, 0xde, 0x4d, 0xe6, - 0x21, 0xe8, 0x27, 0x70, 0x4f, 0x18, 0xde, 0xc7, 0xe7, 0xee, 0xbd, 0x6b, 0x11, 0x3b, 0x4b, 0xb3, - 0xb5, 0xa9, 0x7b, 0x73, 0x63, 0x64, 0x9a, 0xa3, 0x09, 0xde, 0x62, 0xa3, 0xfe, 0xec, 0x64, 0x8b, - 0xe8, 0x53, 0xec, 0x10, 0x6d, 0x6a, 0x09, 0x85, 0xb5, 0x91, 0x39, 0x32, 0xd9, 0xe5, 0x16, 0xbd, - 0xe2, 0x52, 0xf9, 0x57, 0x55, 0x28, 0x2b, 0xf8, 0xa3, 0x19, 0x76, 0x08, 0x7a, 0x16, 0x0a, 0x78, - 0x30, 0x36, 0x9b, 0xd9, 0xeb, 0xd9, 0x27, 0x97, 0x6e, 0x49, 0x9b, 0xa1, 0x29, 0x6d, 0x0a, 0xad, - 0xce, 0x60, 0x6c, 0x76, 0x33, 0x0a, 0xd3, 0x44, 0xb7, 0xa1, 0x78, 0x32, 0x99, 0x39, 0xe3, 0x66, - 0x8e, 0x99, 0x5c, 0x8b, 0x37, 0x79, 0x83, 0xaa, 0x74, 0x33, 0x0a, 0xd7, 0xa5, 0x8f, 0xd1, 0x8d, - 0x13, 0xb3, 0x99, 0x4f, 0x7b, 0xcc, 0x8e, 0x71, 0xc2, 0x1e, 0x43, 0x35, 0xd1, 0xeb, 0x00, 0x0e, - 0x26, 0xaa, 0x69, 0x11, 0xdd, 0x34, 0x9a, 0x05, 0x66, 0xb7, 0x11, 0x6f, 0x77, 0x84, 0xc9, 0x01, - 0x53, 0xeb, 0x66, 0x94, 0xaa, 0xe3, 0x0e, 0xa8, 0x07, 0xdd, 0xd0, 0x89, 0x3a, 0x18, 0x6b, 0xba, - 0xd1, 0x2c, 0xa6, 0x79, 0xd8, 0x31, 0x74, 0xd2, 0xa6, 0x6a, 0xd4, 0x83, 0xee, 0x0e, 0xe8, 0x54, - 0x3f, 0x9a, 0x61, 0xfb, 0xbc, 0x59, 0x4a, 0x9b, 0xea, 0x3d, 0xaa, 0x42, 0xa7, 0xca, 0x74, 0x51, - 0x1b, 0x96, 0xfa, 0x78, 0xa4, 0x1b, 0x6a, 0x7f, 0x62, 0x0e, 0xee, 0x37, 0xcb, 0xcc, 0xf4, 0x7a, - 0xbc, 0xe9, 0x36, 0x55, 0xdc, 0xa6, 0x7a, 0xdd, 0x8c, 0x02, 0x7d, 0x6f, 0x84, 0x5e, 0x86, 0xca, - 0x60, 0x8c, 0x07, 0xf7, 0x55, 0x72, 0xd6, 0xac, 0x30, 0x0f, 0x8f, 0xc5, 0x7b, 0x68, 0x53, 0xad, - 0xde, 0x59, 0x37, 0xa3, 0x94, 0x07, 0xfc, 0x92, 0xce, 0x7b, 0x88, 0x27, 0xfa, 0x29, 0xb6, 0xa9, - 0x75, 0x35, 0x6d, 0xde, 0x77, 0xb8, 0x1e, 0xb3, 0xaf, 0x0e, 0xdd, 0x01, 0x7a, 0x15, 0xaa, 0xd8, - 0x18, 0x8a, 0x09, 0x00, 0x73, 0xb0, 0x9e, 0x10, 0x19, 0xc6, 0xd0, 0x7d, 0xfd, 0x0a, 0x16, 0xd7, - 0xe8, 0x05, 0x28, 0x0d, 0xcc, 0xe9, 0x54, 0x27, 0xcd, 0x25, 0x66, 0xfb, 0x68, 0xc2, 0xab, 0x33, - 0x9d, 0x6e, 0x46, 0x11, 0xda, 0x68, 0x0f, 0xea, 0x13, 0xdd, 0x21, 0xaa, 0x63, 0x68, 0x96, 0x33, - 0x36, 0x89, 0xd3, 0x5c, 0x66, 0xf6, 0x37, 0xe2, 0xed, 0xf7, 0x74, 0x87, 0x1c, 0xb9, 0xaa, 0xdd, - 0x8c, 0x52, 0x9b, 0x04, 0x05, 0xd4, 0x9b, 0x79, 0x72, 0x82, 0x6d, 0xcf, 0x5d, 0xb3, 0x96, 0xe6, - 0xed, 0x80, 0xea, 0xba, 0xd6, 0xd4, 0x9b, 0x19, 0x14, 0xa0, 0x77, 0xe0, 0xd2, 0xc4, 0xd4, 0x86, - 0x9e, 0x33, 0x75, 0x30, 0x9e, 0x19, 0xf7, 0x9b, 0x75, 0xe6, 0xf2, 0x89, 0x84, 0x17, 0x34, 0xb5, - 0xa1, 0xeb, 0xa0, 0x4d, 0xd5, 0xbb, 0x19, 0x65, 0x75, 0x12, 0x15, 0xa2, 0xf7, 0x61, 0x4d, 0xb3, - 0xac, 0xc9, 0x79, 0xd4, 0xf7, 0x0a, 0xf3, 0xfd, 0x64, 0xbc, 0xef, 0x16, 0xb5, 0x88, 0x3a, 0x47, - 0xda, 0x05, 0x29, 0xba, 0x07, 0x0d, 0x1e, 0x8e, 0x36, 0xf6, 0x22, 0xea, 0xaf, 0x3c, 0x28, 0xbf, - 0x9d, 0x12, 0x94, 0x0a, 0x1e, 0x78, 0x91, 0x55, 0xef, 0x87, 0x24, 0x68, 0x17, 0xea, 0x34, 0x3c, - 0x02, 0x0e, 0xff, 0xc6, 0x1d, 0xca, 0x89, 0x41, 0x12, 0x74, 0xb7, 0x8c, 0x03, 0xe3, 0xed, 0x32, - 0x14, 0x4f, 0xb5, 0xc9, 0x0c, 0xcb, 0x4f, 0xc0, 0x52, 0x00, 0x6e, 0x50, 0x13, 0xca, 0x53, 0xec, - 0x38, 0xda, 0x08, 0x33, 0x6c, 0xaa, 0x2a, 0xee, 0x50, 0xae, 0xc3, 0x72, 0x10, 0x64, 0xe4, 0xa9, - 0x67, 0x48, 0x01, 0x84, 0x1a, 0x9e, 0x62, 0xdb, 0xa1, 0xa8, 0x21, 0x0c, 0xc5, 0x10, 0xdd, 0x80, - 0x1a, 0x0b, 0x69, 0xd5, 0xbd, 0x4f, 0x11, 0xac, 0xa0, 0x2c, 0x33, 0xe1, 0xb1, 0x50, 0xda, 0x80, - 0x25, 0xeb, 0x96, 0xe5, 0xa9, 0xe4, 0x99, 0x0a, 0x58, 0xb7, 0x2c, 0xa1, 0x20, 0xbf, 0x0c, 0x8d, - 0x28, 0xee, 0xa0, 0x06, 0xe4, 0xef, 0xe3, 0x73, 0xf1, 0x3c, 0x7a, 0x89, 0xd6, 0xc4, 0xb4, 0xd8, - 0x33, 0xaa, 0x8a, 0x98, 0xe3, 0xef, 0x73, 0x9e, 0xb1, 0x07, 0x39, 0xe8, 0xfb, 0x50, 0xa0, 0xb8, - 0xed, 0x41, 0x30, 0x07, 0xf5, 0x4d, 0x17, 0xd4, 0x37, 0x7b, 0x2e, 0xa8, 0x6f, 0x57, 0x3e, 0xff, - 0x72, 0x23, 0xf3, 0xe9, 0x9f, 0x36, 0xb2, 0x0a, 0xb3, 0x40, 0x57, 0x29, 0x4a, 0x68, 0xba, 0xa1, - 0xea, 0x43, 0xf1, 0x9c, 0x32, 0x1b, 0xef, 0x0c, 0xd1, 0x0e, 0x34, 0x06, 0xa6, 0xe1, 0x60, 0xc3, - 0x99, 0x39, 0x2a, 0x4f, 0x1a, 0x02, 0x7c, 0xa3, 0x27, 0xb9, 0xed, 0xaa, 0x1d, 0x32, 0x2d, 0x65, - 0x65, 0x10, 0x16, 0xa0, 0x3b, 0x00, 0xa7, 0xda, 0x44, 0x1f, 0x6a, 0xc4, 0xb4, 0x9d, 0x66, 0xe1, - 0x7a, 0x3e, 0xc6, 0xc9, 0xb1, 0xab, 0xf0, 0x96, 0x35, 0xd4, 0x08, 0xde, 0x2e, 0xd0, 0x37, 0x55, - 0x02, 0x76, 0xe8, 0x3b, 0xb0, 0xa2, 0x59, 0x96, 0xea, 0x10, 0x8d, 0x60, 0xb5, 0x7f, 0x4e, 0xb0, - 0xc3, 0x20, 0x79, 0x59, 0xa9, 0x69, 0x96, 0x75, 0x44, 0xa5, 0xdb, 0x54, 0x88, 0x1e, 0x87, 0x3a, - 0x05, 0x60, 0x5d, 0x9b, 0xa8, 0x63, 0xac, 0x8f, 0xc6, 0x84, 0x81, 0x6f, 0x5e, 0xa9, 0x09, 0x69, - 0x97, 0x09, 0xe5, 0xa1, 0x17, 0x04, 0x0c, 0x7e, 0x11, 0x82, 0xc2, 0x50, 0x23, 0x1a, 0x5b, 0xc4, - 0x65, 0x85, 0x5d, 0x53, 0x99, 0xa5, 0x91, 0xb1, 0x58, 0x1a, 0x76, 0x8d, 0x2e, 0x43, 0x49, 0xb8, - 0xcd, 0x33, 0xb7, 0x62, 0x44, 0xf7, 0xcb, 0xb2, 0xcd, 0x53, 0xcc, 0x32, 0x4d, 0x45, 0xe1, 0x03, - 0xf9, 0xdf, 0x59, 0x58, 0xbd, 0x00, 0xd5, 0xd4, 0xef, 0x58, 0x73, 0xc6, 0xee, 0xb3, 0xe8, 0x35, - 0x7a, 0x9e, 0xfa, 0xd5, 0x86, 0xd8, 0x16, 0x69, 0xf1, 0xb2, 0xbf, 0x40, 0x3c, 0xd5, 0x77, 0xd9, - 0x5d, 0xb1, 0x30, 0x42, 0x17, 0xdd, 0x85, 0xc6, 0x44, 0x73, 0x88, 0xca, 0x01, 0x50, 0x0d, 0xa4, - 0xc8, 0x28, 0xdc, 0xef, 0x69, 0x2e, 0x60, 0xd2, 0x20, 0x17, 0x6e, 0xea, 0x93, 0x90, 0x14, 0x1d, - 0xc2, 0x5a, 0xff, 0xfc, 0xa7, 0x9a, 0x41, 0x74, 0x03, 0xab, 0x17, 0xf6, 0xec, 0x4a, 0xc4, 0x65, - 0xe7, 0x54, 0x1f, 0x62, 0x63, 0xe0, 0x6e, 0xd6, 0x25, 0xcf, 0xd4, 0xdb, 0x4c, 0x47, 0x3e, 0x84, - 0x7a, 0x38, 0xd1, 0xa0, 0x3a, 0xe4, 0xc8, 0x99, 0x98, 0x7a, 0x8e, 0x9c, 0xa1, 0x4d, 0x28, 0xd0, - 0x09, 0xb2, 0x69, 0xd7, 0x2f, 0x64, 0x76, 0x61, 0xd5, 0x3b, 0xb7, 0xb0, 0xc2, 0xf4, 0x64, 0xd9, - 0x3b, 0x01, 0x5e, 0xf2, 0x89, 0xfa, 0x94, 0x9f, 0x82, 0x95, 0x48, 0x7e, 0x09, 0xec, 0x5b, 0x36, - 0xb8, 0x6f, 0xf2, 0x0a, 0xd4, 0x42, 0xe9, 0x44, 0xbe, 0x0c, 0x6b, 0x71, 0xf9, 0x41, 0x3e, 0xf1, - 0xe4, 0x21, 0xa4, 0x47, 0xb7, 0xa1, 0xe2, 0x25, 0x08, 0x7e, 0x02, 0xa3, 0xeb, 0xe4, 0xaa, 0x2a, - 0x9e, 0x22, 0x3d, 0x78, 0x34, 0x98, 0x59, 0x14, 0xe4, 0xd8, 0x6b, 0x97, 0x35, 0xcb, 0xea, 0x6a, - 0xce, 0x58, 0xfe, 0x10, 0x9a, 0x49, 0xf0, 0x1f, 0x99, 0x44, 0xc1, 0x0b, 0xbe, 0xcb, 0x50, 0x3a, - 0x31, 0xed, 0xa9, 0x46, 0x98, 0xb3, 0x9a, 0x22, 0x46, 0x34, 0x28, 0x79, 0x2a, 0xc8, 0x33, 0x31, - 0x1f, 0xc8, 0x2a, 0x5c, 0x4d, 0x4c, 0x02, 0xd4, 0x44, 0x37, 0x86, 0x98, 0xaf, 0x66, 0x4d, 0xe1, - 0x03, 0xdf, 0x11, 0x7f, 0x59, 0x3e, 0xa0, 0x8f, 0x75, 0xb0, 0x41, 0x63, 0x36, 0xcf, 0x4e, 0x88, - 0x18, 0xc9, 0x77, 0xe1, 0x91, 0xd8, 0x54, 0x10, 0x08, 0xf2, 0xec, 0xe2, 0x41, 0x2e, 0x3f, 0x03, - 0x97, 0x62, 0x12, 0x41, 0xe2, 0x8e, 0xfe, 0xa5, 0x0a, 0x15, 0x05, 0x3b, 0x16, 0x45, 0x21, 0xf4, - 0x3a, 0x54, 0xf1, 0xd9, 0x00, 0x73, 0x12, 0x98, 0x4d, 0xa0, 0x52, 0x5c, 0xb7, 0xe3, 0xea, 0x51, - 0x2e, 0xe3, 0x19, 0xa1, 0xe7, 0x04, 0xc1, 0x4d, 0x62, 0xab, 0xc2, 0x38, 0xc8, 0x70, 0x9f, 0x77, - 0x19, 0x6e, 0x3e, 0x81, 0xbe, 0x70, 0x9b, 0x08, 0xc5, 0x7d, 0x4e, 0x50, 0xdc, 0x42, 0xea, 0x83, - 0x42, 0x1c, 0xb7, 0x15, 0xe2, 0xb8, 0xc5, 0xd4, 0xe9, 0x25, 0x90, 0xdc, 0x56, 0x88, 0xe4, 0x96, - 0x52, 0x5d, 0x24, 0xb0, 0xdc, 0xe7, 0x5d, 0x96, 0x5b, 0x4e, 0x9d, 0x6e, 0x84, 0xe6, 0xde, 0x09, - 0xd3, 0x5c, 0x4e, 0x52, 0xbf, 0x95, 0x60, 0x9b, 0xc8, 0x73, 0x5f, 0x09, 0xf0, 0xdc, 0x6a, 0x02, - 0xd1, 0xe4, 0x2e, 0x62, 0x88, 0x6e, 0x2b, 0x44, 0x74, 0x21, 0x75, 0xee, 0x09, 0x4c, 0xf7, 0xb5, - 0x20, 0xd3, 0x5d, 0x4a, 0xa0, 0xca, 0x22, 0x44, 0xe2, 0xa8, 0xee, 0x8b, 0x1e, 0xd5, 0x5d, 0x4e, - 0x60, 0xe9, 0xe2, 0xed, 0xa3, 0x5c, 0xf7, 0xee, 0x05, 0xae, 0x5b, 0x4b, 0xe0, 0x64, 0xdc, 0xc1, - 0x1c, 0xb2, 0x7b, 0xf7, 0x02, 0xd9, 0xad, 0xa7, 0xba, 0x9b, 0xc3, 0x76, 0xdf, 0x8d, 0x67, 0xbb, - 0x49, 0x8c, 0x54, 0xbc, 0xe2, 0x62, 0x74, 0xf7, 0x83, 0x04, 0xba, 0xdb, 0x60, 0xce, 0x9f, 0x4a, - 0x70, 0xbe, 0x30, 0xdf, 0x55, 0x92, 0xf9, 0xee, 0xe3, 0x69, 0xd1, 0x99, 0x46, 0x78, 0xf7, 0x92, - 0x08, 0xef, 0x8d, 0xe4, 0x58, 0x59, 0x80, 0xf1, 0x3e, 0x45, 0xc9, 0x45, 0x04, 0xbc, 0x28, 0x54, - 0x63, 0xdb, 0x36, 0x6d, 0x41, 0x26, 0xf9, 0x40, 0x7e, 0x92, 0xd2, 0x1d, 0x1f, 0xaa, 0x52, 0xd8, - 0x31, 0x4b, 0x88, 0x01, 0x80, 0x92, 0x7f, 0x93, 0xf5, 0x6d, 0x19, 0x4b, 0x08, 0x52, 0xa5, 0xaa, - 0xa0, 0x4a, 0x01, 0xd2, 0x9c, 0x0b, 0x93, 0xe6, 0x0d, 0x58, 0xa2, 0xa9, 0x2e, 0xc2, 0x87, 0x35, - 0xcb, 0xe5, 0xc3, 0xe8, 0x26, 0xac, 0x32, 0x0e, 0xc3, 0xa9, 0xb5, 0x80, 0xf4, 0x02, 0x83, 0xf4, - 0x15, 0x7a, 0x83, 0x1f, 0x1a, 0x9e, 0xe8, 0x9e, 0x81, 0x4b, 0x01, 0x5d, 0x2f, 0x85, 0x72, 0x22, - 0xd8, 0xf0, 0xb4, 0x5b, 0x22, 0x97, 0xde, 0xf5, 0x17, 0xc8, 0xe7, 0xda, 0x08, 0x0a, 0x03, 0x73, - 0x88, 0x45, 0x82, 0x63, 0xd7, 0x94, 0x7f, 0x4f, 0xcc, 0x91, 0x48, 0x63, 0xf4, 0x92, 0x6a, 0x79, - 0x68, 0x5c, 0xe5, 0x70, 0x2b, 0xff, 0x2e, 0xeb, 0xfb, 0xf3, 0xe9, 0x77, 0x1c, 0x53, 0xce, 0xfe, - 0x2f, 0x98, 0x72, 0xee, 0x6b, 0x32, 0xe5, 0x20, 0xb9, 0xc8, 0x87, 0xc9, 0xc5, 0x3f, 0xb2, 0xfe, - 0xee, 0x7a, 0xbc, 0xf7, 0xeb, 0xad, 0x86, 0xcf, 0x14, 0x8a, 0x6c, 0xaf, 0x04, 0x53, 0x10, 0x95, - 0x4c, 0x89, 0x3d, 0x37, 0x5c, 0xc9, 0x94, 0x39, 0x77, 0x60, 0x03, 0xf4, 0x02, 0x54, 0x59, 0x7b, - 0x4b, 0x35, 0x2d, 0x47, 0x80, 0xff, 0x55, 0x7f, 0xa6, 0xbc, 0x8f, 0xb5, 0x79, 0x48, 0x35, 0x0e, - 0x2c, 0x47, 0xa9, 0x58, 0xe2, 0x2a, 0x90, 0xf5, 0xab, 0x21, 0xfe, 0xfd, 0x28, 0x54, 0xe9, 0xbb, - 0x3b, 0x96, 0x36, 0xc0, 0x0c, 0xca, 0xab, 0x8a, 0x2f, 0x90, 0xdf, 0x07, 0x74, 0x31, 0x95, 0xa0, - 0x37, 0xa0, 0x84, 0x4f, 0xb1, 0x41, 0xe8, 0x7e, 0xd1, 0xa5, 0x5e, 0xbb, 0x40, 0x70, 0xb1, 0x41, - 0xb6, 0x9b, 0x74, 0x81, 0xff, 0xfe, 0xe5, 0x46, 0x83, 0xeb, 0x3e, 0x6d, 0x4e, 0x75, 0x82, 0xa7, - 0x16, 0x39, 0x57, 0x84, 0xb5, 0xfc, 0xc7, 0x1c, 0xe5, 0x9b, 0xa1, 0x34, 0x13, 0xbb, 0xae, 0xee, - 0xc1, 0xc9, 0x05, 0x6a, 0x8c, 0xc5, 0xd6, 0x7a, 0x1d, 0x60, 0xa4, 0x39, 0xea, 0xc7, 0x9a, 0x41, - 0xf0, 0x50, 0x2c, 0x78, 0x40, 0x82, 0x24, 0xa8, 0xd0, 0xd1, 0xcc, 0xc1, 0x43, 0x51, 0xee, 0x78, - 0xe3, 0xc0, 0x2c, 0xcb, 0xdf, 0x64, 0x96, 0xe1, 0x15, 0xae, 0x44, 0x56, 0x38, 0xc0, 0x05, 0xab, - 0x41, 0x2e, 0x48, 0xdf, 0xcc, 0xb2, 0x75, 0xd3, 0xd6, 0xc9, 0x39, 0xdb, 0x96, 0xbc, 0xe2, 0x8d, - 0x69, 0x3d, 0x3d, 0xc5, 0x53, 0xcb, 0x34, 0x27, 0x2a, 0x87, 0xac, 0x25, 0x66, 0xba, 0x2c, 0x84, - 0x1d, 0x86, 0x5c, 0x3f, 0xcf, 0xf9, 0x87, 0xce, 0x67, 0xfc, 0xff, 0x67, 0xcb, 0x2b, 0xff, 0x82, - 0x15, 0xfe, 0x61, 0x22, 0x81, 0xee, 0xc1, 0xaa, 0x77, 0xec, 0xd5, 0x19, 0x83, 0x03, 0x37, 0x94, - 0x17, 0x43, 0x8d, 0xc6, 0x69, 0x58, 0xec, 0xa0, 0x63, 0xb8, 0x12, 0x01, 0x33, 0xcf, 0x71, 0x6e, - 0x21, 0x4c, 0x7b, 0x24, 0x8c, 0x69, 0xae, 0x5f, 0x7f, 0x95, 0xf2, 0xdf, 0xe8, 0xa8, 0xed, 0xd0, - 0x7a, 0x32, 0x48, 0x89, 0x62, 0x77, 0xfd, 0x06, 0xd4, 0x6c, 0x4c, 0x34, 0xdd, 0x50, 0x43, 0xb5, - 0xfa, 0x32, 0x17, 0x8a, 0x0e, 0xc0, 0x3e, 0xad, 0x52, 0x62, 0xc8, 0x11, 0xfa, 0x1e, 0x54, 0x7d, - 0x56, 0x95, 0x8d, 0x2d, 0x7d, 0xbd, 0x92, 0xce, 0xd7, 0x94, 0x7f, 0x9b, 0xf5, 0x1d, 0x86, 0x4b, - 0xc4, 0x36, 0x94, 0x6c, 0xec, 0xcc, 0x26, 0xbc, 0x52, 0xa9, 0xdf, 0xfa, 0xee, 0x22, 0xa4, 0x8a, - 0x4a, 0x67, 0x13, 0xa2, 0x08, 0x53, 0xf9, 0xc7, 0x50, 0xe2, 0x12, 0xb4, 0x04, 0xe5, 0xb7, 0xf6, - 0x77, 0xf7, 0x0f, 0xde, 0xde, 0x6f, 0x64, 0x10, 0x40, 0xa9, 0xd5, 0x6e, 0x77, 0x0e, 0x7b, 0x8d, - 0x2c, 0xaa, 0x42, 0xb1, 0xb5, 0x7d, 0xa0, 0xf4, 0x1a, 0x39, 0x2a, 0x56, 0x3a, 0x3f, 0xea, 0xb4, - 0x7b, 0x8d, 0x3c, 0x5a, 0x85, 0x1a, 0xbf, 0x56, 0xdf, 0x38, 0x50, 0xee, 0xb6, 0x7a, 0x8d, 0x42, - 0x40, 0x74, 0xd4, 0xd9, 0xbf, 0xd3, 0x51, 0x1a, 0x45, 0xf9, 0x39, 0x5a, 0x15, 0x26, 0x10, 0x31, - 0xbf, 0xfe, 0xcb, 0x06, 0xea, 0x3f, 0xf9, 0xd7, 0x39, 0x90, 0x92, 0xf9, 0x15, 0xea, 0x46, 0xa6, - 0xfd, 0xec, 0xc2, 0xd4, 0x2c, 0x32, 0x77, 0xf4, 0x38, 0xd4, 0x6d, 0x7c, 0x82, 0xc9, 0x60, 0xcc, - 0xb9, 0x1e, 0xcf, 0x8d, 0x35, 0xa5, 0x26, 0xa4, 0xcc, 0xc8, 0xe1, 0x6a, 0x3f, 0xc1, 0x03, 0xa2, - 0x72, 0xf0, 0xe1, 0xc1, 0x56, 0xa5, 0x6a, 0x54, 0x7a, 0xc4, 0x85, 0xf2, 0x87, 0x0f, 0xb5, 0x92, - 0x55, 0x28, 0x2a, 0x9d, 0x9e, 0xf2, 0x4e, 0x23, 0x8f, 0x10, 0xd4, 0xd9, 0xa5, 0x7a, 0xb4, 0xdf, - 0x3a, 0x3c, 0xea, 0x1e, 0xd0, 0x95, 0xbc, 0x04, 0x2b, 0xee, 0x4a, 0xba, 0xc2, 0xa2, 0xfc, 0x34, - 0x5c, 0x8e, 0xe7, 0x86, 0x71, 0xb8, 0x25, 0xdf, 0x84, 0xb5, 0x38, 0xde, 0x17, 0xab, 0xfb, 0xcf, - 0x2c, 0xac, 0x44, 0x8e, 0x1c, 0x7a, 0x16, 0x8a, 0xbc, 0xfe, 0x88, 0xff, 0x06, 0xc3, 0xb0, 0x42, - 0x9c, 0x4e, 0xae, 0x88, 0x5e, 0x86, 0x0a, 0x16, 0xcd, 0x9b, 0x8b, 0xc7, 0x9a, 0x57, 0xe2, 0x6e, - 0x73, 0x47, 0x18, 0x7a, 0xfa, 0xe8, 0x55, 0xa8, 0x7a, 0xa8, 0x21, 0x0a, 0xdc, 0x8d, 0xa8, 0xb1, - 0x87, 0x36, 0xc2, 0xda, 0xb7, 0x40, 0x2f, 0xfa, 0x44, 0xb1, 0x10, 0xad, 0x78, 0x84, 0x31, 0xbf, - 0x2d, 0x4c, 0x5d, 0x6d, 0xb9, 0x0d, 0x4b, 0x81, 0x99, 0xa0, 0x6b, 0x50, 0x9d, 0x6a, 0x67, 0xa2, - 0x11, 0xc8, 0x1b, 0x00, 0x95, 0xa9, 0x76, 0xc6, 0x7b, 0x80, 0x57, 0xa0, 0x4c, 0x6f, 0x8e, 0x34, - 0x8e, 0x5a, 0x79, 0xa5, 0x34, 0xd5, 0xce, 0xde, 0xd4, 0x1c, 0xf9, 0x3d, 0xa8, 0x87, 0x1b, 0x61, - 0x34, 0xb2, 0x6d, 0x73, 0x66, 0x0c, 0x99, 0x8f, 0xa2, 0xc2, 0x07, 0xe8, 0x36, 0x14, 0x4f, 0x4d, - 0x0e, 0x7a, 0x71, 0xc7, 0xff, 0xd8, 0x24, 0x38, 0xd0, 0x46, 0xe3, 0xba, 0xf2, 0x19, 0x14, 0x19, - 0x8c, 0xd1, 0x8d, 0x63, 0x2d, 0x2d, 0x41, 0x90, 0xe9, 0x35, 0x7a, 0x0f, 0x40, 0x23, 0xc4, 0xd6, - 0xfb, 0x33, 0xdf, 0xed, 0x63, 0x71, 0x20, 0xd8, 0x72, 0xb5, 0xb6, 0x1f, 0x15, 0x68, 0xb8, 0xe6, - 0x1b, 0x06, 0x10, 0x31, 0xe0, 0x4e, 0xde, 0x87, 0x7a, 0xd8, 0x36, 0xd8, 0x50, 0x5e, 0x8e, 0x69, - 0x28, 0x7b, 0x34, 0xcc, 0x23, 0x71, 0x79, 0xde, 0xb6, 0x64, 0x03, 0xf9, 0x97, 0x59, 0xa8, 0xf4, - 0xce, 0xc4, 0x21, 0x49, 0xe8, 0xb3, 0xf8, 0xa6, 0xb9, 0x60, 0xa7, 0x88, 0xb7, 0xe2, 0xf2, 0x5e, - 0x7b, 0xef, 0x35, 0x0f, 0x04, 0x0a, 0x8b, 0xd5, 0xd7, 0x6e, 0xf3, 0x47, 0xc0, 0xde, 0x2b, 0x50, - 0xf5, 0xa2, 0x89, 0x56, 0x19, 0xda, 0x70, 0x68, 0x63, 0xc7, 0x11, 0x33, 0x73, 0x87, 0xac, 0xfd, - 0x6a, 0x7e, 0x2c, 0x3a, 0x51, 0x79, 0x85, 0x0f, 0xe4, 0x3e, 0xac, 0x44, 0x12, 0x1f, 0x7a, 0x09, - 0xca, 0xd6, 0xac, 0xaf, 0xba, 0x8b, 0x13, 0x3a, 0x2e, 0x2e, 0xeb, 0x9c, 0xf5, 0x27, 0xfa, 0x60, - 0x17, 0x9f, 0xbb, 0xaf, 0x62, 0xcd, 0xfa, 0xbb, 0x7c, 0x05, 0xf9, 0x33, 0x72, 0xc1, 0x67, 0x10, - 0xa8, 0xb8, 0xe1, 0x80, 0x7e, 0x10, 0x3c, 0x1b, 0xdc, 0x7d, 0x33, 0x29, 0x11, 0x0b, 0xe7, 0x81, - 0xa3, 0x71, 0x13, 0x56, 0x1d, 0x7d, 0x64, 0xe0, 0xa1, 0xea, 0xd7, 0x38, 0xec, 0x59, 0x15, 0x65, - 0x85, 0xdf, 0xd8, 0x73, 0x0b, 0x1c, 0xf9, 0x5f, 0x59, 0xa8, 0xb8, 0x47, 0x14, 0x6d, 0x05, 0xe2, - 0xad, 0x7e, 0xa1, 0x73, 0xe4, 0xaa, 0xf9, 0x3d, 0xd4, 0xf0, 0x7b, 0xe6, 0x1e, 0xf6, 0x3d, 0x93, - 0x5a, 0xe0, 0xee, 0x77, 0x88, 0xc2, 0x43, 0x7f, 0x87, 0x78, 0x1a, 0x10, 0x31, 0x89, 0x36, 0x51, - 0x4f, 0x4d, 0xa2, 0x1b, 0x23, 0x95, 0x2f, 0x33, 0xe7, 0x61, 0x0d, 0x76, 0xe7, 0x98, 0xdd, 0x38, - 0x64, 0x2b, 0xfe, 0xb3, 0x2c, 0x54, 0xbc, 0xdc, 0xfa, 0xb0, 0x2d, 0xd1, 0xcb, 0x50, 0x12, 0x29, - 0x84, 0xf7, 0x44, 0xc5, 0xc8, 0xeb, 0xc9, 0x17, 0x02, 0x3d, 0x79, 0x09, 0x2a, 0x53, 0x4c, 0x34, - 0x46, 0x2f, 0x78, 0x89, 0xe9, 0x8d, 0x6f, 0xbe, 0x04, 0x4b, 0x81, 0xde, 0x34, 0x3d, 0x6f, 0xfb, - 0x9d, 0xb7, 0x1b, 0x19, 0xa9, 0xfc, 0xc9, 0x67, 0xd7, 0xf3, 0xfb, 0xf8, 0x63, 0x1a, 0xab, 0x4a, - 0xa7, 0xdd, 0xed, 0xb4, 0x77, 0x1b, 0x59, 0x69, 0xe9, 0x93, 0xcf, 0xae, 0x97, 0x05, 0xb2, 0xdf, - 0xec, 0xc2, 0x72, 0x70, 0x4f, 0xc2, 0x59, 0x08, 0x41, 0xfd, 0xce, 0x5b, 0x87, 0x7b, 0x3b, 0xed, - 0x56, 0xaf, 0xa3, 0x1e, 0x1f, 0xf4, 0x3a, 0x8d, 0x2c, 0xba, 0x02, 0x97, 0xf6, 0x76, 0xde, 0xec, - 0xf6, 0xd4, 0xf6, 0xde, 0x4e, 0x67, 0xbf, 0xa7, 0xb6, 0x7a, 0xbd, 0x56, 0x7b, 0xb7, 0x91, 0xbb, - 0xf5, 0x1f, 0x80, 0x95, 0xd6, 0x76, 0x7b, 0x87, 0x66, 0x50, 0x7d, 0xa0, 0xb1, 0xf2, 0xf6, 0x87, - 0x50, 0x60, 0x15, 0x7e, 0xca, 0xa7, 0x78, 0x29, 0xad, 0x8b, 0x89, 0xb6, 0xa1, 0xc8, 0x0a, 0x7f, - 0x94, 0xf6, 0x65, 0x5e, 0x4a, 0x6d, 0x6a, 0xd2, 0x97, 0x60, 0x07, 0x22, 0xe5, 0x43, 0xbd, 0x94, - 0xd6, 0xe1, 0x44, 0xfb, 0x50, 0xf5, 0x2b, 0xf6, 0x79, 0x9f, 0xed, 0xa5, 0xb9, 0x3d, 0x4f, 0xea, - 0xcf, 0x2f, 0x1e, 0xe6, 0x7d, 0xcc, 0x96, 0xe6, 0x82, 0x14, 0xea, 0x42, 0xd9, 0xad, 0xf4, 0xd2, - 0x3f, 0xac, 0x4b, 0x73, 0xfa, 0x91, 0x74, 0xb9, 0x79, 0x25, 0x9e, 0xf6, 0x77, 0x80, 0x94, 0xda, - 0x54, 0x45, 0x1d, 0x28, 0x09, 0x36, 0x9c, 0xfa, 0xa9, 0x5c, 0x4a, 0xef, 0x2e, 0xd2, 0x45, 0xf2, - 0xdb, 0x1a, 0xf3, 0xfe, 0x74, 0x90, 0xe6, 0x76, 0x89, 0xd1, 0x3d, 0x80, 0x40, 0xb5, 0x3d, 0xf7, - 0x17, 0x06, 0x69, 0x7e, 0xf7, 0x17, 0xed, 0x42, 0xc5, 0x2b, 0x7f, 0xe6, 0xfc, 0x52, 0x20, 0xcd, - 0x6b, 0xc4, 0xa2, 0x77, 0xa1, 0x16, 0x66, 0xfe, 0x8b, 0xfc, 0x28, 0x20, 0x2d, 0xd4, 0x61, 0xa5, - 0xbe, 0xc3, 0x45, 0xc0, 0x22, 0xbf, 0x0d, 0x48, 0x0b, 0xb5, 0x5b, 0xd1, 0x09, 0xac, 0x5e, 0xa4, - 0xe8, 0x8b, 0xfe, 0x43, 0x20, 0x2d, 0xdc, 0x7e, 0x45, 0x3a, 0xa0, 0x18, 0x5a, 0xbf, 0xf0, 0x0f, - 0x05, 0xd2, 0xe2, 0xbd, 0x58, 0xf4, 0x01, 0xd4, 0x23, 0x4c, 0x79, 0xa1, 0x9f, 0x0b, 0xa4, 0xc5, - 0x5a, 0xb2, 0xe8, 0x6d, 0x58, 0x0e, 0x51, 0xeb, 0x05, 0x7e, 0x34, 0x90, 0x16, 0xe9, 0xcd, 0x6e, - 0xbf, 0xfa, 0xf9, 0x57, 0xeb, 0xd9, 0x2f, 0xbe, 0x5a, 0xcf, 0xfe, 0xf9, 0xab, 0xf5, 0xec, 0xa7, - 0x0f, 0xd6, 0x33, 0x5f, 0x3c, 0x58, 0xcf, 0xfc, 0xe1, 0xc1, 0x7a, 0xe6, 0xdd, 0x1b, 0x23, 0x9d, - 0x8c, 0x67, 0xfd, 0xcd, 0x81, 0x39, 0xdd, 0x9a, 0xe8, 0x06, 0xde, 0x8a, 0xf9, 0x0f, 0xac, 0x5f, - 0x62, 0xc9, 0xf1, 0xf6, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xee, 0xae, 0xb1, 0x25, 0x26, - 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ABCIApplicationClient is the client API for ABCIApplication service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -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) - SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error) - DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) - 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) - 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) - ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) - BeginRecheckTx(ctx context.Context, in *RequestBeginRecheckTx, opts ...grpc.CallOption) (*ResponseBeginRecheckTx, error) - EndRecheckTx(ctx context.Context, in *RequestEndRecheckTx, opts ...grpc.CallOption) (*ResponseEndRecheckTx, error) -} - -type aBCIApplicationClient struct { - cc *grpc.ClientConn -} - -func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient { - return &aBCIApplicationClient{cc} + return n } - -func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) { - out := new(ResponseEcho) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Echo", in, out, opts...) - if err != nil { - return nil, err +func (m *RequestBeginBlock) Size() (n int) { + if m == nil { + return 0 } - return out, nil -} - -func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) { - out := new(ResponseFlush) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Flush", in, out, opts...) - if err != nil { - return nil, err + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - return out, nil -} - -func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) { - out := new(ResponseInfo) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Info", in, out, opts...) - if err != nil { - return nil, err + 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 out, nil + return n } -func (c *aBCIApplicationClient) SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error) { - out := new(ResponseSetOption) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/SetOption", in, out, opts...) - if err != nil { - return nil, err +func (m *RequestBeginRecheckTx) Size() (n int) { + if m == nil { + return 0 } - return out, nil + var l int + _ = l + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + return n } -func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) { - out := new(ResponseDeliverTx) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/DeliverTx", in, out, opts...) - if err != nil { - return nil, err +func (m *RequestEndRecheckTx) Size() (n int) { + if m == nil { + return 0 } - 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, "/ostracon.abci.ABCIApplication/CheckTx", in, out, opts...) - if err != nil { - return nil, err + var l int + _ = l + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) } - return out, nil + return n } -func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) { - out := new(ResponseQuery) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Query", in, out, opts...) - if err != nil { - return nil, err +func (m *Response) Size() (n int) { + if m == nil { + return 0 } - return out, nil -} - -func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) { - out := new(ResponseCommit) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/Commit", in, out, opts...) - if err != nil { - return nil, err + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() } - return out, nil + return n } -func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) { - out := new(ResponseInitChain) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/InitChain", in, out, opts...) - if err != nil { - return nil, err +func (m *Response_Exception) Size() (n int) { + if m == nil { + return 0 } - 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, "/ostracon.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, "/ostracon.abci.ABCIApplication/EndBlock", in, out, opts...) - if err != nil { - return nil, err + var l int + _ = l + if m.Exception != nil { + l = m.Exception.Size() + n += 1 + l + sovTypes(uint64(l)) } - return out, nil + return n } - -func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) { - out := new(ResponseListSnapshots) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/ListSnapshots", in, out, opts...) - if err != nil { - return nil, err +func (m *Response_Echo) Size() (n int) { + if m == nil { + return 0 } - return out, nil -} - -func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) { - out := new(ResponseOfferSnapshot) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/OfferSnapshot", in, out, opts...) - if err != nil { - return nil, err + var l int + _ = l + if m.Echo != nil { + l = m.Echo.Size() + n += 1 + l + sovTypes(uint64(l)) } - return out, nil + return n } - -func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) { - out := new(ResponseLoadSnapshotChunk) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...) - if err != nil { - return nil, err +func (m *Response_Flush) Size() (n int) { + if m == nil { + return 0 } - return out, nil -} - -func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) { - out := new(ResponseApplySnapshotChunk) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...) - if err != nil { - return nil, err + var l int + _ = l + if m.Flush != nil { + l = m.Flush.Size() + n += 1 + l + sovTypes(uint64(l)) } - return out, nil + return n } - -func (c *aBCIApplicationClient) BeginRecheckTx(ctx context.Context, in *RequestBeginRecheckTx, opts ...grpc.CallOption) (*ResponseBeginRecheckTx, error) { - out := new(ResponseBeginRecheckTx) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/BeginRecheckTx", in, out, opts...) - if err != nil { - return nil, err +func (m *Response_Info) Size() (n int) { + if m == nil { + return 0 } - return out, nil -} - -func (c *aBCIApplicationClient) EndRecheckTx(ctx context.Context, in *RequestEndRecheckTx, opts ...grpc.CallOption) (*ResponseEndRecheckTx, error) { - out := new(ResponseEndRecheckTx) - err := c.cc.Invoke(ctx, "/ostracon.abci.ABCIApplication/EndRecheckTx", in, out, opts...) - if err != nil { - return nil, err + var l int + _ = l + if m.Info != nil { + l = m.Info.Size() + n += 1 + l + sovTypes(uint64(l)) } - 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) - SetOption(context.Context, *RequestSetOption) (*ResponseSetOption, error) - DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error) - 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) - ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error) - OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) - LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) - ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) - BeginRecheckTx(context.Context, *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) - EndRecheckTx(context.Context, *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) -} - -// UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations. -type UnimplementedABCIApplicationServer struct { -} - -func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) { - return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") -} -func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) { - return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented") -} -func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") -} -func (*UnimplementedABCIApplicationServer) SetOption(ctx context.Context, req *RequestSetOption) (*ResponseSetOption, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetOption 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") -} -func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) { - return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") -} -func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) { - return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented") -} -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") -} -func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) { - return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented") -} -func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented") -} -func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented") -} -func (*UnimplementedABCIApplicationServer) BeginRecheckTx(ctx context.Context, req *RequestBeginRecheckTx) (*ResponseBeginRecheckTx, error) { - return nil, status.Errorf(codes.Unimplemented, "method BeginRecheckTx not implemented") -} -func (*UnimplementedABCIApplicationServer) EndRecheckTx(ctx context.Context, req *RequestEndRecheckTx) (*ResponseEndRecheckTx, error) { - return nil, status.Errorf(codes.Unimplemented, "method EndRecheckTx not implemented") -} - -func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) { - s.RegisterService(&_ABCIApplication_serviceDesc, srv) + return n } - -func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestEcho) - if err := dec(in); err != nil { - return nil, err +func (m *Response_SetOption) Size() (n int) { + if m == nil { + return 0 } - if interceptor == nil { - return srv.(ABCIApplicationServer).Echo(ctx, in) + var l int + _ = l + if m.SetOption != nil { + l = m.SetOption.Size() + n += 1 + l + sovTypes(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/Echo", + return n +} +func (m *Response_InitChain) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho)) + var l int + _ = l + if m.InitChain != nil { + l = m.InitChain.Size() + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestFlush) - if err := dec(in); err != nil { - return nil, err +func (m *Response_Query) Size() (n int) { + if m == nil { + return 0 } - if interceptor == nil { - return srv.(ABCIApplicationServer).Flush(ctx, in) + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovTypes(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/Flush", + return n +} +func (m *Response_BeginBlock) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush)) + var l int + _ = l + if m.BeginBlock != nil { + l = m.BeginBlock.Size() + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestInfo) - if err := dec(in); err != nil { - return nil, err +func (m *Response_CheckTx) Size() (n int) { + if m == nil { + return 0 } - if interceptor == nil { - return srv.(ABCIApplicationServer).Info(ctx, in) + var l int + _ = l + if m.CheckTx != nil { + l = m.CheckTx.Size() + n += 1 + l + sovTypes(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/Info", + return n +} +func (m *Response_DeliverTx) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo)) + var l int + _ = l + if m.DeliverTx != nil { + l = m.DeliverTx.Size() + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -func _ABCIApplication_SetOption_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestSetOption) - if err := dec(in); err != nil { - return nil, err +func (m *Response_EndBlock) Size() (n int) { + if m == nil { + return 0 } - if interceptor == nil { - return srv.(ABCIApplicationServer).SetOption(ctx, in) + var l int + _ = l + if m.EndBlock != nil { + l = m.EndBlock.Size() + n += 1 + l + sovTypes(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/SetOption", + return n +} +func (m *Response_Commit) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).SetOption(ctx, req.(*RequestSetOption)) + var l int + _ = l + if m.Commit != nil { + l = m.Commit.Size() + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -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: "/ostracon.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 { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).CheckTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/CheckTx", +func (m *Response_ListSnapshots) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx)) + var l int + _ = l + if m.ListSnapshots != nil { + l = m.ListSnapshots.Size() + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestQuery) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).Query(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/Query", +func (m *Response_OfferSnapshot) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery)) + var l int + _ = l + if m.OfferSnapshot != nil { + l = m.OfferSnapshot.Size() + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestCommit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).Commit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/Commit", +func (m *Response_LoadSnapshotChunk) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit)) + var l int + _ = l + if m.LoadSnapshotChunk != nil { + l = m.LoadSnapshotChunk.Size() + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestInitChain) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).InitChain(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/InitChain", +func (m *Response_ApplySnapshotChunk) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain)) + var l int + _ = l + if m.ApplySnapshotChunk != nil { + l = m.ApplySnapshotChunk.Size() + n += 2 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -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: "/ostracon.abci.ABCIApplication/BeginBlock", +func (m *Response_BeginRecheckTx) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock)) + var l int + _ = l + if m.BeginRecheckTx != nil { + l = m.BeginRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -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: "/ostracon.abci.ABCIApplication/EndBlock", +func (m *Response_EndRecheckTx) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock)) + var l int + _ = l + if m.EndRecheckTx != nil { + l = m.EndRecheckTx.Size() + n += 2 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } - -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 { - return nil, err +func (m *ResponseCheckTx) Size() (n int) { + if m == nil { + return 0 } - if interceptor == nil { - return srv.(ABCIApplicationServer).ListSnapshots(ctx, in) + var l int + _ = l + if m.Code != 0 { + n += 1 + sovTypes(uint64(m.Code)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/ListSnapshots", + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots)) + l = len(m.Log) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestOfferSnapshot) - if err := dec(in); err != nil { - return nil, err + l = len(m.Info) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if interceptor == nil { - return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in) + if m.GasWanted != 0 { + n += 1 + sovTypes(uint64(m.GasWanted)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/OfferSnapshot", + if m.GasUsed != 0 { + n += 1 + sovTypes(uint64(m.GasUsed)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot)) + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestLoadSnapshotChunk) - if err := dec(in); err != nil { - return nil, err + l = len(m.Codespace) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if interceptor == nil { - return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in) + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/LoadSnapshotChunk", + if m.Priority != 0 { + n += 1 + sovTypes(uint64(m.Priority)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk)) + l = len(m.MempoolError) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestApplySnapshotChunk) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/ApplySnapshotChunk", +func (m *ResponseBeginRecheckTx) Size() (n int) { + if m == nil { + return 0 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk)) + var l int + _ = l + if m.Code != 0 { + n += 1 + sovTypes(uint64(m.Code)) } - return interceptor(ctx, in, info, handler) + return n } -func _ABCIApplication_BeginRecheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestBeginRecheckTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).BeginRecheckTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/BeginRecheckTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).BeginRecheckTx(ctx, req.(*RequestBeginRecheckTx)) +func (m *ResponseEndRecheckTx) Size() (n int) { + if m == nil { + return 0 } - return interceptor(ctx, in, info, handler) -} - -func _ABCIApplication_EndRecheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestEndRecheckTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIApplicationServer).EndRecheckTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ostracon.abci.ABCIApplication/EndRecheckTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIApplicationServer).EndRecheckTx(ctx, req.(*RequestEndRecheckTx)) - } - return interceptor(ctx, in, info, handler) -} - -var _ABCIApplication_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ostracon.abci.ABCIApplication", - HandlerType: (*ABCIApplicationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Echo", - Handler: _ABCIApplication_Echo_Handler, - }, - { - MethodName: "Flush", - Handler: _ABCIApplication_Flush_Handler, - }, - { - MethodName: "Info", - Handler: _ABCIApplication_Info_Handler, - }, - { - MethodName: "SetOption", - Handler: _ABCIApplication_SetOption_Handler, - }, - { - MethodName: "DeliverTx", - Handler: _ABCIApplication_DeliverTx_Handler, - }, - { - MethodName: "CheckTx", - Handler: _ABCIApplication_CheckTx_Handler, - }, - { - MethodName: "Query", - Handler: _ABCIApplication_Query_Handler, - }, - { - MethodName: "Commit", - Handler: _ABCIApplication_Commit_Handler, - }, - { - MethodName: "InitChain", - Handler: _ABCIApplication_InitChain_Handler, - }, - { - MethodName: "BeginBlock", - Handler: _ABCIApplication_BeginBlock_Handler, - }, - { - MethodName: "EndBlock", - Handler: _ABCIApplication_EndBlock_Handler, - }, - { - MethodName: "ListSnapshots", - Handler: _ABCIApplication_ListSnapshots_Handler, - }, - { - MethodName: "OfferSnapshot", - Handler: _ABCIApplication_OfferSnapshot_Handler, - }, - { - MethodName: "LoadSnapshotChunk", - Handler: _ABCIApplication_LoadSnapshotChunk_Handler, - }, - { - MethodName: "ApplySnapshotChunk", - Handler: _ABCIApplication_ApplySnapshotChunk_Handler, - }, - { - MethodName: "BeginRecheckTx", - Handler: _ABCIApplication_BeginRecheckTx_Handler, - }, - { - MethodName: "EndRecheckTx", - Handler: _ABCIApplication_EndRecheckTx_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ostracon/abci/types.proto", -} - -func (m *Request) 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 *Request) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Echo != nil { - { - size, err := m.Echo.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 *Request_Flush) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Flush != nil { - { - size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Request_SetOption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_SetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SetOption != nil { - { - size, err := m.SetOption.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InitChain != nil { - { - size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Query != nil { - { - size, err := m.Query.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_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] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CheckTx != nil { - { - size, err := m.CheckTx.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_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] = 0x4a - } - 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] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Commit != nil { - { - size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ListSnapshots != nil { - { - size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - return len(dAtA) - i, nil -} -func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.OfferSnapshot != nil { - { - size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - return len(dAtA) - i, nil -} -func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.LoadSnapshotChunk != nil { - { - size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - return len(dAtA) - i, nil -} -func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ApplySnapshotChunk != nil { - { - size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - return len(dAtA) - i, nil -} -func (m *Request_BeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_BeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BeginRecheckTx != nil { - { - size, err := m.BeginRecheckTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *Request_EndRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request_EndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.EndRecheckTx != nil { - { - size, err := m.EndRecheckTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xca - } - return len(dAtA) - i, nil -} -func (m *RequestEcho) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestFlush) 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 *RequestFlush) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *RequestInfo) 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 *RequestInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.P2PVersion != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion)) - i-- - dAtA[i] = 0x18 - } - if m.BlockVersion != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion)) - i-- - dAtA[i] = 0x10 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestSetOption) 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 *RequestSetOption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestSetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestInitChain) 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 *RequestInitChain) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.InitialHeight != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight)) - i-- - dAtA[i] = 0x30 - } - if len(m.AppStateBytes) > 0 { - i -= len(m.AppStateBytes) - copy(dAtA[i:], m.AppStateBytes) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes))) - i-- - dAtA[i] = 0x2a - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.ConsensusParams != nil { - { - size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - n19, err19 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err19 != nil { - return 0, err19 - } - i -= n19 - i = encodeVarintTypes(dAtA, i, uint64(n19)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RequestQuery) 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 *RequestQuery) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Prove { - i-- - if m.Prove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 - } - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x12 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - 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) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - } - 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 *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) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *RequestListSnapshots) 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 *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *RequestOfferSnapshot) 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 *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x12 - } - if m.Snapshot != nil { - { - size, err := m.Snapshot.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 *RequestLoadSnapshotChunk) 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 *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Chunk != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Chunk)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RequestApplySnapshotChunk) 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 *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x1a - } - if len(m.Chunk) > 0 { - i -= len(m.Chunk) - copy(dAtA[i:], m.Chunk) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk))) - i-- - dAtA[i] = 0x12 - } - if m.Index != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RequestBeginRecheckTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestBeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestBeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RequestEndRecheckTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestEndRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestEndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Response) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Response) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Exception != nil { - { - size, err := m.Exception.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 *Response_Echo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Echo != nil { - { - size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Flush != nil { - { - size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Info != nil { - { - size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Response_SetOption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_SetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SetOption != nil { - { - size, err := m.SetOption.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.InitChain != nil { - { - size, err := m.InitChain.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 *Response_Query) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Query != nil { - { - size, err := m.Query.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_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] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CheckTx != nil { - { - size, err := m.CheckTx.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_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] = 0x52 - } - 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] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Commit != nil { - { - size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - return len(dAtA) - i, nil -} -func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ListSnapshots != nil { - { - size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - return len(dAtA) - i, nil -} -func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.OfferSnapshot != nil { - { - size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - return len(dAtA) - i, nil -} -func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.LoadSnapshotChunk != nil { - { - size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - return len(dAtA) - i, nil -} -func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ApplySnapshotChunk != nil { - { - size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - return len(dAtA) - i, nil -} -func (m *Response_BeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_BeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BeginRecheckTx != nil { - { - size, err := m.BeginRecheckTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *Response_EndRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Response_EndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.EndRecheckTx != nil { - { - size, err := m.EndRecheckTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xca - } - return len(dAtA) - i, nil -} -func (m *ResponseException) 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 *ResponseException) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResponseEcho) 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 *ResponseEcho) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResponseFlush) 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 *ResponseFlush) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ResponseInfo) 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 *ResponseInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LastBlockAppHash) > 0 { - i -= len(m.LastBlockAppHash) - copy(dAtA[i:], m.LastBlockAppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash))) - i-- - dAtA[i] = 0x2a - } - if m.LastBlockHeight != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight)) - i-- - dAtA[i] = 0x20 - } - if m.AppVersion != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion)) - i-- - dAtA[i] = 0x18 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResponseSetOption) 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 *ResponseSetOption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseSetOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if m.Code != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ResponseInitChain) 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 *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.ConsensusParams != nil { - { - size, err := m.ConsensusParams.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 *ResponseQuery) 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 *ResponseQuery) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x52 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x48 - } - if m.ProofOps != nil { - { - size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x3a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x32 - } - if m.Index != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if m.Code != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - 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) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.MempoolError) > 0 { - i -= len(m.MempoolError) - copy(dAtA[i:], m.MempoolError) - i = encodeVarintTypes(dAtA, i, uint64(len(m.MempoolError))) - i-- - dAtA[i] = 0x5a - } - if m.Priority != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Priority)) - i-- - dAtA[i] = 0x50 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x4a - } - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x42 - } - 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] = 0x3a - } - } - if m.GasUsed != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.GasWanted != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ResponseDeliverTx) 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 *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x42 - } - 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] = 0x3a - } - } - if m.GasUsed != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.GasWanted != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - 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) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RetainHeight != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight)) - i-- - dAtA[i] = 0x18 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *ResponseListSnapshots) 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 *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Snapshots) > 0 { - for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Snapshots[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 *ResponseOfferSnapshot) 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 *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Result != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Result)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ResponseLoadSnapshotChunk) 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 *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Chunk) > 0 { - i -= len(m.Chunk) - copy(dAtA[i:], m.Chunk) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResponseApplySnapshotChunk) 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 *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RejectSenders) > 0 { - for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RejectSenders[iNdEx]) - copy(dAtA[i:], m.RejectSenders[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.RefetchChunks) > 0 { - dAtA46 := make([]byte, len(m.RefetchChunks)*10) - var j45 int - for _, num := range m.RefetchChunks { - for num >= 1<<7 { - dAtA46[j45] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j45++ - } - dAtA46[j45] = uint8(num) - j45++ - } - i -= j45 - copy(dAtA[i:], dAtA46[:j45]) - i = encodeVarintTypes(dAtA, i, uint64(j45)) - i-- - dAtA[i] = 0x12 - } - if m.Result != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Result)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ResponseBeginRecheckTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseBeginRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseBeginRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Code != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ResponseEndRecheckTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseEndRecheckTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseEndRecheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Code != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ConsensusParams) 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 *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Version != nil { - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Evidence != nil { - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Block != nil { - { - size, err := m.Block.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 *BlockParams) 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 *BlockParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MaxGas != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas)) - i-- - dAtA[i] = 0x10 - } - if m.MaxBytes != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.MaxBytes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LastCommitInfo) 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 *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Votes) > 0 { - for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Event) 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 *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[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.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAttribute) 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 *EventAttribute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Index { - i-- - if m.Index { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TxResult) 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 *TxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - 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] = 0x1a - } - if m.Index != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Validator) 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 *Validator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Power != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Power)) - i-- - dAtA[i] = 0x18 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorUpdate) 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 *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Power != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Power)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.PubKey.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 *VoteInfo) 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 *VoteInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SignedLastBlock { - i-- - if m.SignedLastBlock { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Evidence) 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 *Evidence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TotalVotingPower != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower)) - i-- - dAtA[i] = 0x28 - } - n54, err54 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err54 != nil { - return 0, err54 - } - i -= n54 - i = encodeVarintTypes(dAtA, i, uint64(n54)) - i-- - dAtA[i] = 0x22 - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 - } - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x2a - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if m.Chunks != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Chunks)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Request) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} - -func (m *Request_Echo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Echo != nil { - l = m.Echo.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_Flush) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Flush != nil { - l = m.Flush.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_Info) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_SetOption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SetOption != nil { - l = m.SetOption.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_InitChain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InitChain != nil { - l = m.InitChain.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_Query) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Query != nil { - l = m.Query.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_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 *Request_CheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CheckTx != nil { - l = m.CheckTx.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_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 *Request_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 *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) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LoadSnapshotChunk != nil { - l = m.LoadSnapshotChunk.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_ApplySnapshotChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ApplySnapshotChunk != nil { - l = m.ApplySnapshotChunk.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_BeginRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BeginRecheckTx != nil { - l = m.BeginRecheckTx.Size() - n += 2 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Request_EndRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EndRecheckTx != nil { - l = m.EndRecheckTx.Size() - n += 2 + l + sovTypes(uint64(l)) - } - return n -} -func (m *RequestEcho) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *RequestFlush) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RequestInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.BlockVersion != 0 { - n += 1 + sovTypes(uint64(m.BlockVersion)) - } - if m.P2PVersion != 0 { - n += 1 + sovTypes(uint64(m.P2PVersion)) - } - return n -} - -func (m *RequestSetOption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *RequestInitChain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.ConsensusParams != nil { - l = m.ConsensusParams.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.AppStateBytes) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.InitialHeight != 0 { - n += 1 + sovTypes(uint64(m.InitialHeight)) - } - return n -} - -func (m *RequestQuery) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Prove { - n += 2 - } - 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 - } - var l int - _ = l - l = len(m.Tx) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - 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 - } - var l int - _ = l - return n -} - -func (m *RequestListSnapshots) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RequestOfferSnapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Snapshot != nil { - l = m.Snapshot.Size() - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *RequestLoadSnapshotChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovTypes(uint64(m.Format)) - } - if m.Chunk != 0 { - n += 1 + sovTypes(uint64(m.Chunk)) - } - return n -} - -func (m *RequestApplySnapshotChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Index != 0 { - n += 1 + sovTypes(uint64(m.Index)) - } - l = len(m.Chunk) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *RequestBeginRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *RequestEndRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - return n -} - -func (m *Response) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} - -func (m *Response_Exception) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Exception != nil { - l = m.Exception.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_Echo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Echo != nil { - l = m.Echo.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_Flush) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Flush != nil { - l = m.Flush.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_Info) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Info != nil { - l = m.Info.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_SetOption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SetOption != nil { - l = m.SetOption.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_InitChain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InitChain != nil { - l = m.InitChain.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_Query) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Query != nil { - l = m.Query.Size() - n += 1 + l + sovTypes(uint64(l)) - } - 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 - } - var l int - _ = l - if m.CheckTx != nil { - l = m.CheckTx.Size() - n += 1 + l + sovTypes(uint64(l)) - } - 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 - } - var l int - _ = l - if m.Commit != nil { - l = m.Commit.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_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 *Response_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 *Response_LoadSnapshotChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LoadSnapshotChunk != nil { - l = m.LoadSnapshotChunk.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_ApplySnapshotChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ApplySnapshotChunk != nil { - l = m.ApplySnapshotChunk.Size() - n += 2 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_BeginRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BeginRecheckTx != nil { - l = m.BeginRecheckTx.Size() - n += 2 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Response_EndRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EndRecheckTx != nil { - l = m.EndRecheckTx.Size() - n += 2 + l + sovTypes(uint64(l)) - } - return n -} -func (m *ResponseException) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Error) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ResponseEcho) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ResponseFlush) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ResponseInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.AppVersion != 0 { - n += 1 + sovTypes(uint64(m.AppVersion)) - } - if m.LastBlockHeight != 0 { - n += 1 + sovTypes(uint64(m.LastBlockHeight)) - } - l = len(m.LastBlockAppHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ResponseSetOption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTypes(uint64(m.Code)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ResponseInitChain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConsensusParams != nil { - l = m.ConsensusParams.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ResponseQuery) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTypes(uint64(m.Code)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Index != 0 { - n += 1 + sovTypes(uint64(m.Index)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.ProofOps != nil { - l = m.ProofOps.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - 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 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTypes(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.GasWanted != 0 { - n += 1 + sovTypes(uint64(m.GasWanted)) - } - if m.GasUsed != 0 { - n += 1 + sovTypes(uint64(m.GasUsed)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Priority != 0 { - n += 1 + sovTypes(uint64(m.Priority)) - } - l = len(m.MempoolError) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ResponseDeliverTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTypes(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.GasWanted != 0 { - n += 1 + sovTypes(uint64(m.GasWanted)) - } - if m.GasUsed != 0 { - n += 1 + sovTypes(uint64(m.GasUsed)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - 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 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.RetainHeight != 0 { - n += 1 + sovTypes(uint64(m.RetainHeight)) - } - return n -} - -func (m *ResponseListSnapshots) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Snapshots) > 0 { - for _, e := range m.Snapshots { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *ResponseOfferSnapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != 0 { - n += 1 + sovTypes(uint64(m.Result)) - } - return n -} - -func (m *ResponseLoadSnapshotChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Chunk) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ResponseApplySnapshotChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != 0 { - n += 1 + sovTypes(uint64(m.Result)) - } - if len(m.RefetchChunks) > 0 { - l = 0 - for _, e := range m.RefetchChunks { - l += sovTypes(uint64(e)) - } - n += 1 + sovTypes(uint64(l)) + l - } - if len(m.RejectSenders) > 0 { - for _, s := range m.RejectSenders { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *ResponseBeginRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTypes(uint64(m.Code)) - } - return n -} - -func (m *ResponseEndRecheckTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTypes(uint64(m.Code)) - } - return n -} - -func (m *ConsensusParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Evidence != nil { - l = m.Evidence.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Version != nil { - l = m.Version.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *BlockParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxBytes != 0 { - n += 1 + sovTypes(uint64(m.MaxBytes)) - } - if m.MaxGas != 0 { - n += 1 + sovTypes(uint64(m.MaxGas)) - } - return n -} - -func (m *LastCommitInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - if len(m.Votes) > 0 { - for _, e := range m.Votes { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *EventAttribute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Index { - n += 2 - } - return n -} - -func (m *TxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Index != 0 { - n += 1 + sovTypes(uint64(m.Index)) - } - l = len(m.Tx) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Result.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Power != 0 { - n += 1 + sovTypes(uint64(m.Power)) - } - return n -} - -func (m *ValidatorUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PubKey.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.Power != 0 { - n += 1 + sovTypes(uint64(m.Power)) - } - return n -} - -func (m *VoteInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Validator.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.SignedLastBlock { - n += 2 - } - return n -} - -func (m *Evidence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - l = m.Validator.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) - n += 1 + l + sovTypes(uint64(l)) - if m.TotalVotingPower != 0 { - n += 1 + sovTypes(uint64(m.TotalVotingPower)) - } - return n -} - -func (m *Snapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovTypes(uint64(m.Format)) - } - if m.Chunks != 0 { - n += 1 + sovTypes(uint64(m.Chunks)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Request) 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: Request: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Echo", 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 := &RequestEcho{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_Echo{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flush", 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 := &RequestFlush{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_Flush{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", 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 := &RequestInfo{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_Info{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SetOption", 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 := &RequestSetOption{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_SetOption{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitChain", 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 := &RequestInitChain{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_InitChain{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", 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 := &RequestQuery{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_Query{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", 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 := &RequestBeginBlock{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_BeginBlock{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", 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 := &RequestCheckTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_CheckTx{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", 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 := &RequestDeliverTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_DeliverTx{v} - iNdEx = postIndex - case 10: - 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 - } - v := &RequestEndBlock{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_EndBlock{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commit", 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 := &RequestCommit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_Commit{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", 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 := &RequestListSnapshots{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_ListSnapshots{v} - iNdEx = postIndex - case 13: - 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 14: - 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{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_LoadSnapshotChunk{v} - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", 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 := &RequestApplySnapshotChunk{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_ApplySnapshotChunk{v} - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginRecheckTx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RequestBeginRecheckTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_BeginRecheckTx{v} - iNdEx = postIndex - case 1001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndRecheckTx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RequestEndRecheckTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Request_EndRecheckTx{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - 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 *RequestEcho) 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: RequestEcho: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = 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 *RequestFlush) 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: RequestFlush: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestFlush: 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 *RequestInfo) 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: RequestInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType) - } - m.BlockVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType) - } - m.P2PVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.P2PVersion |= uint64(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 *RequestSetOption) 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: RequestSetOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestSetOption: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = 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 *RequestInitChain) 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: RequestInitChain: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", 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.ConsensusParams == nil { - m.ConsensusParams = &ConsensusParams{} - } - if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", 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.Validators = append(m.Validators, ValidatorUpdate{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", 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.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...) - if m.AppStateBytes == nil { - m.AppStateBytes = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType) - } - m.InitialHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InitialHeight |= 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 *RequestQuery) 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: RequestQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", 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.Path = string(dAtA[iNdEx:postIndex]) - 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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Prove = bool(v != 0) - 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 *RequestBeginBlock) 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: RequestBeginBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestBeginBlock: 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) - } - 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 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - 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 { - return ErrInvalidLengthTypes - } - if postIndex > 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 - } - if postIndex > 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 - } - 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 *RequestCheckTx) 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: RequestCheckTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - 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 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 - } - 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 *RequestOfferSnapshot) 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: RequestOfferSnapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", 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.Snapshot == nil { - m.Snapshot = &Snapshot{} - } - if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppHash", 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.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []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 *RequestLoadSnapshotChunk) 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: RequestLoadSnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestLoadSnapshotChunk: 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 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType) - } - m.Chunk = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Chunk |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestApplySnapshotChunk) 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: RequestApplySnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunk", 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.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...) - if m.Chunk == nil { - m.Chunk = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = 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 *RequestBeginRecheckTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestBeginRecheckTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestBeginRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestEndRecheckTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestEndRecheckTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestEndRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Response) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - 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 Exception", 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 := &ResponseException{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_Exception{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Echo", 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 := &ResponseEcho{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_Echo{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flush", 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 := &ResponseFlush{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_Flush{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", 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 := &ResponseInfo{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_Info{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SetOption", 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 := &ResponseSetOption{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_SetOption{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitChain", 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 := &ResponseInitChain{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_InitChain{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", 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 := &ResponseQuery{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_Query{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", 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 := &ResponseBeginBlock{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_BeginBlock{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", 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 := &ResponseCheckTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_CheckTx{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", 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 := &ResponseDeliverTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_DeliverTx{v} - iNdEx = postIndex - case 11: - 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 - } - v := &ResponseEndBlock{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_EndBlock{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commit", 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 := &ResponseCommit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_Commit{v} - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", 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 := &ResponseListSnapshots{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_ListSnapshots{v} - iNdEx = postIndex - case 14: - 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 := &ResponseOfferSnapshot{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_OfferSnapshot{v} - iNdEx = postIndex - case 15: - 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 := &ResponseLoadSnapshotChunk{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_LoadSnapshotChunk{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", 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 := &ResponseApplySnapshotChunk{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_ApplySnapshotChunk{v} - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BeginRecheckTx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ResponseBeginRecheckTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_BeginRecheckTx{v} - iNdEx = postIndex - case 1001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndRecheckTx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ResponseEndRecheckTx{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &Response_EndRecheckTx{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - 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 *ResponseException) 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: ResponseException: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = 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 *ResponseEcho) 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: ResponseEcho: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = 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 *ResponseFlush) 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: ResponseFlush: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseFlush: 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 *ResponseInfo) 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: ResponseInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) - } - m.AppVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AppVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType) - } - m.LastBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastBlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", 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.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastBlockAppHash == nil { - m.LastBlockAppHash = []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 *ResponseSetOption) 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: ResponseSetOption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseSetOption: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = 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 *ResponseInitChain) 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: ResponseInitChain: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", 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.ConsensusParams == nil { - m.ConsensusParams = &ConsensusParams{} - } - if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", 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.Validators = append(m.Validators, ValidatorUpdate{}) - if err := m.Validators[len(m.Validators)-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 AppHash", 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.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []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 *ResponseQuery) 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: ResponseQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", 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.ProofOps == nil { - m.ProofOps = &crypto.ProofOps{} - } - if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - 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 10: - 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 *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 - } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovTypes(uint64(m.Code)) } + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 } -func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Request) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12669,170 +3432,15 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group") + return fmt.Errorf("proto: Request: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", 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.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", 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.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) + return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12859,16 +3467,17 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { 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 { + v := &types.RequestEcho{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Request_Echo{v} iNdEx = postIndex - case 8: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -12878,80 +3487,32 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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 + v := &types.RequestFlush{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Sender = string(dAtA[iNdEx:postIndex]) + m.Value = &Request_Flush{v} iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MempoolError", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -12961,79 +3522,32 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.MempoolError = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { + v := &types.RequestInfo{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); 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 *ResponseDeliverTx) 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: ResponseDeliverTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + m.Value = &Request_Info{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SetOption", wireType) } - m.Code = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13043,16 +3557,32 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= uint32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.RequestSetOption{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_SetOption{v} + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13062,31 +3592,32 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} + v := &types.RequestInitChain{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.Value = &Request_InitChain{v} iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13096,29 +3627,32 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Log = string(dAtA[iNdEx:postIndex]) + v := &types.RequestQuery{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_Query{v} iNdEx = postIndex - case 4: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13128,29 +3662,32 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Info = string(dAtA[iNdEx:postIndex]) + v := &RequestBeginBlock{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_BeginBlock{v} iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) } - m.GasWanted = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13160,16 +3697,32 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GasWanted |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + if msglen < 0 { + return ErrInvalidLengthTypes } - m.GasUsed = 0 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.RequestCheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_CheckTx{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13179,14 +3732,30 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GasUsed |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 7: + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.RequestDeliverTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_DeliverTx{v} + iNdEx = postIndex + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13213,16 +3782,17 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { 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 { + v := &types.RequestEndBlock{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Request_EndBlock{v} iNdEx = postIndex - case 8: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13232,77 +3802,30 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen 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: + } + v := &types.RequestCommit{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_Commit{v} + iNdEx = postIndex + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13329,14 +3852,15 @@ func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error { 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 { + v := &types.RequestListSnapshots{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Request_ListSnapshots{v} iNdEx = postIndex - case 2: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13363,16 +3887,15 @@ func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusParamUpdates == nil { - m.ConsensusParamUpdates = &ConsensusParams{} - } - if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.RequestOfferSnapshot{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Request_OfferSnapshot{v} iNdEx = postIndex - case 3: + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13399,66 +3922,17 @@ func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error { 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 { + v := &types.RequestLoadSnapshotChunk{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Request_LoadSnapshotChunk{v} 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 *ResponseCommit) 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: ResponseCommit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13468,31 +3942,32 @@ func (m *ResponseCommit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} + v := &types.RequestApplySnapshotChunk{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.Value = &Request_ApplySnapshotChunk{v} iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType) + case 1000: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BeginRecheckTx", wireType) } - m.RetainHeight = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13502,64 +3977,30 @@ func (m *ResponseCommit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RetainHeight |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + v := &RequestBeginRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Value = &Request_BeginRecheckTx{v} + iNdEx = postIndex + case 1001: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EndRecheckTx", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13586,10 +4027,11 @@ func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Snapshots = append(m.Snapshots, &Snapshot{}) - if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &RequestEndRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Request_EndRecheckTx{v} iNdEx = postIndex default: iNdEx = preIndex @@ -13612,7 +4054,7 @@ func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error { +func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13635,17 +4077,17 @@ func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group") + return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } - m.Result = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13655,66 +4097,31 @@ func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13724,81 +4131,30 @@ func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...) - if m.Chunk == nil { - m.Chunk = []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 *ResponseApplySnapshotChunk) 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 + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType) } - m.Result = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13808,92 +4164,30 @@ func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RefetchChunks = append(m.RefetchChunks, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.RefetchChunks) == 0 { - m.RefetchChunks = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RefetchChunks = append(m.RefetchChunks, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType) + if msglen < 0 { + return ErrInvalidLengthTypes } - case 3: + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > 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 RejectSenders", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13903,23 +4197,25 @@ func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex])) + m.ByzantineValidators = append(m.ByzantineValidators, types.Evidence{}) + if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -13942,7 +4238,7 @@ func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResponseBeginRecheckTx) Unmarshal(dAtA []byte) error { +func (m *RequestBeginRecheckTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13965,17 +4261,17 @@ func (m *ResponseBeginRecheckTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResponseBeginRecheckTx: wiretype end group for non-group") + return fmt.Errorf("proto: RequestBeginRecheckTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseBeginRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestBeginRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } - m.Code = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13985,11 +4281,25 @@ func (m *ResponseBeginRecheckTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= uint32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -14011,7 +4321,7 @@ func (m *ResponseBeginRecheckTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResponseEndRecheckTx) Unmarshal(dAtA []byte) error { +func (m *RequestEndRecheckTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14034,17 +4344,17 @@ func (m *ResponseEndRecheckTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResponseEndRecheckTx: wiretype end group for non-group") + return fmt.Errorf("proto: RequestEndRecheckTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseEndRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestEndRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } - m.Code = 0 + m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14054,7 +4364,7 @@ func (m *ResponseEndRecheckTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= uint32(b&0x7F) << shift + m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -14080,7 +4390,7 @@ func (m *ResponseEndRecheckTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConsensusParams) Unmarshal(dAtA []byte) error { +func (m *Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14103,15 +4413,15 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConsensusParams: wiretype end group for non-group") + return fmt.Errorf("proto: Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire) + 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 Block", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14138,16 +4448,15 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Block == nil { - m.Block = &BlockParams{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.ResponseException{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_Exception{v} iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14174,16 +4483,15 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Evidence == nil { - m.Evidence = &types1.EvidenceParams{} - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.ResponseEcho{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_Echo{v} iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14210,16 +4518,15 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Validator == nil { - m.Validator = &types1.ValidatorParams{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.ResponseFlush{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_Flush{v} iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14246,173 +4553,15 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Version == nil { - m.Version = &types1.VersionParams{} - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.ResponseInfo{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_Info{v} 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 *BlockParams) 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: BlockParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - m.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) - } - m.MaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (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 - 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: LastCommitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SetOption", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14439,66 +4588,17 @@ func (m *LastCommitInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Votes = append(m.Votes, VoteInfo{}) - if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.ResponseSetOption{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_SetOption{v} iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - 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: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14508,27 +4608,30 @@ func (m *Event) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + v := &types.ResponseInitChain{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_InitChain{v} iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14555,66 +4658,17 @@ func (m *Event) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, EventAttribute{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.ResponseQuery{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_Query{v} 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 *EventAttribute) 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: EventAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14624,31 +4678,32 @@ func (m *EventAttribute) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} + v := &types.ResponseBeginBlock{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.Value = &Response_BeginBlock{v} iNdEx = postIndex - case 2: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14658,31 +4713,32 @@ func (m *EventAttribute) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} + v := &ResponseCheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.Value = &Response_CheckTx{v} iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14692,67 +4748,32 @@ func (m *EventAttribute) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Index = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + v := &types.ResponseDeliverTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxResult: 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.Value = &Response_DeliverTx{v} + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType) } - m.Height = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14762,16 +4783,32 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.ResponseEndBlock{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_EndBlock{v} + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) } - m.Index = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14781,16 +4818,32 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Index |= uint32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.ResponseCommit{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_Commit{v} + iNdEx = postIndex + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14800,29 +4853,30 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen 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{} + v := &types.ResponseListSnapshots{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.Value = &Response_ListSnapshots{v} iNdEx = postIndex - case 4: + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14849,65 +4903,17 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &types.ResponseOfferSnapshot{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_OfferSnapshot{v} 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 *Validator) 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14917,31 +4923,32 @@ func (m *Validator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} + v := &types.ResponseLoadSnapshotChunk{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.Value = &Response_LoadSnapshotChunk{v} iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType) } - m.Power = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -14951,64 +4958,30 @@ func (m *Validator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Power |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + v := &types.ResponseApplySnapshotChunk{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Value = &Response_ApplySnapshotChunk{v} + iNdEx = postIndex + case 1000: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BeginRecheckTx", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15035,15 +5008,17 @@ func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + v := &ResponseBeginRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } + m.Value = &Response_BeginRecheckTx{v} iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + case 1001: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndRecheckTx", wireType) } - m.Power = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15053,11 +5028,27 @@ func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Power |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ResponseEndRecheckTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_EndRecheckTx{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -15079,7 +5070,7 @@ func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error { } return nil } -func (m *VoteInfo) Unmarshal(dAtA []byte) error { +func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15102,17 +5093,36 @@ func (m *VoteInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group") + return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15122,30 +5132,31 @@ func (m *VoteInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15155,67 +5166,80 @@ func (m *VoteInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.SignedLastBlock = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthTypes } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Evidence) 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 + m.Log = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", 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 } - if iNdEx >= l { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Evidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + 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 Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) } - m.Type = 0 + m.GasUsed = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15225,14 +5249,14 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= EvidenceType(b&0x7F) << shift + m.GasUsed |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15259,15 +5283,16 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Events = append(m.Events, types.Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) } - m.Height = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15277,16 +5302,29 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + 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 + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15296,30 +5334,48 @@ func (m *Evidence) 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 } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 10: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + m.Priority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Priority |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MempoolError", wireType) } - m.TotalVotingPower = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15329,11 +5385,24 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalVotingPower |= int64(b&0x7F) << shift + 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.MempoolError = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -15355,7 +5424,7 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } return nil } -func (m *Snapshot) Unmarshal(dAtA []byte) error { +func (m *ResponseBeginRecheckTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15378,55 +5447,17 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Snapshot: wiretype end group for non-group") + return fmt.Errorf("proto: ResponseBeginRecheckTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResponseBeginRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field 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 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } - m.Chunks = 0 + m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15436,50 +5467,66 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Chunks |= uint32(b&0x7F) << shift + m.Code |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err } - if byteLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResponseEndRecheckTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseEndRecheckTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseEndRecheckTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } - var byteLen int + m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -15489,26 +5536,11 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.Code |= uint32(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.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/abci/types/util.go b/abci/types/util.go index 8205fef7e..0d6bc9297 100644 --- a/abci/types/util.go +++ b/abci/types/util.go @@ -2,12 +2,14 @@ package types import ( "sort" + + "github.com/tendermint/tendermint/abci/types" ) //------------------------------------------------------------------------------ // ValidatorUpdates is a list of validators that implements the Sort interface -type ValidatorUpdates []ValidatorUpdate +type ValidatorUpdates []types.ValidatorUpdate var _ sort.Interface = (ValidatorUpdates)(nil) diff --git a/blockchain/msgs.go b/blockchain/msgs.go index 3b2a7e099..208f90bb3 100644 --- a/blockchain/msgs.go +++ b/blockchain/msgs.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/gogo/protobuf/proto" + tmbcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" bcproto "github.com/line/ostracon/proto/ostracon/blockchain" "github.com/line/ostracon/types" @@ -24,15 +25,15 @@ func EncodeMsg(pb proto.Message) ([]byte, error) { msg := bcproto.Message{} switch pb := pb.(type) { - case *bcproto.BlockRequest: + case *tmbcproto.BlockRequest: msg.Sum = &bcproto.Message_BlockRequest{BlockRequest: pb} case *bcproto.BlockResponse: msg.Sum = &bcproto.Message_BlockResponse{BlockResponse: pb} - case *bcproto.NoBlockResponse: + case *tmbcproto.NoBlockResponse: msg.Sum = &bcproto.Message_NoBlockResponse{NoBlockResponse: pb} - case *bcproto.StatusRequest: + case *tmbcproto.StatusRequest: msg.Sum = &bcproto.Message_StatusRequest{StatusRequest: pb} - case *bcproto.StatusResponse: + case *tmbcproto.StatusResponse: msg.Sum = &bcproto.Message_StatusResponse{StatusResponse: pb} default: return nil, fmt.Errorf("unknown message type %T", pb) @@ -78,7 +79,7 @@ func ValidateMsg(pb proto.Message) error { } switch msg := pb.(type) { - case *bcproto.BlockRequest: + case *tmbcproto.BlockRequest: if msg.Height < 0 { return errors.New("negative Height") } @@ -87,11 +88,11 @@ func ValidateMsg(pb proto.Message) error { if err != nil { return err } - case *bcproto.NoBlockResponse: + case *tmbcproto.NoBlockResponse: if msg.Height < 0 { return errors.New("negative Height") } - case *bcproto.StatusResponse: + case *tmbcproto.StatusResponse: if msg.Base < 0 { return errors.New("negative Base") } @@ -101,7 +102,7 @@ func ValidateMsg(pb proto.Message) error { if msg.Base > msg.Height { return fmt.Errorf("base %v cannot be greater than height %v", msg.Base, msg.Height) } - case *bcproto.StatusRequest: + case *tmbcproto.StatusRequest: return nil default: return fmt.Errorf("unknown message type %T", msg) diff --git a/blockchain/msgs_test.go b/blockchain/msgs_test.go index d10f15a48..b392713d6 100644 --- a/blockchain/msgs_test.go +++ b/blockchain/msgs_test.go @@ -9,6 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmbcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" + bcproto "github.com/line/ostracon/proto/ostracon/blockchain" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" @@ -28,7 +30,7 @@ func TestBcBlockRequestMessageValidateBasic(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.testName, func(t *testing.T) { - request := bcproto.BlockRequest{Height: tc.requestHeight} + request := tmbcproto.BlockRequest{Height: tc.requestHeight} assert.Equal(t, tc.expectErr, ValidateMsg(&request) != nil, "Validate Basic had an unexpected result") }) } @@ -48,14 +50,14 @@ func TestBcNoBlockResponseMessageValidateBasic(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.testName, func(t *testing.T) { - nonResponse := bcproto.NoBlockResponse{Height: tc.nonResponseHeight} + nonResponse := tmbcproto.NoBlockResponse{Height: tc.nonResponseHeight} assert.Equal(t, tc.expectErr, ValidateMsg(&nonResponse) != nil, "Validate Basic had an unexpected result") }) } } func TestBcStatusRequestMessageValidateBasic(t *testing.T) { - request := bcproto.StatusRequest{} + request := tmbcproto.StatusRequest{} assert.NoError(t, ValidateMsg(&request)) } @@ -73,7 +75,7 @@ func TestBcStatusResponseMessageValidateBasic(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.testName, func(t *testing.T) { - response := bcproto.StatusResponse{Height: tc.responseHeight} + response := tmbcproto.StatusResponse{Height: tc.responseHeight} assert.Equal(t, tc.expectErr, ValidateMsg(&response) != nil, "Validate Basic had an unexpected result") }) } @@ -94,25 +96,25 @@ func TestBlockchainMessageVectors(t *testing.T) { expBytes string }{ {"BlockRequestMessage", &bcproto.Message{Sum: &bcproto.Message_BlockRequest{ - BlockRequest: &bcproto.BlockRequest{Height: 1}}}, "0a020801"}, + BlockRequest: &tmbcproto.BlockRequest{Height: 1}}}, "0a020801"}, {"BlockRequestMessage", &bcproto.Message{Sum: &bcproto.Message_BlockRequest{ - BlockRequest: &bcproto.BlockRequest{Height: math.MaxInt64}}}, + BlockRequest: &tmbcproto.BlockRequest{Height: math.MaxInt64}}}, "0a0a08ffffffffffffffff7f"}, {"BlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_BlockResponse{ BlockResponse: &bcproto.BlockResponse{Block: bpb}}}, "1a720a700a5d0a04080b100b1803220b088092b8c398feffffff012a0212003a20c4da88e876062aa1543400d50d0eaa0dac88096057949cfb7bca7f3a48c04bf96a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855120d0a0b48656c6c6f20576f726c641a00"}, {"NoBlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_NoBlockResponse{ - NoBlockResponse: &bcproto.NoBlockResponse{Height: 1}}}, "12020801"}, + NoBlockResponse: &tmbcproto.NoBlockResponse{Height: 1}}}, "12020801"}, {"NoBlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_NoBlockResponse{ - NoBlockResponse: &bcproto.NoBlockResponse{Height: math.MaxInt64}}}, + NoBlockResponse: &tmbcproto.NoBlockResponse{Height: math.MaxInt64}}}, "120a08ffffffffffffffff7f"}, {"StatusRequestMessage", &bcproto.Message{Sum: &bcproto.Message_StatusRequest{ - StatusRequest: &bcproto.StatusRequest{}}}, + StatusRequest: &tmbcproto.StatusRequest{}}}, "2200"}, {"StatusResponseMessage", &bcproto.Message{Sum: &bcproto.Message_StatusResponse{ - StatusResponse: &bcproto.StatusResponse{Height: 1, Base: 2}}}, + StatusResponse: &tmbcproto.StatusResponse{Height: 1, Base: 2}}}, "2a0408011002"}, {"StatusResponseMessage", &bcproto.Message{Sum: &bcproto.Message_StatusResponse{ - StatusResponse: &bcproto.StatusResponse{Height: math.MaxInt64, Base: math.MaxInt64}}}, + StatusResponse: &tmbcproto.StatusResponse{Height: math.MaxInt64, Base: math.MaxInt64}}}, "2a1408ffffffffffffffff7f10ffffffffffffffff7f"}, } diff --git a/blockchain/v0/reactor.go b/blockchain/v0/reactor.go index 8ec839ff1..ff006e2ae 100644 --- a/blockchain/v0/reactor.go +++ b/blockchain/v0/reactor.go @@ -5,10 +5,12 @@ import ( "reflect" "time" + bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" + bc "github.com/line/ostracon/blockchain" "github.com/line/ostracon/libs/log" "github.com/line/ostracon/p2p" - bcproto "github.com/line/ostracon/proto/ostracon/blockchain" + ocbcproto "github.com/line/ostracon/proto/ostracon/blockchain" sm "github.com/line/ostracon/state" "github.com/line/ostracon/store" "github.com/line/ostracon/types" @@ -189,7 +191,7 @@ func (bcR *BlockchainReactor) respondToPeer(msg *bcproto.BlockRequest, return false } - msgBytes, err := bc.EncodeMsg(&bcproto.BlockResponse{Block: bl}) + msgBytes, err := bc.EncodeMsg(&ocbcproto.BlockResponse{Block: bl}) if err != nil { bcR.Logger.Error("could not marshal msg", "err", err) return false @@ -229,7 +231,7 @@ func (bcR *BlockchainReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte) switch msg := msg.(type) { case *bcproto.BlockRequest: bcR.respondToPeer(msg, src) - case *bcproto.BlockResponse: + case *ocbcproto.BlockResponse: bi, err := types.BlockFromProto(msg.Block) if err != nil { bcR.Logger.Error("Block content is invalid", "err", err) diff --git a/blockchain/v0/reactor_test.go b/blockchain/v0/reactor_test.go index e0aff57fb..5e1fc0426 100644 --- a/blockchain/v0/reactor_test.go +++ b/blockchain/v0/reactor_test.go @@ -10,9 +10,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" "github.com/line/ostracon/mempool/mock" @@ -312,16 +313,16 @@ func makeBlock(privVal types.PrivValidator, height int64, state sm.State, lastCo } type testApp struct { - abci.BaseApplication + ocabci.BaseApplication } -var _ abci.Application = (*testApp)(nil) +var _ ocabci.Application = (*testApp)(nil) 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) BeginBlock(req ocabci.RequestBeginBlock) abci.ResponseBeginBlock { return abci.ResponseBeginBlock{} } @@ -333,12 +334,12 @@ func (app *testApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx return abci.ResponseDeliverTx{Events: []abci.Event{}} } -func (app *testApp) CheckTxSync(req abci.RequestCheckTx) abci.ResponseCheckTx { - return abci.ResponseCheckTx{} +func (app *testApp) CheckTxSync(req abci.RequestCheckTx) ocabci.ResponseCheckTx { + return ocabci.ResponseCheckTx{} } -func (app *testApp) CheckTxAsync(req abci.RequestCheckTx, callback abci.CheckTxCallback) { - callback(abci.ResponseCheckTx{}) +func (app *testApp) CheckTxAsync(req abci.RequestCheckTx, callback ocabci.CheckTxCallback) { + callback(ocabci.ResponseCheckTx{}) } func (app *testApp) Commit() abci.ResponseCommit { diff --git a/blockchain/v1/reactor.go b/blockchain/v1/reactor.go index 6ee8e252c..238195dfc 100644 --- a/blockchain/v1/reactor.go +++ b/blockchain/v1/reactor.go @@ -5,11 +5,13 @@ import ( "reflect" "time" + bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" + "github.com/line/ostracon/behaviour" bc "github.com/line/ostracon/blockchain" "github.com/line/ostracon/libs/log" "github.com/line/ostracon/p2p" - bcproto "github.com/line/ostracon/proto/ostracon/blockchain" + ocbcproto "github.com/line/ostracon/proto/ostracon/blockchain" sm "github.com/line/ostracon/state" "github.com/line/ostracon/store" "github.com/line/ostracon/types" @@ -213,7 +215,7 @@ func (bcR *BlockchainReactor) sendBlockToPeer(msg *bcproto.BlockRequest, bcR.Logger.Error("Could not send block message to peer", "err", err) return false } - msgBytes, err := bc.EncodeMsg(&bcproto.BlockResponse{Block: pbbi}) + msgBytes, err := bc.EncodeMsg(&ocbcproto.BlockResponse{Block: pbbi}) if err != nil { bcR.Logger.Error("unable to marshal msg", "err", err) return false @@ -287,7 +289,7 @@ func (bcR *BlockchainReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte) bcR.Logger.Error("Could not send status message to peer", "src", src) } - case *bcproto.BlockResponse: + case *ocbcproto.BlockResponse: bi, err := types.BlockFromProto(msg.Block) if err != nil { bcR.Logger.Error("error transition block from protobuf", "err", err) @@ -541,8 +543,8 @@ func (bcR *BlockchainReactor) switchToConsensus() { // Called by FSM and pool: // - pool calls when it detects slow peer or when peer times out // - FSM calls when: -// - adding a block (addBlock) fails -// - reactor processing of a block reports failure and FSM sends back the peers of first and second blocks +// - adding a block (addBlock) fails +// - reactor processing of a block reports failure and FSM sends back the peers of first and second blocks func (bcR *BlockchainReactor) sendPeerError(err error, peerID p2p.ID) { bcR.Logger.Info("sendPeerError:", "peer", peerID, "error", err) msgData := bcFsmMessage{ diff --git a/blockchain/v1/reactor_test.go b/blockchain/v1/reactor_test.go index 6f69d2c23..92d89becb 100644 --- a/blockchain/v1/reactor_test.go +++ b/blockchain/v1/reactor_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" abci "github.com/line/ostracon/abci/types" @@ -18,7 +19,6 @@ import ( "github.com/line/ostracon/libs/log" "github.com/line/ostracon/mempool/mock" "github.com/line/ostracon/p2p" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/proxy" sm "github.com/line/ostracon/state" "github.com/line/ostracon/store" diff --git a/blockchain/v2/io.go b/blockchain/v2/io.go index 9cc9e5882..8ee9811f4 100644 --- a/blockchain/v2/io.go +++ b/blockchain/v2/io.go @@ -3,9 +3,11 @@ package v2 import ( "fmt" + bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" + bc "github.com/line/ostracon/blockchain" "github.com/line/ostracon/p2p" - bcproto "github.com/line/ostracon/proto/ostracon/blockchain" + ocbcproto "github.com/line/ostracon/proto/ostracon/blockchain" "github.com/line/ostracon/state" "github.com/line/ostracon/types" ) @@ -91,7 +93,7 @@ func (sio *switchIO) sendBlockToPeer(block *types.Block, peerID p2p.ID) error { return err } - msgBytes, err := bc.EncodeMsg(&bcproto.BlockResponse{Block: bpb}) + msgBytes, err := bc.EncodeMsg(&ocbcproto.BlockResponse{Block: bpb}) if err != nil { return err } diff --git a/blockchain/v2/reactor.go b/blockchain/v2/reactor.go index 30c860d9a..0464215a3 100644 --- a/blockchain/v2/reactor.go +++ b/blockchain/v2/reactor.go @@ -5,12 +5,14 @@ import ( "fmt" "time" + bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" + "github.com/line/ostracon/behaviour" bc "github.com/line/ostracon/blockchain" "github.com/line/ostracon/libs/log" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/p2p" - bcproto "github.com/line/ostracon/proto/ostracon/blockchain" + ocbcproto "github.com/line/ostracon/proto/ostracon/blockchain" "github.com/line/ostracon/state" "github.com/line/ostracon/types" ) @@ -500,7 +502,7 @@ func (r *BlockchainReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte) { } r.mtx.RUnlock() - case *bcproto.BlockResponse: + case *ocbcproto.BlockResponse: bi, err := types.BlockFromProto(msg.Block) if err != nil { r.logger.Error("error transitioning block from protobuf", "err", err) diff --git a/blockchain/v2/reactor_test.go b/blockchain/v2/reactor_test.go index e48e7cd64..98b88cd87 100644 --- a/blockchain/v2/reactor_test.go +++ b/blockchain/v2/reactor_test.go @@ -9,6 +9,8 @@ import ( "testing" "time" + bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" + abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/behaviour" bc "github.com/line/ostracon/blockchain" @@ -18,7 +20,6 @@ import ( "github.com/line/ostracon/mempool/mock" "github.com/line/ostracon/p2p" "github.com/line/ostracon/p2p/conn" - bcproto "github.com/line/ostracon/proto/ostracon/blockchain" "github.com/line/ostracon/proxy" sm "github.com/line/ostracon/state" "github.com/line/ostracon/store" diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index 12493f791..79f9cb41c 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -12,19 +12,19 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" config2 "github.com/line/ostracon/config" abcicli "github.com/line/ostracon/abci/client" - abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/evidence" "github.com/line/ostracon/libs/log" "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" mempl "github.com/line/ostracon/mempool" "github.com/line/ostracon/p2p" - tmproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" "github.com/line/ostracon/store" "github.com/line/ostracon/types" diff --git a/consensus/common_test.go b/consensus/common_test.go index bd452915b..9b8cea9e1 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -17,12 +17,14 @@ import ( "github.com/go-kit/log/term" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" abcicli "github.com/line/ostracon/abci/client" "github.com/line/ostracon/abci/example/counter" "github.com/line/ostracon/abci/example/kvstore" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" cstypes "github.com/line/ostracon/consensus/types" tmbytes "github.com/line/ostracon/libs/bytes" @@ -33,7 +35,6 @@ import ( mempl "github.com/line/ostracon/mempool" "github.com/line/ostracon/p2p" "github.com/line/ostracon/privval" - tmproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" "github.com/line/ostracon/store" "github.com/line/ostracon/types" @@ -381,7 +382,7 @@ func subscribeToVoter(cs *State, addr []byte) <-chan tmpubsub.Message { //------------------------------------------------------------------------------- // consensus states -func newState(state sm.State, pv types.PrivValidator, app abci.Application) *State { +func newState(state sm.State, pv types.PrivValidator, app ocabci.Application) *State { config := cfg.ResetTestRoot("consensus_state_test") return newStateWithConfig(config, state, pv, app) } @@ -390,7 +391,7 @@ func newStateWithConfig( thisConfig *cfg.Config, state sm.State, pv types.PrivValidator, - app abci.Application, + app ocabci.Application, ) *State { blockDB := dbm.NewMemDB() return newStateWithConfigAndBlockStore(thisConfig, state, pv, app, blockDB) @@ -400,7 +401,7 @@ func newStateWithConfigAndBlockStore( thisConfig *cfg.Config, state sm.State, pv types.PrivValidator, - app abci.Application, + app ocabci.Application, blockDB dbm.DB, ) *State { return newStateWithConfigAndBlockStoreWithLoggers(thisConfig, state, pv, app, blockDB, DefaultTestLoggers()) @@ -410,7 +411,7 @@ func newStateWithConfigAndBlockStoreWithLoggers( thisConfig *cfg.Config, state sm.State, pv types.PrivValidator, - app abci.Application, + app ocabci.Application, blockDB dbm.DB, loggers TestLoggers, ) *State { @@ -466,7 +467,7 @@ func randState(nValidators int) (*State, []*validatorStub) { return randStateWithApp(nValidators, counter.NewApplication(true)) } -func randStateWithApp(nValidators int, app abci.Application) (*State, []*validatorStub) { +func randStateWithApp(nValidators int, app ocabci.Application) (*State, []*validatorStub) { // Get State state, privVals := randGenesisState(nValidators, false, 10) state.LastProofHash = []byte{2} @@ -791,7 +792,7 @@ func consensusLogger() log.Logger { } func randConsensusNet(nValidators int, testName string, tickerFunc func() TimeoutTicker, - appFunc func() abci.Application, configOpts ...func(*cfg.Config)) ([]*State, cleanupFunc) { + appFunc func() ocabci.Application, configOpts ...func(*cfg.Config)) ([]*State, cleanupFunc) { genDoc, privVals := randGenesisDoc(nValidators, false, 30) css := make([]*State, nValidators) logger := consensusLogger() @@ -832,7 +833,7 @@ func randConsensusNetWithPeers( nPeers int, testName string, tickerFunc func() TimeoutTicker, - appFunc func(string) abci.Application, + appFunc func(string) ocabci.Application, ) ([]*State, *types.GenesisDoc, *cfg.Config, cleanupFunc) { genDoc, privVals := randGenesisDoc(nValidators, false, testMinPower) css, peer0Config, configRootDirs := createPeersAndValidators(nValidators, nPeers, testName, @@ -847,7 +848,7 @@ func randConsensusNetWithPeers( func createPeersAndValidators(nValidators, nPeers int, testName string, genDoc *types.GenesisDoc, privVals []types.PrivValidator, tickerFunc func() TimeoutTicker, - appFunc func(string) abci.Application) ([]*State, *cfg.Config, []string) { + appFunc func(string) ocabci.Application) ([]*State, *cfg.Config, []string) { css := make([]*State, nPeers) logger := consensusLogger() var peer0Config *cfg.Config @@ -904,7 +905,7 @@ func getSwitchIndex(switches []*p2p.Switch, peer p2p.Peer) int { panic("didnt find peer in switches") } -//------------------------------------------------------------------------------- +// ------------------------------------------------------------------------------- // genesis func randGenesisDoc(numValidators int, randPower bool, minPower int64) (*types.GenesisDoc, []types.PrivValidator) { validators := make([]types.GenesisValidator, numValidators) @@ -983,11 +984,11 @@ func (*mockTicker) SetLogger(log.Logger) {} //------------------------------------ -func newCounter() abci.Application { +func newCounter() ocabci.Application { return counter.NewApplication(true) } -func newPersistentKVStore() abci.Application { +func newPersistentKVStore() ocabci.Application { dir, err := ioutil.TempDir("", "persistent-kvstore") if err != nil { panic(err) @@ -995,7 +996,7 @@ func newPersistentKVStore() abci.Application { return kvstore.NewPersistentKVStoreApplication(dir) } -func newPersistentKVStoreWithPath(dbDir string) abci.Application { +func newPersistentKVStoreWithPath(dbDir string) ocabci.Application { return kvstore.NewPersistentKVStoreApplication(dbDir) } diff --git a/consensus/invalid_test.go b/consensus/invalid_test.go index b5ca03c7e..adba6bd59 100644 --- a/consensus/invalid_test.go +++ b/consensus/invalid_test.go @@ -3,11 +3,12 @@ package consensus import ( "testing" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/libs/log" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/p2p" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index b8c4bf76b..a397f07c9 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -11,10 +11,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/abci/example/code" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" mempl "github.com/line/ostracon/mempool" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" @@ -154,12 +155,12 @@ func TestMempoolRmBadTx(t *testing.T) { resCommit := app.Commit() assert.True(t, len(resCommit.Data) > 0) - resBeginRecheckTx := app.BeginRecheckTx(abci.RequestBeginRecheckTx{}) + resBeginRecheckTx := app.BeginRecheckTx(ocabci.RequestBeginRecheckTx{}) assert.Equal(t, code.CodeTypeOK, resBeginRecheckTx.Code) // There is no tx to recheck - resEndRecheckTx := app.EndRecheckTx(abci.RequestEndRecheckTx{}) + resEndRecheckTx := app.EndRecheckTx(ocabci.RequestEndRecheckTx{}) assert.Equal(t, code.CodeTypeOK, resEndRecheckTx.Code) checkTxErrorCh := make(chan error) @@ -171,7 +172,7 @@ func TestMempoolRmBadTx(t *testing.T) { // and the tx should get removed from the pool assertMempool(cs.txNotifier).CheckTxAsync(txBytes, mempl.TxInfo{}, func(err error) { checkTxErrorCh <- err - }, func(r *abci.Response) { + }, func(r *ocabci.Response) { if r.GetCheckTx().Code != code.CodeTypeBadNonce { t.Errorf("expected checktx to return bad nonce, got %v", r) return @@ -225,7 +226,7 @@ func TestMempoolRmBadTx(t *testing.T) { // CounterApplication that maintains a mempool state and resets it upon commit type CounterApplication struct { - abci.BaseApplication + ocabci.BaseApplication txCount int mempoolTxCount int @@ -251,30 +252,30 @@ func (app *CounterApplication) DeliverTx(req abci.RequestDeliverTx) abci.Respons return abci.ResponseDeliverTx{Code: code.CodeTypeOK} } -func (app *CounterApplication) CheckTxSync(req abci.RequestCheckTx) abci.ResponseCheckTx { +func (app *CounterApplication) CheckTxSync(req abci.RequestCheckTx) ocabci.ResponseCheckTx { return app.checkTx(req) } -func (app *CounterApplication) CheckTxAsync(req abci.RequestCheckTx, callback abci.CheckTxCallback) { +func (app *CounterApplication) CheckTxAsync(req abci.RequestCheckTx, callback ocabci.CheckTxCallback) { callback(app.checkTx(req)) } -func (app *CounterApplication) checkTx(req abci.RequestCheckTx) abci.ResponseCheckTx { +func (app *CounterApplication) checkTx(req abci.RequestCheckTx) ocabci.ResponseCheckTx { txValue := txAsUint64(req.Tx) app.mempoolTxCountMtx.Lock() defer app.mempoolTxCountMtx.Unlock() if txValue != uint64(app.mempoolTxCount) { - return abci.ResponseCheckTx{ + return ocabci.ResponseCheckTx{ Code: code.CodeTypeBadNonce, Log: fmt.Sprintf("Invalid nonce. Expected %v, got %v", app.mempoolTxCount, txValue)} } app.mempoolTxCount++ - return abci.ResponseCheckTx{Code: code.CodeTypeOK} + return ocabci.ResponseCheckTx{Code: code.CodeTypeOK} } -func (app *CounterApplication) BeginRecheckTx(abci.RequestBeginRecheckTx) abci.ResponseBeginRecheckTx { +func (app *CounterApplication) BeginRecheckTx(ocabci.RequestBeginRecheckTx) ocabci.ResponseBeginRecheckTx { app.mempoolTxCount = app.txCount - return abci.ResponseBeginRecheckTx{Code: code.CodeTypeOK} + return ocabci.ResponseBeginRecheckTx{Code: code.CodeTypeOK} } func txAsUint64(tx []byte) uint64 { diff --git a/consensus/msgs.go b/consensus/msgs.go index 72daaf4a8..e33119ff7 100644 --- a/consensus/msgs.go +++ b/consensus/msgs.go @@ -6,12 +6,13 @@ import ( "github.com/gogo/protobuf/proto" + tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cstypes "github.com/line/ostracon/consensus/types" "github.com/line/ostracon/libs/bits" tmmath "github.com/line/ostracon/libs/math" "github.com/line/ostracon/p2p" - tmcons "github.com/line/ostracon/proto/ostracon/consensus" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) diff --git a/consensus/msgs_test.go b/consensus/msgs_test.go index 7c975aac2..1f8e2f85e 100644 --- a/consensus/msgs_test.go +++ b/consensus/msgs_test.go @@ -10,12 +10,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/libs/bits" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/p2p" - tmcons "github.com/line/ostracon/proto/ostracon/consensus" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) diff --git a/consensus/reactor.go b/consensus/reactor.go index 4c417f5ad..4462eaddb 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -9,6 +9,9 @@ import ( "github.com/gogo/protobuf/proto" + tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cstypes "github.com/line/ostracon/consensus/types" "github.com/line/ostracon/libs/bits" tmevents "github.com/line/ostracon/libs/events" @@ -16,8 +19,6 @@ import ( "github.com/line/ostracon/libs/log" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/p2p" - tmcons "github.com/line/ostracon/proto/ostracon/consensus" - tmproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 1c6b85d30..6ac1c96b5 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -15,11 +15,12 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" abcicli "github.com/line/ostracon/abci/client" "github.com/line/ostracon/abci/example/kvstore" - abci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" cstypes "github.com/line/ostracon/consensus/types" cryptoenc "github.com/line/ostracon/crypto/encoding" @@ -31,7 +32,6 @@ import ( mempl "github.com/line/ostracon/mempool" "github.com/line/ostracon/p2p" p2pmock "github.com/line/ostracon/p2p/mock" - tmproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" statemocks "github.com/line/ostracon/state/mocks" "github.com/line/ostracon/store" diff --git a/consensus/replay.go b/consensus/replay.go index 79220d22a..bab2dc794 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -8,7 +8,8 @@ import ( "reflect" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/libs/log" "github.com/line/ostracon/proxy" diff --git a/consensus/replay_stubs.go b/consensus/replay_stubs.go index 50f700fec..e1b60c39c 100644 --- a/consensus/replay_stubs.go +++ b/consensus/replay_stubs.go @@ -1,7 +1,9 @@ package consensus import ( - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/clist" mempl "github.com/line/ostracon/mempool" tmstate "github.com/line/ostracon/proto/ostracon/state" @@ -18,10 +20,10 @@ var _ mempl.Mempool = emptyMempool{} func (emptyMempool) Lock() {} func (emptyMempool) Unlock() {} func (emptyMempool) Size() int { return 0 } -func (emptyMempool) CheckTxSync(_ types.Tx, _ mempl.TxInfo) (*abci.Response, error) { +func (emptyMempool) CheckTxSync(_ types.Tx, _ mempl.TxInfo) (*ocabci.Response, error) { return nil, nil } -func (emptyMempool) CheckTxAsync(_ types.Tx, _ mempl.TxInfo, _ func(error), _ func(*abci.Response)) { +func (emptyMempool) CheckTxAsync(_ types.Tx, _ mempl.TxInfo, _ func(error), _ func(*ocabci.Response)) { } func (emptyMempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} } func (emptyMempool) ReapMaxBytesMaxGasMaxTxs(_, _, _ int64) types.Txs { return types.Txs{} } @@ -66,7 +68,7 @@ func newMockProxyApp(appHash []byte, abciResponses *tmstate.ABCIResponses) proxy } type mockProxyApp struct { - abci.BaseApplication + ocabci.BaseApplication appHash []byte txCount int diff --git a/consensus/replay_test.go b/consensus/replay_test.go index bd04a1d4f..1ec6e48dc 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -16,10 +16,12 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/abci/example/kvstore" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" "github.com/line/ostracon/crypto" cryptoenc "github.com/line/ostracon/crypto/encoding" @@ -29,7 +31,7 @@ import ( mempl "github.com/line/ostracon/mempool" "github.com/line/ostracon/privval" tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/proxy" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" @@ -325,7 +327,7 @@ func (w *crashingWAL) Start() error { return w.next.Start() } func (w *crashingWAL) Stop() error { return w.next.Stop() } func (w *crashingWAL) Wait() { w.next.Wait() } -//------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------ type testSim struct { GenesisState sm.State Config *cfg.Config @@ -625,13 +627,13 @@ func TestMockProxyApp(t *testing.T) { abciRes := new(tmstate.ABCIResponses) abciRes.DeliverTxs = make([]*abci.ResponseDeliverTx, len(loadedAbciRes.DeliverTxs)) // Execute transactions and get hash. - proxyCb := func(req *abci.Request, res *abci.Response) { - if r, ok := res.Value.(*abci.Response_DeliverTx); ok { + proxyCb := func(req *ocabci.Request, res *ocabci.Response) { + if r, ok := res.Value.(*ocabci.Response_DeliverTx); ok { // TODO: make use of res.Log // TODO: make use of this info // Blocks may include invalid txs. txRes := r.DeliverTx - if txRes.Code == abci.CodeTypeOK { + if txRes.Code == ocabci.CodeTypeOK { validTxs++ } else { logger.Debug("Invalid tx", "code", txRes.Code, "log", txRes.Log) @@ -1029,7 +1031,7 @@ func makeBlock(state sm.State, lastBlock *types.Block, lastBlockMeta *types.Bloc } type badApp struct { - abci.BaseApplication + ocabci.BaseApplication numBlocks byte height byte allHashesAreWrong bool @@ -1093,7 +1095,7 @@ func makeBlockchainFromWAL(wal WAL) ([]*types.Block, []*types.Commit, error) { case EndHeightMessage: // if its not the first one, we have a full block if thisBlockParts != nil { - var pbb = new(tmproto.Block) + var pbb = new(ocproto.Block) bz, err := ioutil.ReadAll(thisBlockParts.GetReader()) if err != nil { panic(err) @@ -1137,7 +1139,7 @@ func makeBlockchainFromWAL(wal WAL) ([]*types.Block, []*types.Commit, error) { if err != nil { panic(err) } - var pbb = new(tmproto.Block) + var pbb = new(ocproto.Block) err = proto.Unmarshal(bz, pbb) if err != nil { panic(err) @@ -1292,7 +1294,7 @@ func TestHandshakeUpdatesValidators(t *testing.T) { // returns the vals on InitChain type initChainApp struct { - abci.BaseApplication + ocabci.BaseApplication vals []abci.ValidatorUpdate } diff --git a/consensus/state.go b/consensus/state.go index c3160dff0..1f4ad89c7 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -12,6 +12,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cfg "github.com/line/ostracon/config" cstypes "github.com/line/ostracon/consensus/types" "github.com/line/ostracon/crypto" @@ -24,7 +26,7 @@ import ( "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/p2p" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" @@ -1984,7 +1986,7 @@ func (cs *State) addProposalBlockPart(msg *BlockPartMessage, peerID p2p.ID) (add return added, err } - var pbb = new(tmproto.Block) + var pbb = new(ocproto.Block) err = proto.Unmarshal(bz, pbb) if err != nil { return added, err diff --git a/consensus/state_test.go b/consensus/state_test.go index a25b63c71..6dd4944fb 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -7,21 +7,22 @@ import ( "testing" "time" - abci "github.com/line/ostracon/abci/types" - "github.com/line/ostracon/abci/types/mocks" - "github.com/stretchr/testify/mock" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/line/ostracon/abci/example/counter" + ocabci "github.com/line/ostracon/abci/types" + "github.com/line/ostracon/abci/types/mocks" cstypes "github.com/line/ostracon/consensus/types" "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/libs/log" tmpubsub "github.com/line/ostracon/libs/pubsub" tmrand "github.com/line/ostracon/libs/rand" p2pmock "github.com/line/ostracon/p2p/mock" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) @@ -2099,8 +2100,8 @@ func TestPruneBlocks(t *testing.T) { mockApp := &mocks.Application{} mockApp.On("BeginBlock", mock.Anything).Return(abci.ResponseBeginBlock{}) mockApp.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{}) - mockApp.On("BeginRecheckTx", mock.Anything).Return(abci.ResponseBeginRecheckTx{Code: abci.CodeTypeOK}) - mockApp.On("EndRecheckTx", mock.Anything).Return(abci.ResponseEndRecheckTx{Code: abci.CodeTypeOK}) + mockApp.On("BeginRecheckTx", mock.Anything).Return(ocabci.ResponseBeginRecheckTx{Code: ocabci.CodeTypeOK}) + mockApp.On("EndRecheckTx", mock.Anything).Return(ocabci.ResponseEndRecheckTx{Code: ocabci.CodeTypeOK}) // Mocking behaviour to response `RetainHeight` for pruneBlocks mockApp.On("Commit", mock.Anything, mock.Anything).Return(abci.ResponseCommit{RetainHeight: 1}) diff --git a/consensus/types/height_vote_set.go b/consensus/types/height_vote_set.go index 711331dc9..6581c7ff3 100644 --- a/consensus/types/height_vote_set.go +++ b/consensus/types/height_vote_set.go @@ -6,10 +6,11 @@ import ( "strings" "sync" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmjson "github.com/line/ostracon/libs/json" tmmath "github.com/line/ostracon/libs/math" "github.com/line/ostracon/p2p" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) diff --git a/consensus/types/height_vote_set_test.go b/consensus/types/height_vote_set_test.go index d2f448622..9de1ad145 100644 --- a/consensus/types/height_vote_set_test.go +++ b/consensus/types/height_vote_set_test.go @@ -5,10 +5,11 @@ import ( "os" "testing" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cfg "github.com/line/ostracon/config" "github.com/line/ostracon/crypto/tmhash" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" ) diff --git a/consensus/wal.go b/consensus/wal.go index 7280e2df6..13c4c150f 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -11,12 +11,13 @@ import ( "github.com/gogo/protobuf/proto" + tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" + auto "github.com/line/ostracon/libs/autofile" tmjson "github.com/line/ostracon/libs/json" "github.com/line/ostracon/libs/log" tmos "github.com/line/ostracon/libs/os" "github.com/line/ostracon/libs/service" - tmcons "github.com/line/ostracon/proto/ostracon/consensus" tmtime "github.com/line/ostracon/types/time" ) diff --git a/crypto/encoding/codec.go b/crypto/encoding/codec.go index 333206eb0..4e20536b8 100644 --- a/crypto/encoding/codec.go +++ b/crypto/encoding/codec.go @@ -3,11 +3,12 @@ package encoding import ( "fmt" + pc "github.com/tendermint/tendermint/proto/tendermint/crypto" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/crypto/secp256k1" "github.com/line/ostracon/libs/json" - pc "github.com/line/ostracon/proto/ostracon/crypto" ) func init() { diff --git a/crypto/merkle/proof.go b/crypto/merkle/proof.go index 14f27e4d8..e9c65e9d7 100644 --- a/crypto/merkle/proof.go +++ b/crypto/merkle/proof.go @@ -5,8 +5,9 @@ import ( "errors" "fmt" + tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" + "github.com/line/ostracon/crypto/tmhash" - tmcrypto "github.com/line/ostracon/proto/ostracon/crypto" ) const ( diff --git a/crypto/merkle/proof_op.go b/crypto/merkle/proof_op.go index dc98b5ce5..038037cf5 100644 --- a/crypto/merkle/proof_op.go +++ b/crypto/merkle/proof_op.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - tmcrypto "github.com/line/ostracon/proto/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" ) //---------------------------------------- diff --git a/crypto/merkle/proof_test.go b/crypto/merkle/proof_test.go index 625512487..22ab900f0 100644 --- a/crypto/merkle/proof_test.go +++ b/crypto/merkle/proof_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmcrypto "github.com/line/ostracon/proto/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" ) const ProofOpDomino = "test:domino" diff --git a/crypto/merkle/proof_value.go b/crypto/merkle/proof_value.go index ce3214938..c7c8868f5 100644 --- a/crypto/merkle/proof_value.go +++ b/crypto/merkle/proof_value.go @@ -4,8 +4,9 @@ import ( "bytes" "fmt" + tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" + "github.com/line/ostracon/crypto/tmhash" - tmcrypto "github.com/line/ostracon/proto/ostracon/crypto" ) const ProofOpValue = "simple:v" diff --git a/evidence/pool_test.go b/evidence/pool_test.go index 74c4b9dac..63f71f3d7 100644 --- a/evidence/pool_test.go +++ b/evidence/pool_test.go @@ -9,14 +9,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/crypto" "github.com/line/ostracon/evidence" "github.com/line/ostracon/evidence/mocks" "github.com/line/ostracon/libs/log" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" sm "github.com/line/ostracon/state" smmocks "github.com/line/ostracon/state/mocks" "github.com/line/ostracon/store" diff --git a/evidence/reactor_test.go b/evidence/reactor_test.go index 4cbd105f3..bc4bf1ae5 100644 --- a/evidence/reactor_test.go +++ b/evidence/reactor_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" cfg "github.com/line/ostracon/config" @@ -23,7 +24,7 @@ import ( "github.com/line/ostracon/libs/log" "github.com/line/ostracon/p2p" p2pmocks "github.com/line/ostracon/p2p/mocks" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" ) @@ -396,14 +397,14 @@ func TestEvidenceVectors(t *testing.T) { for _, tc := range testCases { tc := tc - evi := make([]tmproto.Evidence, len(tc.evidenceList)) + evi := make([]ocproto.Evidence, len(tc.evidenceList)) for i := 0; i < len(tc.evidenceList); i++ { ev, err := types.EvidenceToProto(tc.evidenceList[i]) require.NoError(t, err, tc.testName) evi[i] = *ev } - epl := tmproto.EvidenceList{ + epl := ocproto.EvidenceList{ Evidence: evi, } diff --git a/evidence/verify_test.go b/evidence/verify_test.go index 54f729bfd..a0da17ce4 100644 --- a/evidence/verify_test.go +++ b/evidence/verify_test.go @@ -8,6 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/crypto" @@ -17,8 +19,6 @@ import ( "github.com/line/ostracon/evidence/mocks" "github.com/line/ostracon/libs/log" "github.com/line/ostracon/light" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" sm "github.com/line/ostracon/state" smmocks "github.com/line/ostracon/state/mocks" "github.com/line/ostracon/types" diff --git a/go.mod b/go.mod index fb9713c24..18650048e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/BurntSushi/toml v1.2.1 github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d - github.com/Workiva/go-datastructures v1.0.52 + github.com/Workiva/go-datastructures v1.0.53 github.com/adlio/schema v1.3.3 github.com/btcsuite/btcd v0.22.1 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce @@ -19,7 +19,6 @@ require ( github.com/golang/protobuf v1.5.2 github.com/google/orderedcode v0.0.1 github.com/gorilla/websocket v1.5.0 - github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect github.com/gtank/merlin v0.1.1 github.com/hdevalence/ed25519consensus v0.0.0-20200813231810-1694d75e712a github.com/lib/pq v1.10.7 @@ -38,6 +37,7 @@ require ( github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.1 github.com/tendermint/go-amino v0.16.0 + github.com/tendermint/tendermint v0.34.19 github.com/tendermint/tm-db v0.6.7 github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e @@ -45,7 +45,6 @@ require ( gonum.org/v1/gonum v0.12.0 google.golang.org/grpc v1.52.3 gopkg.in/yaml.v3 v3.0.1 - gotest.tools v2.2.0+incompatible // indirect ) require ( @@ -72,7 +71,7 @@ require ( github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/golang/snappy v0.0.1 // indirect + github.com/golang/snappy v0.0.3 // indirect github.com/google/btree v1.0.0 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect diff --git a/go.sum b/go.sum index 098bc5ffd..0c7fe0183 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -17,6 +18,17 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -25,6 +37,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -36,40 +49,71 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= -github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/adlio/schema v1.3.0/go.mod h1:51QzxkpeFs6lRY11kPye26IaFPOV+HqEj01t5aXXKfs= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= @@ -79,56 +123,88 @@ github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pY github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coniks-sys/coniks-go v0.0.0-20180722014011-11acf4819b71 h1:MFLTqgfJclmtaQ1SRUrWwmDX/1UBok3XWUethkJ2swQ= github.com/coniks-sys/coniks-go v0.0.0-20180722014011-11acf4819b71/go.mod h1:TrHYHH4Wze7v7Hkwu1MH1W+mCPQKM+gs+PicdEV14o8= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -137,23 +213,44 @@ github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -171,18 +268,28 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -190,6 +297,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -206,10 +315,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -221,8 +333,10 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= @@ -230,6 +344,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -242,84 +357,169 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hdevalence/ed25519consensus v0.0.0-20200813231810-1694d75e712a h1:H7I/CTwAupJEX4g8AesPYRKQY0wbGZxQBlg842dGK3k= github.com/hdevalence/ed25519consensus v0.0.0-20200813231810-1694d75e712a/go.mod h1:V0zo781scjlo5OzNQb2GI8wMt6CD4vs7y1beXtxZEhM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -327,45 +527,78 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2 h1:HFB2fbVIlhIfCfOW81bZFbiC/RvnpXSdhbF2/DJr134= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= @@ -377,25 +610,36 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/r2ishiguro/vrf v0.0.0-20180716233122-192de52975eb h1:3kW8n+FfBaUoqlHxCa6e90PXWpGCWWkdyTZ6F7c9m2I= github.com/r2ishiguro/vrf v0.0.0-20180716233122-192de52975eb/go.mod h1:2NzHJUkr/ERaPNQ2IUuNbB2jMTWYp2DxhcraWbzZj00= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -404,8 +648,12 @@ github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6us github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -414,18 +662,27 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -435,8 +692,13 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -446,20 +708,32 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tendermint v0.34.19 h1:y0P1qI5wSa9IRuhKnTDA6IUcOrLi1hXJuALR+R7HFEk= +github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4= +github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= @@ -467,6 +741,7 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17 github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673 h1:PSg2cEFd+9Ae/r5x5iO8cJ3VmTbZNQp6X8tHDmVJAbA= github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673/go.mod h1:Wq2sZrP++Us4tAw1h58MHS8BGIpC4NmKHfvw2QWBe9U= @@ -475,29 +750,62 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -508,6 +816,7 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -521,6 +830,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -532,23 +842,29 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -567,12 +883,23 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= @@ -586,7 +913,14 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -600,13 +934,17 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -618,16 +956,22 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -644,26 +988,46 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -677,6 +1041,7 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= @@ -684,12 +1049,18 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -697,6 +1068,7 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -726,13 +1098,20 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -740,9 +1119,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -762,6 +1144,19 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -793,6 +1188,7 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -805,11 +1201,39 @@ google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -821,11 +1245,25 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -844,24 +1282,33 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= @@ -874,5 +1321,7 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/libs/bits/bit_array.go b/libs/bits/bit_array.go index 548c98dcf..98e54eed9 100644 --- a/libs/bits/bit_array.go +++ b/libs/bits/bit_array.go @@ -7,9 +7,10 @@ import ( "strings" "sync" + tmprotobits "github.com/tendermint/tendermint/proto/tendermint/libs/bits" + tmmath "github.com/line/ostracon/libs/math" tmrand "github.com/line/ostracon/libs/rand" - tmprotobits "github.com/line/ostracon/proto/ostracon/libs/bits" ) // BitArray is a thread-safe implementation of a bit array. diff --git a/light/helpers_test.go b/light/helpers_test.go index 5a5330e61..8ae96e278 100644 --- a/light/helpers_test.go +++ b/light/helpers_test.go @@ -5,13 +5,14 @@ import ( "fmt" "time" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/crypto/tmhash" tmbytes "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" "github.com/line/ostracon/version" diff --git a/light/rpc/client.go b/light/rpc/client.go index 663f09578..e79766520 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -10,7 +10,8 @@ import ( "github.com/gogo/protobuf/proto" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/crypto/merkle" tmbytes "github.com/line/ostracon/libs/bytes" tmmath "github.com/line/ostracon/libs/math" @@ -27,6 +28,7 @@ var errNegOrZeroHeight = errors.New("negative or zero height") type KeyPathFunc func(path string, key []byte) (merkle.KeyPath, error) // LightClient is an interface that contains functionality needed by Client from the light client. +// //go:generate mockery --case underscore --name LightClient type LightClient interface { ChainID() string diff --git a/light/store/db/db_test.go b/light/store/db/db_test.go index 7e1638862..1dc4ae9bb 100644 --- a/light/store/db/db_test.go +++ b/light/store/db/db_test.go @@ -8,12 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/tmhash" tmrand "github.com/line/ostracon/libs/rand" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/types" "github.com/line/ostracon/version" ) diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 05bf20adb..735705fca 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -8,7 +8,10 @@ import ( "sync/atomic" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + ocabci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" auto "github.com/line/ostracon/libs/autofile" "github.com/line/ostracon/libs/clist" @@ -17,7 +20,6 @@ import ( tmos "github.com/line/ostracon/libs/os" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/p2p" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/proxy" "github.com/line/ostracon/types" ) @@ -79,7 +81,7 @@ type requestCheckTxAsync struct { tx types.Tx txInfo TxInfo prepareCb func(error) - checkTxCb func(*abci.Response) + checkTxCb func(*ocabci.Response) } var _ Mempool = &CListMempool{} @@ -237,7 +239,7 @@ func (mem *CListMempool) TxsWaitChan() <-chan struct{} { // It blocks if we're waiting on Update() or Reap(). // Safe for concurrent use by multiple goroutines. -func (mem *CListMempool) CheckTxSync(tx types.Tx, txInfo TxInfo) (res *abci.Response, err error) { +func (mem *CListMempool) CheckTxSync(tx types.Tx, txInfo TxInfo) (res *ocabci.Response, err error) { mem.updateMtx.RLock() // use defer to unlock mutex because application (*local client*) might panic defer mem.updateMtx.RUnlock() @@ -247,13 +249,13 @@ func (mem *CListMempool) CheckTxSync(tx types.Tx, txInfo TxInfo) (res *abci.Resp } // CONTRACT: `app.CheckTxSync()` should check whether `GasWanted` is valid (0 <= GasWanted <= block.masGas) - var r *abci.ResponseCheckTx + var r *ocabci.ResponseCheckTx r, err = mem.proxyAppConn.CheckTxSync(abci.RequestCheckTx{Tx: tx}) if err != nil { return res, err } - res = abci.ToResponseCheckTx(*r) + res = ocabci.ToResponseCheckTx(*r) mem.reqResCb(tx, txInfo.SenderID, txInfo.SenderP2PID, res, nil) return res, err } @@ -263,7 +265,7 @@ func (mem *CListMempool) CheckTxSync(tx types.Tx, txInfo TxInfo) (res *abci.Resp // // Safe for concurrent use by multiple goroutines. func (mem *CListMempool) CheckTxAsync(tx types.Tx, txInfo TxInfo, prepareCb func(error), - checkTxCb func(*abci.Response)) { + checkTxCb func(*ocabci.Response)) { mem.chReqCheckTx <- &requestCheckTxAsync{tx: tx, txInfo: txInfo, prepareCb: prepareCb, checkTxCb: checkTxCb} } @@ -275,7 +277,7 @@ func (mem *CListMempool) checkTxAsyncReactor() { // It blocks if we're waiting on Update() or Reap(). func (mem *CListMempool) checkTxAsync(tx types.Tx, txInfo TxInfo, prepareCb func(error), - checkTxCb func(*abci.Response)) { + checkTxCb func(*ocabci.Response)) { mem.updateMtx.RLock() defer func() { if r := recover(); r != nil { @@ -294,8 +296,8 @@ func (mem *CListMempool) checkTxAsync(tx types.Tx, txInfo TxInfo, prepareCb func } // CONTRACT: `app.CheckTxAsync()` should check whether `GasWanted` is valid (0 <= GasWanted <= block.masGas) - mem.proxyAppConn.CheckTxAsync(abci.RequestCheckTx{Tx: tx}, func(res *abci.Response) { - mem.reqResCb(tx, txInfo.SenderID, txInfo.SenderP2PID, res, func(response *abci.Response) { + mem.proxyAppConn.CheckTxAsync(abci.RequestCheckTx{Tx: tx}, func(res *ocabci.Response) { + mem.reqResCb(tx, txInfo.SenderID, txInfo.SenderP2PID, res, func(response *ocabci.Response) { if checkTxCb != nil { checkTxCb(response) } @@ -379,7 +381,7 @@ func (mem *CListMempool) prepareCheckTx(tx types.Tx, txInfo TxInfo) error { // // When rechecking, we don't need the peerID, so the recheck callback happens // here. -func (mem *CListMempool) globalCb(req *abci.Request, res *abci.Response) { +func (mem *CListMempool) globalCb(req *ocabci.Request, res *ocabci.Response) { checkTxReq := req.GetCheckTx() if checkTxReq == nil { return @@ -407,8 +409,8 @@ func (mem *CListMempool) reqResCb( tx []byte, peerID uint16, peerP2PID p2p.ID, - res *abci.Response, - externalCb func(*abci.Response), + res *ocabci.Response, + externalCb func(*ocabci.Response), ) { mem.resCbFirstTime(tx, peerID, peerP2PID, res) @@ -507,11 +509,11 @@ func (mem *CListMempool) resCbFirstTime( tx []byte, peerID uint16, peerP2PID p2p.ID, - res *abci.Response, + res *ocabci.Response, ) { switch r := res.Value.(type) { - case *abci.Response_CheckTx: - if r.CheckTx.Code == abci.CodeTypeOK { + case *ocabci.Response_CheckTx: + if r.CheckTx.Code == ocabci.CodeTypeOK { memTx := &mempoolTx{ height: mem.height, gasWanted: r.CheckTx.GasWanted, @@ -548,9 +550,9 @@ func (mem *CListMempool) resCbFirstTime( // // The case where the app checks the tx for the first time is handled by the // resCbFirstTime callback. -func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { +func (mem *CListMempool) resCbRecheck(req *ocabci.Request, res *ocabci.Response) { switch r := res.Value.(type) { - case *abci.Response_CheckTx: + case *ocabci.Response_CheckTx: tx := req.GetCheckTx().Tx txHash := TxKey(tx) e, ok := mem.txsMap.Load(txHash) @@ -559,7 +561,7 @@ func (mem *CListMempool) resCbRecheck(req *abci.Request, res *abci.Response) { return } var postCheckErr error - if r.CheckTx.Code == abci.CodeTypeOK { + if r.CheckTx.Code == ocabci.CodeTypeOK { if mem.postCheck == nil { return } @@ -706,7 +708,7 @@ func (mem *CListMempool) Update( } for i, tx := range block.Txs { - if deliverTxResponses[i].Code == abci.CodeTypeOK { + if deliverTxResponses[i].Code == ocabci.CodeTypeOK { // Add valid committed tx to the cache (if missing). _ = mem.cache.Push(tx) } else if !mem.config.KeepInvalidTxsInCache { @@ -733,7 +735,7 @@ func (mem *CListMempool) Update( // recheck non-committed txs to see if they became invalid recheckStartTime := time.Now().UnixNano() - _, err = mem.proxyAppConn.BeginRecheckTxSync(abci.RequestBeginRecheckTx{ + _, err = mem.proxyAppConn.BeginRecheckTxSync(ocabci.RequestBeginRecheckTx{ Header: types.OC2PB.Header(&block.Header), }) if err != nil { @@ -741,7 +743,7 @@ func (mem *CListMempool) Update( } mem.logger.Debug("recheck txs", "numtxs", mem.Size(), "height", block.Height) mem.recheckTxs() - _, err = mem.proxyAppConn.EndRecheckTxSync(abci.RequestEndRecheckTx{Height: block.Height}) + _, err = mem.proxyAppConn.EndRecheckTxSync(ocabci.RequestEndRecheckTx{Height: block.Height}) if err != nil { mem.logger.Error("error in proxyAppConn.EndRecheckTxSync", "err", err) } @@ -781,12 +783,12 @@ func (mem *CListMempool) recheckTxs() { Type: abci.CheckTxType_Recheck, } - mem.proxyAppConn.CheckTxAsync(req, func(res *abci.Response) { + mem.proxyAppConn.CheckTxAsync(req, func(res *ocabci.Response) { wg.Done() }) } - mem.proxyAppConn.FlushAsync(func(res *abci.Response) {}) + mem.proxyAppConn.FlushAsync(func(res *ocabci.Response) {}) wg.Wait() } diff --git a/mempool/clist_mempool_system_test.go b/mempool/clist_mempool_system_test.go index 2b8bd70fa..30153f303 100644 --- a/mempool/clist_mempool_system_test.go +++ b/mempool/clist_mempool_system_test.go @@ -14,11 +14,13 @@ import ( "github.com/stretchr/testify/assert" + abci "github.com/tendermint/tendermint/abci/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/abci/example/counter" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/proxy" "github.com/line/ostracon/types" "github.com/line/ostracon/version" @@ -102,7 +104,7 @@ func createProposalBlockAndDeliverTxs( deliverTxResponses := make([]*abci.ResponseDeliverTx, len(block.Txs)) for i, tx := range block.Txs { deliverTxResponses[i] = &abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, Data: tx, } } @@ -141,9 +143,9 @@ func receiveTx(ctx context.Context, t *testing.T, } } }, - func(res *abci.Response) { + func(res *ocabci.Response) { resCheckTx := res.GetCheckTx() - if resCheckTx.Code != abci.CodeTypeOK && len(resCheckTx.Log) != 0 { + if resCheckTx.Code != ocabci.CodeTypeOK && len(resCheckTx.Log) != 0 { atomic.AddInt64(&receiveTxCounter.abciFail, 1) } else { atomic.AddInt64(&receiveTxCounter.success, 1) diff --git a/mempool/clist_mempool_test.go b/mempool/clist_mempool_test.go index 0d3cab409..091202c1b 100644 --- a/mempool/clist_mempool_test.go +++ b/mempool/clist_mempool_test.go @@ -14,6 +14,8 @@ import ( "testing" "time" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/gogo/protobuf/proto" gogotypes "github.com/gogo/protobuf/types" "github.com/stretchr/testify/assert" @@ -22,7 +24,7 @@ import ( "github.com/line/ostracon/abci/example/counter" "github.com/line/ostracon/abci/example/kvstore" abciserver "github.com/line/ostracon/abci/server" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" tmrand "github.com/line/ostracon/libs/rand" @@ -175,7 +177,7 @@ func TestMempoolFilters(t *testing.T) { } for tcIndex, tt := range tests { err := mempool.Update(newTestBlock(1, emptyTxArr), - abciResponses(len(emptyTxArr), abci.CodeTypeOK), tt.preFilter, nil) + abciResponses(len(emptyTxArr), ocabci.CodeTypeOK), tt.preFilter, nil) require.NoError(t, err) checkTxs(t, mempool, tt.numTxsToCreate, UnknownPeerID) require.Equal(t, tt.expectedNumTxs, mempool.Size(), "mempool had the incorrect size, on test case %d", tcIndex) @@ -192,7 +194,7 @@ func TestMempoolUpdate(t *testing.T) { // 1. Adds valid txs to the cache { err := mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x01}}), - abciResponses(1, abci.CodeTypeOK), nil, nil) + abciResponses(1, ocabci.CodeTypeOK), nil, nil) require.NoError(t, err) _, err = mempool.CheckTxSync([]byte{0x01}, TxInfo{}) if assert.Error(t, err) { @@ -204,7 +206,7 @@ func TestMempoolUpdate(t *testing.T) { { _, err := mempool.CheckTxSync([]byte{0x02}, TxInfo{}) require.NoError(t, err) - err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x02}}), abciResponses(1, abci.CodeTypeOK), nil, nil) + err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x02}}), abciResponses(1, ocabci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.Zero(t, mempool.Size()) } @@ -245,7 +247,7 @@ func TestMempool_KeepInvalidTxsInCache(t *testing.T) { _ = app.DeliverTx(abci.RequestDeliverTx{Tx: a}) _ = app.DeliverTx(abci.RequestDeliverTx{Tx: b}) err = mempool.Update(newTestBlock(1, []types.Tx{a, b}), - []*abci.ResponseDeliverTx{{Code: abci.CodeTypeOK}, {Code: 2}}, nil, nil) + []*abci.ResponseDeliverTx{{Code: ocabci.CodeTypeOK}, {Code: 2}}, nil, nil) require.NoError(t, err) // a must be added to the cache @@ -301,7 +303,7 @@ func TestTxsAvailable(t *testing.T) { // since there are still txs left committedTxs, txs := txs[:50], txs[50:] if err := mempool.Update(newTestBlock(1, committedTxs), - abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { + abciResponses(len(committedTxs), ocabci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } ensureFire(t, mempool.TxsAvailable(), timeoutMS) @@ -314,7 +316,7 @@ func TestTxsAvailable(t *testing.T) { // now call update with all the txs. it should not fire as there are no txs left committedTxs = append(txs, moreTxs...) // nolint: gocritic if err := mempool.Update(newTestBlock(2, committedTxs), - abciResponses(len(committedTxs), abci.CodeTypeOK), nil, nil); err != nil { + abciResponses(len(committedTxs), ocabci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } ensureNoFire(t, mempool.TxsAvailable(), timeoutMS) @@ -374,7 +376,7 @@ func TestSerialReap(t *testing.T) { txs = append(txs, txBytes) } if err := mempool.Update(newTestBlock(0, txs), - abciResponses(len(txs), abci.CodeTypeOK), nil, nil); err != nil { + abciResponses(len(txs), ocabci.CodeTypeOK), nil, nil); err != nil { t.Error(err) } } @@ -546,7 +548,7 @@ func TestMempoolTxsBytes(t *testing.T) { // 3. zero again after tx is removed by Update err = mempool.Update(newTestBlock(1, []types.Tx{[]byte{0x01}}), - abciResponses(1, abci.CodeTypeOK), nil, nil) + abciResponses(1, ocabci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.EqualValues(t, 0, mempool.TxsBytes()) @@ -596,7 +598,7 @@ func TestMempoolTxsBytes(t *testing.T) { require.NotEmpty(t, res2.Data) // Pretend like we committed nothing so txBytes gets rechecked and removed. - err = mempool.Update(newTestBlock(1, []types.Tx{}), abciResponses(0, abci.CodeTypeOK), nil, nil) + err = mempool.Update(newTestBlock(1, []types.Tx{}), abciResponses(0, ocabci.CodeTypeOK), nil, nil) require.NoError(t, err) assert.EqualValues(t, 0, mempool.TxsBytes()) @@ -666,7 +668,7 @@ func newTestBlock(height int64, txs types.Txs) *types.Block { func newRemoteApp( t *testing.T, addr string, - app abci.Application, + app ocabci.Application, ) ( clientCreator proxy.ClientCreator, server service.Service, @@ -724,7 +726,7 @@ func TestTxMempoolPostCheckError(t *testing.T) { mempool, cleanup := newMempoolWithApp(cc) defer cleanup() - mempool.postCheck = func(_ types.Tx, _ *abci.ResponseCheckTx) error { + mempool.postCheck = func(_ types.Tx, _ *ocabci.ResponseCheckTx) error { return testCase.err } @@ -736,16 +738,16 @@ func TestTxMempoolPostCheckError(t *testing.T) { Tx: tx, Type: abci.CheckTxType_Recheck, } - res := &abci.Response{} + res := &ocabci.Response{} m := sync.Mutex{} m.Lock() - mempool.proxyAppConn.CheckTxAsync(req, func(r *abci.Response) { + mempool.proxyAppConn.CheckTxAsync(req, func(r *ocabci.Response) { res = r m.Unlock() }) - checkTxRes, ok := res.Value.(*abci.Response_CheckTx) + checkTxRes, ok := res.Value.(*ocabci.Response_CheckTx) require.True(t, ok) expectedErrString := "" if testCase.err != nil { diff --git a/mempool/mempool.go b/mempool/mempool.go index a13add17d..e60239bd6 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -3,7 +3,9 @@ package mempool import ( "fmt" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/p2p" "github.com/line/ostracon/types" ) @@ -15,8 +17,8 @@ import ( type Mempool interface { // CheckTx executes a new transaction against the application to determine // its validity and whether it should be added to the mempool. - CheckTxSync(tx types.Tx, txInfo TxInfo) (*abci.Response, error) - CheckTxAsync(tx types.Tx, txInfo TxInfo, prepareCb func(error), checkTxCb func(*abci.Response)) + CheckTxSync(tx types.Tx, txInfo TxInfo) (*ocabci.Response, error) + CheckTxAsync(tx types.Tx, txInfo TxInfo, prepareCb func(error), checkTxCb func(*ocabci.Response)) // ReapMaxBytesMaxGas reaps transactions from the mempool up to maxBytes // bytes total with the condition that the total gasWanted must be less than @@ -91,7 +93,7 @@ type PreCheckFunc func(types.Tx) error // PostCheckFunc is an optional filter executed after CheckTx and rejects // transaction if false is returned. An example would be to ensure a // transaction doesn't require more gas than available for the block. -type PostCheckFunc func(types.Tx, *abci.ResponseCheckTx) error +type PostCheckFunc func(types.Tx, *ocabci.ResponseCheckTx) error // TxInfo are parameters that get passed when attempting to add a tx to the // mempool. @@ -121,7 +123,7 @@ func PreCheckMaxBytes(maxBytes int64) PreCheckFunc { // PostCheckMaxGas checks that the wanted gas is smaller or equal to the passed // maxGas. Returns nil if maxGas is -1. func PostCheckMaxGas(maxGas int64) PostCheckFunc { - return func(tx types.Tx, res *abci.ResponseCheckTx) error { + return func(tx types.Tx, res *ocabci.ResponseCheckTx) error { if maxGas == -1 { return nil } diff --git a/mempool/mock/mempool.go b/mempool/mock/mempool.go index 3d817854a..4702b643c 100644 --- a/mempool/mock/mempool.go +++ b/mempool/mock/mempool.go @@ -1,7 +1,9 @@ package mock import ( - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/clist" mempl "github.com/line/ostracon/mempool" "github.com/line/ostracon/types" @@ -15,10 +17,10 @@ var _ mempl.Mempool = Mempool{} func (Mempool) Lock() {} func (Mempool) Unlock() {} func (Mempool) Size() int { return 0 } -func (Mempool) CheckTxSync(_ types.Tx, _ mempl.TxInfo) (*abci.Response, error) { +func (Mempool) CheckTxSync(_ types.Tx, _ mempl.TxInfo) (*ocabci.Response, error) { return nil, nil } -func (Mempool) CheckTxAsync(_ types.Tx, _ mempl.TxInfo, _ func(error), _ func(*abci.Response)) { +func (Mempool) CheckTxAsync(_ types.Tx, _ mempl.TxInfo, _ func(error), _ func(*ocabci.Response)) { } func (Mempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} } func (Mempool) ReapMaxBytesMaxGasMaxTxs(_, _, _ int64) types.Txs { return types.Txs{} } diff --git a/mempool/reactor.go b/mempool/reactor.go index e22aa8053..aa67c613c 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -6,12 +6,13 @@ import ( "math" "time" + protomem "github.com/tendermint/tendermint/proto/tendermint/mempool" + cfg "github.com/line/ostracon/config" "github.com/line/ostracon/libs/clist" "github.com/line/ostracon/libs/log" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/p2p" - protomem "github.com/line/ostracon/proto/ostracon/mempool" "github.com/line/ostracon/types" ) diff --git a/mempool/reactor_test.go b/mempool/reactor_test.go index 277a6e749..f4402d2e8 100644 --- a/mempool/reactor_test.go +++ b/mempool/reactor_test.go @@ -13,14 +13,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + memproto "github.com/tendermint/tendermint/proto/tendermint/mempool" + "github.com/line/ostracon/abci/example/kvstore" - abci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/p2p" "github.com/line/ostracon/p2p/mock" - memproto "github.com/line/ostracon/proto/ostracon/mempool" "github.com/line/ostracon/proxy" "github.com/line/ostracon/types" ) diff --git a/node/node.go b/node/node.go index e47157de6..43f8d05c5 100644 --- a/node/node.go +++ b/node/node.go @@ -13,9 +13,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/cors" + abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" bcv0 "github.com/line/ostracon/blockchain/v0" bcv1 "github.com/line/ostracon/blockchain/v1" bcv2 "github.com/line/ostracon/blockchain/v2" diff --git a/p2p/conn/connection.go b/p2p/conn/connection.go index 0ddbb9c80..0d9d688fd 100644 --- a/p2p/conn/connection.go +++ b/p2p/conn/connection.go @@ -14,6 +14,8 @@ import ( "github.com/gogo/protobuf/proto" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + flow "github.com/line/ostracon/libs/flowrate" "github.com/line/ostracon/libs/log" tmmath "github.com/line/ostracon/libs/math" @@ -21,7 +23,6 @@ import ( "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/libs/timer" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" ) const ( @@ -63,6 +64,7 @@ The byte id and the relative priorities of each `Channel` are configured upon initialization of the connection. There are two methods for sending messages: + func (m MConnection) Send(chID byte, msgBytes []byte) bool {} func (m MConnection) TrySend(chID byte, msgBytes []byte}) bool {} diff --git a/p2p/conn/connection_test.go b/p2p/conn/connection_test.go index e85d0c5ec..78dad8903 100644 --- a/p2p/conn/connection_test.go +++ b/p2p/conn/connection_test.go @@ -11,9 +11,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + "github.com/line/ostracon/libs/log" "github.com/line/ostracon/libs/protoio" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" "github.com/line/ostracon/proto/ostracon/types" ) diff --git a/p2p/conn/evil_secret_connection_test.go b/p2p/conn/evil_secret_connection_test.go index 8ef3d4aad..f2ea2afbb 100644 --- a/p2p/conn/evil_secret_connection_test.go +++ b/p2p/conn/evil_secret_connection_test.go @@ -9,13 +9,13 @@ import ( gogotypes "github.com/gogo/protobuf/types" "github.com/gtank/merlin" "github.com/stretchr/testify/assert" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" "golang.org/x/crypto/chacha20poly1305" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" cryptoenc "github.com/line/ostracon/crypto/encoding" "github.com/line/ostracon/libs/protoio" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" ) type buffer struct { diff --git a/p2p/conn/secret_connection.go b/p2p/conn/secret_connection.go index ff0698f6b..17697db5f 100644 --- a/p2p/conn/secret_connection.go +++ b/p2p/conn/secret_connection.go @@ -16,6 +16,7 @@ import ( gogotypes "github.com/gogo/protobuf/types" "github.com/gtank/merlin" pool "github.com/libp2p/go-buffer-pool" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" "golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/curve25519" "golang.org/x/crypto/hkdf" @@ -27,7 +28,6 @@ import ( "github.com/line/ostracon/libs/async" "github.com/line/ostracon/libs/protoio" tmsync "github.com/line/ostracon/libs/sync" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" ) // 4 + 1024 == 1028 total frame size diff --git a/p2p/netaddress.go b/p2p/netaddress.go index adaeff293..f0ded0941 100644 --- a/p2p/netaddress.go +++ b/p2p/netaddress.go @@ -14,7 +14,7 @@ import ( "strings" "time" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) // EmptyNetAddress defines the string representation of an empty NetAddress diff --git a/p2p/node_info.go b/p2p/node_info.go index 1ce86db02..be828552f 100644 --- a/p2p/node_info.go +++ b/p2p/node_info.go @@ -6,9 +6,10 @@ import ( "fmt" "reflect" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + tmbytes "github.com/line/ostracon/libs/bytes" tmstrings "github.com/line/ostracon/libs/strings" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" "github.com/line/ostracon/version" ) diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 54fb92957..383be76b8 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -8,13 +8,14 @@ import ( "github.com/gogo/protobuf/proto" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + "github.com/line/ostracon/libs/cmap" tmmath "github.com/line/ostracon/libs/math" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/libs/service" "github.com/line/ostracon/p2p" "github.com/line/ostracon/p2p/conn" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" ) type Peer = p2p.Peer diff --git a/p2p/pex/pex_reactor_test.go b/p2p/pex/pex_reactor_test.go index ac94e5b01..dde682e69 100644 --- a/p2p/pex/pex_reactor_test.go +++ b/p2p/pex/pex_reactor_test.go @@ -13,11 +13,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" "github.com/line/ostracon/p2p" "github.com/line/ostracon/p2p/mock" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" ) var ( diff --git a/p2p/transport.go b/p2p/transport.go index 65b87c249..fc2fa8ffb 100644 --- a/p2p/transport.go +++ b/p2p/transport.go @@ -8,10 +8,11 @@ import ( "golang.org/x/net/netutil" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/libs/protoio" "github.com/line/ostracon/p2p/conn" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" ) const ( diff --git a/p2p/transport_test.go b/p2p/transport_test.go index 58555a671..3d8183218 100644 --- a/p2p/transport_test.go +++ b/p2p/transport_test.go @@ -12,10 +12,11 @@ import ( "testing" "time" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/libs/protoio" "github.com/line/ostracon/p2p/conn" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" "github.com/miekg/dns" "github.com/stretchr/testify/require" ) diff --git a/privval/file.go b/privval/file.go index b1a22e2aa..79e001d08 100644 --- a/privval/file.go +++ b/privval/file.go @@ -8,6 +8,7 @@ import ( "time" "github.com/gogo/protobuf/proto" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" @@ -16,7 +17,6 @@ import ( tmos "github.com/line/ostracon/libs/os" "github.com/line/ostracon/libs/protoio" "github.com/line/ostracon/libs/tempfile" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" ) diff --git a/privval/file_test.go b/privval/file_test.go index 50a614d8c..6e4941f90 100644 --- a/privval/file_test.go +++ b/privval/file_test.go @@ -9,6 +9,8 @@ import ( "testing" "time" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -16,7 +18,6 @@ import ( "github.com/line/ostracon/crypto/tmhash" tmjson "github.com/line/ostracon/libs/json" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" ) diff --git a/privval/msgs.go b/privval/msgs.go index 13644a64d..1c894608f 100644 --- a/privval/msgs.go +++ b/privval/msgs.go @@ -5,37 +5,39 @@ import ( "github.com/gogo/protobuf/proto" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" + privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" + + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" ) // TODO: Add ChainIDRequest -func mustWrapMsg(pb proto.Message) privvalproto.Message { - msg := privvalproto.Message{} +func mustWrapMsg(pb proto.Message) ocprivvalproto.Message { + msg := ocprivvalproto.Message{} switch pb := pb.(type) { - case *privvalproto.Message: + case *ocprivvalproto.Message: msg = *pb case *privvalproto.PubKeyRequest: - msg.Sum = &privvalproto.Message_PubKeyRequest{PubKeyRequest: pb} + msg.Sum = &ocprivvalproto.Message_PubKeyRequest{PubKeyRequest: pb} case *privvalproto.PubKeyResponse: - msg.Sum = &privvalproto.Message_PubKeyResponse{PubKeyResponse: pb} + msg.Sum = &ocprivvalproto.Message_PubKeyResponse{PubKeyResponse: pb} case *privvalproto.SignVoteRequest: - msg.Sum = &privvalproto.Message_SignVoteRequest{SignVoteRequest: pb} + msg.Sum = &ocprivvalproto.Message_SignVoteRequest{SignVoteRequest: pb} case *privvalproto.SignedVoteResponse: - msg.Sum = &privvalproto.Message_SignedVoteResponse{SignedVoteResponse: pb} + msg.Sum = &ocprivvalproto.Message_SignedVoteResponse{SignedVoteResponse: pb} case *privvalproto.SignedProposalResponse: - msg.Sum = &privvalproto.Message_SignedProposalResponse{SignedProposalResponse: pb} + msg.Sum = &ocprivvalproto.Message_SignedProposalResponse{SignedProposalResponse: pb} case *privvalproto.SignProposalRequest: - msg.Sum = &privvalproto.Message_SignProposalRequest{SignProposalRequest: pb} - case *privvalproto.VRFProofRequest: - msg.Sum = &privvalproto.Message_VrfProofRequest{VrfProofRequest: pb} - case *privvalproto.VRFProofResponse: - msg.Sum = &privvalproto.Message_VrfProofResponse{VrfProofResponse: pb} + msg.Sum = &ocprivvalproto.Message_SignProposalRequest{SignProposalRequest: pb} + case *ocprivvalproto.VRFProofRequest: + msg.Sum = &ocprivvalproto.Message_VrfProofRequest{VrfProofRequest: pb} + case *ocprivvalproto.VRFProofResponse: + msg.Sum = &ocprivvalproto.Message_VrfProofResponse{VrfProofResponse: pb} case *privvalproto.PingRequest: - msg.Sum = &privvalproto.Message_PingRequest{PingRequest: pb} + msg.Sum = &ocprivvalproto.Message_PingRequest{PingRequest: pb} case *privvalproto.PingResponse: - msg.Sum = &privvalproto.Message_PingResponse{PingResponse: pb} + msg.Sum = &ocprivvalproto.Message_PingResponse{PingResponse: pb} default: panic(fmt.Errorf("unknown message type %T", pb)) } diff --git a/privval/msgs_test.go b/privval/msgs_test.go index 4f7ecdc00..c8d9577a7 100644 --- a/privval/msgs_test.go +++ b/privval/msgs_test.go @@ -5,6 +5,10 @@ import ( "testing" "time" + cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto" + privproto "github.com/tendermint/tendermint/proto/tendermint/privval" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" @@ -12,9 +16,6 @@ import ( "github.com/line/ostracon/crypto/ed25519" cryptoenc "github.com/line/ostracon/crypto/encoding" "github.com/line/ostracon/crypto/tmhash" - cryptoproto "github.com/line/ostracon/proto/ostracon/crypto" - privproto "github.com/line/ostracon/proto/ostracon/privval" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) diff --git a/privval/retry_signer_client.go b/privval/retry_signer_client.go index ec601f7c3..6e0ceee84 100644 --- a/privval/retry_signer_client.go +++ b/privval/retry_signer_client.go @@ -4,8 +4,9 @@ import ( "fmt" "time" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) diff --git a/privval/signer_client.go b/privval/signer_client.go index 2c2a21c63..83ff7c170 100644 --- a/privval/signer_client.go +++ b/privval/signer_client.go @@ -4,10 +4,12 @@ import ( "fmt" "time" + privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" cryptoenc "github.com/line/ostracon/crypto/encoding" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" "github.com/line/ostracon/types" ) @@ -118,7 +120,7 @@ func (sc *SignerClient) SignProposal(chainID string, proposal *tmproto.Proposal) // GenerateVRFProof requests a remote signer to generate a VRF proof func (sc *SignerClient) GenerateVRFProof(message []byte) (crypto.Proof, error) { - msg := &privvalproto.VRFProofRequest{Message: message} + msg := &ocprivvalproto.VRFProofRequest{Message: message} response, err := sc.endpoint.SendRequest(mustWrapMsg(msg)) if err != nil { sc.endpoint.Logger.Error("SignerClient::GenerateVRFProof", "err", err) @@ -126,7 +128,7 @@ func (sc *SignerClient) GenerateVRFProof(message []byte) (crypto.Proof, error) { } switch r := response.Sum.(type) { - case *privvalproto.Message_VrfProofResponse: + case *ocprivvalproto.Message_VrfProofResponse: if r.VrfProofResponse.Error != nil { return nil, fmt.Errorf(r.VrfProofResponse.Error.Description) } diff --git a/privval/signer_client_test.go b/privval/signer_client_test.go index 1aef3e020..02a3aafd4 100644 --- a/privval/signer_client_test.go +++ b/privval/signer_client_test.go @@ -8,14 +8,16 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto" + privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/crypto/vrf" tmrand "github.com/line/ostracon/libs/rand" - cryptoproto "github.com/line/ostracon/proto/ostracon/crypto" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" "github.com/line/ostracon/types" ) @@ -407,20 +409,20 @@ func TestSignerSignVoteErrors(t *testing.T) { } } -func brokenHandler(privVal types.PrivValidator, request privvalproto.Message, - chainID string) (privvalproto.Message, error) { - var res privvalproto.Message +func brokenHandler(privVal types.PrivValidator, request ocprivvalproto.Message, + chainID string) (ocprivvalproto.Message, error) { + var res ocprivvalproto.Message var err error switch r := request.Sum.(type) { // This is broken and will answer most requests with a pubkey response - case *privvalproto.Message_PubKeyRequest: + case *ocprivvalproto.Message_PubKeyRequest: res = mustWrapMsg(&privvalproto.PubKeyResponse{PubKey: cryptoproto.PublicKey{}, Error: nil}) - case *privvalproto.Message_SignVoteRequest: + case *ocprivvalproto.Message_SignVoteRequest: res = mustWrapMsg(&privvalproto.PubKeyResponse{PubKey: cryptoproto.PublicKey{}, Error: nil}) - case *privvalproto.Message_SignProposalRequest: + case *ocprivvalproto.Message_SignProposalRequest: res = mustWrapMsg(&privvalproto.PubKeyResponse{PubKey: cryptoproto.PublicKey{}, Error: nil}) - case *privvalproto.Message_PingRequest: + case *ocprivvalproto.Message_PingRequest: err, res = nil, mustWrapMsg(&privvalproto.PingResponse{}) default: err = fmt.Errorf("unknown msg: %v", r) diff --git a/privval/signer_endpoint.go b/privval/signer_endpoint.go index 509f273c3..de5328baf 100644 --- a/privval/signer_endpoint.go +++ b/privval/signer_endpoint.go @@ -8,7 +8,7 @@ import ( "github.com/line/ostracon/libs/protoio" "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" ) const ( @@ -80,7 +80,7 @@ func (se *signerEndpoint) DropConnection() { } // ReadMessage reads a message from the endpoint -func (se *signerEndpoint) ReadMessage() (msg privvalproto.Message, err error) { +func (se *signerEndpoint) ReadMessage() (msg ocprivvalproto.Message, err error) { se.connMtx.Lock() defer se.connMtx.Unlock() @@ -112,7 +112,7 @@ func (se *signerEndpoint) ReadMessage() (msg privvalproto.Message, err error) { } // WriteMessage writes a message from the endpoint -func (se *signerEndpoint) WriteMessage(msg privvalproto.Message) (err error) { +func (se *signerEndpoint) WriteMessage(msg ocprivvalproto.Message) (err error) { se.connMtx.Lock() defer se.connMtx.Unlock() diff --git a/privval/signer_listener_endpoint.go b/privval/signer_listener_endpoint.go index b4ed8c5cb..55be54b3e 100644 --- a/privval/signer_listener_endpoint.go +++ b/privval/signer_listener_endpoint.go @@ -5,10 +5,12 @@ import ( "net" "time" + privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" + "github.com/line/ostracon/libs/log" "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" ) // SignerListenerEndpointOption sets an optional parameter on the SignerListenerEndpoint. @@ -104,7 +106,7 @@ func (sl *SignerListenerEndpoint) WaitForConnection(maxWait time.Duration) error } // SendRequest ensures there is a connection, sends a request and waits for a response -func (sl *SignerListenerEndpoint) SendRequest(request privvalproto.Message) (*privvalproto.Message, error) { +func (sl *SignerListenerEndpoint) SendRequest(request ocprivvalproto.Message) (*ocprivvalproto.Message, error) { sl.instanceMtx.Lock() defer sl.instanceMtx.Unlock() diff --git a/privval/signer_requestHandler.go b/privval/signer_requestHandler.go index 133f33025..14dba7d43 100644 --- a/privval/signer_requestHandler.go +++ b/privval/signer_requestHandler.go @@ -3,26 +3,28 @@ package privval import ( "fmt" + cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto" + privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" cryptoenc "github.com/line/ostracon/crypto/encoding" - cryptoproto "github.com/line/ostracon/proto/ostracon/crypto" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" "github.com/line/ostracon/types" ) func DefaultValidationRequestHandler( privVal types.PrivValidator, - req privvalproto.Message, + req ocprivvalproto.Message, chainID string, -) (privvalproto.Message, error) { +) (ocprivvalproto.Message, error) { var ( - res privvalproto.Message + res ocprivvalproto.Message err error ) switch r := req.Sum.(type) { - case *privvalproto.Message_PubKeyRequest: + case *ocprivvalproto.Message_PubKeyRequest: if r.PubKeyRequest.GetChainId() != chainID { res = mustWrapMsg(&privvalproto.PubKeyResponse{ PubKey: cryptoproto.PublicKey{}, Error: &privvalproto.RemoteSignerError{ @@ -47,7 +49,7 @@ func DefaultValidationRequestHandler( res = mustWrapMsg(&privvalproto.PubKeyResponse{PubKey: pk, Error: nil}) } - case *privvalproto.Message_SignVoteRequest: + case *ocprivvalproto.Message_SignVoteRequest: if r.SignVoteRequest.ChainId != chainID { res = mustWrapMsg(&privvalproto.SignedVoteResponse{ Vote: tmproto.Vote{}, Error: &privvalproto.RemoteSignerError{ @@ -65,7 +67,7 @@ func DefaultValidationRequestHandler( res = mustWrapMsg(&privvalproto.SignedVoteResponse{Vote: *vote, Error: nil}) } - case *privvalproto.Message_SignProposalRequest: + case *ocprivvalproto.Message_SignProposalRequest: if r.SignProposalRequest.GetChainId() != chainID { res = mustWrapMsg(&privvalproto.SignedProposalResponse{ Proposal: tmproto.Proposal{}, Error: &privvalproto.RemoteSignerError{ @@ -83,16 +85,16 @@ func DefaultValidationRequestHandler( } else { res = mustWrapMsg(&privvalproto.SignedProposalResponse{Proposal: *proposal, Error: nil}) } - case *privvalproto.Message_PingRequest: + case *ocprivvalproto.Message_PingRequest: err, res = nil, mustWrapMsg(&privvalproto.PingResponse{}) - case *privvalproto.Message_VrfProofRequest: + case *ocprivvalproto.Message_VrfProofRequest: proof, err := privVal.GenerateVRFProof(r.VrfProofRequest.Message) if err != nil { err := privvalproto.RemoteSignerError{Code: 0, Description: err.Error()} - res = mustWrapMsg(&privvalproto.VRFProofResponse{Proof: nil, Error: &err}) + res = mustWrapMsg(&ocprivvalproto.VRFProofResponse{Proof: nil, Error: &err}) } else { - res = mustWrapMsg(&privvalproto.VRFProofResponse{Proof: proof[:], Error: nil}) + res = mustWrapMsg(&ocprivvalproto.VRFProofResponse{Proof: proof[:], Error: nil}) } default: diff --git a/privval/signer_server.go b/privval/signer_server.go index 889595e01..3cabdcaab 100644 --- a/privval/signer_server.go +++ b/privval/signer_server.go @@ -5,15 +5,15 @@ import ( "github.com/line/ostracon/libs/service" tmsync "github.com/line/ostracon/libs/sync" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" "github.com/line/ostracon/types" ) // ValidationRequestHandlerFunc handles different remoteSigner requests type ValidationRequestHandlerFunc func( privVal types.PrivValidator, - requestMessage privvalproto.Message, - chainID string) (privvalproto.Message, error) + requestMessage ocprivvalproto.Message, + chainID string) (ocprivvalproto.Message, error) type SignerServer struct { service.BaseService @@ -71,7 +71,7 @@ func (ss *SignerServer) servicePendingRequest() { return } - var res privvalproto.Message + var res ocprivvalproto.Message { // limit the scope of the lock ss.handlerMtx.Lock() diff --git a/proto/ostracon/abci/types.proto b/proto/ostracon/abci/types.proto index 38b47294c..1b607fefd 100644 --- a/proto/ostracon/abci/types.proto +++ b/proto/ostracon/abci/types.proto @@ -5,10 +5,11 @@ option go_package = "github.com/line/ostracon/abci/types"; // For more information on gogo.proto, see: // https://github.com/gogo/protobuf/blob/master/extensions.md -import "ostracon/crypto/proof.proto"; +import "tendermint/crypto/proof.proto"; +import "tendermint/types/params.proto"; +import "tendermint/abci/types.proto"; import "ostracon/types/types.proto"; -import "ostracon/crypto/keys.proto"; -import "ostracon/types/params.proto"; +import "tendermint/crypto/keys.proto"; import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; @@ -21,110 +22,31 @@ import "gogoproto/gogo.proto"; message Request { oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestSetOption set_option = 4; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - RequestCheckTx check_tx = 8; - RequestDeliverTx deliver_tx = 9; - RequestEndBlock end_block = 10; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; - RequestApplySnapshotChunk apply_snapshot_chunk = 15; - RequestBeginRecheckTx begin_recheck_tx = 1000; // 16~99 are reserved for merging original tendermint - RequestEndRecheckTx end_recheck_tx = 1001; + tendermint.abci.RequestEcho echo = 1; + tendermint.abci.RequestFlush flush = 2; + tendermint.abci.RequestInfo info = 3; + tendermint.abci.RequestSetOption set_option = 4; + tendermint.abci.RequestInitChain init_chain = 5; + tendermint.abci.RequestQuery query = 6; + RequestBeginBlock begin_block = 7; + tendermint.abci.RequestCheckTx check_tx = 8; + tendermint.abci.RequestDeliverTx deliver_tx = 9; + tendermint.abci.RequestEndBlock end_block = 10; + tendermint.abci.RequestCommit commit = 11; + tendermint.abci.RequestListSnapshots list_snapshots = 12; + tendermint.abci.RequestOfferSnapshot offer_snapshot = 13; + tendermint.abci.RequestLoadSnapshotChunk load_snapshot_chunk = 14; + tendermint.abci.RequestApplySnapshotChunk apply_snapshot_chunk = 15; + RequestBeginRecheckTx begin_recheck_tx = 1000; // 16~99 are reserved for merging original tendermint + RequestEndRecheckTx end_recheck_tx = 1001; } } -message RequestEcho { - string message = 1; -} - -message RequestFlush {} - -message RequestInfo { - string version = 1; - uint64 block_version = 2; - uint64 p2p_version = 3; -} - -// nondeterministic -message RequestSetOption { - string key = 1; - string value = 2; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - message RequestBeginBlock { - bytes hash = 1; - ostracon.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; -} - -enum CheckTxType { - NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit {} - -// lists available snapshots -message RequestListSnapshots { -} - -// offers a snapshot to the application -message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height -} - -// loads a snapshot chunk -message RequestLoadSnapshotChunk { - uint64 height = 1; - uint32 format = 2; - uint32 chunk = 3; -} - -// Applies a snapshot chunk -message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; - string sender = 3; + bytes hash = 1; + ostracon.types.Header header = 2 [(gogoproto.nullable) = false]; + tendermint.abci.LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated tendermint.abci.Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; } message RequestBeginRecheckTx { @@ -140,88 +62,35 @@ message RequestEndRecheckTx { message Response { oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - ResponseBeginRecheckTx begin_recheck_tx = 1000; // 17~99 are reserved for merging original tendermint - ResponseEndRecheckTx end_recheck_tx = 1001; + tendermint.abci.ResponseException exception = 1; + tendermint.abci.ResponseEcho echo = 2; + tendermint.abci.ResponseFlush flush = 3; + tendermint.abci.ResponseInfo info = 4; + tendermint.abci.ResponseSetOption set_option = 5; + tendermint.abci.ResponseInitChain init_chain = 6; + tendermint.abci.ResponseQuery query = 7; + tendermint.abci.ResponseBeginBlock begin_block = 8; + ResponseCheckTx check_tx = 9; + tendermint.abci.ResponseDeliverTx deliver_tx = 10; + tendermint.abci.ResponseEndBlock end_block = 11; + tendermint.abci.ResponseCommit commit = 12; + tendermint.abci.ResponseListSnapshots list_snapshots = 13; + tendermint.abci.ResponseOfferSnapshot offer_snapshot = 14; + tendermint.abci.ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + tendermint.abci.ResponseApplySnapshotChunk apply_snapshot_chunk = 16; + ResponseBeginRecheckTx begin_recheck_tx = 1000; // 17~99 are reserved for merging original tendermint + ResponseEndRecheckTx end_recheck_tx = 1001; } } -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush {} - -message ResponseInfo { - string data = 1; - - string version = 2; - uint64 app_version = 3; - - int64 last_block_height = 4; - bytes last_block_app_hash = 5; -} - -// nondeterministic -message ResponseSetOption { - uint32 code = 1; - // bytes data = 2; - string log = 3; - string info = 4; -} - -message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - ostracon.crypto.ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; -} - -message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 + uint32 code = 1; + bytes data = 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; + repeated tendermint.abci.Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8; string sender = 9; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first @@ -232,68 +101,6 @@ message ResponseCheckTx { string mempool_error = 11; } -message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic - string codespace = 8; -} - -message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 - [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCommit { - // reserve 1 - bytes data = 2; - int64 retain_height = 3; -} - -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} - -message ResponseOfferSnapshot { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others - } -} - -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} - -message ResponseApplySnapshotChunk { - Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others - } -} - message ResponseBeginRecheckTx { uint32 code = 1; } @@ -302,134 +109,25 @@ message ResponseEndRecheckTx { uint32 code = 1; } -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockParams block = 1; - ostracon.types.EvidenceParams evidence = 2; - ostracon.types.ValidatorParams validator = 3; - ostracon.types.VersionParams version = 4; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Note: must be greater than 0 - int64 max_bytes = 1; - // Note: must be greater or equal to -1 - int64 max_gas = 2; -} - -message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -message Event { - string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; -} - -// EventAttribute is a single key-value pair, associated with an event. -message EventAttribute { - bytes key = 1; - bytes value = 2; - bool index = 3; // nondeterministic -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; -} - -//---------------------------------------- -// Blockchain Types - -// Validator -message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power -} - -// ValidatorUpdate -message ValidatorUpdate { - ostracon.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; // The voting power -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; -} - -enum EvidenceType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; - LIGHT_CLIENT_ATTACK = 2; -} - -message Evidence { - EvidenceType type = 1; - // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; - // The height when the offense occurred - int64 height = 3; - // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - int64 total_voting_power = 5; // total voting power -} - -//---------------------------------------- -// State Sync Types - -message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata -} - //---------------------------------------- // Service Definition service ABCIApplication { - rpc Echo(RequestEcho) returns (ResponseEcho); - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); - rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); - rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); - rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); - rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); + rpc Echo(tendermint.abci.RequestEcho) returns (tendermint.abci.ResponseEcho); + rpc Flush(tendermint.abci.RequestFlush) returns (tendermint.abci.ResponseFlush); + rpc Info(tendermint.abci.RequestInfo) returns (tendermint.abci.ResponseInfo); + rpc SetOption(tendermint.abci.RequestSetOption) returns (tendermint.abci.ResponseSetOption); + rpc DeliverTx(tendermint.abci.RequestDeliverTx) returns (tendermint.abci.ResponseDeliverTx); + rpc CheckTx(tendermint.abci.RequestCheckTx) returns (ResponseCheckTx); + rpc Query(tendermint.abci.RequestQuery) returns (tendermint.abci.ResponseQuery); + rpc Commit(tendermint.abci.RequestCommit) returns (tendermint.abci.ResponseCommit); + rpc InitChain(tendermint.abci.RequestInitChain) returns (tendermint.abci.ResponseInitChain); + rpc BeginBlock(RequestBeginBlock) returns (tendermint.abci.ResponseBeginBlock); + rpc EndBlock(tendermint.abci.RequestEndBlock) returns (tendermint.abci.ResponseEndBlock); + rpc ListSnapshots(tendermint.abci.RequestListSnapshots) returns (tendermint.abci.ResponseListSnapshots); + rpc OfferSnapshot(tendermint.abci.RequestOfferSnapshot) returns (tendermint.abci.ResponseOfferSnapshot); + rpc LoadSnapshotChunk(tendermint.abci.RequestLoadSnapshotChunk) returns (tendermint.abci.ResponseLoadSnapshotChunk); + rpc ApplySnapshotChunk(tendermint.abci.RequestApplySnapshotChunk) returns (tendermint.abci.ResponseApplySnapshotChunk); rpc BeginRecheckTx(RequestBeginRecheckTx) returns (ResponseBeginRecheckTx); rpc EndRecheckTx(RequestEndRecheckTx) returns (ResponseEndRecheckTx); } diff --git a/proto/ostracon/blockchain/types.pb.go b/proto/ostracon/blockchain/types.pb.go index 6136a7424..f40f22c47 100644 --- a/proto/ostracon/blockchain/types.pb.go +++ b/proto/ostracon/blockchain/types.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" proto "github.com/gogo/protobuf/proto" types "github.com/line/ostracon/proto/ostracon/types" + blockchain "github.com/tendermint/tendermint/proto/tendermint/blockchain" io "io" math "math" math_bits "math/bits" @@ -23,96 +24,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// BlockRequest requests a block for a specific height -type BlockRequest struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *BlockRequest) Reset() { *m = BlockRequest{} } -func (m *BlockRequest) String() string { return proto.CompactTextString(m) } -func (*BlockRequest) ProtoMessage() {} -func (*BlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8fcd44ecf244cfa3, []int{0} -} -func (m *BlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockRequest.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 *BlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockRequest.Merge(m, src) -} -func (m *BlockRequest) XXX_Size() int { - return m.Size() -} -func (m *BlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockRequest proto.InternalMessageInfo - -func (m *BlockRequest) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -// NoBlockResponse informs the node that the peer does not have block at the requested height -type NoBlockResponse struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *NoBlockResponse) Reset() { *m = NoBlockResponse{} } -func (m *NoBlockResponse) String() string { return proto.CompactTextString(m) } -func (*NoBlockResponse) ProtoMessage() {} -func (*NoBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8fcd44ecf244cfa3, []int{1} -} -func (m *NoBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoBlockResponse.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 *NoBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoBlockResponse.Merge(m, src) -} -func (m *NoBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *NoBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NoBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NoBlockResponse proto.InternalMessageInfo - -func (m *NoBlockResponse) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - // BlockResponse returns block to the requested type BlockResponse struct { Block *types.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` @@ -122,7 +33,7 @@ func (m *BlockResponse) Reset() { *m = BlockResponse{} } func (m *BlockResponse) String() string { return proto.CompactTextString(m) } func (*BlockResponse) ProtoMessage() {} func (*BlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8fcd44ecf244cfa3, []int{2} + return fileDescriptor_8fcd44ecf244cfa3, []int{0} } func (m *BlockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,96 +69,6 @@ func (m *BlockResponse) GetBlock() *types.Block { return nil } -// StatusRequest requests the status of a peer. -type StatusRequest struct { -} - -func (m *StatusRequest) Reset() { *m = StatusRequest{} } -func (m *StatusRequest) String() string { return proto.CompactTextString(m) } -func (*StatusRequest) ProtoMessage() {} -func (*StatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8fcd44ecf244cfa3, []int{3} -} -func (m *StatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusRequest.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 *StatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusRequest.Merge(m, src) -} -func (m *StatusRequest) XXX_Size() int { - return m.Size() -} -func (m *StatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusRequest proto.InternalMessageInfo - -// StatusResponse is a peer response to inform their status. -type StatusResponse struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Base int64 `protobuf:"varint,2,opt,name=base,proto3" json:"base,omitempty"` -} - -func (m *StatusResponse) Reset() { *m = StatusResponse{} } -func (m *StatusResponse) String() string { return proto.CompactTextString(m) } -func (*StatusResponse) ProtoMessage() {} -func (*StatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8fcd44ecf244cfa3, []int{4} -} -func (m *StatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusResponse.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 *StatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusResponse.Merge(m, src) -} -func (m *StatusResponse) XXX_Size() int { - return m.Size() -} -func (m *StatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusResponse proto.InternalMessageInfo - -func (m *StatusResponse) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *StatusResponse) GetBase() int64 { - if m != nil { - return m.Base - } - return 0 -} - type Message struct { // Types that are valid to be assigned to Sum: // *Message_BlockRequest @@ -262,7 +83,7 @@ func (m *Message) Reset() { *m = Message{} } func (m *Message) String() string { return proto.CompactTextString(m) } func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_8fcd44ecf244cfa3, []int{5} + return fileDescriptor_8fcd44ecf244cfa3, []int{1} } func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,19 +119,19 @@ type isMessage_Sum interface { } type Message_BlockRequest struct { - BlockRequest *BlockRequest `protobuf:"bytes,1,opt,name=block_request,json=blockRequest,proto3,oneof" json:"block_request,omitempty"` + BlockRequest *blockchain.BlockRequest `protobuf:"bytes,1,opt,name=block_request,json=blockRequest,proto3,oneof" json:"block_request,omitempty"` } type Message_NoBlockResponse struct { - NoBlockResponse *NoBlockResponse `protobuf:"bytes,2,opt,name=no_block_response,json=noBlockResponse,proto3,oneof" json:"no_block_response,omitempty"` + NoBlockResponse *blockchain.NoBlockResponse `protobuf:"bytes,2,opt,name=no_block_response,json=noBlockResponse,proto3,oneof" json:"no_block_response,omitempty"` } type Message_BlockResponse struct { BlockResponse *BlockResponse `protobuf:"bytes,3,opt,name=block_response,json=blockResponse,proto3,oneof" json:"block_response,omitempty"` } type Message_StatusRequest struct { - StatusRequest *StatusRequest `protobuf:"bytes,4,opt,name=status_request,json=statusRequest,proto3,oneof" json:"status_request,omitempty"` + StatusRequest *blockchain.StatusRequest `protobuf:"bytes,4,opt,name=status_request,json=statusRequest,proto3,oneof" json:"status_request,omitempty"` } type Message_StatusResponse struct { - StatusResponse *StatusResponse `protobuf:"bytes,5,opt,name=status_response,json=statusResponse,proto3,oneof" json:"status_response,omitempty"` + StatusResponse *blockchain.StatusResponse `protobuf:"bytes,5,opt,name=status_response,json=statusResponse,proto3,oneof" json:"status_response,omitempty"` } func (*Message_BlockRequest) isMessage_Sum() {} @@ -326,14 +147,14 @@ func (m *Message) GetSum() isMessage_Sum { return nil } -func (m *Message) GetBlockRequest() *BlockRequest { +func (m *Message) GetBlockRequest() *blockchain.BlockRequest { if x, ok := m.GetSum().(*Message_BlockRequest); ok { return x.BlockRequest } return nil } -func (m *Message) GetNoBlockResponse() *NoBlockResponse { +func (m *Message) GetNoBlockResponse() *blockchain.NoBlockResponse { if x, ok := m.GetSum().(*Message_NoBlockResponse); ok { return x.NoBlockResponse } @@ -347,14 +168,14 @@ func (m *Message) GetBlockResponse() *BlockResponse { return nil } -func (m *Message) GetStatusRequest() *StatusRequest { +func (m *Message) GetStatusRequest() *blockchain.StatusRequest { if x, ok := m.GetSum().(*Message_StatusRequest); ok { return x.StatusRequest } return nil } -func (m *Message) GetStatusResponse() *StatusResponse { +func (m *Message) GetStatusResponse() *blockchain.StatusResponse { if x, ok := m.GetSum().(*Message_StatusResponse); ok { return x.StatusResponse } @@ -373,97 +194,35 @@ func (*Message) XXX_OneofWrappers() []interface{} { } func init() { - proto.RegisterType((*BlockRequest)(nil), "ostracon.blockchain.BlockRequest") - proto.RegisterType((*NoBlockResponse)(nil), "ostracon.blockchain.NoBlockResponse") proto.RegisterType((*BlockResponse)(nil), "ostracon.blockchain.BlockResponse") - proto.RegisterType((*StatusRequest)(nil), "ostracon.blockchain.StatusRequest") - proto.RegisterType((*StatusResponse)(nil), "ostracon.blockchain.StatusResponse") proto.RegisterType((*Message)(nil), "ostracon.blockchain.Message") } func init() { proto.RegisterFile("ostracon/blockchain/types.proto", fileDescriptor_8fcd44ecf244cfa3) } var fileDescriptor_8fcd44ecf244cfa3 = []byte{ - // 363 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xb1, 0x4f, 0xc2, 0x40, - 0x14, 0xc6, 0x5b, 0x0b, 0x98, 0x3c, 0x28, 0x8d, 0x35, 0x1a, 0xc2, 0x50, 0xb5, 0x1a, 0xa3, 0x31, - 0x69, 0x13, 0x5c, 0x99, 0x98, 0x48, 0x54, 0x86, 0xba, 0xb9, 0x90, 0xb6, 0xb9, 0xd0, 0x46, 0xb8, - 0x43, 0xde, 0x75, 0xf0, 0xbf, 0x70, 0xf4, 0x4f, 0x72, 0x64, 0x74, 0x34, 0xf0, 0x8f, 0x18, 0xee, - 0xca, 0x09, 0x4d, 0xed, 0xd6, 0x7b, 0xfd, 0xde, 0xef, 0xfb, 0xfa, 0xe5, 0x0a, 0x67, 0x0c, 0xf9, - 0x22, 0x8c, 0x19, 0xf5, 0xa3, 0x29, 0x8b, 0x5f, 0xe3, 0x24, 0x4c, 0xa9, 0xcf, 0xdf, 0xe7, 0x04, - 0xbd, 0xf9, 0x82, 0x71, 0x66, 0x1f, 0x6f, 0x05, 0xde, 0x9f, 0xa0, 0xdb, 0x55, 0x5b, 0x42, 0x2a, - 0x77, 0xe5, 0x82, 0x7b, 0x0d, 0xad, 0xc1, 0xe6, 0x18, 0x90, 0xb7, 0x8c, 0x20, 0xb7, 0x4f, 0xa1, - 0x91, 0x90, 0x74, 0x92, 0xf0, 0x8e, 0x7e, 0xae, 0xdf, 0x18, 0x41, 0x7e, 0x72, 0x6f, 0xc1, 0x1a, - 0xb1, 0x5c, 0x89, 0x73, 0x46, 0x91, 0xfc, 0x2b, 0xed, 0x83, 0xb9, 0x2f, 0xbc, 0x83, 0xba, 0xb0, - 0x14, 0xba, 0x66, 0xef, 0xc4, 0x53, 0x21, 0x65, 0x74, 0xa9, 0x96, 0x1a, 0xd7, 0x02, 0xf3, 0x99, - 0x87, 0x3c, 0xc3, 0x3c, 0x91, 0xdb, 0x87, 0xf6, 0x76, 0x50, 0x6d, 0x6c, 0xdb, 0x50, 0x8b, 0x42, - 0x24, 0x9d, 0x03, 0x31, 0x15, 0xcf, 0xee, 0xa7, 0x01, 0x87, 0x4f, 0x04, 0x31, 0x9c, 0x10, 0x7b, - 0x08, 0xa6, 0xf0, 0x18, 0x2f, 0x24, 0x3a, 0xcf, 0x73, 0xe1, 0x95, 0x94, 0xe6, 0xed, 0xb6, 0x32, - 0xd4, 0x82, 0x56, 0xb4, 0xdb, 0x52, 0x00, 0x47, 0x94, 0x8d, 0xb7, 0x30, 0x19, 0x4b, 0xd8, 0x36, - 0x7b, 0x57, 0xa5, 0xb4, 0x42, 0x77, 0x43, 0x2d, 0xb0, 0x68, 0xa1, 0xce, 0x07, 0x68, 0x17, 0x80, - 0x86, 0x00, 0xba, 0x55, 0xf1, 0x14, 0xce, 0x8c, 0x8a, 0x30, 0x14, 0xa5, 0xa9, 0x6f, 0xad, 0x55, - 0xc0, 0xf6, 0x0a, 0xdf, 0xc0, 0x70, 0x77, 0x60, 0x8f, 0xc0, 0x52, 0xb0, 0x3c, 0x5a, 0x5d, 0xd0, - 0x2e, 0x2b, 0x69, 0x2a, 0x5b, 0x1b, 0xf7, 0x26, 0x83, 0x3a, 0x18, 0x98, 0xcd, 0x06, 0x8f, 0x5f, - 0x2b, 0x47, 0x5f, 0xae, 0x1c, 0xfd, 0x67, 0xe5, 0xe8, 0x1f, 0x6b, 0x47, 0x5b, 0xae, 0x1d, 0xed, - 0x7b, 0xed, 0x68, 0x2f, 0xbd, 0x49, 0xca, 0x93, 0x2c, 0xf2, 0x62, 0x36, 0xf3, 0xa7, 0x29, 0x25, - 0xbe, 0xba, 0xc0, 0xe2, 0xd2, 0xfa, 0x25, 0x7f, 0x41, 0xd4, 0x10, 0xaf, 0xee, 0x7f, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x96, 0x66, 0x60, 0x50, 0x23, 0x03, 0x00, 0x00, -} - -func (m *BlockRequest) 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 *BlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockRequest) 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 *NoBlockResponse) 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 *NoBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoBlockResponse) 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 + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x4a, 0xc3, 0x40, + 0x10, 0x87, 0x13, 0x6b, 0x15, 0x56, 0xd3, 0xe2, 0x8a, 0x50, 0x7a, 0x58, 0xb5, 0xfe, 0x41, 0x10, + 0x36, 0x50, 0xaf, 0x9e, 0x7a, 0x2a, 0x6a, 0x45, 0xaa, 0x27, 0x2f, 0x25, 0x89, 0x4b, 0x1b, 0x6c, + 0x77, 0x6b, 0x66, 0x73, 0xf0, 0x2d, 0x7c, 0x04, 0x1f, 0xc7, 0x63, 0x8f, 0x1e, 0x25, 0x79, 0x11, + 0x71, 0x37, 0xdd, 0x24, 0xa5, 0xc1, 0x63, 0x66, 0xbe, 0xf9, 0xf2, 0x9b, 0x65, 0xd0, 0xa1, 0x00, + 0x19, 0x79, 0x81, 0xe0, 0xae, 0x3f, 0x15, 0xc1, 0x6b, 0x30, 0xf1, 0x42, 0xee, 0xca, 0xf7, 0x39, + 0x03, 0x3a, 0x8f, 0x84, 0x14, 0x78, 0x7f, 0x09, 0xd0, 0x1c, 0x68, 0xb7, 0xcd, 0x94, 0x42, 0xf5, + 0xac, 0x1e, 0x68, 0x1f, 0x4b, 0xc6, 0x5f, 0x58, 0x34, 0x0b, 0xb9, 0xac, 0x70, 0x76, 0xae, 0x91, + 0xd3, 0xfb, 0xeb, 0x0c, 0x19, 0xcc, 0x05, 0x07, 0x86, 0x2f, 0x51, 0x5d, 0xa1, 0x2d, 0xfb, 0xc8, + 0xbe, 0xd8, 0xe9, 0x1e, 0x50, 0xf3, 0x53, 0x3d, 0xa6, 0x69, 0xcd, 0x74, 0x3e, 0x6b, 0x68, 0x7b, + 0xc0, 0x00, 0xbc, 0x31, 0xc3, 0x37, 0xc8, 0x51, 0xc5, 0x51, 0xc4, 0xde, 0x62, 0x06, 0x32, 0x13, + 0x9c, 0xd0, 0x3c, 0x44, 0x21, 0x77, 0xe6, 0xd1, 0x68, 0xdf, 0x1a, 0xee, 0xfa, 0x85, 0x6f, 0xfc, + 0x84, 0xf6, 0xb8, 0x18, 0x2d, 0x75, 0x3a, 0x59, 0x6b, 0x43, 0xf9, 0xce, 0x2b, 0x7c, 0xf7, 0xa2, + 0xb4, 0x47, 0xdf, 0x1a, 0x36, 0x79, 0xb9, 0x84, 0x6f, 0x51, 0x63, 0x45, 0x59, 0x53, 0xca, 0x0e, + 0x5d, 0xf3, 0xb0, 0x74, 0x55, 0xe7, 0xf8, 0x25, 0xd9, 0x00, 0x35, 0x40, 0x7a, 0x32, 0x06, 0xb3, + 0xef, 0xa6, 0x92, 0x9d, 0x56, 0xe4, 0x7b, 0x54, 0x70, 0xbe, 0xb0, 0x03, 0xc5, 0x02, 0x7e, 0x40, + 0x4d, 0xa3, 0xcb, 0xc2, 0xd5, 0x95, 0xef, 0xec, 0x1f, 0x9f, 0xc9, 0xd7, 0x80, 0x52, 0xa5, 0x57, + 0x47, 0x35, 0x88, 0x67, 0xbd, 0xbb, 0xaf, 0x84, 0xd8, 0x8b, 0x84, 0xd8, 0x3f, 0x09, 0xb1, 0x3f, + 0x52, 0x62, 0x2d, 0x52, 0x62, 0x7d, 0xa7, 0xc4, 0x7a, 0xee, 0x8e, 0x43, 0x39, 0x89, 0x7d, 0x1a, + 0x88, 0x99, 0x3b, 0x0d, 0x39, 0x73, 0xcd, 0x25, 0xa9, 0xd3, 0x70, 0xd7, 0x9c, 0xa3, 0xbf, 0xa5, + 0x5a, 0x57, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x41, 0x33, 0x04, 0xec, 0xac, 0x02, 0x00, 0x00, } func (m *BlockResponse) Marshal() (dAtA []byte, err error) { @@ -501,62 +260,6 @@ func (m *BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *StatusRequest) 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 *StatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *StatusResponse) 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 *StatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Base != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Base)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *Message) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -705,30 +408,6 @@ func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *BlockRequest) 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 *NoBlockResponse) 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 *BlockResponse) Size() (n int) { if m == nil { return 0 @@ -742,30 +421,6 @@ func (m *BlockResponse) Size() (n int) { return n } -func (m *StatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *StatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Base != 0 { - n += 1 + sovTypes(uint64(m.Base)) - } - return n -} - func (m *Message) Size() (n int) { if m == nil { return 0 @@ -845,144 +500,6 @@ func sovTypes(x uint64) (n int) { func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *BlockRequest) 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: BlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockRequest: 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 *NoBlockResponse) 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: NoBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoBlockResponse: 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 *BlockResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1069,144 +586,6 @@ func (m *BlockResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *StatusRequest) 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: StatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: 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 *StatusResponse) 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: StatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType) - } - m.Base = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Base |= 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 *Message) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1265,7 +644,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &BlockRequest{} + v := &blockchain.BlockRequest{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1300,7 +679,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &NoBlockResponse{} + v := &blockchain.NoBlockResponse{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1370,7 +749,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &StatusRequest{} + v := &blockchain.StatusRequest{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1405,7 +784,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &StatusResponse{} + v := &blockchain.StatusResponse{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/proto/ostracon/blockchain/types.proto b/proto/ostracon/blockchain/types.proto index da953ff33..142b01d82 100644 --- a/proto/ostracon/blockchain/types.proto +++ b/proto/ostracon/blockchain/types.proto @@ -4,38 +4,19 @@ package ostracon.blockchain; option go_package = "github.com/line/ostracon/proto/ostracon/blockchain"; import "ostracon/types/block.proto"; - -// BlockRequest requests a block for a specific height -message BlockRequest { - int64 height = 1; -} - -// NoBlockResponse informs the node that the peer does not have block at the requested height -message NoBlockResponse { - int64 height = 1; -} +import "tendermint/blockchain/types.proto"; // BlockResponse returns block to the requested message BlockResponse { ostracon.types.Block block = 1; } -// StatusRequest requests the status of a peer. -message StatusRequest { -} - -// StatusResponse is a peer response to inform their status. -message StatusResponse { - int64 height = 1; - int64 base = 2; -} - message Message { oneof sum { - BlockRequest block_request = 1; - NoBlockResponse no_block_response = 2; - BlockResponse block_response = 3; - StatusRequest status_request = 4; - StatusResponse status_response = 5; + tendermint.blockchain.BlockRequest block_request = 1; + tendermint.blockchain.NoBlockResponse no_block_response = 2; + BlockResponse block_response = 3; + tendermint.blockchain.StatusRequest status_request = 4; + tendermint.blockchain.StatusResponse status_response = 5; } } diff --git a/proto/ostracon/consensus/types.pb.go b/proto/ostracon/consensus/types.pb.go deleted file mode 100644 index e00a272e2..000000000 --- a/proto/ostracon/consensus/types.pb.go +++ /dev/null @@ -1,3424 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/consensus/types.proto - -package consensus - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - bits "github.com/line/ostracon/proto/ostracon/libs/bits" - types "github.com/line/ostracon/proto/ostracon/types" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// NewRoundStep is sent for every step taken in the ConsensusState. -// For every height/round/step transition -type NewRoundStep struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - Step uint32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` - SecondsSinceStartTime int64 `protobuf:"varint,4,opt,name=seconds_since_start_time,json=secondsSinceStartTime,proto3" json:"seconds_since_start_time,omitempty"` - LastCommitRound int32 `protobuf:"varint,5,opt,name=last_commit_round,json=lastCommitRound,proto3" json:"last_commit_round,omitempty"` -} - -func (m *NewRoundStep) Reset() { *m = NewRoundStep{} } -func (m *NewRoundStep) String() string { return proto.CompactTextString(m) } -func (*NewRoundStep) ProtoMessage() {} -func (*NewRoundStep) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{0} -} -func (m *NewRoundStep) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NewRoundStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NewRoundStep.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 *NewRoundStep) XXX_Merge(src proto.Message) { - xxx_messageInfo_NewRoundStep.Merge(m, src) -} -func (m *NewRoundStep) XXX_Size() int { - return m.Size() -} -func (m *NewRoundStep) XXX_DiscardUnknown() { - xxx_messageInfo_NewRoundStep.DiscardUnknown(m) -} - -var xxx_messageInfo_NewRoundStep proto.InternalMessageInfo - -func (m *NewRoundStep) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *NewRoundStep) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *NewRoundStep) GetStep() uint32 { - if m != nil { - return m.Step - } - return 0 -} - -func (m *NewRoundStep) GetSecondsSinceStartTime() int64 { - if m != nil { - return m.SecondsSinceStartTime - } - return 0 -} - -func (m *NewRoundStep) GetLastCommitRound() int32 { - if m != nil { - return m.LastCommitRound - } - return 0 -} - -// NewValidBlock is sent when a validator observes a valid block B in some round r, -//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. -// In case the block is also committed, then IsCommit flag is set to true. -type NewValidBlock struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - BlockPartSetHeader types.PartSetHeader `protobuf:"bytes,3,opt,name=block_part_set_header,json=blockPartSetHeader,proto3" json:"block_part_set_header"` - BlockParts *bits.BitArray `protobuf:"bytes,4,opt,name=block_parts,json=blockParts,proto3" json:"block_parts,omitempty"` - IsCommit bool `protobuf:"varint,5,opt,name=is_commit,json=isCommit,proto3" json:"is_commit,omitempty"` -} - -func (m *NewValidBlock) Reset() { *m = NewValidBlock{} } -func (m *NewValidBlock) String() string { return proto.CompactTextString(m) } -func (*NewValidBlock) ProtoMessage() {} -func (*NewValidBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{1} -} -func (m *NewValidBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NewValidBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NewValidBlock.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 *NewValidBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_NewValidBlock.Merge(m, src) -} -func (m *NewValidBlock) XXX_Size() int { - return m.Size() -} -func (m *NewValidBlock) XXX_DiscardUnknown() { - xxx_messageInfo_NewValidBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_NewValidBlock proto.InternalMessageInfo - -func (m *NewValidBlock) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *NewValidBlock) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *NewValidBlock) GetBlockPartSetHeader() types.PartSetHeader { - if m != nil { - return m.BlockPartSetHeader - } - return types.PartSetHeader{} -} - -func (m *NewValidBlock) GetBlockParts() *bits.BitArray { - if m != nil { - return m.BlockParts - } - return nil -} - -func (m *NewValidBlock) GetIsCommit() bool { - if m != nil { - return m.IsCommit - } - return false -} - -// Proposal is sent when a new block is proposed. -type Proposal struct { - Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` -} - -func (m *Proposal) Reset() { *m = Proposal{} } -func (m *Proposal) String() string { return proto.CompactTextString(m) } -func (*Proposal) ProtoMessage() {} -func (*Proposal) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{2} -} -func (m *Proposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal.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 *Proposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal.Merge(m, src) -} -func (m *Proposal) XXX_Size() int { - return m.Size() -} -func (m *Proposal) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal proto.InternalMessageInfo - -func (m *Proposal) GetProposal() types.Proposal { - if m != nil { - return m.Proposal - } - return types.Proposal{} -} - -// ProposalPOL is sent when a previous proposal is re-proposed. -type ProposalPOL struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - ProposalPolRound int32 `protobuf:"varint,2,opt,name=proposal_pol_round,json=proposalPolRound,proto3" json:"proposal_pol_round,omitempty"` - ProposalPol bits.BitArray `protobuf:"bytes,3,opt,name=proposal_pol,json=proposalPol,proto3" json:"proposal_pol"` -} - -func (m *ProposalPOL) Reset() { *m = ProposalPOL{} } -func (m *ProposalPOL) String() string { return proto.CompactTextString(m) } -func (*ProposalPOL) ProtoMessage() {} -func (*ProposalPOL) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{3} -} -func (m *ProposalPOL) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalPOL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalPOL.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 *ProposalPOL) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalPOL.Merge(m, src) -} -func (m *ProposalPOL) XXX_Size() int { - return m.Size() -} -func (m *ProposalPOL) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalPOL.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalPOL proto.InternalMessageInfo - -func (m *ProposalPOL) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ProposalPOL) GetProposalPolRound() int32 { - if m != nil { - return m.ProposalPolRound - } - return 0 -} - -func (m *ProposalPOL) GetProposalPol() bits.BitArray { - if m != nil { - return m.ProposalPol - } - return bits.BitArray{} -} - -// BlockPart is sent when gossipping a piece of the proposed block. -type BlockPart struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - Part types.Part `protobuf:"bytes,3,opt,name=part,proto3" json:"part"` -} - -func (m *BlockPart) Reset() { *m = BlockPart{} } -func (m *BlockPart) String() string { return proto.CompactTextString(m) } -func (*BlockPart) ProtoMessage() {} -func (*BlockPart) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{4} -} -func (m *BlockPart) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockPart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockPart.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 *BlockPart) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockPart.Merge(m, src) -} -func (m *BlockPart) XXX_Size() int { - return m.Size() -} -func (m *BlockPart) XXX_DiscardUnknown() { - xxx_messageInfo_BlockPart.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockPart proto.InternalMessageInfo - -func (m *BlockPart) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *BlockPart) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *BlockPart) GetPart() types.Part { - if m != nil { - return m.Part - } - return types.Part{} -} - -// Vote is sent when voting for a proposal (or lack thereof). -type Vote struct { - Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` -} - -func (m *Vote) Reset() { *m = Vote{} } -func (m *Vote) String() string { return proto.CompactTextString(m) } -func (*Vote) ProtoMessage() {} -func (*Vote) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{5} -} -func (m *Vote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Vote.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 *Vote) XXX_Merge(src proto.Message) { - xxx_messageInfo_Vote.Merge(m, src) -} -func (m *Vote) XXX_Size() int { - return m.Size() -} -func (m *Vote) XXX_DiscardUnknown() { - xxx_messageInfo_Vote.DiscardUnknown(m) -} - -var xxx_messageInfo_Vote proto.InternalMessageInfo - -func (m *Vote) GetVote() *types.Vote { - if m != nil { - return m.Vote - } - return nil -} - -// HasVote is sent to indicate that a particular vote has been received. -type HasVote struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=ostracon.types.SignedMsgType" json:"type,omitempty"` - Index int32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"` -} - -func (m *HasVote) Reset() { *m = HasVote{} } -func (m *HasVote) String() string { return proto.CompactTextString(m) } -func (*HasVote) ProtoMessage() {} -func (*HasVote) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{6} -} -func (m *HasVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HasVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HasVote.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 *HasVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_HasVote.Merge(m, src) -} -func (m *HasVote) XXX_Size() int { - return m.Size() -} -func (m *HasVote) XXX_DiscardUnknown() { - xxx_messageInfo_HasVote.DiscardUnknown(m) -} - -var xxx_messageInfo_HasVote proto.InternalMessageInfo - -func (m *HasVote) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *HasVote) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *HasVote) GetType() types.SignedMsgType { - if m != nil { - return m.Type - } - return types.UnknownType -} - -func (m *HasVote) GetIndex() int32 { - if m != nil { - return m.Index - } - return 0 -} - -// VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes. -type VoteSetMaj23 struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=ostracon.types.SignedMsgType" json:"type,omitempty"` - BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` -} - -func (m *VoteSetMaj23) Reset() { *m = VoteSetMaj23{} } -func (m *VoteSetMaj23) String() string { return proto.CompactTextString(m) } -func (*VoteSetMaj23) ProtoMessage() {} -func (*VoteSetMaj23) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{7} -} -func (m *VoteSetMaj23) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VoteSetMaj23) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VoteSetMaj23.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 *VoteSetMaj23) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoteSetMaj23.Merge(m, src) -} -func (m *VoteSetMaj23) XXX_Size() int { - return m.Size() -} -func (m *VoteSetMaj23) XXX_DiscardUnknown() { - xxx_messageInfo_VoteSetMaj23.DiscardUnknown(m) -} - -var xxx_messageInfo_VoteSetMaj23 proto.InternalMessageInfo - -func (m *VoteSetMaj23) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *VoteSetMaj23) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *VoteSetMaj23) GetType() types.SignedMsgType { - if m != nil { - return m.Type - } - return types.UnknownType -} - -func (m *VoteSetMaj23) GetBlockID() types.BlockID { - if m != nil { - return m.BlockID - } - return types.BlockID{} -} - -// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID. -type VoteSetBits struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=ostracon.types.SignedMsgType" json:"type,omitempty"` - BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` - Votes bits.BitArray `protobuf:"bytes,5,opt,name=votes,proto3" json:"votes"` -} - -func (m *VoteSetBits) Reset() { *m = VoteSetBits{} } -func (m *VoteSetBits) String() string { return proto.CompactTextString(m) } -func (*VoteSetBits) ProtoMessage() {} -func (*VoteSetBits) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{8} -} -func (m *VoteSetBits) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VoteSetBits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VoteSetBits.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 *VoteSetBits) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoteSetBits.Merge(m, src) -} -func (m *VoteSetBits) XXX_Size() int { - return m.Size() -} -func (m *VoteSetBits) XXX_DiscardUnknown() { - xxx_messageInfo_VoteSetBits.DiscardUnknown(m) -} - -var xxx_messageInfo_VoteSetBits proto.InternalMessageInfo - -func (m *VoteSetBits) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *VoteSetBits) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *VoteSetBits) GetType() types.SignedMsgType { - if m != nil { - return m.Type - } - return types.UnknownType -} - -func (m *VoteSetBits) GetBlockID() types.BlockID { - if m != nil { - return m.BlockID - } - return types.BlockID{} -} - -func (m *VoteSetBits) GetVotes() bits.BitArray { - if m != nil { - return m.Votes - } - return bits.BitArray{} -} - -type Message struct { - // Types that are valid to be assigned to Sum: - // *Message_NewRoundStep - // *Message_NewValidBlock - // *Message_Proposal - // *Message_ProposalPol - // *Message_BlockPart - // *Message_Vote - // *Message_HasVote - // *Message_VoteSetMaj23 - // *Message_VoteSetBits - Sum isMessage_Sum `protobuf_oneof:"sum"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_0ef76b376cac7abc, []int{9} -} -func (m *Message) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message.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 *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(m, src) -} -func (m *Message) XXX_Size() int { - return m.Size() -} -func (m *Message) XXX_DiscardUnknown() { - xxx_messageInfo_Message.DiscardUnknown(m) -} - -var xxx_messageInfo_Message proto.InternalMessageInfo - -type isMessage_Sum interface { - isMessage_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type Message_NewRoundStep struct { - NewRoundStep *NewRoundStep `protobuf:"bytes,1,opt,name=new_round_step,json=newRoundStep,proto3,oneof" json:"new_round_step,omitempty"` -} -type Message_NewValidBlock struct { - NewValidBlock *NewValidBlock `protobuf:"bytes,2,opt,name=new_valid_block,json=newValidBlock,proto3,oneof" json:"new_valid_block,omitempty"` -} -type Message_Proposal struct { - Proposal *Proposal `protobuf:"bytes,3,opt,name=proposal,proto3,oneof" json:"proposal,omitempty"` -} -type Message_ProposalPol struct { - ProposalPol *ProposalPOL `protobuf:"bytes,4,opt,name=proposal_pol,json=proposalPol,proto3,oneof" json:"proposal_pol,omitempty"` -} -type Message_BlockPart struct { - BlockPart *BlockPart `protobuf:"bytes,5,opt,name=block_part,json=blockPart,proto3,oneof" json:"block_part,omitempty"` -} -type Message_Vote struct { - Vote *Vote `protobuf:"bytes,6,opt,name=vote,proto3,oneof" json:"vote,omitempty"` -} -type Message_HasVote struct { - HasVote *HasVote `protobuf:"bytes,7,opt,name=has_vote,json=hasVote,proto3,oneof" json:"has_vote,omitempty"` -} -type Message_VoteSetMaj23 struct { - VoteSetMaj23 *VoteSetMaj23 `protobuf:"bytes,8,opt,name=vote_set_maj23,json=voteSetMaj23,proto3,oneof" json:"vote_set_maj23,omitempty"` -} -type Message_VoteSetBits struct { - VoteSetBits *VoteSetBits `protobuf:"bytes,9,opt,name=vote_set_bits,json=voteSetBits,proto3,oneof" json:"vote_set_bits,omitempty"` -} - -func (*Message_NewRoundStep) isMessage_Sum() {} -func (*Message_NewValidBlock) isMessage_Sum() {} -func (*Message_Proposal) isMessage_Sum() {} -func (*Message_ProposalPol) isMessage_Sum() {} -func (*Message_BlockPart) isMessage_Sum() {} -func (*Message_Vote) isMessage_Sum() {} -func (*Message_HasVote) isMessage_Sum() {} -func (*Message_VoteSetMaj23) isMessage_Sum() {} -func (*Message_VoteSetBits) isMessage_Sum() {} - -func (m *Message) GetSum() isMessage_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *Message) GetNewRoundStep() *NewRoundStep { - if x, ok := m.GetSum().(*Message_NewRoundStep); ok { - return x.NewRoundStep - } - return nil -} - -func (m *Message) GetNewValidBlock() *NewValidBlock { - if x, ok := m.GetSum().(*Message_NewValidBlock); ok { - return x.NewValidBlock - } - return nil -} - -func (m *Message) GetProposal() *Proposal { - if x, ok := m.GetSum().(*Message_Proposal); ok { - return x.Proposal - } - return nil -} - -func (m *Message) GetProposalPol() *ProposalPOL { - if x, ok := m.GetSum().(*Message_ProposalPol); ok { - return x.ProposalPol - } - return nil -} - -func (m *Message) GetBlockPart() *BlockPart { - if x, ok := m.GetSum().(*Message_BlockPart); ok { - return x.BlockPart - } - return nil -} - -func (m *Message) GetVote() *Vote { - if x, ok := m.GetSum().(*Message_Vote); ok { - return x.Vote - } - return nil -} - -func (m *Message) GetHasVote() *HasVote { - if x, ok := m.GetSum().(*Message_HasVote); ok { - return x.HasVote - } - return nil -} - -func (m *Message) GetVoteSetMaj23() *VoteSetMaj23 { - if x, ok := m.GetSum().(*Message_VoteSetMaj23); ok { - return x.VoteSetMaj23 - } - return nil -} - -func (m *Message) GetVoteSetBits() *VoteSetBits { - if x, ok := m.GetSum().(*Message_VoteSetBits); ok { - return x.VoteSetBits - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Message) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Message_NewRoundStep)(nil), - (*Message_NewValidBlock)(nil), - (*Message_Proposal)(nil), - (*Message_ProposalPol)(nil), - (*Message_BlockPart)(nil), - (*Message_Vote)(nil), - (*Message_HasVote)(nil), - (*Message_VoteSetMaj23)(nil), - (*Message_VoteSetBits)(nil), - } -} - -func init() { - proto.RegisterType((*NewRoundStep)(nil), "ostracon.consensus.NewRoundStep") - proto.RegisterType((*NewValidBlock)(nil), "ostracon.consensus.NewValidBlock") - proto.RegisterType((*Proposal)(nil), "ostracon.consensus.Proposal") - proto.RegisterType((*ProposalPOL)(nil), "ostracon.consensus.ProposalPOL") - proto.RegisterType((*BlockPart)(nil), "ostracon.consensus.BlockPart") - proto.RegisterType((*Vote)(nil), "ostracon.consensus.Vote") - proto.RegisterType((*HasVote)(nil), "ostracon.consensus.HasVote") - proto.RegisterType((*VoteSetMaj23)(nil), "ostracon.consensus.VoteSetMaj23") - proto.RegisterType((*VoteSetBits)(nil), "ostracon.consensus.VoteSetBits") - proto.RegisterType((*Message)(nil), "ostracon.consensus.Message") -} - -func init() { proto.RegisterFile("ostracon/consensus/types.proto", fileDescriptor_0ef76b376cac7abc) } - -var fileDescriptor_0ef76b376cac7abc = []byte{ - // 848 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xb6, 0x59, 0x67, 0x93, 0x3c, 0x27, 0xbb, 0x30, 0xda, 0x82, 0x95, 0xd2, 0x6c, 0xf0, 0x29, - 0x42, 0xc8, 0xa1, 0xe9, 0x81, 0x0a, 0x09, 0x24, 0xdc, 0x16, 0xb9, 0x6a, 0xb7, 0x8d, 0x9c, 0x6a, - 0x0f, 0x5c, 0x2c, 0x27, 0x1e, 0x25, 0x03, 0x8e, 0xc7, 0xf2, 0x4c, 0xb2, 0xec, 0x8d, 0x9f, 0xc0, - 0x99, 0xdf, 0x01, 0xff, 0xa1, 0xc7, 0x1e, 0x39, 0x55, 0x28, 0xcb, 0x95, 0x03, 0xff, 0x00, 0xcd, - 0x78, 0x62, 0x3b, 0x9b, 0x4d, 0xc5, 0x1e, 0x38, 0x70, 0xb3, 0xf3, 0xde, 0xfb, 0xe6, 0xcd, 0xf7, - 0xde, 0xf7, 0xc5, 0xd0, 0xa5, 0x8c, 0x67, 0xe1, 0x94, 0x26, 0x83, 0x29, 0x4d, 0x18, 0x4e, 0xd8, - 0x92, 0x0d, 0xf8, 0x65, 0x8a, 0x99, 0x93, 0x66, 0x94, 0x53, 0x84, 0x36, 0x71, 0xa7, 0x88, 0x77, - 0x4e, 0x66, 0x74, 0x46, 0x65, 0x78, 0x20, 0x9e, 0xf2, 0xcc, 0x4e, 0xa7, 0x40, 0x92, 0xf5, 0x55, - 0x94, 0x4e, 0x79, 0x4a, 0x4c, 0x26, 0x6c, 0x30, 0x21, 0x7c, 0x2b, 0x6e, 0xff, 0xa6, 0x43, 0xeb, - 0x05, 0xbe, 0xf0, 0xe9, 0x32, 0x89, 0xc6, 0x1c, 0xa7, 0xe8, 0x43, 0x38, 0x9c, 0x63, 0x32, 0x9b, - 0x73, 0x4b, 0xef, 0xe9, 0xfd, 0x03, 0x5f, 0xbd, 0xa1, 0x13, 0xa8, 0x65, 0x22, 0xc9, 0x7a, 0xaf, - 0xa7, 0xf7, 0x6b, 0x7e, 0xfe, 0x82, 0x10, 0x18, 0x8c, 0xe3, 0xd4, 0x3a, 0xe8, 0xe9, 0xfd, 0xb6, - 0x2f, 0x9f, 0xd1, 0x17, 0x60, 0x31, 0x3c, 0xa5, 0x49, 0xc4, 0x02, 0x46, 0x92, 0x29, 0x0e, 0x18, - 0x0f, 0x33, 0x1e, 0x70, 0xb2, 0xc0, 0x96, 0x21, 0x31, 0xef, 0xa8, 0xf8, 0x58, 0x84, 0xc7, 0x22, - 0xfa, 0x8a, 0x2c, 0x30, 0xfa, 0x14, 0x3e, 0x88, 0x43, 0xc6, 0x83, 0x29, 0x5d, 0x2c, 0x08, 0x0f, - 0xf2, 0xe3, 0x6a, 0xf2, 0xb8, 0x63, 0x11, 0x78, 0x24, 0x7f, 0x97, 0xad, 0xda, 0x7f, 0xeb, 0xd0, - 0x7e, 0x81, 0x2f, 0xce, 0xc3, 0x98, 0x44, 0x6e, 0x4c, 0xa7, 0x3f, 0xdc, 0xb2, 0xf1, 0x73, 0xb8, - 0x33, 0x11, 0x65, 0x41, 0x2a, 0x7a, 0x63, 0x98, 0x07, 0x73, 0x1c, 0x46, 0x38, 0x93, 0x37, 0x31, - 0x87, 0xf7, 0x9c, 0x82, 0xfd, 0x9c, 0xad, 0x51, 0x98, 0xf1, 0x31, 0xe6, 0x9e, 0x4c, 0x72, 0x8d, - 0xd7, 0x6f, 0x4f, 0x35, 0x1f, 0x49, 0x84, 0xad, 0x08, 0xfa, 0x0a, 0xcc, 0x12, 0x97, 0xc9, 0xfb, - 0x9a, 0xc3, 0x8f, 0x4b, 0x34, 0x31, 0x05, 0x47, 0x4c, 0xc1, 0x71, 0x09, 0xff, 0x26, 0xcb, 0xc2, - 0x4b, 0x1f, 0x0a, 0x18, 0x86, 0xee, 0x42, 0x93, 0x30, 0x45, 0x80, 0xbc, 0x7a, 0xc3, 0x6f, 0x10, - 0x96, 0x5f, 0xdc, 0xfe, 0x16, 0x1a, 0xa3, 0x8c, 0xa6, 0x94, 0x85, 0x31, 0xfa, 0x12, 0x1a, 0xa9, - 0x7a, 0x96, 0xf7, 0x35, 0x87, 0xd6, 0x4e, 0xcb, 0x2a, 0xae, 0xba, 0x2d, 0xf2, 0xed, 0x5f, 0x74, - 0x30, 0x37, 0xc1, 0xd1, 0xcb, 0xe7, 0x7b, 0x99, 0xfb, 0x0c, 0xd0, 0xa6, 0x26, 0x48, 0x69, 0x1c, - 0x54, 0x69, 0x7c, 0x7f, 0x13, 0x19, 0xd1, 0x58, 0x4e, 0x04, 0x3d, 0x81, 0x56, 0x35, 0x5b, 0x11, - 0xf9, 0xce, 0xab, 0xab, 0xce, 0xcc, 0x0a, 0x96, 0x4d, 0xa0, 0xe9, 0x6e, 0xf8, 0xb8, 0xe5, 0x4c, - 0x1d, 0x30, 0x04, 0xeb, 0xea, 0xe4, 0x93, 0x9b, 0x46, 0xa8, 0x4e, 0x94, 0x79, 0xf6, 0xe7, 0x60, - 0x9c, 0x53, 0x8e, 0x51, 0x1f, 0x8c, 0x15, 0xe5, 0x58, 0xf1, 0xb8, 0x53, 0x27, 0x72, 0x7c, 0x99, - 0x61, 0xff, 0xa4, 0x43, 0xdd, 0x0b, 0x99, 0xac, 0xba, 0x5d, 0x6f, 0xf7, 0xc1, 0x10, 0x68, 0xb2, - 0xb7, 0xa3, 0xdd, 0xf5, 0x1a, 0x93, 0x59, 0x82, 0xa3, 0x33, 0x36, 0x7b, 0x75, 0x99, 0x62, 0x5f, - 0xa6, 0x0a, 0x20, 0x92, 0x44, 0xf8, 0x47, 0xb9, 0x44, 0x35, 0x3f, 0x7f, 0xb1, 0x7f, 0xd5, 0xa1, - 0x25, 0xce, 0x1f, 0x63, 0x7e, 0x16, 0x7e, 0x3f, 0x7c, 0xf0, 0xdf, 0xf7, 0xf1, 0x08, 0x1a, 0xf9, - 0x4a, 0x93, 0x48, 0xed, 0xf3, 0x47, 0xd7, 0xcb, 0xe4, 0xc4, 0x9e, 0x3e, 0x76, 0x8f, 0x05, 0xbb, - 0xeb, 0xb7, 0xa7, 0x75, 0xf5, 0x83, 0x5f, 0x97, 0x95, 0x4f, 0x23, 0xfb, 0x2f, 0x1d, 0x4c, 0xd5, - 0xb6, 0x4b, 0x38, 0xfb, 0x7f, 0x74, 0x8d, 0x1e, 0x42, 0x4d, 0xcc, 0x9d, 0x49, 0x29, 0xfe, 0xbb, - 0x65, 0xce, 0x0b, 0xec, 0x3f, 0x0d, 0xa8, 0x9f, 0x61, 0xc6, 0xc2, 0x19, 0x46, 0x1e, 0x1c, 0x25, - 0xf8, 0x22, 0x97, 0x4f, 0x20, 0xed, 0x32, 0xdf, 0xb4, 0x9e, 0xb3, 0x6b, 0xf1, 0x4e, 0xd5, 0x8c, - 0x3d, 0xcd, 0x6f, 0x25, 0x55, 0x73, 0x7e, 0x06, 0xc7, 0x02, 0x69, 0x25, 0x5c, 0x2f, 0x90, 0x4d, - 0x4a, 0x9e, 0xcc, 0xe1, 0x27, 0x7b, 0xa0, 0x4a, 0x7f, 0xf4, 0x34, 0xbf, 0x9d, 0x6c, 0x19, 0x66, - 0xd5, 0x42, 0x76, 0xc4, 0x5a, 0xa2, 0x6c, 0x9c, 0xc2, 0xab, 0x58, 0x08, 0x7a, 0x7c, 0x4d, 0xec, - 0x39, 0xc3, 0xa7, 0xef, 0xaa, 0x1f, 0xbd, 0x7c, 0xee, 0x6d, 0x6b, 0x1d, 0x7d, 0x0d, 0x50, 0x9a, - 0xa5, 0xe2, 0xf8, 0xde, 0x4d, 0x18, 0x85, 0x23, 0x78, 0x9a, 0xdf, 0x2c, 0xec, 0x52, 0x08, 0x5e, - 0x0a, 0xf7, 0xf0, 0xba, 0x01, 0x96, 0x95, 0x62, 0xe7, 0x3c, 0x2d, 0x97, 0x2f, 0x7a, 0x08, 0x8d, - 0x79, 0xc8, 0x02, 0x59, 0x53, 0x97, 0x35, 0x77, 0x6f, 0xaa, 0x51, 0x0a, 0xf7, 0x34, 0xbf, 0x3e, - 0x57, 0x62, 0xf7, 0xe0, 0x48, 0x54, 0xc9, 0x3f, 0x8a, 0x85, 0x90, 0x9d, 0xd5, 0xd8, 0x3f, 0xc2, - 0xaa, 0x3c, 0xc5, 0x08, 0x57, 0x55, 0xb9, 0x3e, 0x81, 0x76, 0x81, 0x24, 0xf6, 0xc7, 0x6a, 0xee, - 0xa7, 0xae, 0x22, 0x18, 0x41, 0xdd, 0xaa, 0x7c, 0x75, 0x6b, 0x70, 0xc0, 0x96, 0x0b, 0xf7, 0xd9, - 0xeb, 0x75, 0x57, 0x7f, 0xb3, 0xee, 0xea, 0x7f, 0xac, 0xbb, 0xfa, 0xcf, 0x57, 0x5d, 0xed, 0xcd, - 0x55, 0x57, 0xfb, 0xfd, 0xaa, 0xab, 0x7d, 0x77, 0x7f, 0x46, 0xf8, 0x7c, 0x39, 0x71, 0xa6, 0x74, - 0x31, 0x88, 0x49, 0x82, 0x07, 0xc5, 0x87, 0x40, 0xfe, 0xfd, 0xb0, 0xfb, 0xf5, 0x31, 0x39, 0x94, - 0x91, 0x07, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x61, 0x4b, 0xdf, 0x94, 0x9a, 0x08, 0x00, 0x00, -} - -func (m *NewRoundStep) 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 *NewRoundStep) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NewRoundStep) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastCommitRound != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastCommitRound)) - i-- - dAtA[i] = 0x28 - } - if m.SecondsSinceStartTime != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.SecondsSinceStartTime)) - i-- - dAtA[i] = 0x20 - } - if m.Step != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Step)) - i-- - dAtA[i] = 0x18 - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *NewValidBlock) 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 *NewValidBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NewValidBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsCommit { - i-- - if m.IsCommit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.BlockParts != nil { - { - size, err := m.BlockParts.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - { - size, err := m.BlockPartSetHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Proposal) 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 *Proposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Proposal.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 *ProposalPOL) 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 *ProposalPOL) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalPOL) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ProposalPol.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.ProposalPolRound != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ProposalPolRound)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BlockPart) 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 *BlockPart) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockPart) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Part.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Vote) 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 *Vote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Vote != nil { - { - size, err := m.Vote.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 *HasVote) 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 *HasVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HasVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Index != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x20 - } - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x18 - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *VoteSetMaj23) 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 *VoteSetMaj23) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VoteSetMaj23) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x18 - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *VoteSetBits) 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 *VoteSetBits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VoteSetBits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Votes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x18 - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Message_NewRoundStep) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_NewRoundStep) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.NewRoundStep != nil { - { - size, err := m.NewRoundStep.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 *Message_NewValidBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_NewValidBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.NewValidBlock != nil { - { - size, err := m.NewValidBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Message_Proposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Message_ProposalPol) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_ProposalPol) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalPol != nil { - { - size, err := m.ProposalPol.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Message_BlockPart) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_BlockPart) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BlockPart != nil { - { - size, err := m.BlockPart.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Message_Vote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Vote != nil { - { - size, err := m.Vote.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 *Message_HasVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_HasVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.HasVote != nil { - { - size, err := m.HasVote.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 *Message_VoteSetMaj23) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_VoteSetMaj23) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.VoteSetMaj23 != nil { - { - size, err := m.VoteSetMaj23.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 *Message_VoteSetBits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_VoteSetBits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.VoteSetBits != nil { - { - size, err := m.VoteSetBits.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 encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *NewRoundStep) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - if m.Step != 0 { - n += 1 + sovTypes(uint64(m.Step)) - } - if m.SecondsSinceStartTime != 0 { - n += 1 + sovTypes(uint64(m.SecondsSinceStartTime)) - } - if m.LastCommitRound != 0 { - n += 1 + sovTypes(uint64(m.LastCommitRound)) - } - return n -} - -func (m *NewValidBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - l = m.BlockPartSetHeader.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.BlockParts != nil { - l = m.BlockParts.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.IsCommit { - n += 2 - } - return n -} - -func (m *Proposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Proposal.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *ProposalPOL) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.ProposalPolRound != 0 { - n += 1 + sovTypes(uint64(m.ProposalPolRound)) - } - l = m.ProposalPol.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *BlockPart) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - l = m.Part.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *Vote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *HasVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - if m.Index != 0 { - n += 1 + sovTypes(uint64(m.Index)) - } - return n -} - -func (m *VoteSetMaj23) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *VoteSetBits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Votes.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *Message) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *Message_NewRoundStep) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NewRoundStep != nil { - l = m.NewRoundStep.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_NewValidBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NewValidBlock != nil { - l = m.NewValidBlock.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_Proposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_ProposalPol) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalPol != nil { - l = m.ProposalPol.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_BlockPart) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockPart != nil { - l = m.BlockPart.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_Vote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_HasVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HasVote != nil { - l = m.HasVote.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_VoteSetMaj23) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VoteSetMaj23 != nil { - l = m.VoteSetMaj23.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_VoteSetBits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VoteSetBits != nil { - l = m.VoteSetBits.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *NewRoundStep) 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: NewRoundStep: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NewRoundStep: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) - } - m.Step = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Step |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SecondsSinceStartTime", wireType) - } - m.SecondsSinceStartTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SecondsSinceStartTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommitRound", wireType) - } - m.LastCommitRound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastCommitRound |= int32(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 *NewValidBlock) 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: NewValidBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NewValidBlock: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockPartSetHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BlockPartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockParts", 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.BlockParts == nil { - m.BlockParts = &bits.BitArray{} - } - if err := m.BlockParts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsCommit", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsCommit = bool(v != 0) - 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 *Proposal) 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Proposal.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 *ProposalPOL) 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: ProposalPOL: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalPOL: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalPolRound", wireType) - } - m.ProposalPolRound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalPolRound |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProposalPol.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 *BlockPart) 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: BlockPart: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockPart: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Part", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Part.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 *Vote) 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", 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.Vote == nil { - m.Vote = &types.Vote{} - } - if err := m.Vote.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 *HasVote) 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: HasVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HasVote: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - 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 |= types.SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= int32(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 *VoteSetMaj23) 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: VoteSetMaj23: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VoteSetMaj23: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - 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 |= types.SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BlockID.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 *VoteSetBits) 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: VoteSetBits: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VoteSetBits: 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 - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - 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 |= types.SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Votes.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 *Message) 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: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRoundStep", 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 := &NewRoundStep{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_NewRoundStep{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewValidBlock", 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 := &NewValidBlock{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_NewValidBlock{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", 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 := &Proposal{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_Proposal{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", 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 := &ProposalPOL{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_ProposalPol{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockPart", 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 := &BlockPart{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_BlockPart{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", 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 := &Vote{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_Vote{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HasVote", 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 := &HasVote{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_HasVote{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoteSetMaj23", 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 := &VoteSetMaj23{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_VoteSetMaj23{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VoteSetBits", 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 := &VoteSetBits{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_VoteSetBits{v} - 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 skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/consensus/types.proto b/proto/ostracon/consensus/types.proto deleted file mode 100644 index 7ab3814a1..000000000 --- a/proto/ostracon/consensus/types.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; -package ostracon.consensus; - -option go_package = "github.com/line/ostracon/proto/ostracon/consensus"; - -import "gogoproto/gogo.proto"; -import "ostracon/types/types.proto"; -import "ostracon/libs/bits/types.proto"; - -// NewRoundStep is sent for every step taken in the ConsensusState. -// For every height/round/step transition -message NewRoundStep { - int64 height = 1; - int32 round = 2; - uint32 step = 3; - int64 seconds_since_start_time = 4; - int32 last_commit_round = 5; -} - -// NewValidBlock is sent when a validator observes a valid block B in some round r, -//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. -// In case the block is also committed, then IsCommit flag is set to true. -message NewValidBlock { - int64 height = 1; - int32 round = 2; - ostracon.types.PartSetHeader block_part_set_header = 3 [(gogoproto.nullable) = false]; - ostracon.libs.bits.BitArray block_parts = 4; - bool is_commit = 5; -} - -// Proposal is sent when a new block is proposed. -message Proposal { - ostracon.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; -} - -// ProposalPOL is sent when a previous proposal is re-proposed. -message ProposalPOL { - int64 height = 1; - int32 proposal_pol_round = 2; - ostracon.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false]; -} - -// BlockPart is sent when gossipping a piece of the proposed block. -message BlockPart { - int64 height = 1; - int32 round = 2; - ostracon.types.Part part = 3 [(gogoproto.nullable) = false]; -} - -// Vote is sent when voting for a proposal (or lack thereof). -message Vote { - ostracon.types.Vote vote = 1; -} - -// HasVote is sent to indicate that a particular vote has been received. -message HasVote { - int64 height = 1; - int32 round = 2; - ostracon.types.SignedMsgType type = 3; - int32 index = 4; -} - -// VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes. -message VoteSetMaj23 { - int64 height = 1; - int32 round = 2; - ostracon.types.SignedMsgType type = 3; - ostracon.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; -} - -// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID. -message VoteSetBits { - int64 height = 1; - int32 round = 2; - ostracon.types.SignedMsgType type = 3; - ostracon.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - ostracon.libs.bits.BitArray votes = 5 [(gogoproto.nullable) = false]; -} - -message Message { - oneof sum { - NewRoundStep new_round_step = 1; - NewValidBlock new_valid_block = 2; - Proposal proposal = 3; - ProposalPOL proposal_pol = 4; - BlockPart block_part = 5; - Vote vote = 6; - HasVote has_vote = 7; - VoteSetMaj23 vote_set_maj23 = 8; - VoteSetBits vote_set_bits = 9; - } -} diff --git a/proto/ostracon/consensus/wal.pb.go b/proto/ostracon/consensus/wal.pb.go deleted file mode 100644 index c6a2b2ead..000000000 --- a/proto/ostracon/consensus/wal.pb.go +++ /dev/null @@ -1,1540 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/consensus/wal.proto - -package consensus - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/duration" - types "github.com/line/ostracon/proto/ostracon/types" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgInfo are msgs from the reactor which may update the state -type MsgInfo struct { - Msg Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"` - PeerID string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` -} - -func (m *MsgInfo) Reset() { *m = MsgInfo{} } -func (m *MsgInfo) String() string { return proto.CompactTextString(m) } -func (*MsgInfo) ProtoMessage() {} -func (*MsgInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_4c737e612f9cf5e0, []int{0} -} -func (m *MsgInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgInfo.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 *MsgInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgInfo.Merge(m, src) -} -func (m *MsgInfo) XXX_Size() int { - return m.Size() -} -func (m *MsgInfo) XXX_DiscardUnknown() { - xxx_messageInfo_MsgInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgInfo proto.InternalMessageInfo - -func (m *MsgInfo) GetMsg() Message { - if m != nil { - return m.Msg - } - return Message{} -} - -func (m *MsgInfo) GetPeerID() string { - if m != nil { - return m.PeerID - } - return "" -} - -// TimeoutInfo internally generated messages which may update the state -type TimeoutInfo struct { - Duration time.Duration `protobuf:"bytes,1,opt,name=duration,proto3,stdduration" json:"duration"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` - Step uint32 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"` -} - -func (m *TimeoutInfo) Reset() { *m = TimeoutInfo{} } -func (m *TimeoutInfo) String() string { return proto.CompactTextString(m) } -func (*TimeoutInfo) ProtoMessage() {} -func (*TimeoutInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_4c737e612f9cf5e0, []int{1} -} -func (m *TimeoutInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimeoutInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimeoutInfo.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 *TimeoutInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeoutInfo.Merge(m, src) -} -func (m *TimeoutInfo) XXX_Size() int { - return m.Size() -} -func (m *TimeoutInfo) XXX_DiscardUnknown() { - xxx_messageInfo_TimeoutInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_TimeoutInfo proto.InternalMessageInfo - -func (m *TimeoutInfo) GetDuration() time.Duration { - if m != nil { - return m.Duration - } - return 0 -} - -func (m *TimeoutInfo) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *TimeoutInfo) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *TimeoutInfo) GetStep() uint32 { - if m != nil { - return m.Step - } - return 0 -} - -// EndHeight marks the end of the given height inside WAL. -// @internal used by scripts/wal2json util. -type EndHeight struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *EndHeight) Reset() { *m = EndHeight{} } -func (m *EndHeight) String() string { return proto.CompactTextString(m) } -func (*EndHeight) ProtoMessage() {} -func (*EndHeight) Descriptor() ([]byte, []int) { - return fileDescriptor_4c737e612f9cf5e0, []int{2} -} -func (m *EndHeight) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EndHeight.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 *EndHeight) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndHeight.Merge(m, src) -} -func (m *EndHeight) XXX_Size() int { - return m.Size() -} -func (m *EndHeight) XXX_DiscardUnknown() { - xxx_messageInfo_EndHeight.DiscardUnknown(m) -} - -var xxx_messageInfo_EndHeight proto.InternalMessageInfo - -func (m *EndHeight) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -type WALMessage struct { - // Types that are valid to be assigned to Sum: - // *WALMessage_EventDataRoundState - // *WALMessage_MsgInfo - // *WALMessage_TimeoutInfo - // *WALMessage_EndHeight - Sum isWALMessage_Sum `protobuf_oneof:"sum"` -} - -func (m *WALMessage) Reset() { *m = WALMessage{} } -func (m *WALMessage) String() string { return proto.CompactTextString(m) } -func (*WALMessage) ProtoMessage() {} -func (*WALMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_4c737e612f9cf5e0, []int{3} -} -func (m *WALMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WALMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WALMessage.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 *WALMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_WALMessage.Merge(m, src) -} -func (m *WALMessage) XXX_Size() int { - return m.Size() -} -func (m *WALMessage) XXX_DiscardUnknown() { - xxx_messageInfo_WALMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_WALMessage proto.InternalMessageInfo - -type isWALMessage_Sum interface { - isWALMessage_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type WALMessage_EventDataRoundState struct { - EventDataRoundState *types.EventDataRoundState `protobuf:"bytes,1,opt,name=event_data_round_state,json=eventDataRoundState,proto3,oneof" json:"event_data_round_state,omitempty"` -} -type WALMessage_MsgInfo struct { - MsgInfo *MsgInfo `protobuf:"bytes,2,opt,name=msg_info,json=msgInfo,proto3,oneof" json:"msg_info,omitempty"` -} -type WALMessage_TimeoutInfo struct { - TimeoutInfo *TimeoutInfo `protobuf:"bytes,3,opt,name=timeout_info,json=timeoutInfo,proto3,oneof" json:"timeout_info,omitempty"` -} -type WALMessage_EndHeight struct { - EndHeight *EndHeight `protobuf:"bytes,4,opt,name=end_height,json=endHeight,proto3,oneof" json:"end_height,omitempty"` -} - -func (*WALMessage_EventDataRoundState) isWALMessage_Sum() {} -func (*WALMessage_MsgInfo) isWALMessage_Sum() {} -func (*WALMessage_TimeoutInfo) isWALMessage_Sum() {} -func (*WALMessage_EndHeight) isWALMessage_Sum() {} - -func (m *WALMessage) GetSum() isWALMessage_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *WALMessage) GetEventDataRoundState() *types.EventDataRoundState { - if x, ok := m.GetSum().(*WALMessage_EventDataRoundState); ok { - return x.EventDataRoundState - } - return nil -} - -func (m *WALMessage) GetMsgInfo() *MsgInfo { - if x, ok := m.GetSum().(*WALMessage_MsgInfo); ok { - return x.MsgInfo - } - return nil -} - -func (m *WALMessage) GetTimeoutInfo() *TimeoutInfo { - if x, ok := m.GetSum().(*WALMessage_TimeoutInfo); ok { - return x.TimeoutInfo - } - return nil -} - -func (m *WALMessage) GetEndHeight() *EndHeight { - if x, ok := m.GetSum().(*WALMessage_EndHeight); ok { - return x.EndHeight - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*WALMessage) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*WALMessage_EventDataRoundState)(nil), - (*WALMessage_MsgInfo)(nil), - (*WALMessage_TimeoutInfo)(nil), - (*WALMessage_EndHeight)(nil), - } -} - -// TimedWALMessage wraps WALMessage and adds Time for debugging purposes. -type TimedWALMessage struct { - Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"` - Msg *WALMessage `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` -} - -func (m *TimedWALMessage) Reset() { *m = TimedWALMessage{} } -func (m *TimedWALMessage) String() string { return proto.CompactTextString(m) } -func (*TimedWALMessage) ProtoMessage() {} -func (*TimedWALMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_4c737e612f9cf5e0, []int{4} -} -func (m *TimedWALMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimedWALMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimedWALMessage.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 *TimedWALMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimedWALMessage.Merge(m, src) -} -func (m *TimedWALMessage) XXX_Size() int { - return m.Size() -} -func (m *TimedWALMessage) XXX_DiscardUnknown() { - xxx_messageInfo_TimedWALMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_TimedWALMessage proto.InternalMessageInfo - -func (m *TimedWALMessage) GetTime() time.Time { - if m != nil { - return m.Time - } - return time.Time{} -} - -func (m *TimedWALMessage) GetMsg() *WALMessage { - if m != nil { - return m.Msg - } - return nil -} - -func init() { - proto.RegisterType((*MsgInfo)(nil), "ostracon.consensus.MsgInfo") - proto.RegisterType((*TimeoutInfo)(nil), "ostracon.consensus.TimeoutInfo") - proto.RegisterType((*EndHeight)(nil), "ostracon.consensus.EndHeight") - proto.RegisterType((*WALMessage)(nil), "ostracon.consensus.WALMessage") - proto.RegisterType((*TimedWALMessage)(nil), "ostracon.consensus.TimedWALMessage") -} - -func init() { proto.RegisterFile("ostracon/consensus/wal.proto", fileDescriptor_4c737e612f9cf5e0) } - -var fileDescriptor_4c737e612f9cf5e0 = []byte{ - // 537 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xcd, 0x8e, 0xd3, 0x30, - 0x10, 0x8e, 0xb7, 0xff, 0x53, 0x10, 0x92, 0x59, 0xad, 0x4a, 0x17, 0xd2, 0xaa, 0xbd, 0xf4, 0x94, - 0x00, 0x7b, 0xd9, 0x13, 0x88, 0xaa, 0x2b, 0xb5, 0x82, 0x95, 0x90, 0x59, 0x09, 0x69, 0x2f, 0x51, - 0xda, 0xb8, 0x69, 0xa4, 0xc6, 0xae, 0x62, 0x07, 0xc4, 0x81, 0x77, 0xe8, 0x91, 0xb7, 0xe0, 0x35, - 0xf6, 0xb8, 0x47, 0x4e, 0x0b, 0x6a, 0x5f, 0x04, 0xc5, 0x76, 0xd2, 0x8a, 0x96, 0x9b, 0xc7, 0xdf, - 0xcc, 0x7c, 0x33, 0xdf, 0x67, 0xc3, 0x73, 0x2e, 0x64, 0xe2, 0xcf, 0x38, 0x73, 0x67, 0x9c, 0x09, - 0xca, 0x44, 0x2a, 0xdc, 0xaf, 0xfe, 0xd2, 0x59, 0x25, 0x5c, 0x72, 0x8c, 0x73, 0xd4, 0x29, 0xd0, - 0xf6, 0x69, 0xc8, 0x43, 0xae, 0x60, 0x37, 0x3b, 0xe9, 0xcc, 0xb6, 0x7d, 0xa4, 0x8f, 0xfc, 0xb6, - 0xa2, 0xc2, 0xe0, 0xe7, 0x05, 0xae, 0x6e, 0x5d, 0xfa, 0x85, 0x32, 0x99, 0x83, 0x76, 0xc8, 0x79, - 0xb8, 0xa4, 0xae, 0x8a, 0xa6, 0xe9, 0xdc, 0x0d, 0xd2, 0xc4, 0x97, 0x11, 0x67, 0x06, 0xef, 0xfc, - 0x8b, 0xcb, 0x28, 0xa6, 0x42, 0xfa, 0xf1, 0x4a, 0x27, 0xf4, 0x66, 0x50, 0xbb, 0x16, 0xe1, 0x84, - 0xcd, 0x39, 0xbe, 0x80, 0x52, 0x2c, 0xc2, 0x16, 0xea, 0xa2, 0x41, 0xf3, 0xf5, 0xb9, 0x73, 0xb8, - 0x80, 0x73, 0x4d, 0x85, 0xf0, 0x43, 0x3a, 0x2c, 0xdf, 0x3d, 0x74, 0x2c, 0x92, 0x65, 0xe3, 0x3e, - 0xd4, 0x56, 0x94, 0x26, 0x5e, 0x14, 0xb4, 0x4e, 0xba, 0x68, 0xd0, 0x18, 0xc2, 0xe6, 0xa1, 0x53, - 0xfd, 0x48, 0x69, 0x32, 0x19, 0x91, 0x6a, 0x06, 0x4d, 0x82, 0xde, 0x1a, 0x41, 0xf3, 0x26, 0x8a, - 0x29, 0x4f, 0xa5, 0x62, 0x7a, 0x0b, 0xf5, 0x7c, 0x4e, 0x43, 0xf7, 0xcc, 0xd1, 0x83, 0x3a, 0xf9, - 0xa0, 0xce, 0xc8, 0x24, 0x0c, 0xeb, 0x19, 0xd9, 0x8f, 0xdf, 0x1d, 0x44, 0x8a, 0x22, 0x7c, 0x06, - 0xd5, 0x05, 0x8d, 0xc2, 0x85, 0x54, 0xa4, 0x25, 0x62, 0x22, 0x7c, 0x0a, 0x95, 0x84, 0xa7, 0x2c, - 0x68, 0x95, 0xba, 0x68, 0x50, 0x21, 0x3a, 0xc0, 0x18, 0xca, 0x42, 0xd2, 0x55, 0xab, 0xdc, 0x45, - 0x83, 0xc7, 0x44, 0x9d, 0x7b, 0x7d, 0x68, 0x5c, 0xb1, 0x60, 0xac, 0xcb, 0x76, 0xed, 0xd0, 0x7e, - 0xbb, 0xde, 0xcf, 0x13, 0x80, 0xcf, 0xef, 0x3e, 0x98, 0xb5, 0xf1, 0x2d, 0x9c, 0x29, 0xf1, 0xbd, - 0xc0, 0x97, 0xbe, 0xa7, 0x7a, 0x7b, 0x42, 0xfa, 0x92, 0x9a, 0x25, 0xfa, 0x3b, 0xcd, 0xb4, 0x81, - 0x57, 0x59, 0xf6, 0xc8, 0x97, 0x3e, 0xc9, 0x72, 0x3f, 0x65, 0xa9, 0x63, 0x8b, 0x3c, 0xa5, 0x87, - 0xd7, 0xf8, 0x12, 0xea, 0xb1, 0x08, 0xbd, 0x88, 0xcd, 0xb9, 0xda, 0xe9, 0x7f, 0x0e, 0x68, 0xaf, - 0xc6, 0x16, 0xa9, 0xc5, 0xc6, 0xb6, 0x11, 0x3c, 0x92, 0x5a, 0x5b, 0x5d, 0x5d, 0x52, 0xd5, 0x9d, - 0x63, 0xd5, 0x7b, 0x1e, 0x8c, 0x2d, 0xd2, 0x94, 0x7b, 0x96, 0xbc, 0x01, 0xa0, 0x2c, 0xf0, 0x8c, - 0x0c, 0x65, 0xd5, 0xe3, 0xc5, 0xb1, 0x1e, 0x85, 0x6a, 0x63, 0x8b, 0x34, 0x68, 0x1e, 0x0c, 0x2b, - 0x50, 0x12, 0x69, 0xdc, 0xfb, 0x0e, 0x4f, 0x32, 0x92, 0x60, 0x4f, 0xb5, 0x4b, 0x28, 0x67, 0x44, - 0x46, 0xa3, 0xf6, 0x81, 0xd1, 0x37, 0xf9, 0x8b, 0xd4, 0x4e, 0xaf, 0x33, 0xa7, 0x55, 0x05, 0x7e, - 0xa9, 0x1f, 0xa4, 0x96, 0xc3, 0x3e, 0x36, 0xcc, 0x8e, 0x46, 0xbd, 0xc6, 0xe1, 0xfb, 0xbb, 0x8d, - 0x8d, 0xee, 0x37, 0x36, 0xfa, 0xb3, 0xb1, 0xd1, 0x7a, 0x6b, 0x5b, 0xf7, 0x5b, 0xdb, 0xfa, 0xb5, - 0xb5, 0xad, 0xdb, 0x57, 0x61, 0x24, 0x17, 0xe9, 0xd4, 0x99, 0xf1, 0xd8, 0x5d, 0x46, 0x8c, 0xba, - 0xc5, 0xaf, 0xd2, 0x1f, 0xf2, 0xf0, 0x13, 0x4e, 0xab, 0x0a, 0xb9, 0xf8, 0x1b, 0x00, 0x00, 0xff, - 0xff, 0x7a, 0x8c, 0x2a, 0x13, 0xe9, 0x03, 0x00, 0x00, -} - -func (m *MsgInfo) 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 *MsgInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PeerID) > 0 { - i -= len(m.PeerID) - copy(dAtA[i:], m.PeerID) - i = encodeVarintWal(dAtA, i, uint64(len(m.PeerID))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintWal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TimeoutInfo) 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 *TimeoutInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Step != 0 { - i = encodeVarintWal(dAtA, i, uint64(m.Step)) - i-- - dAtA[i] = 0x20 - } - if m.Round != 0 { - i = encodeVarintWal(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x18 - } - if m.Height != 0 { - i = encodeVarintWal(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintWal(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EndHeight) 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 *EndHeight) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintWal(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *WALMessage) 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 *WALMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *WALMessage_EventDataRoundState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WALMessage_EventDataRoundState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.EventDataRoundState != nil { - { - size, err := m.EventDataRoundState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintWal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *WALMessage_MsgInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WALMessage_MsgInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.MsgInfo != nil { - { - size, err := m.MsgInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintWal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *WALMessage_TimeoutInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WALMessage_TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.TimeoutInfo != nil { - { - size, err := m.TimeoutInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintWal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *WALMessage_EndHeight) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WALMessage_EndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.EndHeight != nil { - { - size, err := m.EndHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintWal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *TimedWALMessage) 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 *TimedWALMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimedWALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Msg != nil { - { - size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintWal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err8 != nil { - return 0, err8 - } - i -= n8 - i = encodeVarintWal(dAtA, i, uint64(n8)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintWal(dAtA []byte, offset int, v uint64) int { - offset -= sovWal(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Msg.Size() - n += 1 + l + sovWal(uint64(l)) - l = len(m.PeerID) - if l > 0 { - n += 1 + l + sovWal(uint64(l)) - } - return n -} - -func (m *TimeoutInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) - n += 1 + l + sovWal(uint64(l)) - if m.Height != 0 { - n += 1 + sovWal(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovWal(uint64(m.Round)) - } - if m.Step != 0 { - n += 1 + sovWal(uint64(m.Step)) - } - return n -} - -func (m *EndHeight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovWal(uint64(m.Height)) - } - return n -} - -func (m *WALMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *WALMessage_EventDataRoundState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EventDataRoundState != nil { - l = m.EventDataRoundState.Size() - n += 1 + l + sovWal(uint64(l)) - } - return n -} -func (m *WALMessage_MsgInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MsgInfo != nil { - l = m.MsgInfo.Size() - n += 1 + l + sovWal(uint64(l)) - } - return n -} -func (m *WALMessage_TimeoutInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeoutInfo != nil { - l = m.TimeoutInfo.Size() - n += 1 + l + sovWal(uint64(l)) - } - return n -} -func (m *WALMessage_EndHeight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EndHeight != nil { - l = m.EndHeight.Size() - n += 1 + l + sovWal(uint64(l)) - } - return n -} -func (m *TimedWALMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) - n += 1 + l + sovWal(uint64(l)) - if m.Msg != nil { - l = m.Msg.Size() - n += 1 + l + sovWal(uint64(l)) - } - return n -} - -func sovWal(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozWal(x uint64) (n int) { - return sovWal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgInfo) 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 ErrIntOverflowWal - } - 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: MsgInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - 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 ErrInvalidLengthWal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimeoutInfo) 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 ErrIntOverflowWal - } - 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: TimeoutInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeoutInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) - } - m.Step = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Step |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipWal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndHeight) 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 ErrIntOverflowWal - } - 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: EndHeight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndHeight: 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 ErrIntOverflowWal - } - 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 := skipWal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WALMessage) 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 ErrIntOverflowWal - } - 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: WALMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WALMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventDataRoundState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &types.EventDataRoundState{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &WALMessage_EventDataRoundState{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MsgInfo{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &WALMessage_MsgInfo{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TimeoutInfo{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &WALMessage_TimeoutInfo{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &EndHeight{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &WALMessage_EndHeight{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimedWALMessage) 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 ErrIntOverflowWal - } - 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: TimedWALMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimedWALMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthWal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthWal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Msg == nil { - m.Msg = &WALMessage{} - } - if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipWal(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthWal - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupWal - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthWal - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthWal = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowWal = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupWal = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/crypto/keys.pb.go b/proto/ostracon/crypto/keys.pb.go deleted file mode 100644 index 7ecafbc7b..000000000 --- a/proto/ostracon/crypto/keys.pb.go +++ /dev/null @@ -1,655 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/crypto/keys.proto - -package crypto - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// PublicKey defines the keys available for use with Ostracon Validators -type PublicKey struct { - // Types that are valid to be assigned to Sum: - // *PublicKey_Ed25519 - // *PublicKey_Secp256K1 - Sum isPublicKey_Sum `protobuf_oneof:"sum"` -} - -func (m *PublicKey) Reset() { *m = PublicKey{} } -func (m *PublicKey) String() string { return proto.CompactTextString(m) } -func (*PublicKey) ProtoMessage() {} -func (*PublicKey) Descriptor() ([]byte, []int) { - return fileDescriptor_fe45c29a2e63dfe7, []int{0} -} -func (m *PublicKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PublicKey.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 *PublicKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PublicKey.Merge(m, src) -} -func (m *PublicKey) XXX_Size() int { - return m.Size() -} -func (m *PublicKey) XXX_DiscardUnknown() { - xxx_messageInfo_PublicKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PublicKey proto.InternalMessageInfo - -type isPublicKey_Sum interface { - isPublicKey_Sum() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int - Compare(interface{}) int -} - -type PublicKey_Ed25519 struct { - Ed25519 []byte `protobuf:"bytes,1,opt,name=ed25519,proto3,oneof" json:"ed25519,omitempty"` -} -type PublicKey_Secp256K1 struct { - Secp256K1 []byte `protobuf:"bytes,2,opt,name=secp256k1,proto3,oneof" json:"secp256k1,omitempty"` -} - -func (*PublicKey_Ed25519) isPublicKey_Sum() {} -func (*PublicKey_Secp256K1) isPublicKey_Sum() {} - -func (m *PublicKey) GetSum() isPublicKey_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *PublicKey) GetEd25519() []byte { - if x, ok := m.GetSum().(*PublicKey_Ed25519); ok { - return x.Ed25519 - } - return nil -} - -func (m *PublicKey) GetSecp256K1() []byte { - if x, ok := m.GetSum().(*PublicKey_Secp256K1); ok { - return x.Secp256K1 - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PublicKey) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PublicKey_Ed25519)(nil), - (*PublicKey_Secp256K1)(nil), - } -} - -func init() { - proto.RegisterType((*PublicKey)(nil), "ostracon.crypto.PublicKey") -} - -func init() { proto.RegisterFile("ostracon/crypto/keys.proto", fileDescriptor_fe45c29a2e63dfe7) } - -var fileDescriptor_fe45c29a2e63dfe7 = []byte{ - // 200 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x2f, 0x2e, 0x29, - 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0xc9, 0xe9, 0x41, 0xe4, 0xa4, 0x44, 0xd2, - 0xf3, 0xd3, 0xf3, 0xc1, 0x72, 0xfa, 0x20, 0x16, 0x44, 0x99, 0x52, 0x04, 0x17, 0x67, 0x40, 0x69, - 0x52, 0x4e, 0x66, 0xb2, 0x77, 0x6a, 0xa5, 0x90, 0x14, 0x17, 0x7b, 0x6a, 0x8a, 0x91, 0xa9, 0xa9, - 0xa1, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x8f, 0x07, 0x43, 0x10, 0x4c, 0x40, 0x48, 0x8e, 0x8b, - 0xb3, 0x38, 0x35, 0xb9, 0xc0, 0xc8, 0xd4, 0x2c, 0xdb, 0x50, 0x82, 0x09, 0x2a, 0x8b, 0x10, 0xb2, - 0xe2, 0x78, 0xb1, 0x40, 0x9e, 0xf1, 0xc5, 0x42, 0x79, 0x46, 0x27, 0x56, 0x2e, 0xe6, 0xe2, 0xd2, - 0x5c, 0x27, 0x8f, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, - 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4b, 0xcf, - 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xc9, 0xcc, 0x4b, 0xd5, 0x87, 0x7b, - 0x03, 0xe2, 0x3c, 0x34, 0x5f, 0x25, 0xb1, 0x81, 0x85, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x75, 0xfb, 0x97, 0xf1, 0xef, 0x00, 0x00, 0x00, -} - -func (this *PublicKey) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*PublicKey) - if !ok { - that2, ok := that.(PublicKey) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Sum == nil { - if this.Sum != nil { - return 1 - } - } else if this.Sum == nil { - return -1 - } else { - thisType := -1 - switch this.Sum.(type) { - case *PublicKey_Ed25519: - thisType = 0 - case *PublicKey_Secp256K1: - thisType = 1 - default: - panic(fmt.Sprintf("compare: unexpected type %T in oneof", this.Sum)) - } - that1Type := -1 - switch that1.Sum.(type) { - case *PublicKey_Ed25519: - that1Type = 0 - case *PublicKey_Secp256K1: - that1Type = 1 - default: - panic(fmt.Sprintf("compare: unexpected type %T in oneof", that1.Sum)) - } - if thisType == that1Type { - if c := this.Sum.Compare(that1.Sum); c != 0 { - return c - } - } else if thisType < that1Type { - return -1 - } else if thisType > that1Type { - return 1 - } - } - return 0 -} -func (this *PublicKey_Ed25519) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*PublicKey_Ed25519) - if !ok { - that2, ok := that.(PublicKey_Ed25519) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := bytes.Compare(this.Ed25519, that1.Ed25519); c != 0 { - return c - } - return 0 -} -func (this *PublicKey_Secp256K1) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*PublicKey_Secp256K1) - if !ok { - that2, ok := that.(PublicKey_Secp256K1) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := bytes.Compare(this.Secp256K1, that1.Secp256K1); c != 0 { - return c - } - return 0 -} -func (this *PublicKey) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PublicKey) - if !ok { - that2, ok := that.(PublicKey) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Sum == nil { - if this.Sum != nil { - return false - } - } else if this.Sum == nil { - return false - } else if !this.Sum.Equal(that1.Sum) { - return false - } - return true -} -func (this *PublicKey_Ed25519) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PublicKey_Ed25519) - if !ok { - that2, ok := that.(PublicKey_Ed25519) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Ed25519, that1.Ed25519) { - return false - } - return true -} -func (this *PublicKey_Secp256K1) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PublicKey_Secp256K1) - if !ok { - that2, ok := that.(PublicKey_Secp256K1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Secp256K1, that1.Secp256K1) { - return false - } - return true -} -func (m *PublicKey) 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 *PublicKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *PublicKey_Ed25519) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PublicKey_Ed25519) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Ed25519 != nil { - i -= len(m.Ed25519) - copy(dAtA[i:], m.Ed25519) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Ed25519))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *PublicKey_Secp256K1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PublicKey_Secp256K1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Secp256K1 != nil { - i -= len(m.Secp256K1) - copy(dAtA[i:], m.Secp256K1) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Secp256K1))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { - offset -= sovKeys(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PublicKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *PublicKey_Ed25519) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ed25519 != nil { - l = len(m.Ed25519) - n += 1 + l + sovKeys(uint64(l)) - } - return n -} -func (m *PublicKey_Secp256K1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Secp256K1 != nil { - l = len(m.Secp256K1) - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func sovKeys(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozKeys(x uint64) (n int) { - return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PublicKey) 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 ErrIntOverflowKeys - } - 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: PublicKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Sum = &PublicKey_Ed25519{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secp256K1", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Sum = &PublicKey_Secp256K1{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipKeys(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthKeys - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupKeys - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthKeys - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/crypto/proof.pb.go b/proto/ostracon/crypto/proof.pb.go deleted file mode 100644 index d9052b871..000000000 --- a/proto/ostracon/crypto/proof.pb.go +++ /dev/null @@ -1,1422 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/crypto/proof.proto - -package crypto - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Proof struct { - Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` - LeafHash []byte `protobuf:"bytes,3,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"` - Aunts [][]byte `protobuf:"bytes,4,rep,name=aunts,proto3" json:"aunts,omitempty"` -} - -func (m *Proof) Reset() { *m = Proof{} } -func (m *Proof) String() string { return proto.CompactTextString(m) } -func (*Proof) ProtoMessage() {} -func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_465438feca9dfd7e, []int{0} -} -func (m *Proof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proof.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 *Proof) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proof.Merge(m, src) -} -func (m *Proof) XXX_Size() int { - return m.Size() -} -func (m *Proof) XXX_DiscardUnknown() { - xxx_messageInfo_Proof.DiscardUnknown(m) -} - -var xxx_messageInfo_Proof proto.InternalMessageInfo - -func (m *Proof) GetTotal() int64 { - if m != nil { - return m.Total - } - return 0 -} - -func (m *Proof) GetIndex() int64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *Proof) GetLeafHash() []byte { - if m != nil { - return m.LeafHash - } - return nil -} - -func (m *Proof) GetAunts() [][]byte { - if m != nil { - return m.Aunts - } - return nil -} - -type ValueOp struct { - // Encoded in ProofOp.Key. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // To encode in ProofOp.Data - Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (m *ValueOp) Reset() { *m = ValueOp{} } -func (m *ValueOp) String() string { return proto.CompactTextString(m) } -func (*ValueOp) ProtoMessage() {} -func (*ValueOp) Descriptor() ([]byte, []int) { - return fileDescriptor_465438feca9dfd7e, []int{1} -} -func (m *ValueOp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValueOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValueOp.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 *ValueOp) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueOp.Merge(m, src) -} -func (m *ValueOp) XXX_Size() int { - return m.Size() -} -func (m *ValueOp) XXX_DiscardUnknown() { - xxx_messageInfo_ValueOp.DiscardUnknown(m) -} - -var xxx_messageInfo_ValueOp proto.InternalMessageInfo - -func (m *ValueOp) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *ValueOp) GetProof() *Proof { - if m != nil { - return m.Proof - } - return nil -} - -type DominoOp struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` - Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` -} - -func (m *DominoOp) Reset() { *m = DominoOp{} } -func (m *DominoOp) String() string { return proto.CompactTextString(m) } -func (*DominoOp) ProtoMessage() {} -func (*DominoOp) Descriptor() ([]byte, []int) { - return fileDescriptor_465438feca9dfd7e, []int{2} -} -func (m *DominoOp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DominoOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DominoOp.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 *DominoOp) XXX_Merge(src proto.Message) { - xxx_messageInfo_DominoOp.Merge(m, src) -} -func (m *DominoOp) XXX_Size() int { - return m.Size() -} -func (m *DominoOp) XXX_DiscardUnknown() { - xxx_messageInfo_DominoOp.DiscardUnknown(m) -} - -var xxx_messageInfo_DominoOp proto.InternalMessageInfo - -func (m *DominoOp) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *DominoOp) GetInput() string { - if m != nil { - return m.Input - } - return "" -} - -func (m *DominoOp) GetOutput() string { - if m != nil { - return m.Output - } - return "" -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -type ProofOp struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *ProofOp) Reset() { *m = ProofOp{} } -func (m *ProofOp) String() string { return proto.CompactTextString(m) } -func (*ProofOp) ProtoMessage() {} -func (*ProofOp) Descriptor() ([]byte, []int) { - return fileDescriptor_465438feca9dfd7e, []int{3} -} -func (m *ProofOp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProofOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProofOp.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 *ProofOp) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProofOp.Merge(m, src) -} -func (m *ProofOp) XXX_Size() int { - return m.Size() -} -func (m *ProofOp) XXX_DiscardUnknown() { - xxx_messageInfo_ProofOp.DiscardUnknown(m) -} - -var xxx_messageInfo_ProofOp proto.InternalMessageInfo - -func (m *ProofOp) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *ProofOp) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *ProofOp) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -// ProofOps is Merkle proof defined by the list of ProofOps -type ProofOps struct { - Ops []ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"` -} - -func (m *ProofOps) Reset() { *m = ProofOps{} } -func (m *ProofOps) String() string { return proto.CompactTextString(m) } -func (*ProofOps) ProtoMessage() {} -func (*ProofOps) Descriptor() ([]byte, []int) { - return fileDescriptor_465438feca9dfd7e, []int{4} -} -func (m *ProofOps) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProofOps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProofOps.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 *ProofOps) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProofOps.Merge(m, src) -} -func (m *ProofOps) XXX_Size() int { - return m.Size() -} -func (m *ProofOps) XXX_DiscardUnknown() { - xxx_messageInfo_ProofOps.DiscardUnknown(m) -} - -var xxx_messageInfo_ProofOps proto.InternalMessageInfo - -func (m *ProofOps) GetOps() []ProofOp { - if m != nil { - return m.Ops - } - return nil -} - -func init() { - proto.RegisterType((*Proof)(nil), "ostracon.crypto.Proof") - proto.RegisterType((*ValueOp)(nil), "ostracon.crypto.ValueOp") - proto.RegisterType((*DominoOp)(nil), "ostracon.crypto.DominoOp") - proto.RegisterType((*ProofOp)(nil), "ostracon.crypto.ProofOp") - proto.RegisterType((*ProofOps)(nil), "ostracon.crypto.ProofOps") -} - -func init() { proto.RegisterFile("ostracon/crypto/proof.proto", fileDescriptor_465438feca9dfd7e) } - -var fileDescriptor_465438feca9dfd7e = []byte{ - // 354 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x3d, 0x6f, 0xe2, 0x40, - 0x10, 0xb5, 0xb1, 0xf9, 0x1a, 0x90, 0xee, 0xb4, 0x42, 0xc8, 0x3a, 0x24, 0x9f, 0xe5, 0xca, 0xc5, - 0xc9, 0x3e, 0x91, 0x36, 0x15, 0x49, 0x41, 0xd2, 0x10, 0x6d, 0x91, 0x22, 0x4d, 0xb4, 0x80, 0xc1, - 0x56, 0x8c, 0x67, 0x65, 0xaf, 0xa5, 0xf0, 0x2f, 0xf2, 0xb3, 0x28, 0x29, 0x53, 0x45, 0x11, 0xfc, - 0x91, 0x68, 0x77, 0x4d, 0xa2, 0xa0, 0x74, 0xef, 0xbd, 0x99, 0x79, 0xf3, 0x46, 0x03, 0x23, 0x2c, - 0x45, 0xc1, 0x16, 0x98, 0x47, 0x8b, 0x62, 0xcb, 0x05, 0x46, 0xbc, 0x40, 0x5c, 0x85, 0xbc, 0x40, - 0x81, 0xe4, 0xd7, 0xa9, 0x18, 0xea, 0xe2, 0x9f, 0xc1, 0x1a, 0xd7, 0xa8, 0x6a, 0x91, 0x44, 0xba, - 0xcd, 0x5f, 0x41, 0xf3, 0x4e, 0x4e, 0x91, 0x01, 0x34, 0x05, 0x0a, 0x96, 0x39, 0xa6, 0x67, 0x06, - 0x16, 0xd5, 0x44, 0xaa, 0x69, 0xbe, 0x8c, 0x9f, 0x9d, 0x86, 0x56, 0x15, 0x21, 0x23, 0xe8, 0x66, - 0x31, 0x5b, 0x3d, 0x26, 0xac, 0x4c, 0x1c, 0xcb, 0x33, 0x83, 0x3e, 0xed, 0x48, 0x61, 0xca, 0xca, - 0x44, 0x8e, 0xb0, 0x2a, 0x17, 0xa5, 0x63, 0x7b, 0x56, 0xd0, 0xa7, 0x9a, 0xf8, 0x37, 0xd0, 0xbe, - 0x67, 0x59, 0x15, 0xcf, 0x38, 0xf9, 0x0d, 0xd6, 0x53, 0xbc, 0x55, 0x7b, 0xfa, 0x54, 0x42, 0xf2, - 0x0f, 0x9a, 0x2a, 0xba, 0xda, 0xd2, 0x1b, 0x0f, 0xc3, 0xb3, 0xec, 0xa1, 0x8a, 0x48, 0x75, 0x93, - 0x7f, 0x0b, 0x9d, 0x6b, 0xdc, 0xa4, 0x39, 0x7e, 0xf7, 0xea, 0x6a, 0x2f, 0x95, 0x98, 0x57, 0x42, - 0x79, 0x75, 0xa9, 0x26, 0x64, 0x08, 0x2d, 0xac, 0x84, 0x94, 0x2d, 0x25, 0xd7, 0xcc, 0xbf, 0x82, - 0xb6, 0xf2, 0x9e, 0x71, 0x42, 0xc0, 0x16, 0x5b, 0x1e, 0xd7, 0x5e, 0x0a, 0x9f, 0xec, 0x1b, 0x5f, - 0x51, 0x09, 0xd8, 0x4b, 0x26, 0x58, 0x7d, 0xb5, 0xc2, 0xfe, 0x25, 0x74, 0x6a, 0x93, 0x92, 0xfc, - 0x07, 0x0b, 0x79, 0xe9, 0x98, 0x9e, 0x15, 0xf4, 0xc6, 0xce, 0xcf, 0x87, 0xcc, 0xf8, 0xc4, 0xde, - 0xbd, 0xfd, 0x35, 0xa8, 0x6c, 0x9d, 0x4c, 0x77, 0x07, 0xd7, 0xdc, 0x1f, 0x5c, 0xf3, 0xfd, 0xe0, - 0x9a, 0x2f, 0x47, 0xd7, 0xd8, 0x1f, 0x5d, 0xe3, 0xf5, 0xe8, 0x1a, 0x0f, 0xe1, 0x3a, 0x15, 0x49, - 0x35, 0x0f, 0x17, 0xb8, 0x89, 0xb2, 0x34, 0x8f, 0xa3, 0xcf, 0x7f, 0xeb, 0x37, 0x9e, 0xbd, 0x7f, - 0xde, 0x52, 0xf2, 0xc5, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x5b, 0xb9, 0x40, 0x18, 0x02, - 0x00, 0x00, -} - -func (m *Proof) 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 *Proof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Aunts) > 0 { - for iNdEx := len(m.Aunts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Aunts[iNdEx]) - copy(dAtA[i:], m.Aunts[iNdEx]) - i = encodeVarintProof(dAtA, i, uint64(len(m.Aunts[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.LeafHash) > 0 { - i -= len(m.LeafHash) - copy(dAtA[i:], m.LeafHash) - i = encodeVarintProof(dAtA, i, uint64(len(m.LeafHash))) - i-- - dAtA[i] = 0x1a - } - if m.Index != 0 { - i = encodeVarintProof(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x10 - } - if m.Total != 0 { - i = encodeVarintProof(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ValueOp) 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 *ValueOp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProof(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DominoOp) 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 *DominoOp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DominoOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Output) > 0 { - i -= len(m.Output) - copy(dAtA[i:], m.Output) - i = encodeVarintProof(dAtA, i, uint64(len(m.Output))) - i-- - dAtA[i] = 0x1a - } - if len(m.Input) > 0 { - i -= len(m.Input) - copy(dAtA[i:], m.Input) - i = encodeVarintProof(dAtA, i, uint64(len(m.Input))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProofOp) 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 *ProofOp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProofOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintProof(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintProof(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProofOps) 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 *ProofOps) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProofOps) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ops) > 0 { - for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProof(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintProof(dAtA []byte, offset int, v uint64) int { - offset -= sovProof(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Proof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Total != 0 { - n += 1 + sovProof(uint64(m.Total)) - } - if m.Index != 0 { - n += 1 + sovProof(uint64(m.Index)) - } - l = len(m.LeafHash) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - if len(m.Aunts) > 0 { - for _, b := range m.Aunts { - l = len(b) - n += 1 + l + sovProof(uint64(l)) - } - } - return n -} - -func (m *ValueOp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovProof(uint64(l)) - } - return n -} - -func (m *DominoOp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - l = len(m.Input) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - l = len(m.Output) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - return n -} - -func (m *ProofOp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovProof(uint64(l)) - } - return n -} - -func (m *ProofOps) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Ops) > 0 { - for _, e := range m.Ops { - l = e.Size() - n += 1 + l + sovProof(uint64(l)) - } - } - return n -} - -func sovProof(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProof(x uint64) (n int) { - return sovProof(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Proof) 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 ErrIntOverflowProof - } - 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: Proof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeafHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProof - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LeafHash = append(m.LeafHash[:0], dAtA[iNdEx:postIndex]...) - if m.LeafHash == nil { - m.LeafHash = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aunts", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProof - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aunts = append(m.Aunts, make([]byte, postIndex-iNdEx)) - copy(m.Aunts[len(m.Aunts)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProof(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProof - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValueOp) 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 ErrIntOverflowProof - } - 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: ValueOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValueOp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProof - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProof - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &Proof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProof(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProof - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DominoOp) 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 ErrIntOverflowProof - } - 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: DominoOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DominoOp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - 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 ErrInvalidLengthProof - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - 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 ErrInvalidLengthProof - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Input = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - 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 ErrInvalidLengthProof - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Output = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProof(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProof - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProofOp) 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 ErrIntOverflowProof - } - 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: ProofOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProofOp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - 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 ErrInvalidLengthProof - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProof - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProof - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProof(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProof - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProofOps) 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 ErrIntOverflowProof - } - 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: ProofOps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProofOps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ops", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProof - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProof - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProof - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ops = append(m.Ops, ProofOp{}) - if err := m.Ops[len(m.Ops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProof(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProof - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProof(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProof - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProof - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProof - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProof - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProof - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProof - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProof = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProof = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProof = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/libs/bits/types.pb.go b/proto/ostracon/libs/bits/types.pb.go deleted file mode 100644 index c54a1de6a..000000000 --- a/proto/ostracon/libs/bits/types.pb.go +++ /dev/null @@ -1,408 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/libs/bits/types.proto - -package bits - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type BitArray struct { - Bits int64 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"` - Elems []uint64 `protobuf:"varint,2,rep,packed,name=elems,proto3" json:"elems,omitempty"` -} - -func (m *BitArray) Reset() { *m = BitArray{} } -func (m *BitArray) String() string { return proto.CompactTextString(m) } -func (*BitArray) ProtoMessage() {} -func (*BitArray) Descriptor() ([]byte, []int) { - return fileDescriptor_cbd48d316ef10ed8, []int{0} -} -func (m *BitArray) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BitArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BitArray.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 *BitArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_BitArray.Merge(m, src) -} -func (m *BitArray) XXX_Size() int { - return m.Size() -} -func (m *BitArray) XXX_DiscardUnknown() { - xxx_messageInfo_BitArray.DiscardUnknown(m) -} - -var xxx_messageInfo_BitArray proto.InternalMessageInfo - -func (m *BitArray) GetBits() int64 { - if m != nil { - return m.Bits - } - return 0 -} - -func (m *BitArray) GetElems() []uint64 { - if m != nil { - return m.Elems - } - return nil -} - -func init() { - proto.RegisterType((*BitArray)(nil), "ostracon.libs.bits.BitArray") -} - -func init() { proto.RegisterFile("ostracon/libs/bits/types.proto", fileDescriptor_cbd48d316ef10ed8) } - -var fileDescriptor_cbd48d316ef10ed8 = []byte{ - // 168 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x2f, 0x2e, 0x29, - 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0xcf, 0xc9, 0x4c, 0x2a, 0xd6, 0x4f, 0xca, 0x2c, 0x29, 0xd6, 0x2f, - 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xc9, 0xeb, 0x81, - 0xe4, 0xf5, 0x40, 0xf2, 0x4a, 0x26, 0x5c, 0x1c, 0x4e, 0x99, 0x25, 0x8e, 0x45, 0x45, 0x89, 0x95, - 0x42, 0x42, 0x5c, 0x2c, 0x20, 0x31, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x30, 0x5b, 0x48, - 0x84, 0x8b, 0x35, 0x35, 0x27, 0x35, 0xb7, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0x25, 0x08, 0xc2, - 0x71, 0xf2, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, - 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xc3, 0xf4, 0xcc, - 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x9c, 0xcc, 0xbc, 0x54, 0x7d, 0xb8, 0x9b, - 0xc0, 0x6e, 0xd0, 0xc7, 0x74, 0x62, 0x12, 0x1b, 0x58, 0xc6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, - 0x73, 0x45, 0xe0, 0x5d, 0xbf, 0x00, 0x00, 0x00, -} - -func (m *BitArray) 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 *BitArray) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BitArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Elems) > 0 { - dAtA2 := make([]byte, len(m.Elems)*10) - var j1 int - for _, num := range m.Elems { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintTypes(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x12 - } - if m.Bits != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Bits)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BitArray) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Bits != 0 { - n += 1 + sovTypes(uint64(m.Bits)) - } - if len(m.Elems) > 0 { - l = 0 - for _, e := range m.Elems { - l += sovTypes(uint64(e)) - } - n += 1 + sovTypes(uint64(l)) + l - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BitArray) 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: BitArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BitArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType) - } - m.Bits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Bits |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Elems = append(m.Elems, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Elems) == 0 { - m.Elems = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Elems = append(m.Elems, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Elems", wireType) - } - 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 skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/libs/bits/types.proto b/proto/ostracon/libs/bits/types.proto deleted file mode 100644 index bead2db26..000000000 --- a/proto/ostracon/libs/bits/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package ostracon.libs.bits; - -option go_package = "github.com/line/ostracon/proto/ostracon/libs/bits"; - -message BitArray { - int64 bits = 1; - repeated uint64 elems = 2; -} diff --git a/proto/ostracon/mempool/types.pb.go b/proto/ostracon/mempool/types.pb.go deleted file mode 100644 index 433b89636..000000000 --- a/proto/ostracon/mempool/types.pb.go +++ /dev/null @@ -1,556 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/mempool/types.proto - -package mempool - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Txs struct { - Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` -} - -func (m *Txs) Reset() { *m = Txs{} } -func (m *Txs) String() string { return proto.CompactTextString(m) } -func (*Txs) ProtoMessage() {} -func (*Txs) Descriptor() ([]byte, []int) { - return fileDescriptor_1ae4eaa94a26a893, []int{0} -} -func (m *Txs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Txs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Txs.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 *Txs) XXX_Merge(src proto.Message) { - xxx_messageInfo_Txs.Merge(m, src) -} -func (m *Txs) XXX_Size() int { - return m.Size() -} -func (m *Txs) XXX_DiscardUnknown() { - xxx_messageInfo_Txs.DiscardUnknown(m) -} - -var xxx_messageInfo_Txs proto.InternalMessageInfo - -func (m *Txs) GetTxs() [][]byte { - if m != nil { - return m.Txs - } - return nil -} - -type Message struct { - // Types that are valid to be assigned to Sum: - // *Message_Txs - Sum isMessage_Sum `protobuf_oneof:"sum"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_1ae4eaa94a26a893, []int{1} -} -func (m *Message) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message.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 *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(m, src) -} -func (m *Message) XXX_Size() int { - return m.Size() -} -func (m *Message) XXX_DiscardUnknown() { - xxx_messageInfo_Message.DiscardUnknown(m) -} - -var xxx_messageInfo_Message proto.InternalMessageInfo - -type isMessage_Sum interface { - isMessage_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type Message_Txs struct { - Txs *Txs `protobuf:"bytes,1,opt,name=txs,proto3,oneof" json:"txs,omitempty"` -} - -func (*Message_Txs) isMessage_Sum() {} - -func (m *Message) GetSum() isMessage_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *Message) GetTxs() *Txs { - if x, ok := m.GetSum().(*Message_Txs); ok { - return x.Txs - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Message) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Message_Txs)(nil), - } -} - -func init() { - proto.RegisterType((*Txs)(nil), "ostracon.mempool.Txs") - proto.RegisterType((*Message)(nil), "ostracon.mempool.Message") -} - -func init() { proto.RegisterFile("ostracon/mempool/types.proto", fileDescriptor_1ae4eaa94a26a893) } - -var fileDescriptor_1ae4eaa94a26a893 = []byte{ - // 180 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0x2f, 0x2e, 0x29, - 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0xcf, 0x4d, 0xcd, 0x2d, 0xc8, 0xcf, 0xcf, 0xd1, 0x2f, 0xa9, 0x2c, - 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xea, 0x41, 0x65, 0x95, - 0xc4, 0xb9, 0x98, 0x43, 0x2a, 0x8a, 0x85, 0x04, 0xb8, 0x98, 0x4b, 0x2a, 0x8a, 0x25, 0x18, 0x15, - 0x98, 0x35, 0x78, 0x82, 0x40, 0x4c, 0x25, 0x6b, 0x2e, 0x76, 0xdf, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, - 0x54, 0x21, 0x4d, 0x98, 0x24, 0xa3, 0x06, 0xb7, 0x91, 0xa8, 0x1e, 0xba, 0x19, 0x7a, 0x21, 0x15, - 0xc5, 0x1e, 0x0c, 0x60, 0x5d, 0x4e, 0xac, 0x5c, 0xcc, 0xc5, 0xa5, 0xb9, 0x4e, 0x9e, 0x27, 0x1e, - 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, - 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, - 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x93, 0x99, 0x97, 0xaa, 0x0f, 0x77, 0x2f, 0xd8, 0x85, 0xfa, 0xe8, - 0xce, 0x4f, 0x62, 0x03, 0x8b, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xb0, 0x0a, 0x7e, - 0xd9, 0x00, 0x00, 0x00, -} - -func (m *Txs) 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 *Txs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Txs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - 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 *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Message_Txs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_Txs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Txs != nil { - { - size, err := m.Txs.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 encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Txs) 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)) - } - } - return n -} - -func (m *Message) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *Message_Txs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Txs != nil { - l = m.Txs.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Txs) 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: Txs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Txs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) - copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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 *Message) 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: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: 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 - } - v := &Txs{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_Txs{v} - 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 skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/p2p/conn.pb.go b/proto/ostracon/p2p/conn.pb.go deleted file mode 100644 index 9e7d52d1c..000000000 --- a/proto/ostracon/p2p/conn.pb.go +++ /dev/null @@ -1,1269 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/p2p/conn.proto - -package p2p - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - crypto "github.com/line/ostracon/proto/ostracon/crypto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type PacketPing struct { -} - -func (m *PacketPing) Reset() { *m = PacketPing{} } -func (m *PacketPing) String() string { return proto.CompactTextString(m) } -func (*PacketPing) ProtoMessage() {} -func (*PacketPing) Descriptor() ([]byte, []int) { - return fileDescriptor_aeb1ccf8456edf44, []int{0} -} -func (m *PacketPing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PacketPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PacketPing.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 *PacketPing) XXX_Merge(src proto.Message) { - xxx_messageInfo_PacketPing.Merge(m, src) -} -func (m *PacketPing) XXX_Size() int { - return m.Size() -} -func (m *PacketPing) XXX_DiscardUnknown() { - xxx_messageInfo_PacketPing.DiscardUnknown(m) -} - -var xxx_messageInfo_PacketPing proto.InternalMessageInfo - -type PacketPong struct { -} - -func (m *PacketPong) Reset() { *m = PacketPong{} } -func (m *PacketPong) String() string { return proto.CompactTextString(m) } -func (*PacketPong) ProtoMessage() {} -func (*PacketPong) Descriptor() ([]byte, []int) { - return fileDescriptor_aeb1ccf8456edf44, []int{1} -} -func (m *PacketPong) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PacketPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PacketPong.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 *PacketPong) XXX_Merge(src proto.Message) { - xxx_messageInfo_PacketPong.Merge(m, src) -} -func (m *PacketPong) XXX_Size() int { - return m.Size() -} -func (m *PacketPong) XXX_DiscardUnknown() { - xxx_messageInfo_PacketPong.DiscardUnknown(m) -} - -var xxx_messageInfo_PacketPong proto.InternalMessageInfo - -type PacketMsg struct { - ChannelID int32 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - EOF bool `protobuf:"varint,2,opt,name=eof,proto3" json:"eof,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *PacketMsg) Reset() { *m = PacketMsg{} } -func (m *PacketMsg) String() string { return proto.CompactTextString(m) } -func (*PacketMsg) ProtoMessage() {} -func (*PacketMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_aeb1ccf8456edf44, []int{2} -} -func (m *PacketMsg) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PacketMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PacketMsg.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 *PacketMsg) XXX_Merge(src proto.Message) { - xxx_messageInfo_PacketMsg.Merge(m, src) -} -func (m *PacketMsg) XXX_Size() int { - return m.Size() -} -func (m *PacketMsg) XXX_DiscardUnknown() { - xxx_messageInfo_PacketMsg.DiscardUnknown(m) -} - -var xxx_messageInfo_PacketMsg proto.InternalMessageInfo - -func (m *PacketMsg) GetChannelID() int32 { - if m != nil { - return m.ChannelID - } - return 0 -} - -func (m *PacketMsg) GetEOF() bool { - if m != nil { - return m.EOF - } - return false -} - -func (m *PacketMsg) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type Packet struct { - // Types that are valid to be assigned to Sum: - // *Packet_PacketPing - // *Packet_PacketPong - // *Packet_PacketMsg - Sum isPacket_Sum `protobuf_oneof:"sum"` -} - -func (m *Packet) Reset() { *m = Packet{} } -func (m *Packet) String() string { return proto.CompactTextString(m) } -func (*Packet) ProtoMessage() {} -func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_aeb1ccf8456edf44, []int{3} -} -func (m *Packet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Packet.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 *Packet) XXX_Merge(src proto.Message) { - xxx_messageInfo_Packet.Merge(m, src) -} -func (m *Packet) XXX_Size() int { - return m.Size() -} -func (m *Packet) XXX_DiscardUnknown() { - xxx_messageInfo_Packet.DiscardUnknown(m) -} - -var xxx_messageInfo_Packet proto.InternalMessageInfo - -type isPacket_Sum interface { - isPacket_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type Packet_PacketPing struct { - PacketPing *PacketPing `protobuf:"bytes,1,opt,name=packet_ping,json=packetPing,proto3,oneof" json:"packet_ping,omitempty"` -} -type Packet_PacketPong struct { - PacketPong *PacketPong `protobuf:"bytes,2,opt,name=packet_pong,json=packetPong,proto3,oneof" json:"packet_pong,omitempty"` -} -type Packet_PacketMsg struct { - PacketMsg *PacketMsg `protobuf:"bytes,3,opt,name=packet_msg,json=packetMsg,proto3,oneof" json:"packet_msg,omitempty"` -} - -func (*Packet_PacketPing) isPacket_Sum() {} -func (*Packet_PacketPong) isPacket_Sum() {} -func (*Packet_PacketMsg) isPacket_Sum() {} - -func (m *Packet) GetSum() isPacket_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *Packet) GetPacketPing() *PacketPing { - if x, ok := m.GetSum().(*Packet_PacketPing); ok { - return x.PacketPing - } - return nil -} - -func (m *Packet) GetPacketPong() *PacketPong { - if x, ok := m.GetSum().(*Packet_PacketPong); ok { - return x.PacketPong - } - return nil -} - -func (m *Packet) GetPacketMsg() *PacketMsg { - if x, ok := m.GetSum().(*Packet_PacketMsg); ok { - return x.PacketMsg - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Packet) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Packet_PacketPing)(nil), - (*Packet_PacketPong)(nil), - (*Packet_PacketMsg)(nil), - } -} - -type AuthSigMessage struct { - PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"` - Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` -} - -func (m *AuthSigMessage) Reset() { *m = AuthSigMessage{} } -func (m *AuthSigMessage) String() string { return proto.CompactTextString(m) } -func (*AuthSigMessage) ProtoMessage() {} -func (*AuthSigMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_aeb1ccf8456edf44, []int{4} -} -func (m *AuthSigMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthSigMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthSigMessage.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 *AuthSigMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthSigMessage.Merge(m, src) -} -func (m *AuthSigMessage) XXX_Size() int { - return m.Size() -} -func (m *AuthSigMessage) XXX_DiscardUnknown() { - xxx_messageInfo_AuthSigMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthSigMessage proto.InternalMessageInfo - -func (m *AuthSigMessage) GetPubKey() crypto.PublicKey { - if m != nil { - return m.PubKey - } - return crypto.PublicKey{} -} - -func (m *AuthSigMessage) GetSig() []byte { - if m != nil { - return m.Sig - } - return nil -} - -func init() { - proto.RegisterType((*PacketPing)(nil), "ostracon.p2p.PacketPing") - proto.RegisterType((*PacketPong)(nil), "ostracon.p2p.PacketPong") - proto.RegisterType((*PacketMsg)(nil), "ostracon.p2p.PacketMsg") - proto.RegisterType((*Packet)(nil), "ostracon.p2p.Packet") - proto.RegisterType((*AuthSigMessage)(nil), "ostracon.p2p.AuthSigMessage") -} - -func init() { proto.RegisterFile("ostracon/p2p/conn.proto", fileDescriptor_aeb1ccf8456edf44) } - -var fileDescriptor_aeb1ccf8456edf44 = []byte{ - // 395 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xc7, 0x33, 0x66, 0xb7, 0x6b, 0x5e, 0xa3, 0xc8, 0x20, 0x6c, 0xcc, 0x21, 0x2d, 0x39, 0x15, - 0x94, 0x04, 0xe2, 0x45, 0xf1, 0x64, 0x74, 0xc5, 0x65, 0x29, 0x96, 0x78, 0x13, 0x24, 0x24, 0xe9, - 0x38, 0x19, 0xda, 0xce, 0x0c, 0x9d, 0xe4, 0x90, 0x6f, 0xe1, 0x77, 0xf2, 0xb2, 0xc7, 0x3d, 0x7a, - 0x2a, 0x92, 0x7e, 0x11, 0xc9, 0xa4, 0xdb, 0x46, 0x70, 0x6f, 0xff, 0xff, 0x7b, 0xef, 0x37, 0xef, - 0x3d, 0xe6, 0xc1, 0xa5, 0x50, 0xd5, 0x36, 0x2b, 0x04, 0x0f, 0x65, 0x24, 0xc3, 0x42, 0x70, 0x1e, - 0xc8, 0xad, 0xa8, 0x04, 0xb6, 0xef, 0x13, 0x81, 0x8c, 0xa4, 0xfb, 0x9c, 0x0a, 0x2a, 0x74, 0x22, - 0xec, 0x54, 0x5f, 0xe3, 0xba, 0x47, 0xb8, 0xd8, 0x36, 0xb2, 0x12, 0xe1, 0x8a, 0x34, 0xaa, 0xcf, - 0xf9, 0x36, 0xc0, 0x22, 0x2b, 0x56, 0xa4, 0x5a, 0x30, 0x4e, 0x07, 0x4e, 0x70, 0xea, 0x97, 0x60, - 0xf5, 0x6e, 0xae, 0x28, 0x7e, 0x05, 0x50, 0x94, 0x19, 0xe7, 0x64, 0x9d, 0xb2, 0xa5, 0x83, 0xa6, - 0x68, 0x76, 0x1e, 0x3f, 0x69, 0x77, 0x13, 0xeb, 0x43, 0x1f, 0xbd, 0xfe, 0x98, 0x58, 0x87, 0x82, - 0xeb, 0x25, 0x7e, 0x01, 0x26, 0x11, 0x3f, 0x9c, 0x47, 0x53, 0x34, 0x7b, 0x1c, 0x5f, 0xb4, 0xbb, - 0x89, 0x79, 0xf5, 0xe5, 0x53, 0xd2, 0xc5, 0x30, 0x86, 0xb3, 0x65, 0x56, 0x65, 0x8e, 0x39, 0x45, - 0x33, 0x3b, 0xd1, 0xda, 0xff, 0x85, 0x60, 0xd4, 0xb7, 0xc2, 0xef, 0x60, 0x2c, 0xb5, 0x4a, 0x25, - 0xe3, 0x54, 0x37, 0x1a, 0x47, 0x4e, 0x30, 0x5c, 0x33, 0x38, 0x4d, 0xfc, 0xd9, 0x48, 0x40, 0x1e, - 0xdd, 0x10, 0x16, 0x9c, 0xea, 0xf6, 0x0f, 0xc1, 0xe2, 0x1f, 0x58, 0x70, 0x8a, 0xdf, 0xc0, 0xc1, - 0xa5, 0x1b, 0x45, 0xf5, 0x78, 0xe3, 0xe8, 0xf2, 0x7f, 0xec, 0x5c, 0x75, 0xa8, 0x25, 0xef, 0x4d, - 0x7c, 0x0e, 0xa6, 0xaa, 0x37, 0xfe, 0x77, 0x78, 0xfa, 0xbe, 0xae, 0xca, 0xaf, 0x8c, 0xce, 0x89, - 0x52, 0x19, 0x25, 0xf8, 0x2d, 0x5c, 0xc8, 0x3a, 0x4f, 0x57, 0xa4, 0x39, 0x2c, 0xe2, 0x9e, 0xde, - 0xeb, 0xff, 0x22, 0x58, 0xd4, 0xf9, 0x9a, 0x15, 0x37, 0xa4, 0x89, 0xcf, 0x6e, 0x77, 0x13, 0x23, - 0x19, 0xc9, 0x3a, 0xbf, 0x21, 0x0d, 0x7e, 0x06, 0xa6, 0x62, 0xfd, 0x0a, 0x76, 0xd2, 0xc9, 0xf8, - 0xea, 0xb6, 0xf5, 0xd0, 0x5d, 0xeb, 0xa1, 0x3f, 0xad, 0x87, 0x7e, 0xee, 0x3d, 0xe3, 0x6e, 0xef, - 0x19, 0xbf, 0xf7, 0x9e, 0xf1, 0xed, 0x25, 0x65, 0x55, 0x59, 0xe7, 0x41, 0x21, 0x36, 0xe1, 0x9a, - 0x71, 0x12, 0x9e, 0xae, 0x45, 0xdf, 0xc2, 0xf0, 0x78, 0xf2, 0x91, 0x8e, 0xbd, 0xfe, 0x1b, 0x00, - 0x00, 0xff, 0xff, 0x8c, 0xc6, 0xa3, 0x5d, 0x53, 0x02, 0x00, 0x00, -} - -func (m *PacketPing) 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 *PacketPing) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PacketPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *PacketPong) 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 *PacketPong) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PacketPong) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *PacketMsg) 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 *PacketMsg) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PacketMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintConn(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if m.EOF { - i-- - if m.EOF { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.ChannelID != 0 { - i = encodeVarintConn(dAtA, i, uint64(m.ChannelID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Packet) 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 *Packet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Packet_PacketPing) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Packet_PacketPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PacketPing != nil { - { - size, err := m.PacketPing.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConn(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Packet_PacketPong) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Packet_PacketPong) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PacketPong != nil { - { - size, err := m.PacketPong.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConn(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Packet_PacketMsg) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Packet_PacketMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PacketMsg != nil { - { - size, err := m.PacketMsg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConn(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *AuthSigMessage) 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 *AuthSigMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthSigMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sig) > 0 { - i -= len(m.Sig) - copy(dAtA[i:], m.Sig) - i = encodeVarintConn(dAtA, i, uint64(len(m.Sig))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConn(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintConn(dAtA []byte, offset int, v uint64) int { - offset -= sovConn(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PacketPing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *PacketPong) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *PacketMsg) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChannelID != 0 { - n += 1 + sovConn(uint64(m.ChannelID)) - } - if m.EOF { - n += 2 - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovConn(uint64(l)) - } - return n -} - -func (m *Packet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *Packet_PacketPing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketPing != nil { - l = m.PacketPing.Size() - n += 1 + l + sovConn(uint64(l)) - } - return n -} -func (m *Packet_PacketPong) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketPong != nil { - l = m.PacketPong.Size() - n += 1 + l + sovConn(uint64(l)) - } - return n -} -func (m *Packet_PacketMsg) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketMsg != nil { - l = m.PacketMsg.Size() - n += 1 + l + sovConn(uint64(l)) - } - return n -} -func (m *AuthSigMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PubKey.Size() - n += 1 + l + sovConn(uint64(l)) - l = len(m.Sig) - if l > 0 { - n += 1 + l + sovConn(uint64(l)) - } - return n -} - -func sovConn(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozConn(x uint64) (n int) { - return sovConn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PacketPing) 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 ErrIntOverflowConn - } - 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: PacketPing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PacketPing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipConn(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PacketPong) 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 ErrIntOverflowConn - } - 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: PacketPong: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PacketPong: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipConn(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PacketMsg) 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 ErrIntOverflowConn - } - 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: PacketMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PacketMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelID", wireType) - } - m.ChannelID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChannelID |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EOF", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EOF = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConn - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConn - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConn(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Packet) 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 ErrIntOverflowConn - } - 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: Packet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketPing", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConn - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConn - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PacketPing{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Packet_PacketPing{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketPong", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConn - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConn - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PacketPong{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Packet_PacketPong{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketMsg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConn - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConn - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PacketMsg{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Packet_PacketMsg{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConn(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthSigMessage) 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 ErrIntOverflowConn - } - 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: AuthSigMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthSigMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConn - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConn - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConn - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConn - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...) - if m.Sig == nil { - m.Sig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConn(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipConn(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConn - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConn - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConn - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthConn - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupConn - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthConn - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthConn = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowConn = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupConn = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/p2p/conn.proto b/proto/ostracon/p2p/conn.proto deleted file mode 100644 index 7fc2f2f64..000000000 --- a/proto/ostracon/p2p/conn.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package ostracon.p2p; - -option go_package = "github.com/line/ostracon/proto/ostracon/p2p"; - -import "gogoproto/gogo.proto"; -import "ostracon/crypto/keys.proto"; - -message PacketPing {} - -message PacketPong {} - -message PacketMsg { - int32 channel_id = 1 [(gogoproto.customname) = "ChannelID"]; - bool eof = 2 [(gogoproto.customname) = "EOF"]; - bytes data = 3; -} - -message Packet { - oneof sum { - PacketPing packet_ping = 1; - PacketPong packet_pong = 2; - PacketMsg packet_msg = 3; - } -} - -message AuthSigMessage { - ostracon.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - bytes sig = 2; -} diff --git a/proto/ostracon/p2p/pex.pb.go b/proto/ostracon/p2p/pex.pb.go deleted file mode 100644 index 3858d6c2f..000000000 --- a/proto/ostracon/p2p/pex.pb.go +++ /dev/null @@ -1,769 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/p2p/pex.proto - -package p2p - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type PexRequest struct { -} - -func (m *PexRequest) Reset() { *m = PexRequest{} } -func (m *PexRequest) String() string { return proto.CompactTextString(m) } -func (*PexRequest) ProtoMessage() {} -func (*PexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_babab98bd8d8cc43, []int{0} -} -func (m *PexRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PexRequest.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 *PexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PexRequest.Merge(m, src) -} -func (m *PexRequest) XXX_Size() int { - return m.Size() -} -func (m *PexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PexRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PexRequest proto.InternalMessageInfo - -type PexAddrs struct { - Addrs []NetAddress `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs"` -} - -func (m *PexAddrs) Reset() { *m = PexAddrs{} } -func (m *PexAddrs) String() string { return proto.CompactTextString(m) } -func (*PexAddrs) ProtoMessage() {} -func (*PexAddrs) Descriptor() ([]byte, []int) { - return fileDescriptor_babab98bd8d8cc43, []int{1} -} -func (m *PexAddrs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PexAddrs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PexAddrs.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 *PexAddrs) XXX_Merge(src proto.Message) { - xxx_messageInfo_PexAddrs.Merge(m, src) -} -func (m *PexAddrs) XXX_Size() int { - return m.Size() -} -func (m *PexAddrs) XXX_DiscardUnknown() { - xxx_messageInfo_PexAddrs.DiscardUnknown(m) -} - -var xxx_messageInfo_PexAddrs proto.InternalMessageInfo - -func (m *PexAddrs) GetAddrs() []NetAddress { - if m != nil { - return m.Addrs - } - return nil -} - -type Message struct { - // Types that are valid to be assigned to Sum: - // *Message_PexRequest - // *Message_PexAddrs - Sum isMessage_Sum `protobuf_oneof:"sum"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_babab98bd8d8cc43, []int{2} -} -func (m *Message) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message.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 *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(m, src) -} -func (m *Message) XXX_Size() int { - return m.Size() -} -func (m *Message) XXX_DiscardUnknown() { - xxx_messageInfo_Message.DiscardUnknown(m) -} - -var xxx_messageInfo_Message proto.InternalMessageInfo - -type isMessage_Sum interface { - isMessage_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type Message_PexRequest struct { - PexRequest *PexRequest `protobuf:"bytes,1,opt,name=pex_request,json=pexRequest,proto3,oneof" json:"pex_request,omitempty"` -} -type Message_PexAddrs struct { - PexAddrs *PexAddrs `protobuf:"bytes,2,opt,name=pex_addrs,json=pexAddrs,proto3,oneof" json:"pex_addrs,omitempty"` -} - -func (*Message_PexRequest) isMessage_Sum() {} -func (*Message_PexAddrs) isMessage_Sum() {} - -func (m *Message) GetSum() isMessage_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *Message) GetPexRequest() *PexRequest { - if x, ok := m.GetSum().(*Message_PexRequest); ok { - return x.PexRequest - } - return nil -} - -func (m *Message) GetPexAddrs() *PexAddrs { - if x, ok := m.GetSum().(*Message_PexAddrs); ok { - return x.PexAddrs - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Message) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Message_PexRequest)(nil), - (*Message_PexAddrs)(nil), - } -} - -func init() { - proto.RegisterType((*PexRequest)(nil), "ostracon.p2p.PexRequest") - proto.RegisterType((*PexAddrs)(nil), "ostracon.p2p.PexAddrs") - proto.RegisterType((*Message)(nil), "ostracon.p2p.Message") -} - -func init() { proto.RegisterFile("ostracon/p2p/pex.proto", fileDescriptor_babab98bd8d8cc43) } - -var fileDescriptor_babab98bd8d8cc43 = []byte{ - // 268 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcb, 0x2f, 0x2e, 0x29, - 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x2f, 0x30, 0x2a, 0xd0, 0x2f, 0x48, 0xad, 0xd0, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0x89, 0xeb, 0x15, 0x18, 0x15, 0x48, 0x49, 0xa0, 0xa8, 0x2a, 0xa9, - 0x2c, 0x48, 0x2d, 0x86, 0xa8, 0x93, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, - 0x88, 0xa8, 0x12, 0x0f, 0x17, 0x57, 0x40, 0x6a, 0x45, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, - 0x92, 0x03, 0x17, 0x47, 0x40, 0x6a, 0x85, 0x63, 0x4a, 0x4a, 0x51, 0xb1, 0x90, 0x09, 0x17, 0x6b, - 0x22, 0x88, 0x21, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa1, 0x87, 0x6c, 0x8f, 0x9e, 0x5f, - 0x6a, 0x09, 0x48, 0x59, 0x6a, 0x71, 0xb1, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x10, 0xc5, - 0x4a, 0x2d, 0x8c, 0x5c, 0xec, 0xbe, 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0x42, 0xd6, 0x5c, 0xdc, - 0x05, 0xa9, 0x15, 0xf1, 0x45, 0x10, 0xc3, 0x25, 0x18, 0x15, 0x18, 0x31, 0xcd, 0x41, 0x58, 0xee, - 0xc1, 0x10, 0xc4, 0x55, 0x00, 0xe7, 0x09, 0x99, 0x72, 0x71, 0x82, 0x34, 0x43, 0x9c, 0xc0, 0x04, - 0xd6, 0x2a, 0x86, 0xa1, 0x15, 0xec, 0x52, 0x0f, 0x86, 0x20, 0x8e, 0x02, 0x28, 0xdb, 0x89, 0x95, - 0x8b, 0xb9, 0xb8, 0x34, 0xd7, 0xc9, 0xf5, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, - 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, - 0xa2, 0xb4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x73, 0x32, 0xf3, - 0x52, 0xf5, 0x11, 0x01, 0x06, 0x0e, 0x1b, 0xe4, 0xf0, 0x4b, 0x62, 0x03, 0x8b, 0x19, 0x03, 0x02, - 0x00, 0x00, 0xff, 0xff, 0xcb, 0x19, 0xb2, 0xb2, 0x7c, 0x01, 0x00, 0x00, -} - -func (m *PexRequest) 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 *PexRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PexRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *PexAddrs) 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 *PexAddrs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PexAddrs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addrs) > 0 { - for iNdEx := len(m.Addrs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Addrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Message_PexRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_PexRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PexRequest != nil { - { - size, err := m.PexRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Message_PexAddrs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_PexAddrs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PexAddrs != nil { - { - size, err := m.PexAddrs.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func encodeVarintPex(dAtA []byte, offset int, v uint64) int { - offset -= sovPex(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PexRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *PexAddrs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Addrs) > 0 { - for _, e := range m.Addrs { - l = e.Size() - n += 1 + l + sovPex(uint64(l)) - } - } - return n -} - -func (m *Message) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *Message_PexRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PexRequest != nil { - l = m.PexRequest.Size() - n += 1 + l + sovPex(uint64(l)) - } - return n -} -func (m *Message_PexAddrs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PexAddrs != nil { - l = m.PexAddrs.Size() - n += 1 + l + sovPex(uint64(l)) - } - return n -} - -func sovPex(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPex(x uint64) (n int) { - return sovPex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PexRequest) 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 ErrIntOverflowPex - } - 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: PexRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PexRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipPex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PexAddrs) 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 ErrIntOverflowPex - } - 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: PexAddrs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PexAddrs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addrs = append(m.Addrs, NetAddress{}) - if err := m.Addrs[len(m.Addrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Message) 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 ErrIntOverflowPex - } - 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: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PexRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PexRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_PexRequest{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PexAddrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PexAddrs{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_PexAddrs{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPex(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPex - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPex - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPex - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPex = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPex = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPex = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/p2p/types.pb.go b/proto/ostracon/p2p/types.pb.go deleted file mode 100644 index 569d6fd43..000000000 --- a/proto/ostracon/p2p/types.pb.go +++ /dev/null @@ -1,1399 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/p2p/types.proto - -package p2p - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type NetAddress struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - IP string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` - Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` -} - -func (m *NetAddress) Reset() { *m = NetAddress{} } -func (m *NetAddress) String() string { return proto.CompactTextString(m) } -func (*NetAddress) ProtoMessage() {} -func (*NetAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_309178781c11bf68, []int{0} -} -func (m *NetAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NetAddress.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 *NetAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetAddress.Merge(m, src) -} -func (m *NetAddress) XXX_Size() int { - return m.Size() -} -func (m *NetAddress) XXX_DiscardUnknown() { - xxx_messageInfo_NetAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_NetAddress proto.InternalMessageInfo - -func (m *NetAddress) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *NetAddress) GetIP() string { - if m != nil { - return m.IP - } - return "" -} - -func (m *NetAddress) GetPort() uint32 { - if m != nil { - return m.Port - } - return 0 -} - -type ProtocolVersion struct { - P2P uint64 `protobuf:"varint,1,opt,name=p2p,proto3" json:"p2p,omitempty"` - Block uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"` - App uint64 `protobuf:"varint,3,opt,name=app,proto3" json:"app,omitempty"` -} - -func (m *ProtocolVersion) Reset() { *m = ProtocolVersion{} } -func (m *ProtocolVersion) String() string { return proto.CompactTextString(m) } -func (*ProtocolVersion) ProtoMessage() {} -func (*ProtocolVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_309178781c11bf68, []int{1} -} -func (m *ProtocolVersion) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProtocolVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProtocolVersion.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 *ProtocolVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProtocolVersion.Merge(m, src) -} -func (m *ProtocolVersion) XXX_Size() int { - return m.Size() -} -func (m *ProtocolVersion) XXX_DiscardUnknown() { - xxx_messageInfo_ProtocolVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_ProtocolVersion proto.InternalMessageInfo - -func (m *ProtocolVersion) GetP2P() uint64 { - if m != nil { - return m.P2P - } - return 0 -} - -func (m *ProtocolVersion) GetBlock() uint64 { - if m != nil { - return m.Block - } - return 0 -} - -func (m *ProtocolVersion) GetApp() uint64 { - if m != nil { - return m.App - } - return 0 -} - -type DefaultNodeInfo struct { - ProtocolVersion ProtocolVersion `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version"` - DefaultNodeID string `protobuf:"bytes,2,opt,name=default_node_id,json=defaultNodeId,proto3" json:"default_node_id,omitempty"` - ListenAddr string `protobuf:"bytes,3,opt,name=listen_addr,json=listenAddr,proto3" json:"listen_addr,omitempty"` - Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - Channels []byte `protobuf:"bytes,6,opt,name=channels,proto3" json:"channels,omitempty"` - Moniker string `protobuf:"bytes,7,opt,name=moniker,proto3" json:"moniker,omitempty"` - Other DefaultNodeInfoOther `protobuf:"bytes,8,opt,name=other,proto3" json:"other"` -} - -func (m *DefaultNodeInfo) Reset() { *m = DefaultNodeInfo{} } -func (m *DefaultNodeInfo) String() string { return proto.CompactTextString(m) } -func (*DefaultNodeInfo) ProtoMessage() {} -func (*DefaultNodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_309178781c11bf68, []int{2} -} -func (m *DefaultNodeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DefaultNodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DefaultNodeInfo.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 *DefaultNodeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_DefaultNodeInfo.Merge(m, src) -} -func (m *DefaultNodeInfo) XXX_Size() int { - return m.Size() -} -func (m *DefaultNodeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_DefaultNodeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_DefaultNodeInfo proto.InternalMessageInfo - -func (m *DefaultNodeInfo) GetProtocolVersion() ProtocolVersion { - if m != nil { - return m.ProtocolVersion - } - return ProtocolVersion{} -} - -func (m *DefaultNodeInfo) GetDefaultNodeID() string { - if m != nil { - return m.DefaultNodeID - } - return "" -} - -func (m *DefaultNodeInfo) GetListenAddr() string { - if m != nil { - return m.ListenAddr - } - return "" -} - -func (m *DefaultNodeInfo) GetNetwork() string { - if m != nil { - return m.Network - } - return "" -} - -func (m *DefaultNodeInfo) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *DefaultNodeInfo) GetChannels() []byte { - if m != nil { - return m.Channels - } - return nil -} - -func (m *DefaultNodeInfo) GetMoniker() string { - if m != nil { - return m.Moniker - } - return "" -} - -func (m *DefaultNodeInfo) GetOther() DefaultNodeInfoOther { - if m != nil { - return m.Other - } - return DefaultNodeInfoOther{} -} - -type DefaultNodeInfoOther struct { - TxIndex string `protobuf:"bytes,1,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` - RPCAddress string `protobuf:"bytes,2,opt,name=rpc_address,json=rpcAddress,proto3" json:"rpc_address,omitempty"` -} - -func (m *DefaultNodeInfoOther) Reset() { *m = DefaultNodeInfoOther{} } -func (m *DefaultNodeInfoOther) String() string { return proto.CompactTextString(m) } -func (*DefaultNodeInfoOther) ProtoMessage() {} -func (*DefaultNodeInfoOther) Descriptor() ([]byte, []int) { - return fileDescriptor_309178781c11bf68, []int{3} -} -func (m *DefaultNodeInfoOther) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DefaultNodeInfoOther) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DefaultNodeInfoOther.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 *DefaultNodeInfoOther) XXX_Merge(src proto.Message) { - xxx_messageInfo_DefaultNodeInfoOther.Merge(m, src) -} -func (m *DefaultNodeInfoOther) XXX_Size() int { - return m.Size() -} -func (m *DefaultNodeInfoOther) XXX_DiscardUnknown() { - xxx_messageInfo_DefaultNodeInfoOther.DiscardUnknown(m) -} - -var xxx_messageInfo_DefaultNodeInfoOther proto.InternalMessageInfo - -func (m *DefaultNodeInfoOther) GetTxIndex() string { - if m != nil { - return m.TxIndex - } - return "" -} - -func (m *DefaultNodeInfoOther) GetRPCAddress() string { - if m != nil { - return m.RPCAddress - } - return "" -} - -func init() { - proto.RegisterType((*NetAddress)(nil), "ostracon.p2p.NetAddress") - proto.RegisterType((*ProtocolVersion)(nil), "ostracon.p2p.ProtocolVersion") - proto.RegisterType((*DefaultNodeInfo)(nil), "ostracon.p2p.DefaultNodeInfo") - proto.RegisterType((*DefaultNodeInfoOther)(nil), "ostracon.p2p.DefaultNodeInfoOther") -} - -func init() { proto.RegisterFile("ostracon/p2p/types.proto", fileDescriptor_309178781c11bf68) } - -var fileDescriptor_309178781c11bf68 = []byte{ - // 480 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x3d, 0x8f, 0xd3, 0x40, - 0x10, 0x8d, 0x1d, 0xe7, 0xe3, 0x26, 0x17, 0x72, 0xac, 0x22, 0xe4, 0x3b, 0x09, 0x3b, 0x4a, 0x15, - 0x09, 0x29, 0x96, 0x42, 0x45, 0x83, 0x44, 0x08, 0x45, 0x9a, 0x60, 0xad, 0x10, 0x05, 0x4d, 0xe4, - 0x78, 0xf7, 0x92, 0x55, 0x7c, 0xbb, 0xab, 0xf5, 0x1e, 0x84, 0x7f, 0xc1, 0xcf, 0xba, 0xf2, 0x4a, - 0x2a, 0x0b, 0x39, 0x05, 0x7f, 0x03, 0x79, 0xed, 0x80, 0x89, 0xae, 0x9b, 0x37, 0x5f, 0x6f, 0xe6, - 0xe9, 0x81, 0x2b, 0x52, 0xad, 0xa2, 0x58, 0xf0, 0x40, 0xce, 0x64, 0xa0, 0xbf, 0x4b, 0x9a, 0x4e, - 0xa5, 0x12, 0x5a, 0xa0, 0xcb, 0x53, 0x65, 0x2a, 0x67, 0xf2, 0x66, 0xb8, 0x15, 0x5b, 0x61, 0x0a, - 0x41, 0x11, 0x95, 0x3d, 0xe3, 0x10, 0x60, 0x45, 0xf5, 0x3b, 0x42, 0x14, 0x4d, 0x53, 0xf4, 0x02, - 0x6c, 0x46, 0x5c, 0x6b, 0x64, 0x4d, 0x2e, 0xe6, 0xed, 0x3c, 0xf3, 0xed, 0xe5, 0x02, 0xdb, 0x8c, - 0x98, 0xbc, 0x74, 0xed, 0x5a, 0x3e, 0xc4, 0x36, 0x93, 0x08, 0x81, 0x23, 0x85, 0xd2, 0x6e, 0x73, - 0x64, 0x4d, 0xfa, 0xd8, 0xc4, 0xe3, 0x4f, 0x30, 0x08, 0x8b, 0xd5, 0xb1, 0x48, 0x3e, 0x53, 0x95, - 0x32, 0xc1, 0xd1, 0x35, 0x34, 0xe5, 0x4c, 0x9a, 0xbd, 0xce, 0xbc, 0x93, 0x67, 0x7e, 0x33, 0x9c, - 0x85, 0xb8, 0xc8, 0xa1, 0x21, 0xb4, 0x36, 0x89, 0x88, 0xf7, 0x66, 0xb9, 0x83, 0x4b, 0x80, 0xae, - 0xa0, 0x19, 0x49, 0x69, 0xd6, 0x3a, 0xb8, 0x08, 0xc7, 0xbf, 0x6d, 0x18, 0x2c, 0xe8, 0x6d, 0x74, - 0x9f, 0xe8, 0x95, 0x20, 0x74, 0xc9, 0x6f, 0x05, 0x5a, 0xc1, 0x95, 0xac, 0x98, 0xd6, 0x5f, 0x4b, - 0x2a, 0xc3, 0xd1, 0x9b, 0xbd, 0x9c, 0xd6, 0x5f, 0x9f, 0x9e, 0xdd, 0x33, 0x77, 0x1e, 0x32, 0xbf, - 0x81, 0x07, 0xf2, 0xec, 0xcc, 0x37, 0x30, 0x20, 0x25, 0xc5, 0x9a, 0x0b, 0x42, 0xd7, 0x8c, 0x54, - 0x2f, 0x3f, 0xcf, 0x33, 0xbf, 0x5f, 0x67, 0x5f, 0xe0, 0x3e, 0xa9, 0x41, 0x82, 0x7c, 0xe8, 0x25, - 0x2c, 0xd5, 0x94, 0xaf, 0x23, 0x42, 0x94, 0x39, 0xfc, 0x02, 0x43, 0x99, 0x2a, 0xc4, 0x45, 0x2e, - 0x74, 0x38, 0xd5, 0xdf, 0x84, 0xda, 0xbb, 0x8e, 0x29, 0x9e, 0x60, 0x51, 0x39, 0x1d, 0xdf, 0x2a, - 0x2b, 0x15, 0x44, 0x37, 0xd0, 0x8d, 0x77, 0x11, 0xe7, 0x34, 0x49, 0xdd, 0xf6, 0xc8, 0x9a, 0x5c, - 0xe2, 0xbf, 0xb8, 0x98, 0xba, 0x13, 0x9c, 0xed, 0xa9, 0x72, 0x3b, 0xe5, 0x54, 0x05, 0xd1, 0x5b, - 0x68, 0x09, 0xbd, 0xa3, 0xca, 0xed, 0x1a, 0x29, 0xc6, 0xff, 0x4b, 0x71, 0xa6, 0xe1, 0xc7, 0xa2, - 0xb3, 0xd2, 0xa3, 0x1c, 0x1b, 0x6f, 0x60, 0xf8, 0x54, 0x13, 0xba, 0x86, 0xae, 0x3e, 0xac, 0x19, - 0x27, 0xf4, 0x50, 0x3a, 0x04, 0x77, 0xf4, 0x61, 0x59, 0x40, 0x14, 0x40, 0x4f, 0xc9, 0xd8, 0xbc, - 0x4e, 0xd3, 0xb4, 0x12, 0xed, 0x59, 0x9e, 0xf9, 0x80, 0xc3, 0xf7, 0x95, 0xb7, 0x30, 0x28, 0x19, - 0x57, 0xf1, 0xfc, 0xc3, 0x43, 0xee, 0x59, 0x8f, 0xb9, 0x67, 0xfd, 0xca, 0x3d, 0xeb, 0xc7, 0xd1, - 0x6b, 0x3c, 0x1e, 0xbd, 0xc6, 0xcf, 0xa3, 0xd7, 0xf8, 0xf2, 0x6a, 0xcb, 0xf4, 0xee, 0x7e, 0x33, - 0x8d, 0xc5, 0x5d, 0x90, 0x30, 0x4e, 0x83, 0x7f, 0xee, 0x36, 0xd6, 0xad, 0x9b, 0x7d, 0xd3, 0x36, - 0xb9, 0xd7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, 0x79, 0x6e, 0x87, 0x03, 0x03, 0x00, 0x00, -} - -func (m *NetAddress) 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 *NetAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x18 - } - if len(m.IP) > 0 { - i -= len(m.IP) - copy(dAtA[i:], m.IP) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IP))) - i-- - dAtA[i] = 0x12 - } - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProtocolVersion) 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 *ProtocolVersion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProtocolVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.App != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.App)) - i-- - dAtA[i] = 0x18 - } - if m.Block != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Block)) - i-- - dAtA[i] = 0x10 - } - if m.P2P != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.P2P)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DefaultNodeInfo) 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 *DefaultNodeInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DefaultNodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Other.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - if len(m.Moniker) > 0 { - i -= len(m.Moniker) - copy(dAtA[i:], m.Moniker) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Moniker))) - i-- - dAtA[i] = 0x3a - } - if len(m.Channels) > 0 { - i -= len(m.Channels) - copy(dAtA[i:], m.Channels) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Channels))) - i-- - dAtA[i] = 0x32 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x2a - } - if len(m.Network) > 0 { - i -= len(m.Network) - copy(dAtA[i:], m.Network) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Network))) - i-- - dAtA[i] = 0x22 - } - if len(m.ListenAddr) > 0 { - i -= len(m.ListenAddr) - copy(dAtA[i:], m.ListenAddr) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ListenAddr))) - i-- - dAtA[i] = 0x1a - } - if len(m.DefaultNodeID) > 0 { - i -= len(m.DefaultNodeID) - copy(dAtA[i:], m.DefaultNodeID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DefaultNodeID))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ProtocolVersion.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 *DefaultNodeInfoOther) 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 *DefaultNodeInfoOther) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DefaultNodeInfoOther) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RPCAddress) > 0 { - i -= len(m.RPCAddress) - copy(dAtA[i:], m.RPCAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.RPCAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.TxIndex) > 0 { - i -= len(m.TxIndex) - copy(dAtA[i:], m.TxIndex) - i = encodeVarintTypes(dAtA, i, uint64(len(m.TxIndex))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *NetAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.IP) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Port != 0 { - n += 1 + sovTypes(uint64(m.Port)) - } - return n -} - -func (m *ProtocolVersion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.P2P != 0 { - n += 1 + sovTypes(uint64(m.P2P)) - } - if m.Block != 0 { - n += 1 + sovTypes(uint64(m.Block)) - } - if m.App != 0 { - n += 1 + sovTypes(uint64(m.App)) - } - return n -} - -func (m *DefaultNodeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ProtocolVersion.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.DefaultNodeID) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ListenAddr) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Network) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Channels) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Moniker) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Other.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *DefaultNodeInfoOther) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TxIndex) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.RPCAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *NetAddress) 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: NetAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", 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.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IP", 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.IP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProtocolVersion) 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: ProtocolVersion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProtocolVersion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P2P", wireType) - } - m.P2P = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.P2P |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - m.Block = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Block |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field App", wireType) - } - m.App = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.App |= uint64(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 *DefaultNodeInfo) 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: DefaultNodeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DefaultNodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProtocolVersion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProtocolVersion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultNodeID", 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.DefaultNodeID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListenAddr", 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.ListenAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", 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.Network = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Channels", 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.Channels = append(m.Channels[:0], dAtA[iNdEx:postIndex]...) - if m.Channels == nil { - m.Channels = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Moniker", 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.Moniker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Other.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 *DefaultNodeInfoOther) 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: DefaultNodeInfoOther: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DefaultNodeInfoOther: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", 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.TxIndex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RPCAddress", 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.RPCAddress = 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 skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/privval/types.pb.go b/proto/ostracon/privval/types.pb.go index 39e23ce31..15a20e776 100644 --- a/proto/ostracon/privval/types.pb.go +++ b/proto/ostracon/privval/types.pb.go @@ -7,8 +7,9 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - crypto "github.com/line/ostracon/proto/ostracon/crypto" - types "github.com/line/ostracon/proto/ostracon/types" + _ "github.com/tendermint/tendermint/proto/tendermint/crypto" + privval "github.com/tendermint/tendermint/proto/tendermint/privval" + _ "github.com/tendermint/tendermint/proto/tendermint/types" io "io" math "math" math_bits "math/bits" @@ -25,60 +26,23 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type Errors int32 - -const ( - Errors_ERRORS_UNKNOWN Errors = 0 - Errors_ERRORS_UNEXPECTED_RESPONSE Errors = 1 - Errors_ERRORS_NO_CONNECTION Errors = 2 - Errors_ERRORS_CONNECTION_TIMEOUT Errors = 3 - Errors_ERRORS_READ_TIMEOUT Errors = 4 - Errors_ERRORS_WRITE_TIMEOUT Errors = 5 -) - -var Errors_name = map[int32]string{ - 0: "ERRORS_UNKNOWN", - 1: "ERRORS_UNEXPECTED_RESPONSE", - 2: "ERRORS_NO_CONNECTION", - 3: "ERRORS_CONNECTION_TIMEOUT", - 4: "ERRORS_READ_TIMEOUT", - 5: "ERRORS_WRITE_TIMEOUT", -} - -var Errors_value = map[string]int32{ - "ERRORS_UNKNOWN": 0, - "ERRORS_UNEXPECTED_RESPONSE": 1, - "ERRORS_NO_CONNECTION": 2, - "ERRORS_CONNECTION_TIMEOUT": 3, - "ERRORS_READ_TIMEOUT": 4, - "ERRORS_WRITE_TIMEOUT": 5, -} - -func (x Errors) String() string { - return proto.EnumName(Errors_name, int32(x)) -} - -func (Errors) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{0} -} - -type RemoteSignerError struct { - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +// VRFProofRequest is a PrivValidatorSocket message containing a message to generate proof. +type VRFProofRequest struct { + Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } -func (m *RemoteSignerError) Reset() { *m = RemoteSignerError{} } -func (m *RemoteSignerError) String() string { return proto.CompactTextString(m) } -func (*RemoteSignerError) ProtoMessage() {} -func (*RemoteSignerError) Descriptor() ([]byte, []int) { +func (m *VRFProofRequest) Reset() { *m = VRFProofRequest{} } +func (m *VRFProofRequest) String() string { return proto.CompactTextString(m) } +func (*VRFProofRequest) ProtoMessage() {} +func (*VRFProofRequest) Descriptor() ([]byte, []int) { return fileDescriptor_abbbbe5131a55005, []int{0} } -func (m *RemoteSignerError) XXX_Unmarshal(b []byte) error { +func (m *VRFProofRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RemoteSignerError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *VRFProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RemoteSignerError.Marshal(b, m, deterministic) + return xxx_messageInfo_VRFProofRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -88,49 +52,43 @@ func (m *RemoteSignerError) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *RemoteSignerError) XXX_Merge(src proto.Message) { - xxx_messageInfo_RemoteSignerError.Merge(m, src) +func (m *VRFProofRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VRFProofRequest.Merge(m, src) } -func (m *RemoteSignerError) XXX_Size() int { +func (m *VRFProofRequest) XXX_Size() int { return m.Size() } -func (m *RemoteSignerError) XXX_DiscardUnknown() { - xxx_messageInfo_RemoteSignerError.DiscardUnknown(m) +func (m *VRFProofRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VRFProofRequest.DiscardUnknown(m) } -var xxx_messageInfo_RemoteSignerError proto.InternalMessageInfo - -func (m *RemoteSignerError) GetCode() int32 { - if m != nil { - return m.Code - } - return 0 -} +var xxx_messageInfo_VRFProofRequest proto.InternalMessageInfo -func (m *RemoteSignerError) GetDescription() string { +func (m *VRFProofRequest) GetMessage() []byte { if m != nil { - return m.Description + return m.Message } - return "" + return nil } -// PubKeyRequest requests the consensus public key from the remote signer. -type PubKeyRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +// VRFProofResponse is a PrivValidatorSocket message containing a Proof. +type VRFProofResponse struct { + Proof []byte `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` + Error *privval.RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } -func (m *PubKeyRequest) Reset() { *m = PubKeyRequest{} } -func (m *PubKeyRequest) String() string { return proto.CompactTextString(m) } -func (*PubKeyRequest) ProtoMessage() {} -func (*PubKeyRequest) Descriptor() ([]byte, []int) { +func (m *VRFProofResponse) Reset() { *m = VRFProofResponse{} } +func (m *VRFProofResponse) String() string { return proto.CompactTextString(m) } +func (*VRFProofResponse) ProtoMessage() {} +func (*VRFProofResponse) Descriptor() ([]byte, []int) { return fileDescriptor_abbbbe5131a55005, []int{1} } -func (m *PubKeyRequest) XXX_Unmarshal(b []byte) error { +func (m *VRFProofResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PubKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *VRFProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PubKeyRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_VRFProofResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -140,43 +98,59 @@ func (m *PubKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *PubKeyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PubKeyRequest.Merge(m, src) +func (m *VRFProofResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_VRFProofResponse.Merge(m, src) } -func (m *PubKeyRequest) XXX_Size() int { +func (m *VRFProofResponse) XXX_Size() int { return m.Size() } -func (m *PubKeyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PubKeyRequest.DiscardUnknown(m) +func (m *VRFProofResponse) XXX_DiscardUnknown() { + xxx_messageInfo_VRFProofResponse.DiscardUnknown(m) } -var xxx_messageInfo_PubKeyRequest proto.InternalMessageInfo +var xxx_messageInfo_VRFProofResponse proto.InternalMessageInfo + +func (m *VRFProofResponse) GetProof() []byte { + if m != nil { + return m.Proof + } + return nil +} -func (m *PubKeyRequest) GetChainId() string { +func (m *VRFProofResponse) GetError() *privval.RemoteSignerError { if m != nil { - return m.ChainId + return m.Error } - return "" + return nil } -// PubKeyResponse is a response message containing the public key. -type PubKeyResponse struct { - PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"` - Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +type Message struct { + // Types that are valid to be assigned to Sum: + // *Message_PubKeyRequest + // *Message_PubKeyResponse + // *Message_SignVoteRequest + // *Message_SignedVoteResponse + // *Message_SignProposalRequest + // *Message_SignedProposalResponse + // *Message_PingRequest + // *Message_PingResponse + // *Message_VrfProofRequest + // *Message_VrfProofResponse + Sum isMessage_Sum `protobuf_oneof:"sum"` } -func (m *PubKeyResponse) Reset() { *m = PubKeyResponse{} } -func (m *PubKeyResponse) String() string { return proto.CompactTextString(m) } -func (*PubKeyResponse) ProtoMessage() {} -func (*PubKeyResponse) Descriptor() ([]byte, []int) { +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor_abbbbe5131a55005, []int{2} } -func (m *PubKeyResponse) XXX_Unmarshal(b []byte) error { +func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PubKeyResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_Message.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -186,768 +160,466 @@ func (m *PubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *PubKeyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PubKeyResponse.Merge(m, src) +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) } -func (m *PubKeyResponse) XXX_Size() int { +func (m *Message) XXX_Size() int { return m.Size() } -func (m *PubKeyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PubKeyResponse.DiscardUnknown(m) +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) } -var xxx_messageInfo_PubKeyResponse proto.InternalMessageInfo +var xxx_messageInfo_Message proto.InternalMessageInfo -func (m *PubKeyResponse) GetPubKey() crypto.PublicKey { - if m != nil { - return m.PubKey - } - return crypto.PublicKey{} +type isMessage_Sum interface { + isMessage_Sum() + MarshalTo([]byte) (int, error) + Size() int } -func (m *PubKeyResponse) GetError() *RemoteSignerError { - if m != nil { - return m.Error - } - return nil +type Message_PubKeyRequest struct { + PubKeyRequest *privval.PubKeyRequest `protobuf:"bytes,1,opt,name=pub_key_request,json=pubKeyRequest,proto3,oneof" json:"pub_key_request,omitempty"` } - -// SignVoteRequest is a request to sign a vote -type SignVoteRequest struct { - Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +type Message_PubKeyResponse struct { + PubKeyResponse *privval.PubKeyResponse `protobuf:"bytes,2,opt,name=pub_key_response,json=pubKeyResponse,proto3,oneof" json:"pub_key_response,omitempty"` } - -func (m *SignVoteRequest) Reset() { *m = SignVoteRequest{} } -func (m *SignVoteRequest) String() string { return proto.CompactTextString(m) } -func (*SignVoteRequest) ProtoMessage() {} -func (*SignVoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{3} +type Message_SignVoteRequest struct { + SignVoteRequest *privval.SignVoteRequest `protobuf:"bytes,3,opt,name=sign_vote_request,json=signVoteRequest,proto3,oneof" json:"sign_vote_request,omitempty"` } -func (m *SignVoteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +type Message_SignedVoteResponse struct { + SignedVoteResponse *privval.SignedVoteResponse `protobuf:"bytes,4,opt,name=signed_vote_response,json=signedVoteResponse,proto3,oneof" json:"signed_vote_response,omitempty"` } -func (m *SignVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignVoteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } +type Message_SignProposalRequest struct { + SignProposalRequest *privval.SignProposalRequest `protobuf:"bytes,5,opt,name=sign_proposal_request,json=signProposalRequest,proto3,oneof" json:"sign_proposal_request,omitempty"` } -func (m *SignVoteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignVoteRequest.Merge(m, src) +type Message_SignedProposalResponse struct { + SignedProposalResponse *privval.SignedProposalResponse `protobuf:"bytes,6,opt,name=signed_proposal_response,json=signedProposalResponse,proto3,oneof" json:"signed_proposal_response,omitempty"` } -func (m *SignVoteRequest) XXX_Size() int { - return m.Size() +type Message_PingRequest struct { + PingRequest *privval.PingRequest `protobuf:"bytes,7,opt,name=ping_request,json=pingRequest,proto3,oneof" json:"ping_request,omitempty"` +} +type Message_PingResponse struct { + PingResponse *privval.PingResponse `protobuf:"bytes,8,opt,name=ping_response,json=pingResponse,proto3,oneof" json:"ping_response,omitempty"` +} +type Message_VrfProofRequest struct { + VrfProofRequest *VRFProofRequest `protobuf:"bytes,1000,opt,name=vrf_proof_request,json=vrfProofRequest,proto3,oneof" json:"vrf_proof_request,omitempty"` } -func (m *SignVoteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignVoteRequest.DiscardUnknown(m) +type Message_VrfProofResponse struct { + VrfProofResponse *VRFProofResponse `protobuf:"bytes,1001,opt,name=vrf_proof_response,json=vrfProofResponse,proto3,oneof" json:"vrf_proof_response,omitempty"` } -var xxx_messageInfo_SignVoteRequest proto.InternalMessageInfo +func (*Message_PubKeyRequest) isMessage_Sum() {} +func (*Message_PubKeyResponse) isMessage_Sum() {} +func (*Message_SignVoteRequest) isMessage_Sum() {} +func (*Message_SignedVoteResponse) isMessage_Sum() {} +func (*Message_SignProposalRequest) isMessage_Sum() {} +func (*Message_SignedProposalResponse) isMessage_Sum() {} +func (*Message_PingRequest) isMessage_Sum() {} +func (*Message_PingResponse) isMessage_Sum() {} +func (*Message_VrfProofRequest) isMessage_Sum() {} +func (*Message_VrfProofResponse) isMessage_Sum() {} -func (m *SignVoteRequest) GetVote() *types.Vote { +func (m *Message) GetSum() isMessage_Sum { if m != nil { - return m.Vote + return m.Sum } return nil } -func (m *SignVoteRequest) GetChainId() string { - if m != nil { - return m.ChainId +func (m *Message) GetPubKeyRequest() *privval.PubKeyRequest { + if x, ok := m.GetSum().(*Message_PubKeyRequest); ok { + return x.PubKeyRequest } - return "" + return nil } -// SignedVoteResponse is a response containing a signed vote or an error -type SignedVoteResponse struct { - Vote types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"` - Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +func (m *Message) GetPubKeyResponse() *privval.PubKeyResponse { + if x, ok := m.GetSum().(*Message_PubKeyResponse); ok { + return x.PubKeyResponse + } + return nil } -func (m *SignedVoteResponse) Reset() { *m = SignedVoteResponse{} } -func (m *SignedVoteResponse) String() string { return proto.CompactTextString(m) } -func (*SignedVoteResponse) ProtoMessage() {} -func (*SignedVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{4} -} -func (m *SignedVoteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedVoteResponse.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 *Message) GetSignVoteRequest() *privval.SignVoteRequest { + if x, ok := m.GetSum().(*Message_SignVoteRequest); ok { + return x.SignVoteRequest } -} -func (m *SignedVoteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedVoteResponse.Merge(m, src) -} -func (m *SignedVoteResponse) XXX_Size() int { - return m.Size() -} -func (m *SignedVoteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SignedVoteResponse.DiscardUnknown(m) + return nil } -var xxx_messageInfo_SignedVoteResponse proto.InternalMessageInfo - -func (m *SignedVoteResponse) GetVote() types.Vote { - if m != nil { - return m.Vote +func (m *Message) GetSignedVoteResponse() *privval.SignedVoteResponse { + if x, ok := m.GetSum().(*Message_SignedVoteResponse); ok { + return x.SignedVoteResponse } - return types.Vote{} + return nil } -func (m *SignedVoteResponse) GetError() *RemoteSignerError { - if m != nil { - return m.Error +func (m *Message) GetSignProposalRequest() *privval.SignProposalRequest { + if x, ok := m.GetSum().(*Message_SignProposalRequest); ok { + return x.SignProposalRequest } return nil } -// SignProposalRequest is a request to sign a proposal -type SignProposalRequest struct { - Proposal *types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +func (m *Message) GetSignedProposalResponse() *privval.SignedProposalResponse { + if x, ok := m.GetSum().(*Message_SignedProposalResponse); ok { + return x.SignedProposalResponse + } + return nil } -func (m *SignProposalRequest) Reset() { *m = SignProposalRequest{} } -func (m *SignProposalRequest) String() string { return proto.CompactTextString(m) } -func (*SignProposalRequest) ProtoMessage() {} -func (*SignProposalRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{5} -} -func (m *SignProposalRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignProposalRequest.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 *Message) GetPingRequest() *privval.PingRequest { + if x, ok := m.GetSum().(*Message_PingRequest); ok { + return x.PingRequest } + return nil } -func (m *SignProposalRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignProposalRequest.Merge(m, src) -} -func (m *SignProposalRequest) XXX_Size() int { - return m.Size() -} -func (m *SignProposalRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignProposalRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignProposalRequest proto.InternalMessageInfo -func (m *SignProposalRequest) GetProposal() *types.Proposal { - if m != nil { - return m.Proposal +func (m *Message) GetPingResponse() *privval.PingResponse { + if x, ok := m.GetSum().(*Message_PingResponse); ok { + return x.PingResponse } return nil } -func (m *SignProposalRequest) GetChainId() string { - if m != nil { - return m.ChainId +func (m *Message) GetVrfProofRequest() *VRFProofRequest { + if x, ok := m.GetSum().(*Message_VrfProofRequest); ok { + return x.VrfProofRequest } - return "" + return nil } -// SignedProposalResponse is response containing a signed proposal or an error -type SignedProposalResponse struct { - Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` - Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +func (m *Message) GetVrfProofResponse() *VRFProofResponse { + if x, ok := m.GetSum().(*Message_VrfProofResponse); ok { + return x.VrfProofResponse + } + return nil } -func (m *SignedProposalResponse) Reset() { *m = SignedProposalResponse{} } -func (m *SignedProposalResponse) String() string { return proto.CompactTextString(m) } -func (*SignedProposalResponse) ProtoMessage() {} -func (*SignedProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{6} -} -func (m *SignedProposalResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedProposalResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Message) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Message_PubKeyRequest)(nil), + (*Message_PubKeyResponse)(nil), + (*Message_SignVoteRequest)(nil), + (*Message_SignedVoteResponse)(nil), + (*Message_SignProposalRequest)(nil), + (*Message_SignedProposalResponse)(nil), + (*Message_PingRequest)(nil), + (*Message_PingResponse)(nil), + (*Message_VrfProofRequest)(nil), + (*Message_VrfProofResponse)(nil), } } -func (m *SignedProposalResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedProposalResponse.Merge(m, src) -} -func (m *SignedProposalResponse) XXX_Size() int { - return m.Size() -} -func (m *SignedProposalResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SignedProposalResponse.DiscardUnknown(m) + +func init() { + proto.RegisterType((*VRFProofRequest)(nil), "ostracon.privval.VRFProofRequest") + proto.RegisterType((*VRFProofResponse)(nil), "ostracon.privval.VRFProofResponse") + proto.RegisterType((*Message)(nil), "ostracon.privval.Message") } -var xxx_messageInfo_SignedProposalResponse proto.InternalMessageInfo +func init() { proto.RegisterFile("ostracon/privval/types.proto", fileDescriptor_abbbbe5131a55005) } -func (m *SignedProposalResponse) GetProposal() types.Proposal { - if m != nil { - return m.Proposal - } - return types.Proposal{} +var fileDescriptor_abbbbe5131a55005 = []byte{ + // 534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0xc7, 0x13, 0x46, 0x1b, 0xe4, 0x76, 0xb4, 0x33, 0x05, 0x55, 0xd5, 0x14, 0x4a, 0x11, 0x30, + 0x81, 0x94, 0x48, 0xe3, 0xc8, 0x6d, 0xe2, 0x65, 0x68, 0x02, 0x95, 0x4c, 0xda, 0x61, 0x12, 0xaa, + 0xfa, 0xf2, 0x34, 0x44, 0x6b, 0x62, 0x63, 0x3b, 0x91, 0xf2, 0x2d, 0xf8, 0x58, 0x1c, 0x77, 0x84, + 0x1b, 0x6a, 0x2f, 0xf0, 0x2d, 0x50, 0x1c, 0x37, 0x4e, 0xbb, 0x74, 0xb7, 0xf8, 0xef, 0xc7, 0xbf, + 0xe7, 0x67, 0xc5, 0x36, 0x3a, 0x24, 0x5c, 0xb0, 0xf1, 0x94, 0x44, 0x2e, 0x65, 0x41, 0x92, 0x8c, + 0x17, 0xae, 0x48, 0x29, 0x70, 0x87, 0x32, 0x22, 0x08, 0x6e, 0xaf, 0x67, 0x1d, 0x35, 0xdb, 0x3b, + 0x14, 0x10, 0xcd, 0x80, 0x85, 0x41, 0x24, 0xdc, 0x29, 0x4b, 0xa9, 0x20, 0xee, 0x15, 0xa4, 0xaa, + 0xbe, 0xd7, 0xf1, 0x89, 0x4f, 0xe4, 0xa7, 0x9b, 0x7d, 0xa9, 0xb4, 0xbc, 0x46, 0xd2, 0xcb, 0x3d, + 0x7a, 0x76, 0x69, 0xb6, 0xc2, 0x61, 0xf0, 0x0a, 0xb5, 0x2e, 0xbc, 0xf7, 0x43, 0x46, 0xc8, 0xdc, + 0x83, 0xef, 0x31, 0x70, 0x81, 0xbb, 0xc8, 0x0a, 0x81, 0xf3, 0xb1, 0x0f, 0x5d, 0xb3, 0x6f, 0x1e, + 0x35, 0xbd, 0xf5, 0x70, 0x00, 0xa8, 0xad, 0x8b, 0x39, 0x25, 0x11, 0x07, 0xdc, 0x41, 0x35, 0x9a, + 0x05, 0xaa, 0x36, 0x1f, 0xe0, 0x37, 0xa8, 0x06, 0x8c, 0x11, 0xd6, 0xbd, 0xd3, 0x37, 0x8f, 0x1a, + 0xc7, 0xcf, 0x1c, 0xad, 0xb1, 0xde, 0xac, 0xe3, 0x41, 0x48, 0x04, 0x9c, 0x07, 0x7e, 0x04, 0xec, + 0x5d, 0x56, 0xec, 0xe5, 0x6b, 0x06, 0xbf, 0xeb, 0xc8, 0xfa, 0x94, 0xb7, 0xc4, 0x67, 0xa8, 0x45, + 0xe3, 0xc9, 0xe8, 0x0a, 0xd2, 0x11, 0xcb, 0xfd, 0x64, 0xa3, 0xc6, 0xf1, 0x93, 0x2a, 0xe4, 0x30, + 0x9e, 0x9c, 0x41, 0xaa, 0x36, 0x72, 0x6a, 0x78, 0xfb, 0xb4, 0x1c, 0xe0, 0xcf, 0xa8, 0xad, 0x61, + 0xb9, 0xbf, 0x12, 0x1c, 0xdc, 0x46, 0xcb, 0x2b, 0x4f, 0x0d, 0xef, 0x3e, 0xdd, 0x48, 0xf0, 0x17, + 0x74, 0xc0, 0x03, 0x3f, 0x1a, 0x25, 0x44, 0x40, 0xa1, 0xb7, 0x27, 0x81, 0x4f, 0xab, 0x80, 0xd9, + 0x5e, 0x2f, 0x88, 0x00, 0x2d, 0xd8, 0xe2, 0x9b, 0x11, 0xbe, 0x44, 0x9d, 0x2c, 0x82, 0xd9, 0x1a, + 0xaa, 0x34, 0xef, 0x4a, 0xea, 0xf3, 0x5d, 0x54, 0x98, 0xe5, 0x90, 0x42, 0x15, 0xf3, 0x1b, 0x29, + 0xfe, 0x8a, 0x1e, 0x4a, 0x5d, 0xca, 0x08, 0x25, 0x7c, 0xbc, 0x28, 0x94, 0x6b, 0x12, 0xfe, 0x62, + 0x17, 0x7c, 0xa8, 0xea, 0xb5, 0xf6, 0x03, 0x7e, 0x33, 0xc6, 0x73, 0xd4, 0x55, 0xea, 0xa5, 0x06, + 0x4a, 0xbf, 0x2e, 0x3b, 0xbc, 0xdc, 0xad, 0xaf, 0x61, 0xc5, 0x16, 0x1e, 0xf1, 0xca, 0x19, 0xfc, + 0x16, 0x35, 0x69, 0x10, 0xf9, 0x85, 0xbd, 0x25, 0xd9, 0x8f, 0x2b, 0xff, 0x60, 0x10, 0xf9, 0xda, + 0xba, 0x41, 0xf5, 0x10, 0x7f, 0x40, 0xfb, 0x8a, 0xa2, 0x14, 0xef, 0x49, 0x4c, 0x7f, 0x37, 0xa6, + 0x10, 0x6b, 0xd2, 0xd2, 0x18, 0x0f, 0xd1, 0x41, 0xc2, 0xe6, 0x23, 0x79, 0xee, 0x0b, 0xa7, 0xbf, + 0x96, 0x3a, 0xa4, 0xdb, 0x57, 0xdc, 0xd9, 0xba, 0x6d, 0xd9, 0x19, 0x48, 0xd8, 0x7c, 0xe3, 0x02, + 0x9e, 0x23, 0x5c, 0x26, 0x2a, 0xbf, 0x7f, 0x96, 0x3a, 0xa9, 0xb7, 0x20, 0x0b, 0xc5, 0xb6, 0x66, + 0xe6, 0xd9, 0x49, 0x0d, 0xed, 0xf1, 0x38, 0x3c, 0xf9, 0xf8, 0x73, 0x69, 0x9b, 0xd7, 0x4b, 0xdb, + 0xfc, 0xb3, 0xb4, 0xcd, 0x1f, 0x2b, 0xdb, 0xb8, 0x5e, 0xd9, 0xc6, 0xaf, 0x95, 0x6d, 0x5c, 0xba, + 0x7e, 0x20, 0xbe, 0xc5, 0x13, 0x67, 0x4a, 0x42, 0x77, 0x11, 0x44, 0xe0, 0x96, 0xde, 0xae, 0xec, + 0xc9, 0xd9, 0x7e, 0xca, 0x26, 0x75, 0x99, 0xbf, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x56, + 0xe1, 0x85, 0xe5, 0x04, 0x00, 0x00, } -func (m *SignedProposalResponse) GetError() *RemoteSignerError { - if m != nil { - return m.Error +func (m *VRFProofRequest) 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 nil -} - -// VRFProofRequest is a PrivValidatorSocket message containing a message to generate proof. -type VRFProofRequest struct { - Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + return dAtA[:n], nil } -func (m *VRFProofRequest) Reset() { *m = VRFProofRequest{} } -func (m *VRFProofRequest) String() string { return proto.CompactTextString(m) } -func (*VRFProofRequest) ProtoMessage() {} -func (*VRFProofRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{7} -} -func (m *VRFProofRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *VRFProofRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *VRFProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VRFProofRequest.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 *VRFProofRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa } + return len(dAtA) - i, nil } -func (m *VRFProofRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VRFProofRequest.Merge(m, src) -} -func (m *VRFProofRequest) XXX_Size() int { - return m.Size() -} -func (m *VRFProofRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VRFProofRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_VRFProofRequest proto.InternalMessageInfo -func (m *VRFProofRequest) GetMessage() []byte { - if m != nil { - return m.Message +func (m *VRFProofResponse) 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 nil + return dAtA[:n], nil } -// VRFProofResponse is a PrivValidatorSocket message containing a Proof. -type VRFProofResponse struct { - Proof []byte `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` - Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +func (m *VRFProofResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *VRFProofResponse) Reset() { *m = VRFProofResponse{} } -func (m *VRFProofResponse) String() string { return proto.CompactTextString(m) } -func (*VRFProofResponse) ProtoMessage() {} -func (*VRFProofResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{8} -} -func (m *VRFProofResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VRFProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VRFProofResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *VRFProofResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x12 } -} -func (m *VRFProofResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VRFProofResponse.Merge(m, src) -} -func (m *VRFProofResponse) XXX_Size() int { - return m.Size() -} -func (m *VRFProofResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VRFProofResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VRFProofResponse proto.InternalMessageInfo - -func (m *VRFProofResponse) GetProof() []byte { - if m != nil { - return m.Proof + if len(m.Proof) > 0 { + i -= len(m.Proof) + copy(dAtA[i:], m.Proof) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Proof))) + i-- + dAtA[i] = 0xa } - return nil + return len(dAtA) - i, nil } -func (m *VRFProofResponse) GetError() *RemoteSignerError { - if m != nil { - return m.Error +func (m *Message) 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 nil + return dAtA[:n], nil } -// PingRequest is a request to confirm that the connection is alive. -type PingRequest struct { +func (m *Message) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PingRequest) Reset() { *m = PingRequest{} } -func (m *PingRequest) String() string { return proto.CompactTextString(m) } -func (*PingRequest) ProtoMessage() {} -func (*PingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{9} -} -func (m *PingRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PingRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - return b[:n], nil } -} -func (m *PingRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingRequest.Merge(m, src) -} -func (m *PingRequest) XXX_Size() int { - return m.Size() -} -func (m *PingRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PingRequest.DiscardUnknown(m) + return len(dAtA) - i, nil } -var xxx_messageInfo_PingRequest proto.InternalMessageInfo - -// PingResponse is a response to confirm that the connection is alive. -type PingResponse struct { +func (m *Message_PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PingResponse) Reset() { *m = PingResponse{} } -func (m *PingResponse) String() string { return proto.CompactTextString(m) } -func (*PingResponse) ProtoMessage() {} -func (*PingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{10} +func (m *Message_PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PubKeyRequest != nil { + { + size, err := m.PubKeyRequest.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 *PingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *Message_PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PingResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *Message_PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PubKeyResponse != nil { + { + size, err := m.PubKeyResponse.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x12 } + return len(dAtA) - i, nil } -func (m *PingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PingResponse.Merge(m, src) +func (m *Message_SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PingResponse) XXX_Size() int { - return m.Size() + +func (m *Message_SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SignVoteRequest != nil { + { + size, err := m.SignVoteRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil } -func (m *PingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PingResponse.DiscardUnknown(m) +func (m *Message_SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_PingResponse proto.InternalMessageInfo - -type Message struct { - // Types that are valid to be assigned to Sum: - // *Message_PubKeyRequest - // *Message_PubKeyResponse - // *Message_SignVoteRequest - // *Message_SignedVoteResponse - // *Message_SignProposalRequest - // *Message_SignedProposalResponse - // *Message_PingRequest - // *Message_PingResponse - // *Message_VrfProofRequest - // *Message_VrfProofResponse - Sum isMessage_Sum `protobuf_oneof:"sum"` +func (m *Message_SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SignedVoteResponse != nil { + { + size, err := m.SignedVoteResponse.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *Message_SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_abbbbe5131a55005, []int{11} -} -func (m *Message) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Message_SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SignProposalRequest != nil { + { + size, err := m.SignProposalRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - return b[:n], nil - } -} -func (m *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(m, src) -} -func (m *Message) XXX_Size() int { - return m.Size() -} -func (m *Message) XXX_DiscardUnknown() { - xxx_messageInfo_Message.DiscardUnknown(m) -} - -var xxx_messageInfo_Message proto.InternalMessageInfo - -type isMessage_Sum interface { - isMessage_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type Message_PubKeyRequest struct { - PubKeyRequest *PubKeyRequest `protobuf:"bytes,1,opt,name=pub_key_request,json=pubKeyRequest,proto3,oneof" json:"pub_key_request,omitempty"` -} -type Message_PubKeyResponse struct { - PubKeyResponse *PubKeyResponse `protobuf:"bytes,2,opt,name=pub_key_response,json=pubKeyResponse,proto3,oneof" json:"pub_key_response,omitempty"` -} -type Message_SignVoteRequest struct { - SignVoteRequest *SignVoteRequest `protobuf:"bytes,3,opt,name=sign_vote_request,json=signVoteRequest,proto3,oneof" json:"sign_vote_request,omitempty"` -} -type Message_SignedVoteResponse struct { - SignedVoteResponse *SignedVoteResponse `protobuf:"bytes,4,opt,name=signed_vote_response,json=signedVoteResponse,proto3,oneof" json:"signed_vote_response,omitempty"` -} -type Message_SignProposalRequest struct { - SignProposalRequest *SignProposalRequest `protobuf:"bytes,5,opt,name=sign_proposal_request,json=signProposalRequest,proto3,oneof" json:"sign_proposal_request,omitempty"` -} -type Message_SignedProposalResponse struct { - SignedProposalResponse *SignedProposalResponse `protobuf:"bytes,6,opt,name=signed_proposal_response,json=signedProposalResponse,proto3,oneof" json:"signed_proposal_response,omitempty"` -} -type Message_PingRequest struct { - PingRequest *PingRequest `protobuf:"bytes,7,opt,name=ping_request,json=pingRequest,proto3,oneof" json:"ping_request,omitempty"` -} -type Message_PingResponse struct { - PingResponse *PingResponse `protobuf:"bytes,8,opt,name=ping_response,json=pingResponse,proto3,oneof" json:"ping_response,omitempty"` -} -type Message_VrfProofRequest struct { - VrfProofRequest *VRFProofRequest `protobuf:"bytes,1000,opt,name=vrf_proof_request,json=vrfProofRequest,proto3,oneof" json:"vrf_proof_request,omitempty"` -} -type Message_VrfProofResponse struct { - VrfProofResponse *VRFProofResponse `protobuf:"bytes,1001,opt,name=vrf_proof_response,json=vrfProofResponse,proto3,oneof" json:"vrf_proof_response,omitempty"` -} - -func (*Message_PubKeyRequest) isMessage_Sum() {} -func (*Message_PubKeyResponse) isMessage_Sum() {} -func (*Message_SignVoteRequest) isMessage_Sum() {} -func (*Message_SignedVoteResponse) isMessage_Sum() {} -func (*Message_SignProposalRequest) isMessage_Sum() {} -func (*Message_SignedProposalResponse) isMessage_Sum() {} -func (*Message_PingRequest) isMessage_Sum() {} -func (*Message_PingResponse) isMessage_Sum() {} -func (*Message_VrfProofRequest) isMessage_Sum() {} -func (*Message_VrfProofResponse) isMessage_Sum() {} - -func (m *Message) GetSum() isMessage_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *Message) GetPubKeyRequest() *PubKeyRequest { - if x, ok := m.GetSum().(*Message_PubKeyRequest); ok { - return x.PubKeyRequest - } - return nil -} - -func (m *Message) GetPubKeyResponse() *PubKeyResponse { - if x, ok := m.GetSum().(*Message_PubKeyResponse); ok { - return x.PubKeyResponse - } - return nil -} - -func (m *Message) GetSignVoteRequest() *SignVoteRequest { - if x, ok := m.GetSum().(*Message_SignVoteRequest); ok { - return x.SignVoteRequest - } - return nil -} - -func (m *Message) GetSignedVoteResponse() *SignedVoteResponse { - if x, ok := m.GetSum().(*Message_SignedVoteResponse); ok { - return x.SignedVoteResponse - } - return nil -} - -func (m *Message) GetSignProposalRequest() *SignProposalRequest { - if x, ok := m.GetSum().(*Message_SignProposalRequest); ok { - return x.SignProposalRequest - } - return nil -} - -func (m *Message) GetSignedProposalResponse() *SignedProposalResponse { - if x, ok := m.GetSum().(*Message_SignedProposalResponse); ok { - return x.SignedProposalResponse - } - return nil -} - -func (m *Message) GetPingRequest() *PingRequest { - if x, ok := m.GetSum().(*Message_PingRequest); ok { - return x.PingRequest - } - return nil -} - -func (m *Message) GetPingResponse() *PingResponse { - if x, ok := m.GetSum().(*Message_PingResponse); ok { - return x.PingResponse - } - return nil -} - -func (m *Message) GetVrfProofRequest() *VRFProofRequest { - if x, ok := m.GetSum().(*Message_VrfProofRequest); ok { - return x.VrfProofRequest - } - return nil -} - -func (m *Message) GetVrfProofResponse() *VRFProofResponse { - if x, ok := m.GetSum().(*Message_VrfProofResponse); ok { - return x.VrfProofResponse - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Message) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Message_PubKeyRequest)(nil), - (*Message_PubKeyResponse)(nil), - (*Message_SignVoteRequest)(nil), - (*Message_SignedVoteResponse)(nil), - (*Message_SignProposalRequest)(nil), - (*Message_SignedProposalResponse)(nil), - (*Message_PingRequest)(nil), - (*Message_PingResponse)(nil), - (*Message_VrfProofRequest)(nil), - (*Message_VrfProofResponse)(nil), - } -} - -func init() { - proto.RegisterEnum("ostracon.privval.Errors", Errors_name, Errors_value) - proto.RegisterType((*RemoteSignerError)(nil), "ostracon.privval.RemoteSignerError") - proto.RegisterType((*PubKeyRequest)(nil), "ostracon.privval.PubKeyRequest") - proto.RegisterType((*PubKeyResponse)(nil), "ostracon.privval.PubKeyResponse") - proto.RegisterType((*SignVoteRequest)(nil), "ostracon.privval.SignVoteRequest") - proto.RegisterType((*SignedVoteResponse)(nil), "ostracon.privval.SignedVoteResponse") - proto.RegisterType((*SignProposalRequest)(nil), "ostracon.privval.SignProposalRequest") - proto.RegisterType((*SignedProposalResponse)(nil), "ostracon.privval.SignedProposalResponse") - proto.RegisterType((*VRFProofRequest)(nil), "ostracon.privval.VRFProofRequest") - proto.RegisterType((*VRFProofResponse)(nil), "ostracon.privval.VRFProofResponse") - proto.RegisterType((*PingRequest)(nil), "ostracon.privval.PingRequest") - proto.RegisterType((*PingResponse)(nil), "ostracon.privval.PingResponse") - proto.RegisterType((*Message)(nil), "ostracon.privval.Message") -} - -func init() { proto.RegisterFile("ostracon/privval/types.proto", fileDescriptor_abbbbe5131a55005) } - -var fileDescriptor_abbbbe5131a55005 = []byte{ - // 834 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcb, 0x6e, 0xdb, 0x46, - 0x14, 0x86, 0x49, 0x5b, 0x17, 0xe7, 0xc8, 0x17, 0x79, 0xac, 0xa6, 0x8a, 0xd0, 0x28, 0xae, 0xda, - 0x02, 0x46, 0x0a, 0x50, 0x40, 0xda, 0x4d, 0xba, 0xab, 0x1d, 0x16, 0x12, 0xdc, 0x90, 0xc4, 0x48, - 0x71, 0x82, 0x76, 0x41, 0x48, 0xd4, 0x98, 0x21, 0x62, 0x73, 0xa6, 0x1c, 0x4a, 0x80, 0x56, 0xdd, - 0x75, 0xdb, 0x3e, 0x46, 0x1f, 0x25, 0xdd, 0x65, 0xd9, 0x55, 0x51, 0xd8, 0x9b, 0xf6, 0x2d, 0x0a, - 0xce, 0x0c, 0x2f, 0xa2, 0xe5, 0x34, 0x80, 0x77, 0x9c, 0x73, 0x8e, 0xbe, 0xf3, 0xff, 0x24, 0x7f, - 0x88, 0xf0, 0x09, 0xe5, 0x71, 0x34, 0xf1, 0x68, 0xd8, 0x67, 0x51, 0xb0, 0x58, 0x4c, 0x2e, 0xfa, - 0xf1, 0x92, 0x11, 0x6e, 0xb0, 0x88, 0xc6, 0x14, 0x35, 0xd3, 0xae, 0xa1, 0xba, 0x9d, 0x4e, 0x36, - 0xef, 0x45, 0x4b, 0x16, 0xd3, 0xfe, 0x1b, 0xb2, 0x54, 0xd3, 0x85, 0x9e, 0x60, 0x14, 0x49, 0x9d, - 0x96, 0x4f, 0x7d, 0x2a, 0x2e, 0xfb, 0xc9, 0x95, 0xac, 0xf6, 0x86, 0xb0, 0x8f, 0xc9, 0x25, 0x8d, - 0xc9, 0x28, 0xf0, 0x43, 0x12, 0x99, 0x51, 0x44, 0x23, 0x84, 0xa0, 0xe2, 0xd1, 0x19, 0x69, 0xeb, - 0x87, 0xfa, 0x51, 0x15, 0x8b, 0x6b, 0x74, 0x08, 0x8d, 0x19, 0xe1, 0x5e, 0x14, 0xb0, 0x38, 0xa0, - 0x61, 0x7b, 0xe3, 0x50, 0x3f, 0xba, 0x87, 0x8b, 0xa5, 0xde, 0x63, 0xd8, 0x71, 0xe6, 0xd3, 0x53, - 0xb2, 0xc4, 0xe4, 0xa7, 0x39, 0xe1, 0x31, 0x7a, 0x00, 0x5b, 0xde, 0xeb, 0x49, 0x10, 0xba, 0xc1, - 0x4c, 0xa0, 0xee, 0xe1, 0xba, 0x38, 0x0f, 0x67, 0xbd, 0x5f, 0x74, 0xd8, 0x4d, 0x87, 0x39, 0xa3, - 0x21, 0x27, 0xe8, 0x29, 0xd4, 0xd9, 0x7c, 0xea, 0xbe, 0x21, 0x4b, 0x31, 0xdc, 0x78, 0xd2, 0x31, - 0x32, 0xef, 0xd2, 0xa9, 0xe1, 0xcc, 0xa7, 0x17, 0x81, 0x77, 0x4a, 0x96, 0xc7, 0x95, 0xb7, 0x7f, - 0x3d, 0xd2, 0x70, 0x8d, 0x09, 0x04, 0x7a, 0x0a, 0x55, 0x92, 0x08, 0x17, 0xaa, 0x1a, 0x4f, 0x3e, - 0x33, 0xca, 0x37, 0xcd, 0xb8, 0xe1, 0x11, 0xcb, 0x5f, 0xf4, 0xce, 0x60, 0x2f, 0xa9, 0x9e, 0xd1, - 0x98, 0xa4, 0xb2, 0x8f, 0xa0, 0xb2, 0xa0, 0x31, 0x51, 0x2a, 0x5a, 0x39, 0x4c, 0xde, 0x4d, 0x31, - 0x2a, 0x26, 0x56, 0x0c, 0x6e, 0xac, 0x1a, 0xfc, 0x19, 0x90, 0xd8, 0x36, 0x93, 0x64, 0xe5, 0xd1, - 0xf8, 0x7f, 0xb4, 0xb2, 0x26, 0x17, 0xdc, 0xc1, 0xd8, 0x39, 0x1c, 0x24, 0x55, 0x27, 0xa2, 0x8c, - 0xf2, 0xc9, 0x45, 0x6a, 0xee, 0x6b, 0xd8, 0x62, 0xaa, 0xa4, 0x54, 0xb4, 0xcb, 0x2a, 0xb2, 0x9f, - 0x64, 0x93, 0xef, 0x33, 0xfa, 0xab, 0x0e, 0xf7, 0xa5, 0xd3, 0x7c, 0x95, 0x72, 0xfb, 0xcd, 0x87, - 0xef, 0x52, 0xae, 0xf3, 0x8d, 0x77, 0x70, 0xfe, 0x25, 0xec, 0x9d, 0xe1, 0xef, 0x9c, 0x88, 0xd2, - 0xf3, 0xd4, 0x75, 0x1b, 0xea, 0x97, 0x84, 0xf3, 0x89, 0x2f, 0x6f, 0xfd, 0x36, 0x4e, 0x8f, 0x3d, - 0x0f, 0x9a, 0xf9, 0xb0, 0xd2, 0xdd, 0x82, 0x2a, 0x4b, 0x0a, 0x6a, 0x56, 0x1e, 0xee, 0xa2, 0x68, - 0x07, 0x1a, 0x4e, 0x10, 0xfa, 0x4a, 0x4d, 0x6f, 0x17, 0xb6, 0xe5, 0x51, 0xee, 0xeb, 0xfd, 0x51, - 0x83, 0xfa, 0x73, 0xa9, 0x07, 0x0d, 0x61, 0x4f, 0xa5, 0xc0, 0x8d, 0xe4, 0xb8, 0xba, 0x75, 0x8f, - 0x6e, 0xee, 0x5b, 0x49, 0xdb, 0x40, 0xc3, 0x3b, 0x6c, 0x25, 0x7e, 0xdf, 0x43, 0x33, 0x47, 0xc9, - 0x55, 0x4a, 0xfb, 0xe1, 0xed, 0x2c, 0x39, 0x37, 0xd0, 0xf0, 0x2e, 0x5b, 0x8d, 0xa7, 0x0d, 0xfb, - 0x3c, 0xf0, 0x43, 0x37, 0x79, 0x2f, 0x33, 0x69, 0x9b, 0x02, 0xf7, 0xe9, 0x4d, 0x5c, 0x29, 0x53, - 0x03, 0x0d, 0xef, 0xf1, 0x52, 0xcc, 0x5e, 0x41, 0x8b, 0x8b, 0xf7, 0x26, 0x45, 0x2a, 0x89, 0x15, - 0xc1, 0xfc, 0x7c, 0x3d, 0x73, 0x35, 0x4f, 0x03, 0x0d, 0x23, 0x7e, 0x33, 0x65, 0x3f, 0xc2, 0x47, - 0x42, 0x6a, 0xfa, 0x32, 0x65, 0x72, 0xab, 0x02, 0xfd, 0xc5, 0x7a, 0x74, 0x29, 0x29, 0x03, 0x0d, - 0x1f, 0xf0, 0x35, 0x01, 0x9a, 0x41, 0x5b, 0xc9, 0x2e, 0xe0, 0x95, 0xf4, 0x9a, 0xe0, 0x1f, 0xdd, - 0x26, 0xbd, 0x1c, 0x90, 0x81, 0x86, 0xef, 0xf3, 0xf5, 0xd1, 0x39, 0x86, 0x6d, 0x16, 0x84, 0x7e, - 0xa6, 0xbc, 0x2e, 0xc8, 0x0f, 0xd7, 0x3c, 0xb7, 0xfc, 0xbd, 0x1a, 0x68, 0xb8, 0xc1, 0xf2, 0x23, - 0x32, 0x61, 0x47, 0x31, 0x94, 0xbc, 0x2d, 0x01, 0xe9, 0xde, 0x06, 0xc9, 0x44, 0x6d, 0xb3, 0xc2, - 0x19, 0x39, 0xb0, 0xbf, 0x88, 0xce, 0x5d, 0x11, 0x82, 0x4c, 0xcf, 0x3f, 0xf5, 0xdb, 0x9e, 0x7c, - 0x29, 0x7a, 0xc9, 0x93, 0x5f, 0x44, 0xe7, 0x2b, 0x69, 0x1c, 0x01, 0x2a, 0x12, 0x95, 0xba, 0x7f, - 0x25, 0xb2, 0xf7, 0x3e, 0x64, 0x26, 0xb1, 0x99, 0x33, 0x65, 0xed, 0xb8, 0x0a, 0x9b, 0x7c, 0x7e, - 0xf9, 0xf8, 0x77, 0x1d, 0x6a, 0x22, 0x7b, 0x1c, 0x21, 0xd8, 0x35, 0x31, 0xb6, 0xf1, 0xc8, 0x7d, - 0x61, 0x9d, 0x5a, 0xf6, 0x4b, 0xab, 0xa9, 0xa1, 0x2e, 0x74, 0xb2, 0x9a, 0xf9, 0xca, 0x31, 0x4f, - 0xc6, 0xe6, 0x33, 0x17, 0x9b, 0x23, 0xc7, 0xb6, 0x46, 0x66, 0x53, 0x47, 0x6d, 0x68, 0xa9, 0xbe, - 0x65, 0xbb, 0x27, 0xb6, 0x65, 0x99, 0x27, 0xe3, 0xa1, 0x6d, 0x35, 0x37, 0xd0, 0x43, 0x78, 0xa0, - 0x3a, 0x79, 0xd9, 0x1d, 0x0f, 0x9f, 0x9b, 0xf6, 0x8b, 0x71, 0x73, 0x13, 0x7d, 0x0c, 0x07, 0xaa, - 0x8d, 0xcd, 0x6f, 0x9f, 0x65, 0x8d, 0x4a, 0x81, 0xf8, 0x12, 0x0f, 0xc7, 0x66, 0xd6, 0xa9, 0x1e, - 0x0f, 0xdf, 0x5e, 0x75, 0xf5, 0x77, 0x57, 0x5d, 0xfd, 0xef, 0xab, 0xae, 0xfe, 0xdb, 0x75, 0x57, - 0x7b, 0x77, 0xdd, 0xd5, 0xfe, 0xbc, 0xee, 0x6a, 0x3f, 0xf4, 0xfd, 0x20, 0x7e, 0x3d, 0x9f, 0x1a, - 0x1e, 0xbd, 0xec, 0x5f, 0x04, 0x21, 0xe9, 0x17, 0x3e, 0x11, 0x92, 0xff, 0xef, 0xf2, 0x17, 0xc3, - 0xb4, 0x26, 0xea, 0x5f, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x45, 0xc7, 0x81, 0xcc, 0x4c, 0x08, - 0x00, 0x00, -} - -func (m *RemoteSignerError) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + i-- + dAtA[i] = 0x2a } - return dAtA[:n], nil + return len(dAtA) - i, nil } - -func (m *RemoteSignerError) MarshalTo(dAtA []byte) (int, error) { +func (m *Message_SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RemoteSignerError) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Message_SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Code)) + if m.SignedProposalResponse != nil { + { + size, err := m.SignedProposalResponse.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x32 } return len(dAtA) - i, nil } - -func (m *PubKeyRequest) 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 *PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *Message_PingRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Message_PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) + if m.PingRequest != nil { + { + size, err := m.PingRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0xa + dAtA[i] = 0x3a } return len(dAtA) - i, nil } - -func (m *PubKeyResponse) 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 *PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *Message_PingResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Message_PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { + if m.PingResponse != nil { { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.PingResponse.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -955,51 +627,20 @@ func (m *PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - { - size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + dAtA[i] = 0x42 } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } - -func (m *SignVoteRequest) 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 *SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *Message_VrfProofRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Message_VrfProofRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if m.Vote != nil { + if m.VrfProofRequest != nil { { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.VrfProofRequest.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1007,34 +648,22 @@ func (m *SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xc2 } return len(dAtA) - i, nil } - -func (m *SignedVoteResponse) 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 *SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *Message_VrfProofResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Message_VrfProofResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { + if m.VrfProofResponse != nil { { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.VrfProofResponse.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1042,1553 +671,191 @@ func (m *SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xca } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } - -func (m *SignProposalRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *VRFProofRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + l = len(m.Message) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil + return n } -func (m *SignedProposalResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *VRFProofResponse) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + l = len(m.Proof) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovTypes(uint64(l)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *VRFProofRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Message) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *VRFProofRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VRFProofRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0xa + if m.Sum != nil { + n += m.Sum.Size() } - return len(dAtA) - i, nil + return n } -func (m *VRFProofResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Message_PubKeyRequest) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *VRFProofResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VRFProofResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if m.Error != nil { - { - size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Proof))) - i-- - dAtA[i] = 0xa + if m.PubKeyRequest != nil { + l = m.PubKeyRequest.Size() + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil + return n } - -func (m *PingRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Message_PubKeyResponse) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - return len(dAtA) - i, nil -} - -func (m *PingResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.PubKeyResponse != nil { + l = m.PubKeyResponse.Size() + n += 1 + l + sovTypes(uint64(l)) } - return dAtA[:n], nil -} - -func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return n } - -func (m *PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Message_SignVoteRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - return len(dAtA) - i, nil + if m.SignVoteRequest != nil { + l = m.SignVoteRequest.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n } - -func (m *Message) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Message_SignedVoteResponse) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *Message) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Message_PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PubKeyRequest != nil { - { - size, err := m.PubKeyRequest.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 *Message_PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PubKeyResponse != nil { - { - size, err := m.PubKeyResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Message_SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SignVoteRequest != nil { - { - size, err := m.SignVoteRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Message_SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) if m.SignedVoteResponse != nil { - { - size, err := m.SignedVoteResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Message_SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SignProposalRequest != nil { - { - size, err := m.SignProposalRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Message_SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SignedProposalResponse != nil { - { - size, err := m.SignedProposalResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 + l = m.SignedVoteResponse.Size() + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil -} -func (m *Message_PingRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return n } - -func (m *Message_PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PingRequest != nil { - { - size, err := m.PingRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a +func (m *Message_SignProposalRequest) Size() (n int) { + if m == nil { + return 0 } - return len(dAtA) - i, nil -} -func (m *Message_PingResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PingResponse != nil { - { - size, err := m.PingResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 + var l int + _ = l + if m.SignProposalRequest != nil { + l = m.SignProposalRequest.Size() + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil -} -func (m *Message_VrfProofRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return n } - -func (m *Message_VrfProofRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.VrfProofRequest != nil { - { - size, err := m.VrfProofRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 +func (m *Message_SignedProposalResponse) Size() (n int) { + if m == nil { + return 0 } - return len(dAtA) - i, nil -} -func (m *Message_VrfProofResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_VrfProofResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.VrfProofResponse != nil { - { - size, err := m.VrfProofResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xca + var l int + _ = l + if m.SignedProposalResponse != nil { + l = m.SignedProposalResponse.Size() + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil -} -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RemoteSignerError) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTypes(uint64(m.Code)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *PubKeyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *PubKeyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PubKey.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *SignVoteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *SignedVoteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Vote.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *SignProposalRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *SignedProposalResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Proposal.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *VRFProofRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *VRFProofResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Proof) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *PingRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *PingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *Message) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *Message_PubKeyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PubKeyRequest != nil { - l = m.PubKeyRequest.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_PubKeyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PubKeyResponse != nil { - l = m.PubKeyResponse.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_SignVoteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignVoteRequest != nil { - l = m.SignVoteRequest.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_SignedVoteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignedVoteResponse != nil { - l = m.SignedVoteResponse.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_SignProposalRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignProposalRequest != nil { - l = m.SignProposalRequest.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_SignedProposalResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignedProposalResponse != nil { - l = m.SignedProposalResponse.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n + return n } func (m *Message_PingRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PingRequest != nil { - l = m.PingRequest.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_PingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PingResponse != nil { - l = m.PingResponse.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_VrfProofRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VrfProofRequest != nil { - l = m.VrfProofRequest.Size() - n += 2 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_VrfProofResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VrfProofResponse != nil { - l = m.VrfProofResponse.Size() - n += 2 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RemoteSignerError) 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: RemoteSignerError: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemoteSignerError: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = 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 *PubKeyRequest) 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: PubKeyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = 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 *PubKeyResponse) 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: PubKeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error == nil { - m.Error = &RemoteSignerError{} - } - if err := m.Error.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 *SignVoteRequest) 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: SignVoteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", 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.Vote == nil { - m.Vote = &types.Vote{} - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = 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 *SignedVoteResponse) 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: SignedVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error == nil { - m.Error = &RemoteSignerError{} - } - if err := m.Error.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 *SignProposalRequest) 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: SignProposalRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", 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.Proposal == nil { - m.Proposal = &types.Proposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", 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.ChainId = 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 m == nil { + return 0 } - - if iNdEx > l { - return io.ErrUnexpectedEOF + var l int + _ = l + if m.PingRequest != nil { + l = m.PingRequest.Size() + n += 1 + l + sovTypes(uint64(l)) } - return nil + return n } -func (m *SignedProposalResponse) 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: SignedProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignedProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error == nil { - m.Error = &RemoteSignerError{} - } - if err := m.Error.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 - } +func (m *Message_PingResponse) Size() (n int) { + if m == nil { + return 0 } - - if iNdEx > l { - return io.ErrUnexpectedEOF + var l int + _ = l + if m.PingResponse != nil { + l = m.PingResponse.Size() + n += 1 + l + sovTypes(uint64(l)) } - return nil + return n +} +func (m *Message_VrfProofRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VrfProofRequest != nil { + l = m.VrfProofRequest.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Message_VrfProofResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VrfProofResponse != nil { + l = m.VrfProofResponse.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *VRFProofRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -2767,7 +1034,7 @@ func (m *VRFProofResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Error == nil { - m.Error = &RemoteSignerError{} + m.Error = &privval.RemoteSignerError{} } if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2794,106 +1061,6 @@ func (m *VRFProofResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PingRequest) 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: PingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PingRequest: 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 *PingResponse) 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: PingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PingResponse: 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 *Message) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2952,7 +1119,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &PubKeyRequest{} + v := &privval.PubKeyRequest{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2987,7 +1154,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &PubKeyResponse{} + v := &privval.PubKeyResponse{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3022,7 +1189,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &SignVoteRequest{} + v := &privval.SignVoteRequest{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3057,7 +1224,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &SignedVoteResponse{} + v := &privval.SignedVoteResponse{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3092,7 +1259,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &SignProposalRequest{} + v := &privval.SignProposalRequest{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3127,7 +1294,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &SignedProposalResponse{} + v := &privval.SignedProposalResponse{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3162,7 +1329,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &PingRequest{} + v := &privval.PingRequest{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3197,7 +1364,7 @@ func (m *Message) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &PingResponse{} + v := &privval.PingResponse{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/proto/ostracon/privval/types.proto b/proto/ostracon/privval/types.proto index 1fbe380f0..2613df611 100644 --- a/proto/ostracon/privval/types.proto +++ b/proto/ostracon/privval/types.proto @@ -1,61 +1,13 @@ syntax = "proto3"; package ostracon.privval; -import "ostracon/crypto/keys.proto"; -import "ostracon/types/types.proto"; +import "tendermint/crypto/keys.proto"; import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/privval/types.proto"; option go_package = "github.com/line/ostracon/proto/ostracon/privval"; -enum Errors { - ERRORS_UNKNOWN = 0; - ERRORS_UNEXPECTED_RESPONSE = 1; - ERRORS_NO_CONNECTION = 2; - ERRORS_CONNECTION_TIMEOUT = 3; - ERRORS_READ_TIMEOUT = 4; - ERRORS_WRITE_TIMEOUT = 5; -} - -message RemoteSignerError { - int32 code = 1; - string description = 2; -} - -// PubKeyRequest requests the consensus public key from the remote signer. -message PubKeyRequest { - string chain_id = 1; -} - -// PubKeyResponse is a response message containing the public key. -message PubKeyResponse { - ostracon.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; -} - -// SignVoteRequest is a request to sign a vote -message SignVoteRequest { - ostracon.types.Vote vote = 1; - string chain_id = 2; -} - -// SignedVoteResponse is a response containing a signed vote or an error -message SignedVoteResponse { - ostracon.types.Vote vote = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; -} - -// SignProposalRequest is a request to sign a proposal -message SignProposalRequest { - ostracon.types.Proposal proposal = 1; - string chain_id = 2; -} - -// SignedProposalResponse is response containing a signed proposal or an error -message SignedProposalResponse { - ostracon.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; -} - // VRFProofRequest is a PrivValidatorSocket message containing a message to generate proof. message VRFProofRequest { bytes message = 1; @@ -63,27 +15,21 @@ message VRFProofRequest { // VRFProofResponse is a PrivValidatorSocket message containing a Proof. message VRFProofResponse { - bytes proof = 1; - RemoteSignerError error = 2; + bytes proof = 1; + tendermint.privval.RemoteSignerError error = 2; } -// PingRequest is a request to confirm that the connection is alive. -message PingRequest {} - -// PingResponse is a response to confirm that the connection is alive. -message PingResponse {} - message Message { oneof sum { - PubKeyRequest pub_key_request = 1; - PubKeyResponse pub_key_response = 2; - SignVoteRequest sign_vote_request = 3; - SignedVoteResponse signed_vote_response = 4; - SignProposalRequest sign_proposal_request = 5; - SignedProposalResponse signed_proposal_response = 6; - PingRequest ping_request = 7; - PingResponse ping_response = 8; - VRFProofRequest vrf_proof_request = 1000; - VRFProofResponse vrf_proof_response = 1001; + tendermint.privval.PubKeyRequest pub_key_request = 1; + tendermint.privval.PubKeyResponse pub_key_response = 2; + tendermint.privval.SignVoteRequest sign_vote_request = 3; + tendermint.privval.SignedVoteResponse signed_vote_response = 4; + tendermint.privval.SignProposalRequest sign_proposal_request = 5; + tendermint.privval.SignedProposalResponse signed_proposal_response = 6; + tendermint.privval.PingRequest ping_request = 7; + tendermint.privval.PingResponse ping_response = 8; + VRFProofRequest vrf_proof_request = 1000; + VRFProofResponse vrf_proof_response = 1001; } } diff --git a/proto/ostracon/rpc/grpc/types.proto b/proto/ostracon/rpc/grpc/types.proto index 0b39c9ec1..705bfa9bb 100644 --- a/proto/ostracon/rpc/grpc/types.proto +++ b/proto/ostracon/rpc/grpc/types.proto @@ -3,6 +3,7 @@ package ostracon.rpc.grpc; option go_package = "github.com/line/ostracon/rpc/grpc;coregrpc"; import "ostracon/abci/types.proto"; +import "tendermint/abci/types.proto"; //---------------------------------------- // Request types @@ -19,8 +20,8 @@ message RequestBroadcastTx { message ResponsePing {} message ResponseBroadcastTx { - ostracon.abci.ResponseCheckTx check_tx = 1; - ostracon.abci.ResponseDeliverTx deliver_tx = 2; + ostracon.abci.ResponseCheckTx check_tx = 1; + tendermint.abci.ResponseDeliverTx deliver_tx = 2; } //---------------------------------------- diff --git a/proto/ostracon/state/types.pb.go b/proto/ostracon/state/types.pb.go index 1ccdd4765..def5b4f77 100644 --- a/proto/ostracon/state/types.pb.go +++ b/proto/ostracon/state/types.pb.go @@ -9,9 +9,12 @@ import ( proto "github.com/gogo/protobuf/proto" _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/line/ostracon/abci/types" - types1 "github.com/line/ostracon/proto/ostracon/types" - version "github.com/line/ostracon/proto/ostracon/version" + _ "github.com/line/ostracon/abci/types" + _ "github.com/line/ostracon/proto/ostracon/types" + types "github.com/tendermint/tendermint/abci/types" + state "github.com/tendermint/tendermint/proto/tendermint/state" + types1 "github.com/tendermint/tendermint/proto/tendermint/types" + _ "github.com/tendermint/tendermint/proto/tendermint/version" io "io" math "math" math_bits "math/bits" @@ -93,166 +96,8 @@ func (m *ABCIResponses) GetBeginBlock() *types.ResponseBeginBlock { return nil } -// ValidatorsInfo represents the latest validator set, or the last height it changed -type ValidatorsInfo struct { - ValidatorSet *types1.ValidatorSet `protobuf:"bytes,1,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` - LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` -} - -func (m *ValidatorsInfo) Reset() { *m = ValidatorsInfo{} } -func (m *ValidatorsInfo) String() string { return proto.CompactTextString(m) } -func (*ValidatorsInfo) ProtoMessage() {} -func (*ValidatorsInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_898987a4421067cd, []int{1} -} -func (m *ValidatorsInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorsInfo.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 *ValidatorsInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorsInfo.Merge(m, src) -} -func (m *ValidatorsInfo) XXX_Size() int { - return m.Size() -} -func (m *ValidatorsInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorsInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorsInfo proto.InternalMessageInfo - -func (m *ValidatorsInfo) GetValidatorSet() *types1.ValidatorSet { - if m != nil { - return m.ValidatorSet - } - return nil -} - -func (m *ValidatorsInfo) GetLastHeightChanged() int64 { - if m != nil { - return m.LastHeightChanged - } - return 0 -} - -// ConsensusParamsInfo represents the latest consensus params, or the last height it changed -type ConsensusParamsInfo struct { - ConsensusParams types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` - LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"` -} - -func (m *ConsensusParamsInfo) Reset() { *m = ConsensusParamsInfo{} } -func (m *ConsensusParamsInfo) String() string { return proto.CompactTextString(m) } -func (*ConsensusParamsInfo) ProtoMessage() {} -func (*ConsensusParamsInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_898987a4421067cd, []int{2} -} -func (m *ConsensusParamsInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusParamsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusParamsInfo.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 *ConsensusParamsInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusParamsInfo.Merge(m, src) -} -func (m *ConsensusParamsInfo) XXX_Size() int { - return m.Size() -} -func (m *ConsensusParamsInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusParamsInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusParamsInfo proto.InternalMessageInfo - -func (m *ConsensusParamsInfo) GetConsensusParams() types1.ConsensusParams { - if m != nil { - return m.ConsensusParams - } - return types1.ConsensusParams{} -} - -func (m *ConsensusParamsInfo) GetLastHeightChanged() int64 { - if m != nil { - return m.LastHeightChanged - } - return 0 -} - -type Version struct { - Consensus version.Consensus `protobuf:"bytes,1,opt,name=consensus,proto3" json:"consensus"` - Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"` -} - -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { - return fileDescriptor_898987a4421067cd, []int{3} -} -func (m *Version) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Version.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 *Version) XXX_Merge(src proto.Message) { - xxx_messageInfo_Version.Merge(m, src) -} -func (m *Version) XXX_Size() int { - return m.Size() -} -func (m *Version) XXX_DiscardUnknown() { - xxx_messageInfo_Version.DiscardUnknown(m) -} - -var xxx_messageInfo_Version proto.InternalMessageInfo - -func (m *Version) GetConsensus() version.Consensus { - if m != nil { - return m.Consensus - } - return version.Consensus{} -} - -func (m *Version) GetSoftware() string { - if m != nil { - return m.Software - } - return "" -} - type State struct { - Version Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` + Version state.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` // immutable ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` InitialHeight int64 `protobuf:"varint,14,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` @@ -286,7 +131,7 @@ func (m *State) Reset() { *m = State{} } func (m *State) String() string { return proto.CompactTextString(m) } func (*State) ProtoMessage() {} func (*State) Descriptor() ([]byte, []int) { - return fileDescriptor_898987a4421067cd, []int{4} + return fileDescriptor_898987a4421067cd, []int{1} } func (m *State) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -315,11 +160,11 @@ func (m *State) XXX_DiscardUnknown() { var xxx_messageInfo_State proto.InternalMessageInfo -func (m *State) GetVersion() Version { +func (m *State) GetVersion() state.Version { if m != nil { return m.Version } - return Version{} + return state.Version{} } func (m *State) GetChainID() string { @@ -422,65 +267,57 @@ func (m *State) GetLastProofHash() []byte { func init() { proto.RegisterType((*ABCIResponses)(nil), "ostracon.state.ABCIResponses") - proto.RegisterType((*ValidatorsInfo)(nil), "ostracon.state.ValidatorsInfo") - proto.RegisterType((*ConsensusParamsInfo)(nil), "ostracon.state.ConsensusParamsInfo") - proto.RegisterType((*Version)(nil), "ostracon.state.Version") proto.RegisterType((*State)(nil), "ostracon.state.State") } func init() { proto.RegisterFile("ostracon/state/types.proto", fileDescriptor_898987a4421067cd) } var fileDescriptor_898987a4421067cd = []byte{ - // 783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6a, 0xf3, 0x46, - 0x14, 0xb5, 0xea, 0x2f, 0xb1, 0x3d, 0x8a, 0xed, 0x76, 0x52, 0xa8, 0xe2, 0x04, 0xd9, 0x35, 0xfd, - 0x09, 0x85, 0xca, 0x90, 0x2e, 0xba, 0x09, 0x94, 0xc8, 0x0e, 0x8d, 0x21, 0x14, 0xa3, 0x84, 0x2c, - 0xba, 0x11, 0x63, 0x69, 0x2c, 0x89, 0xca, 0x1a, 0xa1, 0x19, 0xbb, 0xe9, 0xba, 0x2f, 0x90, 0x5d, - 0x5f, 0x29, 0xcb, 0x2c, 0xba, 0xe8, 0x2a, 0x2d, 0xce, 0xa6, 0x4f, 0x51, 0xca, 0xfc, 0xe8, 0xc7, - 0xa6, 0x81, 0x94, 0x6f, 0x27, 0xdd, 0x73, 0xee, 0xd1, 0x99, 0x3b, 0xe7, 0x22, 0xd0, 0x23, 0x94, - 0x65, 0xc8, 0x23, 0xc9, 0x88, 0x32, 0xc4, 0xf0, 0x88, 0xfd, 0x92, 0x62, 0x6a, 0xa5, 0x19, 0x61, - 0x04, 0x76, 0x72, 0xcc, 0x12, 0x58, 0xef, 0xe3, 0x80, 0x04, 0x44, 0x40, 0x23, 0xfe, 0x24, 0x59, - 0xbd, 0xa3, 0x42, 0x01, 0xcd, 0xbd, 0xa8, 0x2a, 0xd0, 0x2b, 0xc5, 0x45, 0x75, 0x0b, 0x33, 0x77, - 0xb0, 0x35, 0x8a, 0x23, 0x1f, 0x31, 0x92, 0x29, 0xfc, 0x78, 0x07, 0x4f, 0x51, 0x86, 0x96, 0x79, - 0xf3, 0x49, 0x01, 0xae, 0x71, 0x46, 0xa3, 0x9c, 0xa4, 0xd0, 0x7e, 0x40, 0x48, 0x10, 0xe3, 0x91, - 0x78, 0x9b, 0xaf, 0x16, 0x23, 0x16, 0x2d, 0x31, 0x65, 0x68, 0x99, 0x4a, 0xc2, 0xf0, 0x77, 0x0d, - 0xb4, 0x2f, 0xec, 0xf1, 0xd4, 0xc1, 0x34, 0x25, 0x09, 0xc5, 0x14, 0x5e, 0x00, 0xdd, 0xc7, 0x71, - 0xb4, 0xc6, 0x99, 0xcb, 0xee, 0xa9, 0xa1, 0x0d, 0xea, 0xa7, 0xfa, 0xd9, 0xc0, 0x2a, 0x06, 0xc0, - 0x8f, 0x66, 0xe5, 0xf4, 0x89, 0x64, 0xde, 0xde, 0x3b, 0xc0, 0xcf, 0x1f, 0x29, 0x3c, 0x07, 0x2d, - 0x9c, 0xf8, 0xee, 0x3c, 0x26, 0xde, 0x4f, 0xc6, 0x07, 0x03, 0xed, 0x54, 0x3f, 0xeb, 0xbf, 0x22, - 0x70, 0x99, 0xf8, 0x36, 0xa7, 0x39, 0x4d, 0xac, 0x9e, 0xa0, 0x0d, 0xf4, 0x39, 0x0e, 0xa2, 0x44, - 0xf5, 0xd7, 0x45, 0xff, 0xa7, 0xaf, 0xf4, 0xdb, 0x9c, 0x29, 0x15, 0xc0, 0xbc, 0x78, 0x1e, 0xfe, - 0xaa, 0x81, 0xce, 0x5d, 0x3e, 0x46, 0x3a, 0x4d, 0x16, 0x04, 0x5e, 0x80, 0x76, 0x31, 0x58, 0x97, - 0x62, 0x66, 0x68, 0x42, 0xf8, 0xa4, 0x14, 0x96, 0x83, 0x2b, 0xda, 0x6e, 0x30, 0x73, 0x0e, 0xd6, - 0x95, 0x37, 0x68, 0x81, 0xc3, 0x18, 0x51, 0xe6, 0x86, 0x38, 0x0a, 0x42, 0xe6, 0x7a, 0x21, 0x4a, - 0x02, 0xec, 0x8b, 0x13, 0xd6, 0x9d, 0x8f, 0x38, 0x74, 0x25, 0x90, 0xb1, 0x04, 0x86, 0xbf, 0x69, - 0xe0, 0x70, 0xcc, 0x5d, 0x26, 0x74, 0x45, 0x67, 0xe2, 0xd6, 0x84, 0x95, 0x19, 0xf8, 0xd0, 0xcb, - 0xcb, 0xae, 0xbc, 0x4d, 0xe5, 0xa6, 0xbf, 0xeb, 0x66, 0xa7, 0xdd, 0x7e, 0xf7, 0xf8, 0xdc, 0xaf, - 0x39, 0x5d, 0x6f, 0xbb, 0xfc, 0xbf, 0x9d, 0x2d, 0x40, 0xe3, 0x4e, 0xc6, 0x05, 0x7e, 0x07, 0x5a, - 0x85, 0x9a, 0x72, 0x71, 0x5c, 0xba, 0x50, 0xa1, 0x2a, 0x7d, 0x28, 0x07, 0x65, 0x0f, 0xec, 0x81, - 0x26, 0x25, 0x0b, 0xf6, 0x33, 0xca, 0xb0, 0xf8, 0x60, 0xcb, 0x29, 0xde, 0x87, 0xff, 0xec, 0x83, - 0xbd, 0x1b, 0xbe, 0x31, 0xf0, 0x5b, 0xd0, 0x50, 0x5a, 0xea, 0x23, 0x9f, 0x58, 0xdb, 0x3b, 0x65, - 0x29, 0x43, 0xea, 0x03, 0x39, 0x1b, 0x7e, 0x01, 0x9a, 0x5e, 0x88, 0xa2, 0xc4, 0x8d, 0xe4, 0x79, - 0x5a, 0xb6, 0xbe, 0x79, 0xee, 0x37, 0xc6, 0xbc, 0x36, 0x9d, 0x38, 0x0d, 0x01, 0x4e, 0x7d, 0xf8, - 0x39, 0xe8, 0x44, 0x49, 0xc4, 0x22, 0x14, 0xab, 0x29, 0x18, 0x1d, 0x71, 0xfa, 0xb6, 0xaa, 0xca, - 0x01, 0xc0, 0xaf, 0x80, 0x18, 0x87, 0x0c, 0x57, 0xce, 0xac, 0x0b, 0x66, 0x97, 0x03, 0x22, 0x3f, - 0x8a, 0x3b, 0x03, 0xed, 0x0a, 0x37, 0xf2, 0x8d, 0x77, 0xbb, 0xce, 0xe5, 0x25, 0x89, 0x9e, 0xe9, - 0xc4, 0x3e, 0xe4, 0xce, 0x37, 0xcf, 0x7d, 0xfd, 0x3a, 0x17, 0x9a, 0x4e, 0x1c, 0xbd, 0x50, 0x9d, - 0xfa, 0xf0, 0x1a, 0x74, 0x2b, 0x8a, 0x7c, 0x19, 0x8d, 0x3d, 0xa1, 0xd9, 0xb3, 0xe4, 0xa6, 0x5a, - 0xf9, 0xa6, 0x5a, 0xb7, 0xf9, 0xa6, 0xda, 0x4d, 0x2e, 0xfb, 0xf0, 0x67, 0x5f, 0x73, 0xda, 0x85, - 0x16, 0x47, 0xe1, 0x25, 0xe8, 0x26, 0xf8, 0x9e, 0xb9, 0x45, 0x48, 0xa9, 0xb1, 0xff, 0x86, 0x50, - 0x77, 0x78, 0x53, 0xb9, 0x1d, 0xf0, 0x1c, 0x80, 0x8a, 0x42, 0xe3, 0x0d, 0x0a, 0x15, 0x3e, 0x37, - 0x21, 0x8e, 0x54, 0x91, 0x68, 0xbe, 0xc5, 0x04, 0x6f, 0xaa, 0x98, 0x18, 0x03, 0xb3, 0x9a, 0xe0, - 0x52, 0xad, 0x08, 0x73, 0x4b, 0x5c, 0xd2, 0x71, 0x19, 0xe6, 0xb2, 0x5b, 0xc5, 0xfa, 0x3f, 0x17, - 0x0b, 0xbc, 0xd7, 0x62, 0xfd, 0x00, 0x3e, 0xdb, 0x5a, 0xac, 0x1d, 0xf5, 0xc2, 0x9c, 0x2e, 0xcc, - 0x0d, 0x2a, 0x9b, 0xb6, 0x2d, 0x94, 0x3b, 0xcc, 0xe3, 0x97, 0x61, 0xba, 0x8a, 0x19, 0x75, 0x43, - 0x44, 0x43, 0xe3, 0x60, 0xa0, 0x9d, 0x1e, 0xc8, 0xf8, 0x39, 0xb2, 0x7e, 0x85, 0x68, 0x08, 0x8f, - 0x40, 0x13, 0xa5, 0xa9, 0xa4, 0xb4, 0x05, 0xa5, 0x81, 0xd2, 0x54, 0x40, 0x5f, 0xaa, 0xa1, 0xa7, - 0x19, 0x21, 0x0b, 0xc9, 0xf8, 0xbb, 0x21, 0x28, 0x22, 0x22, 0x33, 0x5e, 0xe6, 0x44, 0xfb, 0xfb, - 0xc7, 0x8d, 0xa9, 0x3d, 0x6d, 0x4c, 0xed, 0xaf, 0x8d, 0xa9, 0x3d, 0xbc, 0x98, 0xb5, 0xa7, 0x17, - 0xb3, 0xf6, 0xc7, 0x8b, 0x59, 0xfb, 0xf1, 0xeb, 0x20, 0x62, 0xe1, 0x6a, 0x6e, 0x79, 0x64, 0x39, - 0x8a, 0xa3, 0x04, 0x8f, 0x8a, 0x1f, 0x89, 0xfc, 0xaf, 0x6d, 0xff, 0x0d, 0xe7, 0xfb, 0xa2, 0xfa, - 0xcd, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x89, 0xef, 0x00, 0x54, 0x26, 0x07, 0x00, 0x00, + // 703 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x1b, 0xba, 0xad, 0x9d, 0xb3, 0xb6, 0x10, 0x38, 0x64, 0x1d, 0xa4, 0x65, 0xfc, 0xab, + 0x90, 0x48, 0xa5, 0x71, 0xe2, 0x82, 0x44, 0x5a, 0xb4, 0x55, 0x9a, 0xd0, 0x94, 0x4d, 0x3b, 0x70, + 0x89, 0x9c, 0xc4, 0x4b, 0x2c, 0xd2, 0x38, 0x8a, 0xdd, 0x69, 0x7c, 0x05, 0x4e, 0xfb, 0x58, 0x3b, + 0xee, 0x88, 0x38, 0x0c, 0xd4, 0x5d, 0xf8, 0x18, 0xc8, 0x76, 0x9c, 0x66, 0x2b, 0x93, 0x76, 0x73, + 0xde, 0xe7, 0x79, 0x7f, 0x7a, 0x6c, 0xbf, 0x31, 0xe8, 0x12, 0xca, 0x72, 0x18, 0x90, 0x74, 0x48, + 0x19, 0x64, 0x68, 0xc8, 0xbe, 0x67, 0x88, 0xda, 0x59, 0x4e, 0x18, 0x31, 0xda, 0x4a, 0xb3, 0x85, + 0xd6, 0x7d, 0x12, 0x91, 0x88, 0x08, 0x69, 0xc8, 0x57, 0xd2, 0xd5, 0xdd, 0x2c, 0x09, 0xd0, 0x0f, + 0x70, 0x15, 0xd0, 0x5d, 0xc0, 0x45, 0xf5, 0x86, 0xd6, 0x67, 0x28, 0x0d, 0x51, 0x3e, 0xc5, 0x29, + 0x2b, 0xd4, 0x53, 0x98, 0xe0, 0x10, 0x32, 0x92, 0x17, 0x8e, 0x67, 0x4b, 0x8e, 0x0c, 0xe6, 0x70, + 0xaa, 0x00, 0x4f, 0x97, 0xe4, 0x2a, 0xde, 0xaa, 0xa8, 0xa7, 0x28, 0xa7, 0x58, 0x85, 0x28, 0xf4, + 0x5e, 0x44, 0x48, 0x94, 0xa0, 0xa1, 0xf8, 0xf2, 0x67, 0x27, 0x43, 0x86, 0xa7, 0x88, 0x32, 0x38, + 0xcd, 0xfe, 0x83, 0x5f, 0x3a, 0x9a, 0xee, 0x56, 0x45, 0xbd, 0xbd, 0xed, 0xed, 0x5f, 0x1a, 0x68, + 0x7d, 0x72, 0x46, 0x13, 0x17, 0xd1, 0x8c, 0xa4, 0x14, 0x51, 0x63, 0x04, 0xf4, 0x10, 0x25, 0xf8, + 0x14, 0xe5, 0x1e, 0x3b, 0xa3, 0xa6, 0xd6, 0xaf, 0x0f, 0xf4, 0x9d, 0x6d, 0x7b, 0x01, 0xb1, 0x39, + 0xc4, 0x56, 0x0d, 0x63, 0xe9, 0x3d, 0x3a, 0x73, 0x41, 0xa8, 0x96, 0xd4, 0xf8, 0x08, 0xd6, 0x51, + 0x1a, 0x7a, 0x7e, 0x42, 0x82, 0x6f, 0xe6, 0x83, 0xbe, 0x36, 0xd0, 0x77, 0x9e, 0xdf, 0x89, 0xf8, + 0x9c, 0x86, 0x0e, 0x37, 0xba, 0x4d, 0x54, 0xac, 0x8c, 0x31, 0xd0, 0x7d, 0x14, 0xe1, 0xb4, 0x20, + 0xd4, 0x05, 0xe1, 0xc5, 0x9d, 0x04, 0x87, 0x7b, 0x25, 0x03, 0xf8, 0xe5, 0x7a, 0xfb, 0x47, 0x03, + 0xac, 0x1e, 0xf2, 0xf3, 0x30, 0x3e, 0x80, 0x46, 0x71, 0xb2, 0xa6, 0x26, 0x58, 0x9b, 0x55, 0x96, + 0x38, 0x33, 0xfb, 0x58, 0x1a, 0x9c, 0x95, 0x8b, 0xab, 0x5e, 0xcd, 0x55, 0x7e, 0xe3, 0x35, 0x68, + 0x06, 0x31, 0xc4, 0xa9, 0x87, 0x43, 0xb1, 0x93, 0x75, 0x47, 0x9f, 0x5f, 0xf5, 0x1a, 0x23, 0x5e, + 0x9b, 0x8c, 0xdd, 0x86, 0x10, 0x27, 0xa1, 0xf1, 0x0a, 0xb4, 0x71, 0x8a, 0x19, 0x86, 0x89, 0x17, + 0x23, 0x1c, 0xc5, 0xcc, 0x6c, 0xf7, 0xb5, 0x41, 0xdd, 0x6d, 0x15, 0xd5, 0x3d, 0x51, 0x34, 0xde, + 0x82, 0x47, 0x09, 0xa4, 0x4c, 0x6e, 0x4c, 0x39, 0xeb, 0xc2, 0xd9, 0xe1, 0x82, 0x48, 0x5e, 0x78, + 0x5d, 0xd0, 0xaa, 0x78, 0x71, 0x68, 0xae, 0x2c, 0x67, 0x97, 0x97, 0x29, 0xba, 0x26, 0x63, 0xe7, + 0x31, 0xcf, 0x3e, 0xbf, 0xea, 0xe9, 0xfb, 0x0a, 0x35, 0x19, 0xbb, 0x7a, 0xc9, 0x9d, 0x84, 0xc6, + 0x3e, 0xe8, 0x54, 0x98, 0x7c, 0x92, 0xcc, 0x55, 0x41, 0xed, 0xda, 0x72, 0xcc, 0x6c, 0x35, 0x66, + 0xf6, 0x91, 0x1a, 0x33, 0xa7, 0xc9, 0xb1, 0xe7, 0xbf, 0x7b, 0x9a, 0xdb, 0x2a, 0x59, 0x5c, 0x35, + 0x76, 0x41, 0x27, 0x45, 0x67, 0xcc, 0x2b, 0xff, 0x07, 0x6a, 0xae, 0x09, 0x9a, 0xb5, 0x9c, 0xf1, + 0x58, 0x79, 0x0e, 0x11, 0x73, 0xdb, 0xbc, 0xad, 0xac, 0xf0, 0x81, 0x01, 0x15, 0x46, 0xe3, 0x5e, + 0x8c, 0x4a, 0x07, 0x0f, 0x22, 0xb6, 0x55, 0x81, 0x34, 0xef, 0x17, 0x84, 0xb7, 0x55, 0x82, 0x8c, + 0x80, 0x25, 0x40, 0xf2, 0x66, 0x2a, 0x3c, 0x2f, 0x88, 0x61, 0x1a, 0xa1, 0xd0, 0x5c, 0x17, 0x97, + 0xb5, 0xc5, 0x5d, 0xf2, 0x9e, 0x16, 0xdd, 0x23, 0x69, 0x31, 0x5c, 0xf0, 0x30, 0xe0, 0x73, 0x99, + 0xd2, 0x19, 0xf5, 0xe4, 0x4b, 0x60, 0x82, 0xe5, 0xbf, 0x40, 0xc6, 0x19, 0x29, 0xe7, 0x81, 0x30, + 0x16, 0xf3, 0xd7, 0x09, 0x6e, 0x96, 0x8d, 0x2f, 0xe0, 0x65, 0x35, 0xd8, 0x6d, 0x7e, 0x19, 0x4f, + 0x17, 0xf1, 0xfa, 0x8b, 0x78, 0xb7, 0xf8, 0x2a, 0xa3, 0x1a, 0xc4, 0x1c, 0xd1, 0x59, 0xc2, 0xa8, + 0x17, 0x43, 0x1a, 0x9b, 0x1b, 0x7d, 0x6d, 0xb0, 0x21, 0x07, 0xd1, 0x95, 0xf5, 0x3d, 0x48, 0x63, + 0x63, 0x13, 0x34, 0x61, 0x96, 0x49, 0x4b, 0x4b, 0x58, 0x1a, 0x30, 0xcb, 0x84, 0xf4, 0xa6, 0x38, + 0xf8, 0x2c, 0x27, 0xe4, 0x44, 0x3a, 0xfe, 0x36, 0x84, 0x45, 0x8c, 0xca, 0x01, 0x2f, 0x73, 0xa3, + 0xb3, 0x7b, 0x31, 0xb7, 0xb4, 0xcb, 0xb9, 0xa5, 0xfd, 0x99, 0x5b, 0xda, 0xf9, 0xb5, 0x55, 0xbb, + 0xbc, 0xb6, 0x6a, 0x3f, 0xaf, 0xad, 0xda, 0xd7, 0x77, 0x11, 0x66, 0xf1, 0xcc, 0xb7, 0x03, 0x32, + 0x1d, 0x26, 0x38, 0x45, 0xc3, 0xf2, 0x29, 0x96, 0x0f, 0xf8, 0xcd, 0x67, 0xdf, 0x5f, 0x13, 0xd5, + 0xf7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x82, 0xd1, 0xeb, 0x0f, 0x06, 0x00, 0x00, } func (m *ABCIResponses) Marshal() (dAtA []byte, err error) { @@ -544,124 +381,6 @@ func (m *ABCIResponses) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ValidatorsInfo) 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 *ValidatorsInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorsInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastHeightChanged != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightChanged)) - i-- - dAtA[i] = 0x10 - } - if m.ValidatorSet != nil { - { - size, err := m.ValidatorSet.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 *ConsensusParamsInfo) 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 *ConsensusParamsInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusParamsInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastHeightChanged != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightChanged)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.ConsensusParams.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 *Version) 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 *Version) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Version) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Software) > 0 { - i -= len(m.Software) - copy(dAtA[i:], m.Software) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Software))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Consensus.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 *State) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -766,12 +485,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 + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) + if err7 != nil { + return 0, err7 } - i -= n10 - i = encodeVarintTypes(dAtA, i, uint64(n10)) + i -= n7 + i = encodeVarintTypes(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x2a { @@ -843,51 +562,6 @@ func (m *ABCIResponses) Size() (n int) { return n } -func (m *ValidatorsInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorSet != nil { - l = m.ValidatorSet.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.LastHeightChanged != 0 { - n += 1 + sovTypes(uint64(m.LastHeightChanged)) - } - return n -} - -func (m *ConsensusParamsInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConsensusParams.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.LastHeightChanged != 0 { - n += 1 + sovTypes(uint64(m.LastHeightChanged)) - } - return n -} - -func (m *Version) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Consensus.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.Software) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - func (m *State) Size() (n int) { if m == nil { return 0 @@ -1107,328 +781,6 @@ func (m *ABCIResponses) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValidatorsInfo) 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: ValidatorsInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorsInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", 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.ValidatorSet == nil { - m.ValidatorSet = &types1.ValidatorSet{} - } - if err := m.ValidatorSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastHeightChanged", wireType) - } - m.LastHeightChanged = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastHeightChanged |= 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 *ConsensusParamsInfo) 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: ConsensusParamsInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusParamsInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastHeightChanged", wireType) - } - m.LastHeightChanged = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastHeightChanged |= 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 *Version) 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: Version: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Consensus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Consensus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Software", 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.Software = 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 *State) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/proto/ostracon/state/types.proto b/proto/ostracon/state/types.proto index 830bfa122..87436ba90 100644 --- a/proto/ostracon/state/types.proto +++ b/proto/ostracon/state/types.proto @@ -6,47 +6,33 @@ option go_package = "github.com/line/ostracon/proto/ostracon/state"; import "gogoproto/gogo.proto"; import "ostracon/abci/types.proto"; import "ostracon/types/types.proto"; -import "ostracon/types/validator.proto"; -import "ostracon/types/params.proto"; -import "ostracon/version/types.proto"; +import "tendermint/types/validator.proto"; +import "tendermint/types/params.proto"; +import "tendermint/types/types.proto"; +import "tendermint/version/types.proto"; import "google/protobuf/timestamp.proto"; +import "tendermint/state/types.proto"; +import "tendermint/abci/types.proto"; // ABCIResponses retains the responses // of the various ABCI calls during block processing. // It is persisted to disk for each height before calling Commit. message ABCIResponses { - repeated ostracon.abci.ResponseDeliverTx deliver_txs = 1; - ostracon.abci.ResponseEndBlock end_block = 2; - ostracon.abci.ResponseBeginBlock begin_block = 3; -} - -// ValidatorsInfo represents the latest validator set, or the last height it changed -message ValidatorsInfo { - ostracon.types.ValidatorSet validator_set = 1; - int64 last_height_changed = 2; -} - -// ConsensusParamsInfo represents the latest consensus params, or the last height it changed -message ConsensusParamsInfo { - ostracon.types.ConsensusParams consensus_params = 1 [(gogoproto.nullable) = false]; - int64 last_height_changed = 2; -} - -message Version { - ostracon.version.Consensus consensus = 1 [(gogoproto.nullable) = false]; - string software = 2; + repeated tendermint.abci.ResponseDeliverTx deliver_txs = 1; + tendermint.abci.ResponseEndBlock end_block = 2; + tendermint.abci.ResponseBeginBlock begin_block = 3; } message State { - Version version = 1 [(gogoproto.nullable) = false]; + tendermint.state.Version version = 1 [(gogoproto.nullable) = false]; // immutable string chain_id = 2 [(gogoproto.customname) = "ChainID"]; int64 initial_height = 14; // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - int64 last_block_height = 3; - ostracon.types.BlockID last_block_id = 4 + int64 last_block_height = 3; + tendermint.types.BlockID last_block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; google.protobuf.Timestamp last_block_time = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; @@ -57,15 +43,15 @@ message State { // Note that if s.LastBlockHeight causes a valset change, // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 // Extra +1 due to nextValSet delay. - ostracon.types.ValidatorSet next_validators = 6; - ostracon.types.ValidatorSet validators = 7; - ostracon.types.ValidatorSet last_validators = 8; - int64 last_height_validators_changed = 9; + tendermint.types.ValidatorSet next_validators = 6; + tendermint.types.ValidatorSet validators = 7; + tendermint.types.ValidatorSet last_validators = 8; + int64 last_height_validators_changed = 9; // Consensus parameters used for validating blocks. // Changes returned by EndBlock and updated after Commit. - ostracon.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false]; - int64 last_height_consensus_params_changed = 11; + tendermint.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false]; + int64 last_height_consensus_params_changed = 11; // Merkle root of the results from executing prev block bytes last_results_hash = 12; diff --git a/proto/ostracon/statesync/types.pb.go b/proto/ostracon/statesync/types.pb.go deleted file mode 100644 index db9f080ab..000000000 --- a/proto/ostracon/statesync/types.pb.go +++ /dev/null @@ -1,1628 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/statesync/types.proto - -package statesync - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Message struct { - // Types that are valid to be assigned to Sum: - // *Message_SnapshotsRequest - // *Message_SnapshotsResponse - // *Message_ChunkRequest - // *Message_ChunkResponse - Sum isMessage_Sum `protobuf_oneof:"sum"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_347327882fa4a28e, []int{0} -} -func (m *Message) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Message.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 *Message) XXX_Merge(src proto.Message) { - xxx_messageInfo_Message.Merge(m, src) -} -func (m *Message) XXX_Size() int { - return m.Size() -} -func (m *Message) XXX_DiscardUnknown() { - xxx_messageInfo_Message.DiscardUnknown(m) -} - -var xxx_messageInfo_Message proto.InternalMessageInfo - -type isMessage_Sum interface { - isMessage_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type Message_SnapshotsRequest struct { - SnapshotsRequest *SnapshotsRequest `protobuf:"bytes,1,opt,name=snapshots_request,json=snapshotsRequest,proto3,oneof" json:"snapshots_request,omitempty"` -} -type Message_SnapshotsResponse struct { - SnapshotsResponse *SnapshotsResponse `protobuf:"bytes,2,opt,name=snapshots_response,json=snapshotsResponse,proto3,oneof" json:"snapshots_response,omitempty"` -} -type Message_ChunkRequest struct { - ChunkRequest *ChunkRequest `protobuf:"bytes,3,opt,name=chunk_request,json=chunkRequest,proto3,oneof" json:"chunk_request,omitempty"` -} -type Message_ChunkResponse struct { - ChunkResponse *ChunkResponse `protobuf:"bytes,4,opt,name=chunk_response,json=chunkResponse,proto3,oneof" json:"chunk_response,omitempty"` -} - -func (*Message_SnapshotsRequest) isMessage_Sum() {} -func (*Message_SnapshotsResponse) isMessage_Sum() {} -func (*Message_ChunkRequest) isMessage_Sum() {} -func (*Message_ChunkResponse) isMessage_Sum() {} - -func (m *Message) GetSum() isMessage_Sum { - if m != nil { - return m.Sum - } - return nil -} - -func (m *Message) GetSnapshotsRequest() *SnapshotsRequest { - if x, ok := m.GetSum().(*Message_SnapshotsRequest); ok { - return x.SnapshotsRequest - } - return nil -} - -func (m *Message) GetSnapshotsResponse() *SnapshotsResponse { - if x, ok := m.GetSum().(*Message_SnapshotsResponse); ok { - return x.SnapshotsResponse - } - return nil -} - -func (m *Message) GetChunkRequest() *ChunkRequest { - if x, ok := m.GetSum().(*Message_ChunkRequest); ok { - return x.ChunkRequest - } - return nil -} - -func (m *Message) GetChunkResponse() *ChunkResponse { - if x, ok := m.GetSum().(*Message_ChunkResponse); ok { - return x.ChunkResponse - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Message) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Message_SnapshotsRequest)(nil), - (*Message_SnapshotsResponse)(nil), - (*Message_ChunkRequest)(nil), - (*Message_ChunkResponse)(nil), - } -} - -type SnapshotsRequest struct { -} - -func (m *SnapshotsRequest) Reset() { *m = SnapshotsRequest{} } -func (m *SnapshotsRequest) String() string { return proto.CompactTextString(m) } -func (*SnapshotsRequest) ProtoMessage() {} -func (*SnapshotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_347327882fa4a28e, []int{1} -} -func (m *SnapshotsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotsRequest.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 *SnapshotsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotsRequest.Merge(m, src) -} -func (m *SnapshotsRequest) XXX_Size() int { - return m.Size() -} -func (m *SnapshotsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotsRequest proto.InternalMessageInfo - -type SnapshotsResponse struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` - Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *SnapshotsResponse) Reset() { *m = SnapshotsResponse{} } -func (m *SnapshotsResponse) String() string { return proto.CompactTextString(m) } -func (*SnapshotsResponse) ProtoMessage() {} -func (*SnapshotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_347327882fa4a28e, []int{2} -} -func (m *SnapshotsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotsResponse.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 *SnapshotsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotsResponse.Merge(m, src) -} -func (m *SnapshotsResponse) XXX_Size() int { - return m.Size() -} -func (m *SnapshotsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotsResponse proto.InternalMessageInfo - -func (m *SnapshotsResponse) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *SnapshotsResponse) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -func (m *SnapshotsResponse) GetChunks() uint32 { - if m != nil { - return m.Chunks - } - return 0 -} - -func (m *SnapshotsResponse) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *SnapshotsResponse) GetMetadata() []byte { - if m != nil { - return m.Metadata - } - return nil -} - -type ChunkRequest struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` -} - -func (m *ChunkRequest) Reset() { *m = ChunkRequest{} } -func (m *ChunkRequest) String() string { return proto.CompactTextString(m) } -func (*ChunkRequest) ProtoMessage() {} -func (*ChunkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_347327882fa4a28e, []int{3} -} -func (m *ChunkRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChunkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChunkRequest.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 *ChunkRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChunkRequest.Merge(m, src) -} -func (m *ChunkRequest) XXX_Size() int { - return m.Size() -} -func (m *ChunkRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChunkRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ChunkRequest proto.InternalMessageInfo - -func (m *ChunkRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ChunkRequest) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -func (m *ChunkRequest) GetIndex() uint32 { - if m != nil { - return m.Index - } - return 0 -} - -type ChunkResponse struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` - Chunk []byte `protobuf:"bytes,4,opt,name=chunk,proto3" json:"chunk,omitempty"` - Missing bool `protobuf:"varint,5,opt,name=missing,proto3" json:"missing,omitempty"` -} - -func (m *ChunkResponse) Reset() { *m = ChunkResponse{} } -func (m *ChunkResponse) String() string { return proto.CompactTextString(m) } -func (*ChunkResponse) ProtoMessage() {} -func (*ChunkResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_347327882fa4a28e, []int{4} -} -func (m *ChunkResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChunkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChunkResponse.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 *ChunkResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChunkResponse.Merge(m, src) -} -func (m *ChunkResponse) XXX_Size() int { - return m.Size() -} -func (m *ChunkResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ChunkResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ChunkResponse proto.InternalMessageInfo - -func (m *ChunkResponse) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ChunkResponse) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -func (m *ChunkResponse) GetIndex() uint32 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *ChunkResponse) GetChunk() []byte { - if m != nil { - return m.Chunk - } - return nil -} - -func (m *ChunkResponse) GetMissing() bool { - if m != nil { - return m.Missing - } - return false -} - -func init() { - proto.RegisterType((*Message)(nil), "ostracon.statesync.Message") - proto.RegisterType((*SnapshotsRequest)(nil), "ostracon.statesync.SnapshotsRequest") - proto.RegisterType((*SnapshotsResponse)(nil), "ostracon.statesync.SnapshotsResponse") - proto.RegisterType((*ChunkRequest)(nil), "ostracon.statesync.ChunkRequest") - proto.RegisterType((*ChunkResponse)(nil), "ostracon.statesync.ChunkResponse") -} - -func init() { proto.RegisterFile("ostracon/statesync/types.proto", fileDescriptor_347327882fa4a28e) } - -var fileDescriptor_347327882fa4a28e = []byte{ - // 394 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x4d, 0x6b, 0xdb, 0x40, - 0x14, 0x94, 0xfc, 0xcd, 0xab, 0x55, 0xec, 0xa5, 0x14, 0xd1, 0x83, 0x70, 0x45, 0x0b, 0x3d, 0x49, - 0xb4, 0xfd, 0x07, 0xee, 0xa1, 0xa6, 0xa5, 0x97, 0x75, 0xe9, 0xa1, 0x97, 0xb2, 0x96, 0xb7, 0x92, - 0x68, 0xb5, 0xab, 0xea, 0xad, 0xa0, 0xfe, 0x01, 0x39, 0xe5, 0x92, 0x9f, 0x95, 0xa3, 0xc9, 0x29, - 0xc7, 0x60, 0xff, 0x91, 0xa0, 0xd5, 0x47, 0x14, 0x3b, 0x24, 0x04, 0x72, 0xd3, 0xcc, 0x7b, 0x9a, - 0x9d, 0x19, 0x78, 0xe0, 0x48, 0x54, 0x19, 0x0b, 0xa4, 0xf0, 0x51, 0x31, 0xc5, 0x71, 0x23, 0x02, - 0x5f, 0x6d, 0x52, 0x8e, 0x5e, 0x9a, 0x49, 0x25, 0x09, 0xa9, 0xe7, 0x5e, 0x33, 0x77, 0x2f, 0x3a, - 0x30, 0xfc, 0xc6, 0x11, 0x59, 0xc8, 0xc9, 0x12, 0xa6, 0x28, 0x58, 0x8a, 0x91, 0x54, 0xf8, 0x2b, - 0xe3, 0xff, 0x72, 0x8e, 0xca, 0x36, 0x67, 0xe6, 0xbb, 0x67, 0x1f, 0xde, 0x78, 0xc7, 0xff, 0x7a, - 0xcb, 0x7a, 0x99, 0x96, 0xbb, 0x0b, 0x83, 0x4e, 0xf0, 0x80, 0x23, 0x3f, 0x80, 0xb4, 0x45, 0x31, - 0x95, 0x02, 0xb9, 0xdd, 0xd1, 0xaa, 0x6f, 0x1f, 0x50, 0x2d, 0x97, 0x17, 0x06, 0x9d, 0xe2, 0x21, - 0x49, 0x3e, 0x83, 0x15, 0x44, 0xb9, 0xf8, 0xd3, 0x18, 0xed, 0x6a, 0xc9, 0xd9, 0x5d, 0x92, 0x9f, - 0x8a, 0xc5, 0x1b, 0x93, 0xe3, 0xa0, 0x85, 0xc9, 0x17, 0x78, 0x5e, 0x0b, 0x55, 0xe6, 0x7a, 0x5a, - 0xe9, 0xf5, 0x3d, 0x4a, 0x8d, 0x31, 0x2b, 0x68, 0x13, 0xf3, 0x3e, 0x74, 0x31, 0x4f, 0x5c, 0x02, - 0x93, 0xc3, 0x6e, 0xdc, 0x53, 0x13, 0xa6, 0x47, 0xd1, 0xc8, 0x4b, 0x18, 0x44, 0x3c, 0x0e, 0xa3, - 0xb2, 0xe7, 0x1e, 0xad, 0x50, 0xc1, 0xff, 0x96, 0x59, 0xc2, 0x94, 0x6e, 0xca, 0xa2, 0x15, 0x2a, - 0x78, 0xfd, 0x22, 0xea, 0xb8, 0x16, 0xad, 0x10, 0x21, 0xd0, 0x8b, 0x18, 0x46, 0xda, 0xfa, 0x98, - 0xea, 0x6f, 0xf2, 0x0a, 0x46, 0x09, 0x57, 0x6c, 0xcd, 0x14, 0xb3, 0xfb, 0x9a, 0x6f, 0xb0, 0xfb, - 0x1d, 0xc6, 0xed, 0x52, 0x1e, 0xed, 0xe3, 0x05, 0xf4, 0x63, 0xb1, 0xe6, 0xff, 0x2b, 0x1b, 0x25, - 0x70, 0x4f, 0x4c, 0xb0, 0x6e, 0x35, 0xf4, 0x34, 0xba, 0x05, 0xab, 0x73, 0x56, 0xf1, 0x4a, 0x40, - 0x6c, 0x18, 0x26, 0x31, 0x62, 0x2c, 0x42, 0x1d, 0x6f, 0x44, 0x6b, 0x38, 0xff, 0x7a, 0xbe, 0x73, - 0xcc, 0xed, 0xce, 0x31, 0xaf, 0x76, 0x8e, 0x79, 0xb6, 0x77, 0x8c, 0xed, 0xde, 0x31, 0x2e, 0xf7, - 0x8e, 0xf1, 0xf3, 0x7d, 0x18, 0xab, 0x28, 0x5f, 0x79, 0x81, 0x4c, 0xfc, 0xbf, 0xb1, 0xe0, 0x7e, - 0x73, 0x32, 0xfa, 0x44, 0xfc, 0xe3, 0x0b, 0x5a, 0x0d, 0xf4, 0xe4, 0xe3, 0x75, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xde, 0x40, 0x9e, 0x4b, 0x5e, 0x03, 0x00, 0x00, -} - -func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Message_SnapshotsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_SnapshotsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SnapshotsRequest != nil { - { - size, err := m.SnapshotsRequest.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 *Message_SnapshotsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_SnapshotsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SnapshotsResponse != nil { - { - size, err := m.SnapshotsResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Message_ChunkRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_ChunkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ChunkRequest != nil { - { - size, err := m.ChunkRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Message_ChunkResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Message_ChunkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ChunkResponse != nil { - { - size, err := m.ChunkResponse.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *SnapshotsRequest) 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 *SnapshotsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *SnapshotsResponse) 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 *SnapshotsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x2a - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if m.Chunks != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Chunks)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ChunkRequest) 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 *ChunkRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChunkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Index != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ChunkResponse) 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 *ChunkResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChunkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Missing { - i-- - if m.Missing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.Chunk) > 0 { - i -= len(m.Chunk) - copy(dAtA[i:], m.Chunk) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk))) - i-- - dAtA[i] = 0x22 - } - if m.Index != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Message) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - n += m.Sum.Size() - } - return n -} - -func (m *Message_SnapshotsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SnapshotsRequest != nil { - l = m.SnapshotsRequest.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_SnapshotsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SnapshotsResponse != nil { - l = m.SnapshotsResponse.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_ChunkRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChunkRequest != nil { - l = m.ChunkRequest.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *Message_ChunkResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChunkResponse != nil { - l = m.ChunkResponse.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *SnapshotsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *SnapshotsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovTypes(uint64(m.Format)) - } - if m.Chunks != 0 { - n += 1 + sovTypes(uint64(m.Chunks)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ChunkRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovTypes(uint64(m.Format)) - } - if m.Index != 0 { - n += 1 + sovTypes(uint64(m.Index)) - } - return n -} - -func (m *ChunkResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovTypes(uint64(m.Format)) - } - if m.Index != 0 { - n += 1 + sovTypes(uint64(m.Index)) - } - l = len(m.Chunk) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Missing { - n += 2 - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Message) 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: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotsRequest", 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 := &SnapshotsRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_SnapshotsRequest{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotsResponse", 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 := &SnapshotsResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_SnapshotsResponse{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkRequest", 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 := &ChunkRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_ChunkRequest{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkResponse", 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 := &ChunkResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Sum = &Message_ChunkResponse{v} - 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 *SnapshotsRequest) 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: SnapshotsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotsRequest: 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 *SnapshotsResponse) 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: SnapshotsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotsResponse: 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 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - m.Chunks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Chunks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []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 *ChunkRequest) 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: ChunkRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChunkRequest: 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 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChunkResponse) 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: ChunkResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChunkResponse: 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 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunk", 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.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...) - if m.Chunk == nil { - m.Chunk = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Missing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Missing = bool(v != 0) - 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 skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/store/types.pb.go b/proto/ostracon/store/types.pb.go deleted file mode 100644 index a57abe157..000000000 --- a/proto/ostracon/store/types.pb.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/store/types.proto - -package store - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type BlockStoreState struct { - Base int64 `protobuf:"varint,1,opt,name=base,proto3" json:"base,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *BlockStoreState) Reset() { *m = BlockStoreState{} } -func (m *BlockStoreState) String() string { return proto.CompactTextString(m) } -func (*BlockStoreState) ProtoMessage() {} -func (*BlockStoreState) Descriptor() ([]byte, []int) { - return fileDescriptor_429926436d348b85, []int{0} -} -func (m *BlockStoreState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockStoreState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockStoreState.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 *BlockStoreState) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockStoreState.Merge(m, src) -} -func (m *BlockStoreState) XXX_Size() int { - return m.Size() -} -func (m *BlockStoreState) XXX_DiscardUnknown() { - xxx_messageInfo_BlockStoreState.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockStoreState proto.InternalMessageInfo - -func (m *BlockStoreState) GetBase() int64 { - if m != nil { - return m.Base - } - return 0 -} - -func (m *BlockStoreState) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func init() { - proto.RegisterType((*BlockStoreState)(nil), "ostracon.store.BlockStoreState") -} - -func init() { proto.RegisterFile("ostracon/store/types.proto", fileDescriptor_429926436d348b85) } - -var fileDescriptor_429926436d348b85 = []byte{ - // 166 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x2f, 0x2e, 0x29, - 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x2f, 0x2e, 0xc9, 0x2f, 0x4a, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc9, 0xe9, 0x81, 0xe5, 0x94, 0x6c, 0xb9, - 0xf8, 0x9d, 0x72, 0xf2, 0x93, 0xb3, 0x83, 0x41, 0xbc, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0x21, 0x21, - 0x2e, 0x96, 0xa4, 0xc4, 0xe2, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x30, 0x5b, 0x48, - 0x8c, 0x8b, 0x2d, 0x23, 0x35, 0x33, 0x3d, 0xa3, 0x44, 0x82, 0x09, 0x2c, 0x0a, 0xe5, 0x39, 0xb9, - 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, - 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x6e, 0x7a, 0x66, 0x49, 0x46, - 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x4e, 0x66, 0x5e, 0xaa, 0x3e, 0xdc, 0x51, 0x60, 0x87, - 0xe8, 0xa3, 0xba, 0x31, 0x89, 0x0d, 0x2c, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x79, 0x5d, - 0xc8, 0x90, 0xbc, 0x00, 0x00, 0x00, -} - -func (m *BlockStoreState) 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 *BlockStoreState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockStoreState) 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] = 0x10 - } - if m.Base != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Base)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BlockStoreState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Base != 0 { - n += 1 + sovTypes(uint64(m.Base)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BlockStoreState) 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: BlockStoreState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockStoreState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType) - } - m.Base = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Base |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - 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 skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/store/types.proto b/proto/ostracon/store/types.proto deleted file mode 100644 index 11cab895b..000000000 --- a/proto/ostracon/store/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package ostracon.store; - -option go_package = "github.com/line/ostracon/proto/ostracon/store"; - -message BlockStoreState { - int64 base = 1; - int64 height = 2; -} diff --git a/proto/ostracon/types/block.pb.go b/proto/ostracon/types/block.pb.go index be452de43..5e95ab7f5 100644 --- a/proto/ostracon/types/block.pb.go +++ b/proto/ostracon/types/block.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" math "math" math_bits "math/bits" @@ -24,10 +25,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Block struct { - Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` - Data Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` - Evidence EvidenceList `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"` - LastCommit *Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` + Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` + Data types.Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` + Evidence EvidenceList `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"` + LastCommit *types.Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` } func (m *Block) Reset() { *m = Block{} } @@ -70,11 +71,11 @@ func (m *Block) GetHeader() Header { return Header{} } -func (m *Block) GetData() Data { +func (m *Block) GetData() types.Data { if m != nil { return m.Data } - return Data{} + return types.Data{} } func (m *Block) GetEvidence() EvidenceList { @@ -84,7 +85,7 @@ func (m *Block) GetEvidence() EvidenceList { return EvidenceList{} } -func (m *Block) GetLastCommit() *Commit { +func (m *Block) GetLastCommit() *types.Commit { if m != nil { return m.LastCommit } @@ -98,24 +99,25 @@ func init() { func init() { proto.RegisterFile("ostracon/types/block.proto", fileDescriptor_69510200dee501a6) } var fileDescriptor_69510200dee501a6 = []byte{ - // 267 bytes of a gzipped FileDescriptorProto + // 284 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x2f, 0x2e, 0x29, 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc9, 0xe9, 0x81, 0xe5, 0xa4, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x14, 0xba, 0x09, 0x60, 0x12, 0x2a, - 0x27, 0x8b, 0x26, 0x97, 0x5a, 0x96, 0x99, 0x92, 0x9a, 0x97, 0x9c, 0x0a, 0x91, 0x56, 0x7a, 0xc6, - 0xc8, 0xc5, 0xea, 0x04, 0xb2, 0x50, 0xc8, 0x84, 0x8b, 0x2d, 0x23, 0x35, 0x31, 0x25, 0xb5, 0x48, - 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x4c, 0x0f, 0xd5, 0x6e, 0x3d, 0x0f, 0xb0, 0xac, 0x13, - 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x50, 0xb5, 0x42, 0x7a, 0x5c, 0x2c, 0x29, 0x89, 0x25, 0x89, - 0x12, 0x4c, 0x60, 0x3d, 0x22, 0xe8, 0x7a, 0x5c, 0x12, 0x4b, 0x12, 0xa1, 0x3a, 0xc0, 0xea, 0x84, - 0xec, 0xb8, 0x38, 0x60, 0x2e, 0x90, 0x60, 0x06, 0xeb, 0x91, 0x41, 0xd7, 0xe3, 0x0a, 0x95, 0xf7, - 0xc9, 0x2c, 0x2e, 0x81, 0xea, 0x85, 0xeb, 0x11, 0x32, 0xe7, 0xe2, 0xce, 0x49, 0x2c, 0x2e, 0x89, - 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0x2c, 0x91, 0x60, 0xc1, 0xee, 0x54, 0x67, 0xb0, 0x6c, 0x10, 0x17, - 0x48, 0x29, 0x84, 0xed, 0xe4, 0x7e, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, - 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, - 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x39, 0x99, 0x79, 0xa9, - 0xfa, 0xf0, 0x10, 0x83, 0x04, 0x34, 0x6a, 0x00, 0x26, 0xb1, 0x81, 0x45, 0x8d, 0x01, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x42, 0x79, 0x19, 0x39, 0xb7, 0x01, 0x00, 0x00, + 0x27, 0x8b, 0x26, 0x97, 0x5a, 0x96, 0x99, 0x92, 0x9a, 0x97, 0x9c, 0x0a, 0x95, 0x96, 0x29, 0x49, + 0xcd, 0x4b, 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xc1, 0xd4, 0xac, 0xf4, 0x8a, 0x91, 0x8b, 0xd5, + 0x09, 0xe4, 0x1c, 0x21, 0x13, 0x2e, 0xb6, 0x8c, 0xd4, 0xc4, 0x94, 0xd4, 0x22, 0x09, 0x46, 0x05, + 0x46, 0x0d, 0x6e, 0x23, 0x31, 0x3d, 0x54, 0x97, 0xe9, 0x79, 0x80, 0x65, 0x9d, 0x58, 0x4e, 0xdc, + 0x93, 0x67, 0x08, 0x82, 0xaa, 0x15, 0x32, 0xe0, 0x62, 0x49, 0x49, 0x2c, 0x49, 0x94, 0x60, 0x82, + 0xea, 0x41, 0x58, 0x06, 0xd5, 0xe5, 0x92, 0x58, 0x92, 0x08, 0xd5, 0x03, 0x56, 0x29, 0x64, 0xc7, + 0xc5, 0x01, 0x73, 0xa1, 0x04, 0x33, 0x58, 0x97, 0x0c, 0xba, 0x4d, 0xae, 0x50, 0x79, 0x9f, 0xcc, + 0xe2, 0x12, 0xa8, 0x5e, 0xb8, 0x1e, 0x21, 0x4b, 0x2e, 0xee, 0x9c, 0xc4, 0xe2, 0x92, 0xf8, 0xe4, + 0xfc, 0xdc, 0xdc, 0xcc, 0x12, 0x09, 0x16, 0xb0, 0x11, 0x12, 0x98, 0x16, 0x3b, 0x83, 0xe5, 0x83, + 0xb8, 0x40, 0x8a, 0x21, 0x6c, 0x27, 0xf7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, + 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, + 0x88, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xc9, 0xcc, + 0x4b, 0xd5, 0x87, 0x87, 0x29, 0x24, 0x2a, 0x50, 0x83, 0x38, 0x89, 0x0d, 0x2c, 0x6a, 0x0c, 0x08, + 0x00, 0x00, 0xff, 0xff, 0x8f, 0xa6, 0x62, 0x99, 0xd9, 0x01, 0x00, 0x00, } func (m *Block) Marshal() (dAtA []byte, err error) { @@ -377,7 +379,7 @@ func (m *Block) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.LastCommit == nil { - m.LastCommit = &Commit{} + m.LastCommit = &types.Commit{} } if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/proto/ostracon/types/block.proto b/proto/ostracon/types/block.proto index 96c19fd8b..756c223a3 100644 --- a/proto/ostracon/types/block.proto +++ b/proto/ostracon/types/block.proto @@ -6,10 +6,11 @@ option go_package = "github.com/line/ostracon/proto/ostracon/types"; import "gogoproto/gogo.proto"; import "ostracon/types/types.proto"; import "ostracon/types/evidence.proto"; +import "tendermint/types/types.proto"; message Block { Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; + tendermint.types.Data data = 2 [(gogoproto.nullable) = false]; ostracon.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; + tendermint.types.Commit last_commit = 4; } diff --git a/proto/ostracon/types/canonical.pb.go b/proto/ostracon/types/canonical.pb.go deleted file mode 100644 index 6f68c9c7a..000000000 --- a/proto/ostracon/types/canonical.pb.go +++ /dev/null @@ -1,1378 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/types/canonical.proto - -package types - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type CanonicalBlockID struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - PartSetHeader CanonicalPartSetHeader `protobuf:"bytes,2,opt,name=part_set_header,json=partSetHeader,proto3" json:"part_set_header"` -} - -func (m *CanonicalBlockID) Reset() { *m = CanonicalBlockID{} } -func (m *CanonicalBlockID) String() string { return proto.CompactTextString(m) } -func (*CanonicalBlockID) ProtoMessage() {} -func (*CanonicalBlockID) Descriptor() ([]byte, []int) { - return fileDescriptor_ca4a1fbbc6b35f34, []int{0} -} -func (m *CanonicalBlockID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CanonicalBlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CanonicalBlockID.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 *CanonicalBlockID) XXX_Merge(src proto.Message) { - xxx_messageInfo_CanonicalBlockID.Merge(m, src) -} -func (m *CanonicalBlockID) XXX_Size() int { - return m.Size() -} -func (m *CanonicalBlockID) XXX_DiscardUnknown() { - xxx_messageInfo_CanonicalBlockID.DiscardUnknown(m) -} - -var xxx_messageInfo_CanonicalBlockID proto.InternalMessageInfo - -func (m *CanonicalBlockID) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *CanonicalBlockID) GetPartSetHeader() CanonicalPartSetHeader { - if m != nil { - return m.PartSetHeader - } - return CanonicalPartSetHeader{} -} - -type CanonicalPartSetHeader struct { - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *CanonicalPartSetHeader) Reset() { *m = CanonicalPartSetHeader{} } -func (m *CanonicalPartSetHeader) String() string { return proto.CompactTextString(m) } -func (*CanonicalPartSetHeader) ProtoMessage() {} -func (*CanonicalPartSetHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_ca4a1fbbc6b35f34, []int{1} -} -func (m *CanonicalPartSetHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CanonicalPartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CanonicalPartSetHeader.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 *CanonicalPartSetHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_CanonicalPartSetHeader.Merge(m, src) -} -func (m *CanonicalPartSetHeader) XXX_Size() int { - return m.Size() -} -func (m *CanonicalPartSetHeader) XXX_DiscardUnknown() { - xxx_messageInfo_CanonicalPartSetHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_CanonicalPartSetHeader proto.InternalMessageInfo - -func (m *CanonicalPartSetHeader) GetTotal() uint32 { - if m != nil { - return m.Total - } - return 0 -} - -func (m *CanonicalPartSetHeader) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -type CanonicalProposal struct { - Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=ostracon.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` - Round int64 `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"` - POLRound int64 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` - BlockID *CanonicalBlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - ChainID string `protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (m *CanonicalProposal) Reset() { *m = CanonicalProposal{} } -func (m *CanonicalProposal) String() string { return proto.CompactTextString(m) } -func (*CanonicalProposal) ProtoMessage() {} -func (*CanonicalProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_ca4a1fbbc6b35f34, []int{2} -} -func (m *CanonicalProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CanonicalProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CanonicalProposal.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 *CanonicalProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_CanonicalProposal.Merge(m, src) -} -func (m *CanonicalProposal) XXX_Size() int { - return m.Size() -} -func (m *CanonicalProposal) XXX_DiscardUnknown() { - xxx_messageInfo_CanonicalProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_CanonicalProposal proto.InternalMessageInfo - -func (m *CanonicalProposal) GetType() SignedMsgType { - if m != nil { - return m.Type - } - return UnknownType -} - -func (m *CanonicalProposal) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *CanonicalProposal) GetRound() int64 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *CanonicalProposal) GetPOLRound() int64 { - if m != nil { - return m.POLRound - } - return 0 -} - -func (m *CanonicalProposal) GetBlockID() *CanonicalBlockID { - if m != nil { - return m.BlockID - } - return nil -} - -func (m *CanonicalProposal) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *CanonicalProposal) GetChainID() string { - if m != nil { - return m.ChainID - } - return "" -} - -type CanonicalVote struct { - Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=ostracon.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` - Round int64 `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"` - BlockID *CanonicalBlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - ChainID string `protobuf:"bytes,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (m *CanonicalVote) Reset() { *m = CanonicalVote{} } -func (m *CanonicalVote) String() string { return proto.CompactTextString(m) } -func (*CanonicalVote) ProtoMessage() {} -func (*CanonicalVote) Descriptor() ([]byte, []int) { - return fileDescriptor_ca4a1fbbc6b35f34, []int{3} -} -func (m *CanonicalVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CanonicalVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CanonicalVote.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 *CanonicalVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_CanonicalVote.Merge(m, src) -} -func (m *CanonicalVote) XXX_Size() int { - return m.Size() -} -func (m *CanonicalVote) XXX_DiscardUnknown() { - xxx_messageInfo_CanonicalVote.DiscardUnknown(m) -} - -var xxx_messageInfo_CanonicalVote proto.InternalMessageInfo - -func (m *CanonicalVote) GetType() SignedMsgType { - if m != nil { - return m.Type - } - return UnknownType -} - -func (m *CanonicalVote) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *CanonicalVote) GetRound() int64 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *CanonicalVote) GetBlockID() *CanonicalBlockID { - if m != nil { - return m.BlockID - } - return nil -} - -func (m *CanonicalVote) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *CanonicalVote) GetChainID() string { - if m != nil { - return m.ChainID - } - return "" -} - -func init() { - proto.RegisterType((*CanonicalBlockID)(nil), "ostracon.types.CanonicalBlockID") - proto.RegisterType((*CanonicalPartSetHeader)(nil), "ostracon.types.CanonicalPartSetHeader") - proto.RegisterType((*CanonicalProposal)(nil), "ostracon.types.CanonicalProposal") - proto.RegisterType((*CanonicalVote)(nil), "ostracon.types.CanonicalVote") -} - -func init() { proto.RegisterFile("ostracon/types/canonical.proto", fileDescriptor_ca4a1fbbc6b35f34) } - -var fileDescriptor_ca4a1fbbc6b35f34 = []byte{ - // 489 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xc1, 0x6a, 0xdb, 0x4c, - 0x10, 0xf6, 0x3a, 0xb2, 0x2d, 0x6f, 0xe2, 0xfc, 0xf9, 0x97, 0x10, 0x84, 0xa1, 0x92, 0xf0, 0x21, - 0xb8, 0x87, 0x4a, 0x34, 0x7d, 0x03, 0xa5, 0xd0, 0x18, 0x5a, 0x1a, 0x36, 0xa6, 0x87, 0x5e, 0xcc, - 0x5a, 0xda, 0x4a, 0xa2, 0xb2, 0x66, 0x91, 0xd6, 0x87, 0x40, 0x1f, 0x22, 0x4f, 0xd1, 0x67, 0xc9, - 0x31, 0x97, 0x42, 0x4f, 0x6e, 0x91, 0x5f, 0xa4, 0xec, 0xca, 0x96, 0x93, 0xd0, 0x9c, 0xda, 0x5e, - 0x96, 0x9d, 0xf9, 0xbe, 0x99, 0xf9, 0xf8, 0x86, 0xc1, 0x36, 0x94, 0xb2, 0x60, 0x21, 0xe4, 0xbe, - 0xbc, 0x16, 0xbc, 0xf4, 0x43, 0x96, 0x43, 0x9e, 0x86, 0x2c, 0xf3, 0x44, 0x01, 0x12, 0xc8, 0xe1, - 0x16, 0xf7, 0x34, 0x3e, 0x3c, 0x8e, 0x21, 0x06, 0x0d, 0xf9, 0xea, 0x57, 0xb3, 0x86, 0xc3, 0x47, - 0x5d, 0xf4, 0xbb, 0xc1, 0x9c, 0x18, 0x20, 0xce, 0xb8, 0xaf, 0xa3, 0xf9, 0xf2, 0x93, 0x2f, 0xd3, - 0x05, 0x2f, 0x25, 0x5b, 0x88, 0x9a, 0x30, 0xfa, 0x82, 0x8f, 0xce, 0xb7, 0x53, 0x83, 0x0c, 0xc2, - 0xcf, 0x93, 0xd7, 0x84, 0x60, 0x23, 0x61, 0x65, 0x62, 0x21, 0x17, 0x8d, 0x0f, 0xa8, 0xfe, 0x93, - 0x29, 0xfe, 0x4f, 0xb0, 0x42, 0xce, 0x4a, 0x2e, 0x67, 0x09, 0x67, 0x11, 0x2f, 0xac, 0xb6, 0x8b, - 0xc6, 0xfb, 0x67, 0xa7, 0xde, 0x43, 0x91, 0x5e, 0xd3, 0xee, 0x92, 0x15, 0xf2, 0x8a, 0xcb, 0x0b, - 0xcd, 0x0e, 0x8c, 0xdb, 0x95, 0xd3, 0xa2, 0x03, 0x71, 0x3f, 0x39, 0x0a, 0xf0, 0xc9, 0xef, 0xe9, - 0xe4, 0x18, 0x77, 0x24, 0x48, 0x96, 0x69, 0x11, 0x03, 0x5a, 0x07, 0x8d, 0xb2, 0xf6, 0x4e, 0xd9, - 0xe8, 0x5b, 0x1b, 0xff, 0xbf, 0x6b, 0x52, 0x80, 0x80, 0x92, 0x65, 0xe4, 0x25, 0x36, 0x94, 0x1c, - 0x5d, 0x7e, 0x78, 0xf6, 0xec, 0xb1, 0xc8, 0xab, 0x34, 0xce, 0x79, 0xf4, 0xae, 0x8c, 0xa7, 0xd7, - 0x82, 0x53, 0x4d, 0x25, 0x27, 0xb8, 0x9b, 0xf0, 0x34, 0x4e, 0xa4, 0x6e, 0x7f, 0x44, 0x37, 0x91, - 0x92, 0x52, 0xc0, 0x32, 0x8f, 0xac, 0x3d, 0x9d, 0xae, 0x03, 0xf2, 0x1c, 0xf7, 0x05, 0x64, 0xb3, - 0x1a, 0x31, 0x5c, 0x34, 0xde, 0x0b, 0x0e, 0xaa, 0x95, 0x63, 0x5e, 0xbe, 0x7f, 0x4b, 0x55, 0x8e, - 0x9a, 0x02, 0x32, 0xfd, 0x23, 0x17, 0xd8, 0x9c, 0x2b, 0x6b, 0x67, 0x69, 0x64, 0x75, 0xb4, 0x69, - 0xee, 0x93, 0xa6, 0x6d, 0x76, 0x10, 0xec, 0x57, 0x2b, 0xa7, 0xb7, 0x09, 0x68, 0x4f, 0x97, 0x4f, - 0x22, 0x12, 0xe0, 0x7e, 0xb3, 0x40, 0xab, 0xab, 0x5b, 0x0d, 0xbd, 0x7a, 0xc5, 0xde, 0x76, 0xc5, - 0xde, 0x74, 0xcb, 0x08, 0x4c, 0xe5, 0xf9, 0xcd, 0x0f, 0x07, 0xd1, 0x5d, 0x19, 0x39, 0xc5, 0x66, - 0x98, 0xb0, 0x34, 0x57, 0x6a, 0x7a, 0x2e, 0x1a, 0xf7, 0xeb, 0x59, 0xe7, 0x2a, 0xa7, 0x66, 0x69, - 0x70, 0x12, 0x8d, 0xbe, 0xb6, 0xf1, 0xa0, 0x91, 0xf5, 0x01, 0x24, 0xff, 0xf7, 0x9e, 0xde, 0x37, - 0xca, 0xf8, 0x7b, 0x46, 0x75, 0xfe, 0xdc, 0xa8, 0xee, 0xd3, 0x46, 0x05, 0x6f, 0x6e, 0x2b, 0x1b, - 0xdd, 0x55, 0x36, 0xfa, 0x59, 0xd9, 0xe8, 0x66, 0x6d, 0xb7, 0xee, 0xd6, 0x76, 0xeb, 0xfb, 0xda, - 0x6e, 0x7d, 0x7c, 0x11, 0xa7, 0x32, 0x59, 0xce, 0xbd, 0x10, 0x16, 0x7e, 0x96, 0xe6, 0xdc, 0x6f, - 0x2e, 0xb5, 0x3e, 0xe2, 0x87, 0x87, 0x3b, 0xef, 0xea, 0xec, 0xab, 0x5f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x83, 0x0f, 0xca, 0x3d, 0x17, 0x04, 0x00, 0x00, -} - -func (m *CanonicalBlockID) 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 *CanonicalBlockID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CanonicalBlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartSetHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCanonical(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintCanonical(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CanonicalPartSetHeader) 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 *CanonicalPartSetHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CanonicalPartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintCanonical(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - if m.Total != 0 { - i = encodeVarintCanonical(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CanonicalProposal) 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 *CanonicalProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CanonicalProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintCanonical(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0x3a - } - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintCanonical(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x32 - if m.BlockID != nil { - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCanonical(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.POLRound != 0 { - i = encodeVarintCanonical(dAtA, i, uint64(m.POLRound)) - i-- - dAtA[i] = 0x20 - } - if m.Round != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Round)) - i-- - dAtA[i] = 0x19 - } - if m.Height != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Height)) - i-- - dAtA[i] = 0x11 - } - if m.Type != 0 { - i = encodeVarintCanonical(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CanonicalVote) 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 *CanonicalVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintCanonical(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0x32 - } - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintCanonical(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x2a - if m.BlockID != nil { - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCanonical(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Round != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Round)) - i-- - dAtA[i] = 0x19 - } - if m.Height != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Height)) - i-- - dAtA[i] = 0x11 - } - if m.Type != 0 { - i = encodeVarintCanonical(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintCanonical(dAtA []byte, offset int, v uint64) int { - offset -= sovCanonical(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CanonicalBlockID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovCanonical(uint64(l)) - } - l = m.PartSetHeader.Size() - n += 1 + l + sovCanonical(uint64(l)) - return n -} - -func (m *CanonicalPartSetHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Total != 0 { - n += 1 + sovCanonical(uint64(m.Total)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovCanonical(uint64(l)) - } - return n -} - -func (m *CanonicalProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovCanonical(uint64(m.Type)) - } - if m.Height != 0 { - n += 9 - } - if m.Round != 0 { - n += 9 - } - if m.POLRound != 0 { - n += 1 + sovCanonical(uint64(m.POLRound)) - } - if m.BlockID != nil { - l = m.BlockID.Size() - n += 1 + l + sovCanonical(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovCanonical(uint64(l)) - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovCanonical(uint64(l)) - } - return n -} - -func (m *CanonicalVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovCanonical(uint64(m.Type)) - } - if m.Height != 0 { - n += 9 - } - if m.Round != 0 { - n += 9 - } - if m.BlockID != nil { - l = m.BlockID.Size() - n += 1 + l + sovCanonical(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovCanonical(uint64(l)) - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovCanonical(uint64(l)) - } - return n -} - -func sovCanonical(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCanonical(x uint64) (n int) { - return sovCanonical(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CanonicalBlockID) 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 ErrIntOverflowCanonical - } - 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: CanonicalBlockID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CanonicalBlockID: 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) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - 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 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartSetHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCanonical(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCanonical - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CanonicalPartSetHeader) 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 ErrIntOverflowCanonical - } - 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: CanonicalPartSetHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CanonicalPartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCanonical(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCanonical - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CanonicalProposal) 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 ErrIntOverflowCanonical - } - 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: CanonicalProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CanonicalProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Height = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Round = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field POLRound", wireType) - } - m.POLRound = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.POLRound |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockID == nil { - m.BlockID = &CanonicalBlockID{} - } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - 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 ErrInvalidLengthCanonical - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCanonical(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCanonical - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CanonicalVote) 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 ErrIntOverflowCanonical - } - 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: CanonicalVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CanonicalVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Height = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Round = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockID == nil { - m.BlockID = &CanonicalBlockID{} - } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - 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 ErrInvalidLengthCanonical - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCanonical(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCanonical - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCanonical(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCanonical - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCanonical - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCanonical - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCanonical - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCanonical - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCanonical - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCanonical = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCanonical = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCanonical = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/types/events.pb.go b/proto/ostracon/types/events.pb.go deleted file mode 100644 index 71274ff0b..000000000 --- a/proto/ostracon/types/events.pb.go +++ /dev/null @@ -1,386 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/types/events.proto - -package types - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type EventDataRoundState struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - Step string `protobuf:"bytes,3,opt,name=step,proto3" json:"step,omitempty"` -} - -func (m *EventDataRoundState) Reset() { *m = EventDataRoundState{} } -func (m *EventDataRoundState) String() string { return proto.CompactTextString(m) } -func (*EventDataRoundState) ProtoMessage() {} -func (*EventDataRoundState) Descriptor() ([]byte, []int) { - return fileDescriptor_67f647461b1e70c9, []int{0} -} -func (m *EventDataRoundState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDataRoundState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDataRoundState.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 *EventDataRoundState) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDataRoundState.Merge(m, src) -} -func (m *EventDataRoundState) XXX_Size() int { - return m.Size() -} -func (m *EventDataRoundState) XXX_DiscardUnknown() { - xxx_messageInfo_EventDataRoundState.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDataRoundState proto.InternalMessageInfo - -func (m *EventDataRoundState) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *EventDataRoundState) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *EventDataRoundState) GetStep() string { - if m != nil { - return m.Step - } - return "" -} - -func init() { - proto.RegisterType((*EventDataRoundState)(nil), "ostracon.types.EventDataRoundState") -} - -func init() { proto.RegisterFile("ostracon/types/events.proto", fileDescriptor_67f647461b1e70c9) } - -var fileDescriptor_67f647461b1e70c9 = []byte{ - // 190 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xce, 0x2f, 0x2e, 0x29, - 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, - 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0x49, 0xea, 0x81, 0x25, 0x95, 0xc2, - 0xb9, 0x84, 0x5d, 0x41, 0xf2, 0x2e, 0x89, 0x25, 0x89, 0x41, 0xf9, 0xa5, 0x79, 0x29, 0xc1, 0x25, - 0x89, 0x25, 0xa9, 0x42, 0x62, 0x5c, 0x6c, 0x19, 0xa9, 0x99, 0xe9, 0x19, 0x25, 0x12, 0x8c, 0x0a, - 0x8c, 0x1a, 0xcc, 0x41, 0x50, 0x9e, 0x90, 0x08, 0x17, 0x6b, 0x11, 0x48, 0x95, 0x04, 0x93, 0x02, - 0xa3, 0x06, 0x6b, 0x10, 0x84, 0x23, 0x24, 0xc4, 0xc5, 0x52, 0x5c, 0x92, 0x5a, 0x20, 0xc1, 0xac, - 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x66, 0x3b, 0xb9, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, - 0x1c, 0x43, 0x94, 0x6e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x4e, - 0x66, 0x5e, 0xaa, 0x3e, 0xdc, 0xbd, 0x60, 0x27, 0xea, 0xa3, 0x3a, 0x3f, 0x89, 0x0d, 0x2c, 0x6a, - 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xda, 0xaa, 0x5c, 0xd7, 0x00, 0x00, 0x00, -} - -func (m *EventDataRoundState) 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 *EventDataRoundState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDataRoundState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Step) > 0 { - i -= len(m.Step) - copy(dAtA[i:], m.Step) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Step))) - i-- - dAtA[i] = 0x1a - } - if m.Round != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { - offset -= sovEvents(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EventDataRoundState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovEvents(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovEvents(uint64(m.Round)) - } - l = len(m.Step) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - return n -} - -func sovEvents(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvents(x uint64) (n int) { - return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EventDataRoundState) 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 ErrIntOverflowEvents - } - 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: EventDataRoundState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDataRoundState: 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 ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - 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 ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Step = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvents(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvents - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvents(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvents - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvents - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/types/evidence.pb.go b/proto/ostracon/types/evidence.pb.go index 57231f9e0..d9beb7cd9 100644 --- a/proto/ostracon/types/evidence.pb.go +++ b/proto/ostracon/types/evidence.pb.go @@ -9,6 +9,7 @@ import ( proto "github.com/gogo/protobuf/proto" _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" math "math" math_bits "math/bits" @@ -114,11 +115,11 @@ func (*Evidence) XXX_OneofWrappers() []interface{} { // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. type DuplicateVoteEvidence struct { - VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` - VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` - TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` - ValidatorPower int64 `protobuf:"varint,4,opt,name=validator_power,json=validatorPower,proto3" json:"validator_power,omitempty"` - Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + VoteA *types.Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"` + VoteB *types.Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"` + TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` + ValidatorPower int64 `protobuf:"varint,4,opt,name=validator_power,json=validatorPower,proto3" json:"validator_power,omitempty"` + Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` } func (m *DuplicateVoteEvidence) Reset() { *m = DuplicateVoteEvidence{} } @@ -154,14 +155,14 @@ func (m *DuplicateVoteEvidence) XXX_DiscardUnknown() { var xxx_messageInfo_DuplicateVoteEvidence proto.InternalMessageInfo -func (m *DuplicateVoteEvidence) GetVoteA() *Vote { +func (m *DuplicateVoteEvidence) GetVoteA() *types.Vote { if m != nil { return m.VoteA } return nil } -func (m *DuplicateVoteEvidence) GetVoteB() *Vote { +func (m *DuplicateVoteEvidence) GetVoteB() *types.Vote { if m != nil { return m.VoteB } @@ -191,11 +192,11 @@ func (m *DuplicateVoteEvidence) GetTimestamp() time.Time { // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. type LightClientAttackEvidence struct { - ConflictingBlock *LightBlock `protobuf:"bytes,1,opt,name=conflicting_block,json=conflictingBlock,proto3" json:"conflicting_block,omitempty"` - CommonHeight int64 `protobuf:"varint,2,opt,name=common_height,json=commonHeight,proto3" json:"common_height,omitempty"` - ByzantineValidators []*Validator `protobuf:"bytes,3,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators,omitempty"` - TotalVotingPower int64 `protobuf:"varint,4,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` - Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + ConflictingBlock *LightBlock `protobuf:"bytes,1,opt,name=conflicting_block,json=conflictingBlock,proto3" json:"conflicting_block,omitempty"` + CommonHeight int64 `protobuf:"varint,2,opt,name=common_height,json=commonHeight,proto3" json:"common_height,omitempty"` + ByzantineValidators []*types.Validator `protobuf:"bytes,3,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators,omitempty"` + TotalVotingPower int64 `protobuf:"varint,4,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` + Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` } func (m *LightClientAttackEvidence) Reset() { *m = LightClientAttackEvidence{} } @@ -245,7 +246,7 @@ func (m *LightClientAttackEvidence) GetCommonHeight() int64 { return 0 } -func (m *LightClientAttackEvidence) GetByzantineValidators() []*Validator { +func (m *LightClientAttackEvidence) GetByzantineValidators() []*types.Validator { if m != nil { return m.ByzantineValidators } @@ -320,41 +321,42 @@ func init() { func init() { proto.RegisterFile("ostracon/types/evidence.proto", fileDescriptor_97062afbc223b6b9) } var fileDescriptor_97062afbc223b6b9 = []byte{ - // 530 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0x9b, 0xa6, 0x9d, 0x8a, 0x37, 0xc6, 0x30, 0x9d, 0x68, 0x23, 0x48, 0xab, 0x22, 0x44, - 0x11, 0x90, 0x48, 0xe3, 0xc6, 0x6d, 0x01, 0xb4, 0x09, 0xf5, 0x80, 0x22, 0xb4, 0x03, 0x97, 0xc8, - 0x71, 0xbd, 0xd4, 0x9a, 0x13, 0x47, 0x8d, 0x5b, 0x34, 0x3e, 0x03, 0x87, 0x7d, 0xac, 0x71, 0xdb, - 0x91, 0x13, 0x4c, 0xed, 0x17, 0x41, 0x76, 0x12, 0xaf, 0x0b, 0x2d, 0xa7, 0x5d, 0xa2, 0xe4, 0xfd, - 0x7f, 0xcf, 0xef, 0xbd, 0xbf, 0xed, 0x80, 0xa7, 0x3c, 0x13, 0x53, 0x84, 0x79, 0xe2, 0x8a, 0xf3, - 0x94, 0x64, 0x2e, 0x99, 0xd3, 0x31, 0x49, 0x30, 0x71, 0xd2, 0x29, 0x17, 0x1c, 0xee, 0x96, 0xb2, - 0xa3, 0x64, 0xab, 0x1d, 0xf1, 0x88, 0x2b, 0xc9, 0x95, 0x6f, 0x39, 0x65, 0xf5, 0x22, 0xce, 0x23, - 0x46, 0x5c, 0xf5, 0x15, 0xce, 0x4e, 0x5d, 0x41, 0x63, 0x92, 0x09, 0x14, 0xa7, 0x05, 0x60, 0x55, - 0xaa, 0xa8, 0x67, 0xa1, 0xd9, 0x15, 0x6d, 0x8e, 0x18, 0x1d, 0x23, 0xc1, 0xa7, 0xb9, 0x3e, 0xb8, - 0x36, 0x40, 0xeb, 0x63, 0xd1, 0x15, 0x0c, 0xc0, 0xe3, 0xf1, 0x2c, 0x65, 0x14, 0x23, 0x41, 0x82, - 0x39, 0x17, 0x24, 0x28, 0x1b, 0xee, 0x18, 0x7d, 0x63, 0xb8, 0x7d, 0xf0, 0xdc, 0xb9, 0xdd, 0xb1, - 0xf3, 0xa1, 0xc4, 0x4f, 0xb8, 0x20, 0xe5, 0x3a, 0xc7, 0x35, 0x7f, 0x7f, 0xbc, 0x4e, 0x80, 0x0c, - 0x3c, 0x61, 0x34, 0x9a, 0x88, 0x00, 0x33, 0x4a, 0x12, 0x11, 0x20, 0x21, 0x10, 0x3e, 0xbb, 0xa9, - 0x52, 0x57, 0x55, 0x5e, 0x56, 0xab, 0x8c, 0x64, 0xce, 0x7b, 0x95, 0x72, 0xa8, 0x32, 0x56, 0x2a, - 0x75, 0xd9, 0x26, 0xd1, 0x6b, 0x02, 0x33, 0x9b, 0xc5, 0x83, 0x1f, 0x75, 0xb0, 0xbf, 0xb6, 0x4f, - 0xf8, 0x0a, 0x6c, 0xa9, 0x29, 0x51, 0x31, 0x5e, 0xbb, 0x5a, 0x58, 0xd2, 0x7e, 0x53, 0x32, 0x87, - 0x1a, 0x0e, 0x8b, 0x2e, 0xff, 0x03, 0x7b, 0xf0, 0x35, 0x80, 0x82, 0x0b, 0xc4, 0xa4, 0x8b, 0x34, - 0x89, 0x82, 0x94, 0x7f, 0x23, 0xd3, 0x8e, 0xd9, 0x37, 0x86, 0xa6, 0xbf, 0xa7, 0x94, 0x13, 0x25, - 0x7c, 0x96, 0x71, 0xf8, 0x02, 0x3c, 0xd0, 0xfb, 0x52, 0xa0, 0x0d, 0x85, 0xee, 0xea, 0x70, 0x0e, - 0x7a, 0xe0, 0x9e, 0xde, 0xfc, 0x4e, 0x53, 0xb5, 0x61, 0x39, 0xf9, 0xf1, 0x70, 0xca, 0xe3, 0xe1, - 0x7c, 0x29, 0x09, 0xaf, 0x75, 0xf9, 0xbb, 0x57, 0xbb, 0xf8, 0xd3, 0x33, 0xfc, 0x9b, 0xb4, 0xc1, - 0xcf, 0x3a, 0xe8, 0x6e, 0x34, 0x14, 0x1e, 0x81, 0x87, 0x98, 0x27, 0xa7, 0x8c, 0x62, 0xd5, 0x77, - 0xc8, 0x38, 0x3e, 0x2b, 0xdc, 0xb1, 0xd6, 0x6e, 0x8b, 0x27, 0x09, 0x7f, 0x6f, 0x25, 0x49, 0x45, - 0xe0, 0x33, 0x70, 0x1f, 0xf3, 0x38, 0xe6, 0x49, 0x30, 0x21, 0x92, 0x53, 0xae, 0x99, 0xfe, 0x4e, - 0x1e, 0x3c, 0x56, 0x31, 0x38, 0x02, 0xed, 0xf0, 0xfc, 0x3b, 0x4a, 0x04, 0x4d, 0x48, 0xa0, 0x67, - 0xcd, 0x3a, 0x66, 0xdf, 0x1c, 0x6e, 0x1f, 0x74, 0xff, 0x71, 0xb8, 0x24, 0xfc, 0x47, 0x3a, 0x4d, - 0xc7, 0xb2, 0x0d, 0xa6, 0x37, 0x36, 0x98, 0x7e, 0x17, 0x5e, 0x7e, 0x02, 0x3b, 0xa5, 0x73, 0x23, - 0x9a, 0x09, 0xf8, 0x0e, 0xb4, 0x56, 0x6e, 0x8c, 0x9c, 0xa1, 0x53, 0x9d, 0x41, 0x9f, 0xce, 0x86, - 0x5c, 0xd0, 0xd7, 0xbc, 0x77, 0x74, 0xb9, 0xb0, 0x8d, 0xab, 0x85, 0x6d, 0x5c, 0x2f, 0x6c, 0xe3, - 0x62, 0x69, 0xd7, 0xae, 0x96, 0x76, 0xed, 0xd7, 0xd2, 0xae, 0x7d, 0x7d, 0x13, 0x51, 0x31, 0x99, - 0x85, 0x0e, 0xe6, 0xb1, 0xcb, 0x68, 0x42, 0x5c, 0x7d, 0xa7, 0xf3, 0x7f, 0xc5, 0xed, 0x2b, 0x1e, - 0x6e, 0xa9, 0xe8, 0xdb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x98, 0xd4, 0x86, 0x84, 0x7d, 0x04, - 0x00, 0x00, + // 545 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x41, 0x6f, 0x12, 0x41, + 0x14, 0xc7, 0x59, 0x16, 0x1a, 0x9c, 0xd6, 0x5a, 0xc7, 0x56, 0x29, 0xd6, 0x85, 0x60, 0x8c, 0x98, + 0xd8, 0xdd, 0xa4, 0xde, 0xbc, 0x75, 0xd5, 0xb4, 0x31, 0x8d, 0x31, 0x1b, 0xd3, 0x83, 0x97, 0xcd, + 0xee, 0x32, 0x5d, 0x26, 0x9d, 0x9d, 0x21, 0xec, 0x03, 0x53, 0x3f, 0x05, 0x1f, 0xab, 0x89, 0x97, + 0x1e, 0x3d, 0x69, 0x03, 0x5f, 0xc4, 0xcc, 0x30, 0x3b, 0x50, 0x04, 0x4f, 0x5e, 0x08, 0xbc, 0xff, + 0xef, 0xcd, 0x7b, 0xef, 0x3f, 0x8f, 0x41, 0xcf, 0x44, 0x0e, 0x83, 0x28, 0x11, 0xdc, 0x83, 0xab, + 0x3e, 0xc9, 0x3d, 0x32, 0xa2, 0x5d, 0xc2, 0x13, 0xe2, 0xf6, 0x07, 0x02, 0x04, 0xde, 0x2e, 0x64, + 0x57, 0xc9, 0x8d, 0xdd, 0x54, 0xa4, 0x42, 0x49, 0x9e, 0xfc, 0x36, 0xa3, 0x1a, 0xcd, 0x54, 0x88, + 0x94, 0x11, 0x4f, 0xfd, 0x8a, 0x87, 0x17, 0x1e, 0xd0, 0x8c, 0xe4, 0x10, 0x65, 0x7d, 0x0d, 0x34, + 0x96, 0xaa, 0xa8, 0x4f, 0xad, 0xb5, 0x80, 0xf0, 0x2e, 0x19, 0x64, 0x94, 0x83, 0x56, 0x47, 0x11, + 0xa3, 0xdd, 0x08, 0xc4, 0x40, 0x13, 0x07, 0x7f, 0x11, 0x0b, 0xf9, 0xed, 0x5b, 0x0b, 0xd5, 0x3e, + 0xe8, 0xae, 0x71, 0x88, 0x9e, 0x74, 0x87, 0x7d, 0x46, 0x93, 0x08, 0x48, 0x38, 0x12, 0x40, 0xc2, + 0x62, 0xa0, 0xba, 0xd5, 0xb2, 0x3a, 0x9b, 0x47, 0x2f, 0xdc, 0xbb, 0x13, 0xb9, 0xef, 0x0b, 0xfc, + 0x5c, 0x00, 0x29, 0xce, 0x39, 0x2d, 0x05, 0x7b, 0xdd, 0x55, 0x02, 0x66, 0xe8, 0x80, 0xd1, 0xb4, + 0x07, 0x61, 0xc2, 0x28, 0xe1, 0x10, 0x46, 0x00, 0x51, 0x72, 0x39, 0xaf, 0x52, 0x56, 0x55, 0x5e, + 0x2d, 0x57, 0x39, 0x93, 0x39, 0xef, 0x54, 0xca, 0xb1, 0xca, 0x58, 0xa8, 0xb4, 0xcf, 0xd6, 0x89, + 0x7e, 0x15, 0xd9, 0xf9, 0x30, 0x6b, 0x8f, 0xcb, 0x68, 0x6f, 0x65, 0x9f, 0xf8, 0x10, 0x6d, 0xa8, + 0x29, 0x23, 0x3d, 0xde, 0x63, 0x77, 0xee, 0x95, 0x2e, 0x2d, 0xf9, 0xa0, 0x2a, 0xa9, 0x63, 0x83, + 0xc7, 0xba, 0xcf, 0x7f, 0xe2, 0x3e, 0x7e, 0x8d, 0x30, 0x08, 0x88, 0x98, 0x74, 0x92, 0xf2, 0x34, + 0xec, 0x8b, 0x6f, 0x64, 0x50, 0xb7, 0x5b, 0x56, 0xc7, 0x0e, 0x76, 0x94, 0x72, 0xae, 0x84, 0xcf, + 0x32, 0x8e, 0x5f, 0xa2, 0x07, 0xe6, 0xe6, 0x34, 0x5a, 0x51, 0xe8, 0xb6, 0x09, 0xcf, 0x40, 0x1f, + 0xdd, 0x33, 0x0b, 0x52, 0xaf, 0xaa, 0x46, 0x1a, 0xee, 0x6c, 0x85, 0xdc, 0x62, 0x85, 0xdc, 0x2f, + 0x05, 0xe1, 0xd7, 0xae, 0x7f, 0x35, 0x4b, 0xe3, 0xdf, 0x4d, 0x2b, 0x98, 0xa7, 0xb5, 0x7f, 0x94, + 0xd1, 0xfe, 0x5a, 0x53, 0xf1, 0x09, 0x7a, 0x98, 0x08, 0x7e, 0xc1, 0x68, 0xa2, 0xfa, 0x8e, 0x99, + 0x48, 0x2e, 0xb5, 0x43, 0x8d, 0x95, 0x57, 0xe3, 0x4b, 0x22, 0xd8, 0x59, 0x48, 0x52, 0x11, 0xfc, + 0x1c, 0xdd, 0x4f, 0x44, 0x96, 0x09, 0x1e, 0xf6, 0x88, 0xe4, 0x94, 0x6f, 0x76, 0xb0, 0x35, 0x0b, + 0x9e, 0xaa, 0x18, 0xfe, 0x84, 0x76, 0xe3, 0xab, 0xef, 0x11, 0x07, 0xca, 0x49, 0x68, 0x66, 0xcd, + 0xeb, 0x76, 0xcb, 0xee, 0x6c, 0x1e, 0x3d, 0x5d, 0xe1, 0x71, 0xc1, 0x04, 0x8f, 0x4c, 0xa2, 0x89, + 0xe5, 0x6b, 0x6c, 0xaf, 0xac, 0xb1, 0xfd, 0x7f, 0xb8, 0xf9, 0x11, 0x6d, 0x15, 0xde, 0x9d, 0xd1, + 0x1c, 0xf0, 0x5b, 0x54, 0x5b, 0xf8, 0xdf, 0xc8, 0x29, 0xea, 0xcb, 0xb6, 0x99, 0x1d, 0xad, 0xc8, + 0x03, 0x03, 0xc3, 0xfb, 0x27, 0xd7, 0x13, 0xc7, 0xba, 0x99, 0x38, 0xd6, 0xed, 0xc4, 0xb1, 0xc6, + 0x53, 0xa7, 0x74, 0x33, 0x75, 0x4a, 0x3f, 0xa7, 0x4e, 0xe9, 0xeb, 0x61, 0x4a, 0xa1, 0x37, 0x8c, + 0xdd, 0x44, 0x64, 0x1e, 0xa3, 0x9c, 0x78, 0xe6, 0x55, 0x98, 0xbd, 0x28, 0x77, 0x1f, 0x89, 0x78, + 0x43, 0x45, 0xdf, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x8b, 0x9b, 0x1f, 0xa3, 0x04, 0x00, + 0x00, } func (m *Evidence) Marshal() (dAtA []byte, err error) { @@ -899,7 +901,7 @@ func (m *DuplicateVoteEvidence) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.VoteA == nil { - m.VoteA = &Vote{} + m.VoteA = &types.Vote{} } if err := m.VoteA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -935,7 +937,7 @@ func (m *DuplicateVoteEvidence) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.VoteB == nil { - m.VoteB = &Vote{} + m.VoteB = &types.Vote{} } if err := m.VoteB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1146,7 +1148,7 @@ func (m *LightClientAttackEvidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ByzantineValidators = append(m.ByzantineValidators, &Validator{}) + m.ByzantineValidators = append(m.ByzantineValidators, &types.Validator{}) if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/proto/ostracon/types/evidence.proto b/proto/ostracon/types/evidence.proto index 38506732a..688d7e9e0 100644 --- a/proto/ostracon/types/evidence.proto +++ b/proto/ostracon/types/evidence.proto @@ -6,7 +6,8 @@ option go_package = "github.com/line/ostracon/proto/ostracon/types"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "ostracon/types/types.proto"; -import "ostracon/types/validator.proto"; +import "tendermint/types/validator.proto"; +import "tendermint/types/types.proto"; message Evidence { oneof sum { @@ -17,8 +18,8 @@ message Evidence { // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. message DuplicateVoteEvidence { - ostracon.types.Vote vote_a = 1; - ostracon.types.Vote vote_b = 2; + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; int64 total_voting_power = 3; // total voting power int64 validator_power = 4; // voting power google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; @@ -26,11 +27,11 @@ message DuplicateVoteEvidence { // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. message LightClientAttackEvidence { - ostracon.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated ostracon.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; // total voting power - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + ostracon.types.LightBlock conflicting_block = 1; + int64 common_height = 2; + repeated tendermint.types.Validator byzantine_validators = 3; + int64 total_voting_power = 4; // total voting power + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } message EvidenceList { diff --git a/proto/ostracon/types/params.pb.go b/proto/ostracon/types/params.pb.go deleted file mode 100644 index efe602ccb..000000000 --- a/proto/ostracon/types/params.pb.go +++ /dev/null @@ -1,1780 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/types/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/duration" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -type ConsensusParams struct { - Block BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block"` - Evidence EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence"` - Validator ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator"` - Version VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version"` -} - -func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } -func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } -func (*ConsensusParams) ProtoMessage() {} -func (*ConsensusParams) Descriptor() ([]byte, []int) { - return fileDescriptor_93f70d04c868d295, []int{0} -} -func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusParams.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 *ConsensusParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusParams.Merge(m, src) -} -func (m *ConsensusParams) XXX_Size() int { - return m.Size() -} -func (m *ConsensusParams) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo - -func (m *ConsensusParams) GetBlock() BlockParams { - if m != nil { - return m.Block - } - return BlockParams{} -} - -func (m *ConsensusParams) GetEvidence() EvidenceParams { - if m != nil { - return m.Evidence - } - return EvidenceParams{} -} - -func (m *ConsensusParams) GetValidator() ValidatorParams { - if m != nil { - return m.Validator - } - return ValidatorParams{} -} - -func (m *ConsensusParams) GetVersion() VersionParams { - if m != nil { - return m.Version - } - return VersionParams{} -} - -// BlockParams contains limits on the block size. -type BlockParams struct { - // Max block size, in bytes. - // Note: must be greater than 0 - MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` - // Max gas per block. - // Note: must be greater or equal to -1 - MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` - // Minimum time increment between consecutive blocks (in milliseconds) If the - // block header timestamp is ahead of the system clock, decrease this value. - // - // Not exposed to the application. - TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"` -} - -func (m *BlockParams) Reset() { *m = BlockParams{} } -func (m *BlockParams) String() string { return proto.CompactTextString(m) } -func (*BlockParams) ProtoMessage() {} -func (*BlockParams) Descriptor() ([]byte, []int) { - return fileDescriptor_93f70d04c868d295, []int{1} -} -func (m *BlockParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockParams.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 *BlockParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockParams.Merge(m, src) -} -func (m *BlockParams) XXX_Size() int { - return m.Size() -} -func (m *BlockParams) XXX_DiscardUnknown() { - xxx_messageInfo_BlockParams.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockParams proto.InternalMessageInfo - -func (m *BlockParams) GetMaxBytes() int64 { - if m != nil { - return m.MaxBytes - } - return 0 -} - -func (m *BlockParams) GetMaxGas() int64 { - if m != nil { - return m.MaxGas - } - return 0 -} - -func (m *BlockParams) GetTimeIotaMs() int64 { - if m != nil { - return m.TimeIotaMs - } - return 0 -} - -// EvidenceParams determine how we handle evidence of malfeasance. -type EvidenceParams struct { - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"` - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"` - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - MaxBytes int64 `protobuf:"varint,3,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` -} - -func (m *EvidenceParams) Reset() { *m = EvidenceParams{} } -func (m *EvidenceParams) String() string { return proto.CompactTextString(m) } -func (*EvidenceParams) ProtoMessage() {} -func (*EvidenceParams) Descriptor() ([]byte, []int) { - return fileDescriptor_93f70d04c868d295, []int{2} -} -func (m *EvidenceParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EvidenceParams.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 *EvidenceParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_EvidenceParams.Merge(m, src) -} -func (m *EvidenceParams) XXX_Size() int { - return m.Size() -} -func (m *EvidenceParams) XXX_DiscardUnknown() { - xxx_messageInfo_EvidenceParams.DiscardUnknown(m) -} - -var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo - -func (m *EvidenceParams) GetMaxAgeNumBlocks() int64 { - if m != nil { - return m.MaxAgeNumBlocks - } - return 0 -} - -func (m *EvidenceParams) GetMaxAgeDuration() time.Duration { - if m != nil { - return m.MaxAgeDuration - } - return 0 -} - -func (m *EvidenceParams) GetMaxBytes() int64 { - if m != nil { - return m.MaxBytes - } - return 0 -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -type ValidatorParams struct { - PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"` -} - -func (m *ValidatorParams) Reset() { *m = ValidatorParams{} } -func (m *ValidatorParams) String() string { return proto.CompactTextString(m) } -func (*ValidatorParams) ProtoMessage() {} -func (*ValidatorParams) Descriptor() ([]byte, []int) { - return fileDescriptor_93f70d04c868d295, []int{3} -} -func (m *ValidatorParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorParams.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 *ValidatorParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorParams.Merge(m, src) -} -func (m *ValidatorParams) XXX_Size() int { - return m.Size() -} -func (m *ValidatorParams) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorParams proto.InternalMessageInfo - -func (m *ValidatorParams) GetPubKeyTypes() []string { - if m != nil { - return m.PubKeyTypes - } - return nil -} - -// VersionParams contains the ABCI application version. -type VersionParams struct { - AppVersion uint64 `protobuf:"varint,1,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` -} - -func (m *VersionParams) Reset() { *m = VersionParams{} } -func (m *VersionParams) String() string { return proto.CompactTextString(m) } -func (*VersionParams) ProtoMessage() {} -func (*VersionParams) Descriptor() ([]byte, []int) { - return fileDescriptor_93f70d04c868d295, []int{4} -} -func (m *VersionParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VersionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VersionParams.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 *VersionParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_VersionParams.Merge(m, src) -} -func (m *VersionParams) XXX_Size() int { - return m.Size() -} -func (m *VersionParams) XXX_DiscardUnknown() { - xxx_messageInfo_VersionParams.DiscardUnknown(m) -} - -var xxx_messageInfo_VersionParams proto.InternalMessageInfo - -func (m *VersionParams) GetAppVersion() uint64 { - if m != nil { - return m.AppVersion - } - return 0 -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -type HashedParams struct { - BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"` - BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` -} - -func (m *HashedParams) Reset() { *m = HashedParams{} } -func (m *HashedParams) String() string { return proto.CompactTextString(m) } -func (*HashedParams) ProtoMessage() {} -func (*HashedParams) Descriptor() ([]byte, []int) { - return fileDescriptor_93f70d04c868d295, []int{5} -} -func (m *HashedParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HashedParams.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 *HashedParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashedParams.Merge(m, src) -} -func (m *HashedParams) XXX_Size() int { - return m.Size() -} -func (m *HashedParams) XXX_DiscardUnknown() { - xxx_messageInfo_HashedParams.DiscardUnknown(m) -} - -var xxx_messageInfo_HashedParams proto.InternalMessageInfo - -func (m *HashedParams) GetBlockMaxBytes() int64 { - if m != nil { - return m.BlockMaxBytes - } - return 0 -} - -func (m *HashedParams) GetBlockMaxGas() int64 { - if m != nil { - return m.BlockMaxGas - } - return 0 -} - -func init() { - proto.RegisterType((*ConsensusParams)(nil), "ostracon.types.ConsensusParams") - proto.RegisterType((*BlockParams)(nil), "ostracon.types.BlockParams") - proto.RegisterType((*EvidenceParams)(nil), "ostracon.types.EvidenceParams") - proto.RegisterType((*ValidatorParams)(nil), "ostracon.types.ValidatorParams") - proto.RegisterType((*VersionParams)(nil), "ostracon.types.VersionParams") - proto.RegisterType((*HashedParams)(nil), "ostracon.types.HashedParams") -} - -func init() { proto.RegisterFile("ostracon/types/params.proto", fileDescriptor_93f70d04c868d295) } - -var fileDescriptor_93f70d04c868d295 = []byte{ - // 535 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x53, 0xcf, 0x6e, 0xd3, 0x30, - 0x18, 0xaf, 0x97, 0xb1, 0xb5, 0x5f, 0xd7, 0x16, 0x59, 0x48, 0x94, 0x55, 0x24, 0x55, 0x0e, 0x68, - 0x12, 0x22, 0x91, 0xe0, 0x80, 0x34, 0x09, 0x01, 0x19, 0x68, 0xa0, 0xa9, 0x08, 0x45, 0x88, 0xc3, - 0x2e, 0x91, 0xd3, 0x9a, 0x2c, 0x5a, 0x1d, 0x47, 0xb1, 0x53, 0xb5, 0x6f, 0xb1, 0x23, 0xc7, 0x1d, - 0xe1, 0x0d, 0x78, 0x84, 0x1d, 0x77, 0xe4, 0x04, 0xa8, 0xbd, 0xf0, 0x18, 0x28, 0x4e, 0xbc, 0x2e, - 0xe5, 0x16, 0x7f, 0xbf, 0x3f, 0xce, 0xf7, 0xfb, 0xc9, 0x30, 0xe0, 0x42, 0x66, 0x64, 0xcc, 0x13, - 0x57, 0x2e, 0x52, 0x2a, 0xdc, 0x94, 0x64, 0x84, 0x09, 0x27, 0xcd, 0xb8, 0xe4, 0xb8, 0xab, 0x41, - 0x47, 0x81, 0xfb, 0xf7, 0x22, 0x1e, 0x71, 0x05, 0xb9, 0xc5, 0x57, 0xc9, 0xda, 0x37, 0x23, 0xce, - 0xa3, 0x29, 0x75, 0xd5, 0x29, 0xcc, 0xbf, 0xb8, 0x93, 0x3c, 0x23, 0x32, 0xe6, 0x49, 0x89, 0xdb, - 0x17, 0x5b, 0xd0, 0x3b, 0xe2, 0x89, 0xa0, 0x89, 0xc8, 0xc5, 0x47, 0xe5, 0x8f, 0x9f, 0xc3, 0x9d, - 0x70, 0xca, 0xc7, 0xe7, 0x7d, 0x34, 0x44, 0x07, 0xed, 0xa7, 0x03, 0xa7, 0x7e, 0x93, 0xe3, 0x15, - 0x60, 0xc9, 0xf5, 0xb6, 0xaf, 0x7e, 0x59, 0x0d, 0xbf, 0xe4, 0xe3, 0x57, 0xd0, 0xa4, 0xb3, 0x78, - 0x42, 0x93, 0x31, 0xed, 0x6f, 0x29, 0xad, 0xb9, 0xa9, 0x7d, 0x5b, 0xe1, 0x35, 0xf9, 0x8d, 0x0a, - 0x1f, 0x41, 0x6b, 0x46, 0xa6, 0xf1, 0x84, 0x48, 0x9e, 0xf5, 0x0d, 0x65, 0x61, 0x6d, 0x5a, 0x7c, - 0xd6, 0x84, 0x9a, 0xc7, 0x5a, 0x87, 0x5f, 0xc0, 0xee, 0x8c, 0x66, 0x22, 0xe6, 0x49, 0x7f, 0x5b, - 0x59, 0x3c, 0xfc, 0xcf, 0xa2, 0x84, 0x6b, 0x06, 0x5a, 0x63, 0x53, 0x68, 0xdf, 0xda, 0x10, 0x0f, - 0xa0, 0xc5, 0xc8, 0x3c, 0x08, 0x17, 0x92, 0x0a, 0x95, 0x88, 0xe1, 0x37, 0x19, 0x99, 0x7b, 0xc5, - 0x19, 0xdf, 0x87, 0xdd, 0x02, 0x8c, 0x88, 0x50, 0x0b, 0x1b, 0xfe, 0x0e, 0x23, 0xf3, 0x63, 0x22, - 0xf0, 0x10, 0xf6, 0x64, 0xcc, 0x68, 0x10, 0x73, 0x49, 0x02, 0x26, 0xd4, 0x2e, 0x86, 0x0f, 0xc5, - 0xec, 0x3d, 0x97, 0x64, 0x24, 0xec, 0xef, 0x08, 0xba, 0xf5, 0x34, 0xf0, 0x63, 0xc0, 0x85, 0x1b, - 0x89, 0x68, 0x90, 0xe4, 0x2c, 0x50, 0xa1, 0xea, 0x3b, 0x7b, 0x8c, 0xcc, 0x5f, 0x47, 0xf4, 0x43, - 0xce, 0xd4, 0xcf, 0x09, 0x3c, 0x82, 0xbb, 0x9a, 0xac, 0x3b, 0xad, 0x42, 0x7f, 0xe0, 0x94, 0xa5, - 0x3b, 0xba, 0x74, 0xe7, 0x4d, 0x45, 0xf0, 0x9a, 0xc5, 0xaa, 0x5f, 0x7f, 0x5b, 0xc8, 0xef, 0x96, - 0x7e, 0x1a, 0xa9, 0xaf, 0x69, 0xd4, 0xd7, 0xb4, 0x5f, 0x42, 0x6f, 0x23, 0x75, 0x6c, 0x43, 0x27, - 0xcd, 0xc3, 0xe0, 0x9c, 0x2e, 0x02, 0x95, 0x69, 0x1f, 0x0d, 0x8d, 0x83, 0x96, 0xdf, 0x4e, 0xf3, - 0xf0, 0x84, 0x2e, 0x3e, 0x15, 0xa3, 0xc3, 0xe6, 0x8f, 0x4b, 0x0b, 0xfd, 0xbd, 0xb4, 0x90, 0x7d, - 0x08, 0x9d, 0x5a, 0xe6, 0xd8, 0x82, 0x36, 0x49, 0xd3, 0x40, 0xf7, 0x54, 0xec, 0xb8, 0xed, 0x03, - 0x49, 0xd3, 0x8a, 0x76, 0x4b, 0x7b, 0x0a, 0x7b, 0xef, 0x88, 0x38, 0xa3, 0x93, 0x4a, 0xfa, 0x08, - 0x7a, 0x2a, 0x99, 0x60, 0xb3, 0x96, 0x8e, 0x1a, 0x8f, 0x74, 0x37, 0x36, 0x74, 0xd6, 0xbc, 0x75, - 0x43, 0x6d, 0xcd, 0x3a, 0x26, 0xc2, 0x3b, 0xf9, 0xb6, 0x34, 0xd1, 0xd5, 0xd2, 0x44, 0xd7, 0x4b, - 0x13, 0xfd, 0x59, 0x9a, 0xe8, 0x62, 0x65, 0x36, 0xae, 0x57, 0x66, 0xe3, 0xe7, 0xca, 0x6c, 0x9c, - 0x3e, 0x89, 0x62, 0x79, 0x96, 0x87, 0xce, 0x98, 0x33, 0x77, 0x1a, 0x27, 0xd4, 0xbd, 0x79, 0x8f, - 0xe5, 0x3b, 0xab, 0x3f, 0xcf, 0x70, 0x47, 0x4d, 0x9f, 0xfd, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x3c, - 0x58, 0x77, 0x3c, 0xb7, 0x03, 0x00, 0x00, -} - -func (this *ConsensusParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConsensusParams) - if !ok { - that2, ok := that.(ConsensusParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Block.Equal(&that1.Block) { - return false - } - if !this.Evidence.Equal(&that1.Evidence) { - return false - } - if !this.Validator.Equal(&that1.Validator) { - return false - } - if !this.Version.Equal(&that1.Version) { - return false - } - return true -} -func (this *BlockParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BlockParams) - if !ok { - that2, ok := that.(BlockParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MaxBytes != that1.MaxBytes { - return false - } - if this.MaxGas != that1.MaxGas { - return false - } - if this.TimeIotaMs != that1.TimeIotaMs { - return false - } - return true -} -func (this *EvidenceParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*EvidenceParams) - if !ok { - that2, ok := that.(EvidenceParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MaxAgeNumBlocks != that1.MaxAgeNumBlocks { - return false - } - if this.MaxAgeDuration != that1.MaxAgeDuration { - return false - } - if this.MaxBytes != that1.MaxBytes { - return false - } - return true -} -func (this *ValidatorParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ValidatorParams) - if !ok { - that2, ok := that.(ValidatorParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.PubKeyTypes) != len(that1.PubKeyTypes) { - return false - } - for i := range this.PubKeyTypes { - if this.PubKeyTypes[i] != that1.PubKeyTypes[i] { - return false - } - } - return true -} -func (this *VersionParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VersionParams) - if !ok { - that2, ok := that.(VersionParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.AppVersion != that1.AppVersion { - return false - } - return true -} -func (this *HashedParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HashedParams) - if !ok { - that2, ok := that.(HashedParams) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.BlockMaxBytes != that1.BlockMaxBytes { - return false - } - if this.BlockMaxGas != that1.BlockMaxGas { - return false - } - return true -} -func (m *ConsensusParams) 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 *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BlockParams) 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 *BlockParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TimeIotaMs != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.TimeIotaMs)) - i-- - dAtA[i] = 0x18 - } - if m.MaxGas != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxGas)) - i-- - dAtA[i] = 0x10 - } - if m.MaxBytes != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EvidenceParams) 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 *EvidenceParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MaxBytes != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes)) - i-- - dAtA[i] = 0x18 - } - n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintParams(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x12 - if m.MaxAgeNumBlocks != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxAgeNumBlocks)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorParams) 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 *ValidatorParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PubKeyTypes) > 0 { - for iNdEx := len(m.PubKeyTypes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PubKeyTypes[iNdEx]) - copy(dAtA[i:], m.PubKeyTypes[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.PubKeyTypes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *VersionParams) 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 *VersionParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VersionParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AppVersion != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.AppVersion)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *HashedParams) 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 *HashedParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HashedParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockMaxGas != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxGas)) - i-- - dAtA[i] = 0x10 - } - if m.BlockMaxBytes != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxBytes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedValidatorParams(r randyParams, easy bool) *ValidatorParams { - this := &ValidatorParams{} - v1 := r.Intn(10) - this.PubKeyTypes = make([]string, v1) - for i := 0; i < v1; i++ { - this.PubKeyTypes[i] = string(randStringParams(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedVersionParams(r randyParams, easy bool) *VersionParams { - this := &VersionParams{} - this.AppVersion = uint64(uint64(r.Uint32())) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyParams interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneParams(r randyParams) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringParams(r randyParams) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneParams(r) - } - return string(tmps) -} -func randUnrecognizedParams(r randyParams, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldParams(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldParams(dAtA []byte, r randyParams, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateParams(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateParams(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateParams(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *ConsensusParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Block.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.Evidence.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.Validator.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.Version.Size() - n += 1 + l + sovParams(uint64(l)) - return n -} - -func (m *BlockParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxBytes != 0 { - n += 1 + sovParams(uint64(m.MaxBytes)) - } - if m.MaxGas != 0 { - n += 1 + sovParams(uint64(m.MaxGas)) - } - if m.TimeIotaMs != 0 { - n += 1 + sovParams(uint64(m.TimeIotaMs)) - } - return n -} - -func (m *EvidenceParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxAgeNumBlocks != 0 { - n += 1 + sovParams(uint64(m.MaxAgeNumBlocks)) - } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration) - n += 1 + l + sovParams(uint64(l)) - if m.MaxBytes != 0 { - n += 1 + sovParams(uint64(m.MaxBytes)) - } - return n -} - -func (m *ValidatorParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PubKeyTypes) > 0 { - for _, s := range m.PubKeyTypes { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } - return n -} - -func (m *VersionParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AppVersion != 0 { - n += 1 + sovParams(uint64(m.AppVersion)) - } - return n -} - -func (m *HashedParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockMaxBytes != 0 { - n += 1 + sovParams(uint64(m.BlockMaxBytes)) - } - if m.BlockMaxGas != 0 { - n += 1 + sovParams(uint64(m.BlockMaxGas)) - } - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ConsensusParams) 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 ErrIntOverflowParams - } - 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: ConsensusParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockParams) 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 ErrIntOverflowParams - } - 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: BlockParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - m.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) - } - m.MaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeIotaMs", wireType) - } - m.TimeIotaMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeIotaMs |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EvidenceParams) 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 ErrIntOverflowParams - } - 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: EvidenceParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeNumBlocks", wireType) - } - m.MaxAgeNumBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxAgeNumBlocks |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - m.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorParams) 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 ErrIntOverflowParams - } - 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: ValidatorParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKeyTypes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PubKeyTypes = append(m.PubKeyTypes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VersionParams) 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 ErrIntOverflowParams - } - 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: VersionParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VersionParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) - } - m.AppVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AppVersion |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HashedParams) 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 ErrIntOverflowParams - } - 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: HashedParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HashedParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxBytes", wireType) - } - m.BlockMaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockMaxBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) - } - m.BlockMaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockMaxGas |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/types/types.pb.go b/proto/ostracon/types/types.pb.go index c5fb62e9a..b2a51890c 100644 --- a/proto/ostracon/types/types.pb.go +++ b/proto/ostracon/types/types.pb.go @@ -9,8 +9,9 @@ import ( proto "github.com/gogo/protobuf/proto" _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - crypto "github.com/line/ostracon/proto/ostracon/crypto" - version "github.com/line/ostracon/proto/ostracon/version" + _ "github.com/tendermint/tendermint/proto/tendermint/crypto" + types1 "github.com/tendermint/tendermint/proto/tendermint/types" + version "github.com/tendermint/tendermint/proto/tendermint/version" io "io" math "math" math_bits "math/bits" @@ -29,238 +30,6 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// BlockIdFlag indicates which BlcokID the signature is for -type BlockIDFlag int32 - -const ( - BlockIDFlagUnknown BlockIDFlag = 0 - BlockIDFlagAbsent BlockIDFlag = 1 - BlockIDFlagCommit BlockIDFlag = 2 - BlockIDFlagNil BlockIDFlag = 3 -) - -var BlockIDFlag_name = map[int32]string{ - 0: "BLOCK_ID_FLAG_UNKNOWN", - 1: "BLOCK_ID_FLAG_ABSENT", - 2: "BLOCK_ID_FLAG_COMMIT", - 3: "BLOCK_ID_FLAG_NIL", -} - -var BlockIDFlag_value = map[string]int32{ - "BLOCK_ID_FLAG_UNKNOWN": 0, - "BLOCK_ID_FLAG_ABSENT": 1, - "BLOCK_ID_FLAG_COMMIT": 2, - "BLOCK_ID_FLAG_NIL": 3, -} - -func (x BlockIDFlag) String() string { - return proto.EnumName(BlockIDFlag_name, int32(x)) -} - -func (BlockIDFlag) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{0} -} - -// SignedMsgType is a type of signed message in the consensus. -type SignedMsgType int32 - -const ( - UnknownType SignedMsgType = 0 - // Votes - PrevoteType SignedMsgType = 1 - PrecommitType SignedMsgType = 2 - // Proposals - ProposalType SignedMsgType = 32 -) - -var SignedMsgType_name = map[int32]string{ - 0: "SIGNED_MSG_TYPE_UNKNOWN", - 1: "SIGNED_MSG_TYPE_PREVOTE", - 2: "SIGNED_MSG_TYPE_PRECOMMIT", - 32: "SIGNED_MSG_TYPE_PROPOSAL", -} - -var SignedMsgType_value = map[string]int32{ - "SIGNED_MSG_TYPE_UNKNOWN": 0, - "SIGNED_MSG_TYPE_PREVOTE": 1, - "SIGNED_MSG_TYPE_PRECOMMIT": 2, - "SIGNED_MSG_TYPE_PROPOSAL": 32, -} - -func (x SignedMsgType) String() string { - return proto.EnumName(SignedMsgType_name, int32(x)) -} - -func (SignedMsgType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{1} -} - -// PartsetHeader -type PartSetHeader struct { - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } -func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } -func (*PartSetHeader) ProtoMessage() {} -func (*PartSetHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{0} -} -func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PartSetHeader.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 *PartSetHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartSetHeader.Merge(m, src) -} -func (m *PartSetHeader) XXX_Size() int { - return m.Size() -} -func (m *PartSetHeader) XXX_DiscardUnknown() { - xxx_messageInfo_PartSetHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo - -func (m *PartSetHeader) GetTotal() uint32 { - if m != nil { - return m.Total - } - return 0 -} - -func (m *PartSetHeader) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -type Part struct { - Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` - Proof crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof"` -} - -func (m *Part) Reset() { *m = Part{} } -func (m *Part) String() string { return proto.CompactTextString(m) } -func (*Part) ProtoMessage() {} -func (*Part) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{1} -} -func (m *Part) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Part.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 *Part) XXX_Merge(src proto.Message) { - xxx_messageInfo_Part.Merge(m, src) -} -func (m *Part) XXX_Size() int { - return m.Size() -} -func (m *Part) XXX_DiscardUnknown() { - xxx_messageInfo_Part.DiscardUnknown(m) -} - -var xxx_messageInfo_Part proto.InternalMessageInfo - -func (m *Part) GetIndex() uint32 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *Part) GetBytes() []byte { - if m != nil { - return m.Bytes - } - return nil -} - -func (m *Part) GetProof() crypto.Proof { - if m != nil { - return m.Proof - } - return crypto.Proof{} -} - -// BlockID -type BlockID struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - PartSetHeader PartSetHeader `protobuf:"bytes,2,opt,name=part_set_header,json=partSetHeader,proto3" json:"part_set_header"` -} - -func (m *BlockID) Reset() { *m = BlockID{} } -func (m *BlockID) String() string { return proto.CompactTextString(m) } -func (*BlockID) ProtoMessage() {} -func (*BlockID) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{2} -} -func (m *BlockID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockID.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 *BlockID) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockID.Merge(m, src) -} -func (m *BlockID) XXX_Size() int { - return m.Size() -} -func (m *BlockID) XXX_DiscardUnknown() { - xxx_messageInfo_BlockID.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockID proto.InternalMessageInfo - -func (m *BlockID) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *BlockID) GetPartSetHeader() PartSetHeader { - if m != nil { - return m.PartSetHeader - } - return PartSetHeader{} -} - // Header defines the structure of an Ostracon block header. type Header struct { // basic block info @@ -269,7 +38,7 @@ type Header struct { Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` // prev block info - LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` + LastBlockId types1.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` // hashes of block data LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` @@ -291,7 +60,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{3} + return fileDescriptor_0e52e849a4baef8c, []int{0} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -348,11 +117,11 @@ func (m *Header) GetTime() time.Time { return time.Time{} } -func (m *Header) GetLastBlockId() BlockID { +func (m *Header) GetLastBlockId() types1.BlockID { if m != nil { return m.LastBlockId } - return BlockID{} + return types1.BlockID{} } func (m *Header) GetLastCommitHash() []byte { @@ -432,26 +201,23 @@ func (m *Header) GetProof() []byte { return nil } -// Data contains the set of transactions included in the block -type Data struct { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` +type SignedHeader struct { + Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + Commit *types1.Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` } -func (m *Data) Reset() { *m = Data{} } -func (m *Data) String() string { return proto.CompactTextString(m) } -func (*Data) ProtoMessage() {} -func (*Data) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{4} +func (m *SignedHeader) Reset() { *m = SignedHeader{} } +func (m *SignedHeader) String() string { return proto.CompactTextString(m) } +func (*SignedHeader) ProtoMessage() {} +func (*SignedHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_0e52e849a4baef8c, []int{1} } -func (m *Data) XXX_Unmarshal(b []byte) error { +func (m *SignedHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Data.Marshal(b, m, deterministic) + return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -461,50 +227,49 @@ func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Data) XXX_Merge(src proto.Message) { - xxx_messageInfo_Data.Merge(m, src) +func (m *SignedHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedHeader.Merge(m, src) } -func (m *Data) XXX_Size() int { +func (m *SignedHeader) XXX_Size() int { return m.Size() } -func (m *Data) XXX_DiscardUnknown() { - xxx_messageInfo_Data.DiscardUnknown(m) +func (m *SignedHeader) XXX_DiscardUnknown() { + xxx_messageInfo_SignedHeader.DiscardUnknown(m) } -var xxx_messageInfo_Data proto.InternalMessageInfo +var xxx_messageInfo_SignedHeader proto.InternalMessageInfo + +func (m *SignedHeader) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} -func (m *Data) GetTxs() [][]byte { +func (m *SignedHeader) GetCommit() *types1.Commit { if m != nil { - return m.Txs + return m.Commit } return nil } -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -type Vote struct { - Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=ostracon.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` - BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"` - Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - ValidatorIndex int32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"` - Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` +type LightBlock struct { + SignedHeader *SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3" json:"signed_header,omitempty"` + ValidatorSet *types1.ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` } -func (m *Vote) Reset() { *m = Vote{} } -func (m *Vote) String() string { return proto.CompactTextString(m) } -func (*Vote) ProtoMessage() {} -func (*Vote) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{5} +func (m *LightBlock) Reset() { *m = LightBlock{} } +func (m *LightBlock) String() string { return proto.CompactTextString(m) } +func (*LightBlock) ProtoMessage() {} +func (*LightBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_0e52e849a4baef8c, []int{2} } -func (m *Vote) XXX_Unmarshal(b []byte) error { +func (m *LightBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LightBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Vote.Marshal(b, m, deterministic) + return xxx_messageInfo_LightBlock.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -514,94 +279,51 @@ func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Vote) XXX_Merge(src proto.Message) { - xxx_messageInfo_Vote.Merge(m, src) +func (m *LightBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_LightBlock.Merge(m, src) } -func (m *Vote) XXX_Size() int { +func (m *LightBlock) XXX_Size() int { return m.Size() } -func (m *Vote) XXX_DiscardUnknown() { - xxx_messageInfo_Vote.DiscardUnknown(m) -} - -var xxx_messageInfo_Vote proto.InternalMessageInfo - -func (m *Vote) GetType() SignedMsgType { - if m != nil { - return m.Type - } - return UnknownType -} - -func (m *Vote) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *Vote) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 -} - -func (m *Vote) GetBlockID() BlockID { - if m != nil { - return m.BlockID - } - return BlockID{} +func (m *LightBlock) XXX_DiscardUnknown() { + xxx_messageInfo_LightBlock.DiscardUnknown(m) } -func (m *Vote) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} +var xxx_messageInfo_LightBlock proto.InternalMessageInfo -func (m *Vote) GetValidatorAddress() []byte { +func (m *LightBlock) GetSignedHeader() *SignedHeader { if m != nil { - return m.ValidatorAddress + return m.SignedHeader } return nil } -func (m *Vote) GetValidatorIndex() int32 { +func (m *LightBlock) GetValidatorSet() *types1.ValidatorSet { if m != nil { - return m.ValidatorIndex - } - return 0 -} - -func (m *Vote) GetSignature() []byte { - if m != nil { - return m.Signature + return m.ValidatorSet } return nil } -// Commit contains the evidence that a block was committed by a set of validators. -type Commit struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"` - Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"` +type BlockMeta struct { + BlockID types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id"` + BlockSize int64 `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` + Header Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header"` + NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` } -func (m *Commit) Reset() { *m = Commit{} } -func (m *Commit) String() string { return proto.CompactTextString(m) } -func (*Commit) ProtoMessage() {} -func (*Commit) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{6} +func (m *BlockMeta) Reset() { *m = BlockMeta{} } +func (m *BlockMeta) String() string { return proto.CompactTextString(m) } +func (*BlockMeta) ProtoMessage() {} +func (*BlockMeta) Descriptor() ([]byte, []int) { + return fileDescriptor_0e52e849a4baef8c, []int{3} } -func (m *Commit) XXX_Unmarshal(b []byte) error { +func (m *BlockMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Commit.Marshal(b, m, deterministic) + return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -611,604 +333,368 @@ func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Commit) XXX_Merge(src proto.Message) { - xxx_messageInfo_Commit.Merge(m, src) +func (m *BlockMeta) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockMeta.Merge(m, src) } -func (m *Commit) XXX_Size() int { +func (m *BlockMeta) XXX_Size() int { return m.Size() } -func (m *Commit) XXX_DiscardUnknown() { - xxx_messageInfo_Commit.DiscardUnknown(m) +func (m *BlockMeta) XXX_DiscardUnknown() { + xxx_messageInfo_BlockMeta.DiscardUnknown(m) } -var xxx_messageInfo_Commit proto.InternalMessageInfo +var xxx_messageInfo_BlockMeta proto.InternalMessageInfo -func (m *Commit) GetHeight() int64 { +func (m *BlockMeta) GetBlockID() types1.BlockID { if m != nil { - return m.Height + return m.BlockID } - return 0 + return types1.BlockID{} } -func (m *Commit) GetRound() int32 { +func (m *BlockMeta) GetBlockSize() int64 { if m != nil { - return m.Round + return m.BlockSize } return 0 } -func (m *Commit) GetBlockID() BlockID { +func (m *BlockMeta) GetHeader() Header { if m != nil { - return m.BlockID + return m.Header } - return BlockID{} + return Header{} } -func (m *Commit) GetSignatures() []CommitSig { +func (m *BlockMeta) GetNumTxs() int64 { if m != nil { - return m.Signatures + return m.NumTxs } - return nil -} - -// CommitSig is a part of the Vote included in a Commit. -type CommitSig struct { - BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=ostracon.types.BlockIDFlag" json:"block_id_flag,omitempty"` - ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` + return 0 } -func (m *CommitSig) Reset() { *m = CommitSig{} } -func (m *CommitSig) String() string { return proto.CompactTextString(m) } -func (*CommitSig) ProtoMessage() {} -func (*CommitSig) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{7} -} -func (m *CommitSig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitSig.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 *CommitSig) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitSig.Merge(m, src) -} -func (m *CommitSig) XXX_Size() int { - return m.Size() -} -func (m *CommitSig) XXX_DiscardUnknown() { - xxx_messageInfo_CommitSig.DiscardUnknown(m) +func init() { + proto.RegisterType((*Header)(nil), "ostracon.types.Header") + proto.RegisterType((*SignedHeader)(nil), "ostracon.types.SignedHeader") + proto.RegisterType((*LightBlock)(nil), "ostracon.types.LightBlock") + proto.RegisterType((*BlockMeta)(nil), "ostracon.types.BlockMeta") } -var xxx_messageInfo_CommitSig proto.InternalMessageInfo +func init() { proto.RegisterFile("ostracon/types/types.proto", fileDescriptor_0e52e849a4baef8c) } -func (m *CommitSig) GetBlockIdFlag() BlockIDFlag { - if m != nil { - return m.BlockIdFlag - } - return BlockIDFlagUnknown +var fileDescriptor_0e52e849a4baef8c = []byte{ + // 729 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x1b, 0xba, 0xfe, 0x7b, 0xfb, 0x67, 0x23, 0x1a, 0x23, 0x2b, 0x5b, 0x5a, 0x15, 0x01, + 0x05, 0x89, 0x74, 0x1a, 0x1c, 0xb8, 0x70, 0x58, 0x3b, 0xc4, 0x26, 0xc1, 0x25, 0x9b, 0x38, 0x70, + 0x89, 0xd2, 0xc4, 0x6b, 0x23, 0x9a, 0x38, 0x8a, 0xdd, 0x6a, 0xdb, 0xa7, 0xd8, 0x61, 0x1f, 0x88, + 0xe3, 0x8e, 0x3b, 0x72, 0x1a, 0xa8, 0xbb, 0xc0, 0xb7, 0x40, 0x7e, 0xed, 0x74, 0xed, 0x2a, 0xc1, + 0xa5, 0x8a, 0x9f, 0xe7, 0x67, 0xfb, 0xed, 0xeb, 0xc7, 0x86, 0x3a, 0x65, 0x3c, 0x71, 0x3d, 0x1a, + 0x75, 0xf8, 0x59, 0x4c, 0x98, 0xfc, 0xb5, 0xe2, 0x84, 0x72, 0xaa, 0xd7, 0x52, 0xcf, 0x42, 0xb5, + 0xbe, 0x3e, 0xa0, 0x03, 0x8a, 0x56, 0x47, 0x7c, 0x49, 0xaa, 0xde, 0x18, 0x50, 0x3a, 0x18, 0x91, + 0x0e, 0x8e, 0xfa, 0xe3, 0x93, 0x0e, 0x0f, 0x42, 0xc2, 0xb8, 0x1b, 0xc6, 0x0a, 0xd8, 0xe6, 0x24, + 0xf2, 0x49, 0x12, 0x06, 0x11, 0xef, 0x78, 0xc9, 0x59, 0xcc, 0xa9, 0x60, 0xe9, 0x89, 0xb2, 0xcd, + 0x39, 0x7b, 0x42, 0x12, 0x16, 0xa4, 0xb5, 0x28, 0x7f, 0x6b, 0xce, 0x5f, 0xaa, 0xb1, 0xde, 0x5c, + 0x72, 0x27, 0xee, 0x28, 0xf0, 0x5d, 0x4e, 0x13, 0x49, 0xb4, 0x2e, 0x73, 0x90, 0x3f, 0x20, 0xae, + 0x4f, 0x12, 0xfd, 0x3d, 0x14, 0xd4, 0x0e, 0x86, 0xd6, 0xd4, 0xda, 0xe5, 0xdd, 0x6d, 0xeb, 0x6e, + 0xba, 0xa5, 0x2c, 0xab, 0x47, 0x23, 0x46, 0x22, 0x36, 0x66, 0xdd, 0x95, 0xab, 0x9b, 0x46, 0xc6, + 0x4e, 0xe7, 0xe8, 0xcf, 0xa1, 0xe8, 0x0d, 0xdd, 0x20, 0x72, 0x02, 0xdf, 0x78, 0xd0, 0xd4, 0xda, + 0xa5, 0x6e, 0x79, 0x7a, 0xd3, 0x28, 0xf4, 0x84, 0x76, 0xb8, 0x6f, 0x17, 0xd0, 0x3c, 0xf4, 0xf5, + 0x0d, 0xc8, 0x0f, 0x49, 0x30, 0x18, 0x72, 0x23, 0xdb, 0xd4, 0xda, 0x59, 0x5b, 0x8d, 0xf4, 0x77, + 0xb0, 0x22, 0x7a, 0x63, 0xac, 0xe0, 0xde, 0x75, 0x4b, 0x36, 0xce, 0x4a, 0x1b, 0x67, 0x1d, 0xa7, + 0x8d, 0xeb, 0x16, 0xc5, 0xc6, 0x17, 0x3f, 0x1b, 0x9a, 0x8d, 0x33, 0xf4, 0x1e, 0x54, 0x47, 0x2e, + 0xe3, 0x4e, 0x7f, 0x44, 0xbd, 0x6f, 0x62, 0xfb, 0x1c, 0x2e, 0xb1, 0x39, 0x5f, 0xbe, 0xec, 0x4a, + 0x57, 0x10, 0x87, 0xfb, 0xaa, 0xf4, 0xb2, 0x98, 0x25, 0x25, 0x5f, 0x6f, 0xc3, 0x1a, 0x2e, 0xe2, + 0xd1, 0x30, 0x0c, 0xb8, 0x33, 0x74, 0xd9, 0xd0, 0xc8, 0x37, 0xb5, 0x76, 0xc5, 0xae, 0x09, 0xbd, + 0x87, 0xf2, 0x81, 0xcb, 0x86, 0xfa, 0x13, 0x28, 0xf9, 0x2e, 0x77, 0x25, 0x52, 0x40, 0xa4, 0x28, + 0x04, 0x34, 0x5f, 0xc0, 0xea, 0xac, 0xc5, 0x4c, 0x22, 0x45, 0xb9, 0xca, 0x9d, 0x8c, 0xe0, 0x0e, + 0xac, 0x47, 0xe4, 0x94, 0x3b, 0xf7, 0xe9, 0x12, 0xd2, 0xba, 0xf0, 0xbe, 0x2c, 0xce, 0x78, 0x06, + 0x35, 0x2f, 0x6d, 0xbe, 0x64, 0x01, 0xd9, 0xea, 0x4c, 0x45, 0x6c, 0x13, 0x8a, 0x6e, 0x1c, 0x4b, + 0xa0, 0x8c, 0x40, 0xc1, 0x8d, 0x63, 0xb4, 0x5e, 0xc1, 0x43, 0xfc, 0x8f, 0x09, 0x61, 0xe3, 0x11, + 0x57, 0x8b, 0x54, 0x90, 0x59, 0x15, 0x86, 0x2d, 0x75, 0x64, 0x9f, 0x42, 0x95, 0x4c, 0x02, 0x9f, + 0x44, 0x1e, 0x91, 0x5c, 0x15, 0xb9, 0x4a, 0x2a, 0x22, 0xf4, 0x12, 0xd6, 0xe2, 0x84, 0xc6, 0x94, + 0x91, 0xc4, 0x71, 0x7d, 0x3f, 0x21, 0x8c, 0x19, 0x35, 0xb9, 0x5e, 0xaa, 0xef, 0x49, 0x59, 0x7f, + 0x04, 0xb9, 0x84, 0x8e, 0x23, 0xdf, 0xf8, 0x2d, 0x5a, 0x96, 0xb3, 0xe5, 0x48, 0xc8, 0x18, 0x77, + 0xe3, 0x8f, 0xec, 0xa4, 0x1c, 0xb5, 0x62, 0xa8, 0x1c, 0x05, 0x83, 0x88, 0xf8, 0x2a, 0x9b, 0x96, + 0x08, 0x8d, 0xf8, 0x52, 0xd1, 0xdc, 0xb0, 0x16, 0x6f, 0x9f, 0x25, 0x39, 0x5b, 0x51, 0xfa, 0x0e, + 0xe4, 0xe5, 0x41, 0x62, 0x14, 0xcb, 0xbb, 0xc6, 0x72, 0x16, 0xe4, 0x89, 0xda, 0x8a, 0x6b, 0x5d, + 0x6a, 0x00, 0x9f, 0x44, 0x10, 0x31, 0x10, 0xfa, 0x1e, 0x54, 0x19, 0x16, 0xe0, 0x2c, 0xec, 0xbb, + 0x75, 0x7f, 0xdf, 0xf9, 0x2a, 0xed, 0x0a, 0x9b, 0xaf, 0xb9, 0x07, 0xd5, 0xd9, 0xe1, 0x3a, 0x8c, + 0xa4, 0xa5, 0x98, 0xcb, 0xa5, 0xcc, 0x0e, 0xfa, 0x88, 0x70, 0xbb, 0x32, 0x99, 0x1b, 0xb5, 0xbe, + 0x6b, 0x50, 0xc2, 0x8a, 0x3e, 0x13, 0xee, 0xea, 0x1f, 0xa0, 0x38, 0x0b, 0xb9, 0xf6, 0xbf, 0x90, + 0xaf, 0x8a, 0x90, 0x8b, 0x2b, 0xa8, 0x04, 0xbb, 0xd0, 0x57, 0x59, 0xdf, 0x06, 0x90, 0xcb, 0xb0, + 0xe0, 0x9c, 0x60, 0x59, 0x59, 0xbb, 0x84, 0xca, 0x51, 0x70, 0x4e, 0xf4, 0xb7, 0xb3, 0x66, 0x67, + 0xff, 0xd5, 0x6c, 0x75, 0x8b, 0xd2, 0x96, 0x3f, 0x86, 0x42, 0x34, 0x0e, 0x1d, 0x7e, 0xca, 0xf0, + 0x0a, 0x67, 0xed, 0x7c, 0x34, 0x0e, 0x8f, 0x4f, 0x59, 0xf7, 0xe3, 0xd5, 0xd4, 0xd4, 0xae, 0xa7, + 0xa6, 0xf6, 0x6b, 0x6a, 0x6a, 0x17, 0xb7, 0x66, 0xe6, 0xfa, 0xd6, 0xcc, 0xfc, 0xb8, 0x35, 0x33, + 0x5f, 0x5f, 0x0f, 0x02, 0x3e, 0x1c, 0xf7, 0x2d, 0x8f, 0x86, 0x9d, 0x51, 0x10, 0x91, 0xce, 0xec, + 0xb9, 0x95, 0xef, 0xe8, 0xe2, 0xeb, 0xdb, 0xcf, 0xa3, 0xfa, 0xe6, 0x6f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x17, 0xe2, 0x5d, 0xcd, 0x96, 0x05, 0x00, 0x00, } -func (m *CommitSig) GetValidatorAddress() []byte { - if m != nil { - return m.ValidatorAddress - } - return nil -} - -func (m *CommitSig) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *CommitSig) GetSignature() []byte { - if m != nil { - return m.Signature +func (m *Header) 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 nil + return dAtA[:n], nil } -type Proposal struct { - Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=ostracon.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` - PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"` - BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"` - Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` +func (m *Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Proposal) Reset() { *m = Proposal{} } -func (m *Proposal) String() string { return proto.CompactTextString(m) } -func (*Proposal) ProtoMessage() {} -func (*Proposal) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{8} -} -func (m *Proposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Proof) > 0 { + i -= len(m.Proof) + copy(dAtA[i:], m.Proof) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Proof))) + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xca + } + if m.Round != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Round)) + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xc0 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x72 + } + if len(m.EvidenceHash) > 0 { + i -= len(m.EvidenceHash) + copy(dAtA[i:], m.EvidenceHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) + i-- + dAtA[i] = 0x6a + } + if len(m.LastResultsHash) > 0 { + i -= len(m.LastResultsHash) + copy(dAtA[i:], m.LastResultsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) + i-- + dAtA[i] = 0x62 + } + if len(m.AppHash) > 0 { + i -= len(m.AppHash) + copy(dAtA[i:], m.AppHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) + i-- + dAtA[i] = 0x5a + } + if len(m.ConsensusHash) > 0 { + i -= len(m.ConsensusHash) + copy(dAtA[i:], m.ConsensusHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) + i-- + dAtA[i] = 0x52 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x4a + } + if len(m.ValidatorsHash) > 0 { + i -= len(m.ValidatorsHash) + copy(dAtA[i:], m.ValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) + i-- + dAtA[i] = 0x42 + } + if len(m.DataHash) > 0 { + i -= len(m.DataHash) + copy(dAtA[i:], m.DataHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.LastCommitHash) > 0 { + i -= len(m.LastCommitHash) + copy(dAtA[i:], m.LastCommitHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) + i-- + dAtA[i] = 0x32 + } + { + size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) if err != nil { - return nil, err + return 0, err } - return b[:n], nil + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } -} -func (m *Proposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal.Merge(m, src) -} -func (m *Proposal) XXX_Size() int { - return m.Size() -} -func (m *Proposal) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal proto.InternalMessageInfo - -func (m *Proposal) GetType() SignedMsgType { - if m != nil { - return m.Type + i-- + dAtA[i] = 0x2a + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err2 != nil { + return 0, err2 } - return UnknownType + i -= n2 + i = encodeVarintTypes(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x22 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Version.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 *Proposal) GetHeight() int64 { - if m != nil { - return m.Height +func (m *SignedHeader) 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 0 + return dAtA[:n], nil } -func (m *Proposal) GetRound() int32 { - if m != nil { - return m.Round - } - return 0 +func (m *SignedHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Proposal) GetPolRound() int32 { - if m != nil { - return m.PolRound +func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Commit != nil { + { + size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return 0 + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *Proposal) GetBlockID() BlockID { - if m != nil { - return m.BlockID +func (m *LightBlock) 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 BlockID{} + return dAtA[:n], nil } -func (m *Proposal) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} +func (m *LightBlock) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Proposal) GetSignature() []byte { - if m != nil { - return m.Signature +func (m *LightBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ValidatorSet != nil { + { + size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return nil + if m.SignedHeader != nil { + { + size, err := m.SignedHeader.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 } -type SignedHeader struct { - Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"` +func (m *BlockMeta) 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 *SignedHeader) Reset() { *m = SignedHeader{} } -func (m *SignedHeader) String() string { return proto.CompactTextString(m) } -func (*SignedHeader) ProtoMessage() {} -func (*SignedHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{9} -} -func (m *SignedHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignedHeader.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 *SignedHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignedHeader.Merge(m, src) -} -func (m *SignedHeader) XXX_Size() int { - return m.Size() -} -func (m *SignedHeader) XXX_DiscardUnknown() { - xxx_messageInfo_SignedHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_SignedHeader proto.InternalMessageInfo - -func (m *SignedHeader) GetHeader() *Header { - if m != nil { - return m.Header - } - return nil -} - -func (m *SignedHeader) GetCommit() *Commit { - if m != nil { - return m.Commit - } - return nil -} - -type LightBlock struct { - SignedHeader *SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3" json:"signed_header,omitempty"` - ValidatorSet *ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"` -} - -func (m *LightBlock) Reset() { *m = LightBlock{} } -func (m *LightBlock) String() string { return proto.CompactTextString(m) } -func (*LightBlock) ProtoMessage() {} -func (*LightBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{10} -} -func (m *LightBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LightBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LightBlock.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 *LightBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_LightBlock.Merge(m, src) -} -func (m *LightBlock) XXX_Size() int { - return m.Size() -} -func (m *LightBlock) XXX_DiscardUnknown() { - xxx_messageInfo_LightBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_LightBlock proto.InternalMessageInfo - -func (m *LightBlock) GetSignedHeader() *SignedHeader { - if m != nil { - return m.SignedHeader - } - return nil -} - -func (m *LightBlock) GetValidatorSet() *ValidatorSet { - if m != nil { - return m.ValidatorSet - } - return nil -} - -type BlockMeta struct { - BlockID BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id"` - BlockSize int64 `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` - Header Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header"` - NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` -} - -func (m *BlockMeta) Reset() { *m = BlockMeta{} } -func (m *BlockMeta) String() string { return proto.CompactTextString(m) } -func (*BlockMeta) ProtoMessage() {} -func (*BlockMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{11} -} -func (m *BlockMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockMeta.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 *BlockMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockMeta.Merge(m, src) -} -func (m *BlockMeta) XXX_Size() int { - return m.Size() -} -func (m *BlockMeta) XXX_DiscardUnknown() { - xxx_messageInfo_BlockMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockMeta proto.InternalMessageInfo - -func (m *BlockMeta) GetBlockID() BlockID { - if m != nil { - return m.BlockID - } - return BlockID{} -} - -func (m *BlockMeta) GetBlockSize() int64 { - if m != nil { - return m.BlockSize - } - return 0 -} - -func (m *BlockMeta) GetHeader() Header { - if m != nil { - return m.Header - } - return Header{} -} - -func (m *BlockMeta) GetNumTxs() int64 { - if m != nil { - return m.NumTxs - } - return 0 -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -type TxProof struct { - RootHash []byte `protobuf:"bytes,1,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Proof *crypto.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (m *TxProof) Reset() { *m = TxProof{} } -func (m *TxProof) String() string { return proto.CompactTextString(m) } -func (*TxProof) ProtoMessage() {} -func (*TxProof) Descriptor() ([]byte, []int) { - return fileDescriptor_0e52e849a4baef8c, []int{12} -} -func (m *TxProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxProof.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 *TxProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxProof.Merge(m, src) -} -func (m *TxProof) XXX_Size() int { - return m.Size() -} -func (m *TxProof) XXX_DiscardUnknown() { - xxx_messageInfo_TxProof.DiscardUnknown(m) -} - -var xxx_messageInfo_TxProof proto.InternalMessageInfo - -func (m *TxProof) GetRootHash() []byte { - if m != nil { - return m.RootHash - } - return nil -} - -func (m *TxProof) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *TxProof) GetProof() *crypto.Proof { - if m != nil { - return m.Proof - } - return nil -} - -func init() { - proto.RegisterEnum("ostracon.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value) - proto.RegisterEnum("ostracon.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value) - proto.RegisterType((*PartSetHeader)(nil), "ostracon.types.PartSetHeader") - proto.RegisterType((*Part)(nil), "ostracon.types.Part") - proto.RegisterType((*BlockID)(nil), "ostracon.types.BlockID") - proto.RegisterType((*Header)(nil), "ostracon.types.Header") - proto.RegisterType((*Data)(nil), "ostracon.types.Data") - proto.RegisterType((*Vote)(nil), "ostracon.types.Vote") - proto.RegisterType((*Commit)(nil), "ostracon.types.Commit") - proto.RegisterType((*CommitSig)(nil), "ostracon.types.CommitSig") - proto.RegisterType((*Proposal)(nil), "ostracon.types.Proposal") - proto.RegisterType((*SignedHeader)(nil), "ostracon.types.SignedHeader") - proto.RegisterType((*LightBlock)(nil), "ostracon.types.LightBlock") - proto.RegisterType((*BlockMeta)(nil), "ostracon.types.BlockMeta") - proto.RegisterType((*TxProof)(nil), "ostracon.types.TxProof") -} - -func init() { proto.RegisterFile("ostracon/types/types.proto", fileDescriptor_0e52e849a4baef8c) } - -var fileDescriptor_0e52e849a4baef8c = []byte{ - // 1328 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1a, 0x47, - 0x14, 0xf7, 0xc2, 0x62, 0xe0, 0x01, 0x36, 0x5e, 0x39, 0x0e, 0xc1, 0x09, 0x46, 0x54, 0x6d, 0x9d, - 0x34, 0x5d, 0x12, 0xb7, 0x87, 0x56, 0x3d, 0x44, 0x60, 0x3b, 0x0e, 0x8a, 0x8d, 0xd1, 0x42, 0x52, - 0xb5, 0x97, 0xd5, 0x02, 0x63, 0xd8, 0x66, 0xd9, 0x59, 0xed, 0x0c, 0xae, 0x9d, 0x4f, 0x50, 0xf9, - 0x14, 0xf5, 0xee, 0x53, 0x7b, 0xe8, 0xad, 0x5f, 0xa0, 0xea, 0x39, 0xc7, 0xdc, 0x5a, 0xa9, 0x52, - 0x5a, 0x39, 0x3d, 0xb4, 0xdf, 0xa2, 0x9a, 0x3f, 0xbb, 0x2c, 0xd8, 0x8e, 0xa2, 0x28, 0xbd, 0xa0, - 0x9d, 0xf7, 0x7e, 0x6f, 0xe6, 0xcd, 0xef, 0xfd, 0x66, 0xde, 0x00, 0x45, 0x4c, 0xa8, 0x6f, 0xf5, - 0xb0, 0x5b, 0xa5, 0xc7, 0x1e, 0x22, 0xe2, 0x57, 0xf7, 0x7c, 0x4c, 0xb1, 0xb6, 0x10, 0xf8, 0x74, - 0x6e, 0x2d, 0x2e, 0x0f, 0xf0, 0x00, 0x73, 0x57, 0x95, 0x7d, 0x09, 0x54, 0x71, 0x6d, 0x80, 0xf1, - 0xc0, 0x41, 0x55, 0x3e, 0xea, 0x8e, 0x0f, 0xaa, 0xd4, 0x1e, 0x21, 0x42, 0xad, 0x91, 0x27, 0x01, - 0xab, 0xe1, 0x12, 0x3d, 0xff, 0xd8, 0xa3, 0x98, 0x21, 0xf1, 0x81, 0x74, 0x5e, 0x0f, 0x9d, 0x87, - 0xc8, 0x27, 0x76, 0x90, 0x87, 0xf4, 0x96, 0x66, 0xb2, 0x3b, 0xb4, 0x1c, 0xbb, 0x6f, 0x51, 0xec, - 0x0b, 0x7f, 0xe5, 0x73, 0xc8, 0xb5, 0x2c, 0x9f, 0xb6, 0x11, 0x7d, 0x80, 0xac, 0x3e, 0xf2, 0xb5, - 0x65, 0x48, 0x50, 0x4c, 0x2d, 0xa7, 0xa0, 0x94, 0x95, 0xf5, 0x9c, 0x21, 0x06, 0x9a, 0x06, 0xea, - 0xd0, 0x22, 0xc3, 0x42, 0xac, 0xac, 0xac, 0x67, 0x0d, 0xfe, 0x5d, 0x39, 0x00, 0x95, 0x85, 0xb2, - 0x08, 0xdb, 0xed, 0xa3, 0xa3, 0x20, 0x82, 0x0f, 0x98, 0xb5, 0x7b, 0x4c, 0x11, 0x91, 0x21, 0x62, - 0xa0, 0x6d, 0x40, 0x82, 0xe7, 0x5e, 0x88, 0x97, 0x95, 0xf5, 0xcc, 0xc6, 0x8a, 0x1e, 0x12, 0x24, - 0x76, 0xa6, 0xb7, 0x98, 0xb7, 0xae, 0x3e, 0x7f, 0xb9, 0x36, 0x67, 0x08, 0x68, 0xe5, 0x1b, 0x48, - 0xd6, 0x1d, 0xdc, 0x7b, 0xd2, 0xd8, 0x0a, 0xd3, 0x50, 0x26, 0x69, 0x68, 0x0f, 0x61, 0xd1, 0xb3, - 0x7c, 0x6a, 0x12, 0x44, 0xcd, 0x21, 0xdf, 0x03, 0x5f, 0x32, 0xb3, 0x71, 0x43, 0x9f, 0x66, 0x5f, - 0x9f, 0xda, 0xa8, 0x5c, 0x23, 0xe7, 0x45, 0x8d, 0x95, 0x67, 0x09, 0x98, 0x97, 0x44, 0x7c, 0x01, - 0x49, 0x49, 0x28, 0x5f, 0x2e, 0xb3, 0xb1, 0x3a, 0x99, 0x4f, 0x3a, 0xf4, 0x4d, 0xec, 0x12, 0xe4, - 0x92, 0x31, 0x91, 0xb3, 0x05, 0x11, 0xda, 0x07, 0x90, 0xea, 0x0d, 0x2d, 0xdb, 0x35, 0xed, 0x3e, - 0xcf, 0x26, 0x5d, 0xcf, 0x9c, 0xbd, 0x5c, 0x4b, 0x6e, 0x32, 0x5b, 0x63, 0xcb, 0x48, 0x72, 0x67, - 0xa3, 0xaf, 0xad, 0xc0, 0xfc, 0x10, 0xd9, 0x83, 0x21, 0xe5, 0x84, 0xc4, 0x0d, 0x39, 0xd2, 0x3e, - 0x03, 0x95, 0x89, 0xa0, 0xa0, 0xf2, 0x95, 0x8b, 0xba, 0x50, 0x88, 0x1e, 0x28, 0x44, 0xef, 0x04, - 0x0a, 0xa9, 0xa7, 0xd8, 0xc2, 0xcf, 0xfe, 0x5c, 0x53, 0x0c, 0x1e, 0xa1, 0xd5, 0x20, 0xe7, 0x58, - 0x84, 0x9a, 0x5d, 0x46, 0x19, 0x5b, 0x3e, 0xc1, 0xa7, 0xb8, 0x3a, 0x4b, 0x86, 0xa4, 0x54, 0x26, - 0x9e, 0x61, 0x31, 0xc2, 0xd4, 0xd7, 0xd6, 0x21, 0xcf, 0xa7, 0xe8, 0xe1, 0xd1, 0xc8, 0xa6, 0x26, - 0x67, 0x7c, 0x9e, 0x33, 0xbe, 0xc0, 0xec, 0x9b, 0xdc, 0xfc, 0x80, 0x71, 0xbf, 0x0a, 0xe9, 0xbe, - 0x45, 0x2d, 0x01, 0x49, 0x72, 0x48, 0x8a, 0x19, 0xb8, 0xf3, 0x43, 0x58, 0x0c, 0xd5, 0x46, 0x04, - 0x24, 0x25, 0x66, 0x99, 0x98, 0x39, 0xf0, 0x0e, 0x2c, 0xbb, 0xe8, 0x88, 0x9a, 0xb3, 0xe8, 0x34, - 0x47, 0x6b, 0xcc, 0xf7, 0x78, 0x3a, 0xe2, 0x7d, 0x58, 0xe8, 0x05, 0xd4, 0x0b, 0x2c, 0x70, 0x6c, - 0x2e, 0xb4, 0x72, 0xd8, 0x35, 0x48, 0x59, 0x9e, 0x27, 0x00, 0x19, 0x0e, 0x48, 0x5a, 0x9e, 0xc7, - 0x5d, 0xb7, 0x60, 0x89, 0xef, 0xd1, 0x47, 0x64, 0xec, 0x50, 0x39, 0x49, 0x96, 0x63, 0x16, 0x99, - 0xc3, 0x10, 0x76, 0x8e, 0x7d, 0x0f, 0x72, 0xe8, 0xd0, 0xee, 0x23, 0xb7, 0x87, 0x04, 0x2e, 0xc7, - 0x71, 0xd9, 0xc0, 0xc8, 0x41, 0x37, 0x21, 0xef, 0xf9, 0xd8, 0xc3, 0x04, 0xf9, 0xa6, 0xd5, 0xef, - 0xfb, 0x88, 0x90, 0xc2, 0x82, 0x98, 0x2f, 0xb0, 0xd7, 0x84, 0x59, 0xbb, 0x02, 0x09, 0x1f, 0x8f, - 0xdd, 0x7e, 0xe1, 0x1f, 0x46, 0x59, 0xc2, 0x10, 0x23, 0x66, 0x16, 0x67, 0xe3, 0x5f, 0xc1, 0xa4, - 0x94, 0x7f, 0x01, 0xd4, 0x2d, 0x8b, 0x5a, 0x5a, 0x1e, 0xe2, 0xf4, 0x88, 0x14, 0x94, 0x72, 0x7c, - 0x3d, 0x6b, 0xb0, 0xcf, 0xca, 0xdf, 0x31, 0x50, 0x1f, 0x63, 0x8a, 0xb4, 0xbb, 0xa0, 0xb2, 0xa2, - 0x72, 0x9d, 0x2e, 0x9c, 0xd7, 0x7d, 0xdb, 0x1e, 0xb8, 0xa8, 0xbf, 0x47, 0x06, 0x9d, 0x63, 0x0f, - 0x19, 0x1c, 0x1a, 0x11, 0x5e, 0x6c, 0x4a, 0x78, 0xcb, 0x41, 0x6e, 0xf1, 0x68, 0x6a, 0x9b, 0x90, - 0x0a, 0xf5, 0xa4, 0xbe, 0x5e, 0x4f, 0x8b, 0x4c, 0x4f, 0x4c, 0xeb, 0xd2, 0x60, 0x24, 0xbb, 0x52, - 0x56, 0x75, 0x48, 0x87, 0x17, 0x9b, 0x54, 0xe5, 0x9b, 0x09, 0x7b, 0x12, 0xa6, 0x7d, 0x04, 0x4b, - 0xa1, 0x4a, 0x42, 0x9a, 0x85, 0x36, 0xf3, 0xa1, 0x23, 0xe0, 0x39, 0x2a, 0x40, 0x53, 0x5c, 0x51, - 0x82, 0xf0, 0x89, 0x00, 0x1b, 0xfc, 0xae, 0xba, 0x0e, 0x69, 0x62, 0x0f, 0x5c, 0x8b, 0x8e, 0x7d, - 0x24, 0x35, 0x3a, 0x31, 0x54, 0x7e, 0x51, 0x60, 0x5e, 0x68, 0x3e, 0xc2, 0x9a, 0x72, 0x31, 0x6b, - 0xb1, 0xcb, 0x58, 0x8b, 0xbf, 0x2d, 0x6b, 0xf7, 0x00, 0xc2, 0x54, 0x48, 0x41, 0x2d, 0xc7, 0xd7, - 0x33, 0x1b, 0xd7, 0x66, 0xa7, 0x11, 0xe9, 0xb5, 0xed, 0x81, 0x3c, 0xce, 0x91, 0x90, 0xca, 0x1f, - 0x0a, 0xa4, 0x43, 0xbf, 0x76, 0x0f, 0x72, 0x41, 0x4e, 0xe6, 0x81, 0x63, 0x0d, 0xa4, 0x66, 0x56, - 0x2f, 0x49, 0xec, 0xbe, 0x63, 0x0d, 0x8c, 0x8c, 0xcc, 0x85, 0x0d, 0x2e, 0xae, 0x40, 0xec, 0x92, - 0x0a, 0x4c, 0x95, 0x3c, 0xfe, 0x76, 0x25, 0x9f, 0x2a, 0x8e, 0x3a, 0x5b, 0x9c, 0x9f, 0x63, 0x90, - 0x6a, 0xf1, 0xf3, 0x65, 0x39, 0xff, 0xff, 0x39, 0x58, 0x85, 0xb4, 0x87, 0x1d, 0x53, 0x78, 0x54, - 0xee, 0x49, 0x79, 0xd8, 0x31, 0xce, 0x95, 0x3b, 0xf1, 0x4e, 0x0e, 0xc9, 0xfc, 0x3b, 0x60, 0x2c, - 0x39, 0xcb, 0x98, 0x0b, 0x59, 0x41, 0x84, 0xec, 0x73, 0x3a, 0x63, 0x80, 0xb7, 0x4d, 0x65, 0xb6, - 0x27, 0x8b, 0xa4, 0x05, 0xce, 0x90, 0x28, 0x86, 0x17, 0x8d, 0x41, 0xb6, 0xd9, 0x95, 0x8b, 0xc5, - 0x68, 0x48, 0x54, 0xe5, 0x7b, 0x05, 0x60, 0x97, 0x71, 0xca, 0xf7, 0xca, 0xfa, 0x13, 0xe1, 0xcb, - 0x9b, 0x53, 0xab, 0x5e, 0xbf, 0xb8, 0x58, 0x72, 0xed, 0x2c, 0x89, 0x66, 0x5c, 0x83, 0xdc, 0x44, - 0x82, 0x04, 0x05, 0x89, 0x9c, 0x9b, 0x22, 0x6c, 0x1a, 0x6d, 0x44, 0x8d, 0xec, 0x61, 0x64, 0x54, - 0xf9, 0x55, 0x81, 0x34, 0xcf, 0x67, 0x0f, 0x51, 0x6b, 0xaa, 0x72, 0xca, 0xdb, 0x56, 0xee, 0x06, - 0x80, 0x98, 0x84, 0xd8, 0x4f, 0x91, 0x54, 0x53, 0x9a, 0x5b, 0xda, 0xf6, 0x53, 0xa4, 0x7d, 0x1a, - 0xd2, 0x1c, 0x7f, 0x1d, 0xcd, 0xf2, 0x00, 0x07, 0x64, 0x5f, 0x85, 0xa4, 0x3b, 0x1e, 0x99, 0xec, - 0xe2, 0x57, 0x85, 0x3e, 0xdd, 0xf1, 0xa8, 0x73, 0x44, 0x2a, 0x43, 0x48, 0x76, 0x8e, 0xf8, 0x63, - 0x89, 0x89, 0xd2, 0xc7, 0x58, 0xf6, 0x69, 0xf1, 0x32, 0x4a, 0x31, 0x03, 0x6f, 0x4b, 0x1a, 0xa8, - 0xac, 0x21, 0x07, 0x0f, 0x37, 0xf6, 0xad, 0xdd, 0x7e, 0xa3, 0x47, 0x98, 0xec, 0x3f, 0xb7, 0x7e, - 0x53, 0x20, 0x13, 0xb9, 0x0d, 0xb4, 0xbb, 0x70, 0xa5, 0xbe, 0xbb, 0xbf, 0xf9, 0xd0, 0x6c, 0x6c, - 0x99, 0xf7, 0x77, 0x6b, 0x3b, 0xe6, 0xa3, 0xe6, 0xc3, 0xe6, 0xfe, 0x97, 0xcd, 0xfc, 0x5c, 0x71, - 0xe5, 0xe4, 0xb4, 0xac, 0x45, 0xb0, 0x8f, 0xdc, 0x27, 0x2e, 0xfe, 0xd6, 0xd5, 0xaa, 0xb0, 0x3c, - 0x1d, 0x52, 0xab, 0xb7, 0xb7, 0x9b, 0x9d, 0xbc, 0x52, 0xbc, 0x72, 0x72, 0x5a, 0x5e, 0x8a, 0x44, - 0xd4, 0xba, 0x04, 0xb9, 0xf4, 0x7c, 0xc0, 0xe6, 0xfe, 0xde, 0x5e, 0xa3, 0x93, 0x8f, 0x9d, 0x0b, - 0x90, 0x17, 0xf3, 0x4d, 0x58, 0x9a, 0x0e, 0x68, 0x36, 0x76, 0xf3, 0xf1, 0xa2, 0x76, 0x72, 0x5a, - 0x5e, 0x88, 0xa0, 0x9b, 0xb6, 0x53, 0x4c, 0x7d, 0xf7, 0x43, 0x69, 0xee, 0xa7, 0x1f, 0x4b, 0x0a, - 0xdb, 0x59, 0x6e, 0xea, 0x4e, 0xd0, 0x6e, 0xc3, 0xd5, 0x76, 0x63, 0xa7, 0xb9, 0xbd, 0x65, 0xee, - 0xb5, 0x77, 0xcc, 0xce, 0x57, 0xad, 0xed, 0xc8, 0xee, 0x16, 0x4f, 0x4e, 0xcb, 0x19, 0xb9, 0xa5, - 0xcb, 0xd0, 0x2d, 0x63, 0xfb, 0xf1, 0x7e, 0x67, 0x3b, 0xaf, 0x08, 0x74, 0xcb, 0x47, 0x87, 0x98, - 0x22, 0x8e, 0xbe, 0x03, 0xd7, 0x2e, 0x40, 0x87, 0x1b, 0x5b, 0x3a, 0x39, 0x2d, 0xe7, 0x5a, 0x3e, - 0x12, 0xa7, 0x86, 0x47, 0xe8, 0x50, 0x38, 0x1f, 0xb1, 0xdf, 0xda, 0x6f, 0xd7, 0x76, 0xf3, 0xe5, - 0x62, 0xfe, 0xe4, 0xb4, 0x9c, 0x0d, 0xae, 0x3e, 0x86, 0x9f, 0xec, 0xac, 0xbe, 0xf3, 0xfc, 0xac, - 0xa4, 0xbc, 0x38, 0x2b, 0x29, 0x7f, 0x9d, 0x95, 0x94, 0x67, 0xaf, 0x4a, 0x73, 0x2f, 0x5e, 0x95, - 0xe6, 0x7e, 0x7f, 0x55, 0x9a, 0xfb, 0xfa, 0xe3, 0x81, 0x4d, 0x87, 0xe3, 0xae, 0xde, 0xc3, 0xa3, - 0xaa, 0x63, 0xbb, 0xa8, 0x1a, 0xfe, 0x3f, 0x10, 0x7f, 0x4b, 0xa6, 0xff, 0x2e, 0x74, 0xe7, 0xb9, - 0xf5, 0x93, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x01, 0x91, 0x46, 0xe5, 0x0c, 0x00, 0x00, -} - -func (m *PartSetHeader) 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 *PartSetHeader) MarshalTo(dAtA []byte) (int, error) { +func (m *BlockMeta) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - 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 m.Total != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Total)) + if m.NumTxs != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Part) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x20 } - return dAtA[:n], nil -} - -func (m *Part) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1217,965 +703,137 @@ func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - if len(m.Bytes) > 0 { - i -= len(m.Bytes) - copy(dAtA[i:], m.Bytes) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Bytes))) + if m.BlockSize != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if m.Index != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x8 + { + size, err := m.BlockID.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 *BlockID) 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 *BlockID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartSetHeader.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 +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return len(dAtA) - i, nil + dAtA[offset] = uint8(v) + return base } - -func (m *Header) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Header) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *Header) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Proof))) - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xca - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc0 - } - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x72 - } - if len(m.EvidenceHash) > 0 { - i -= len(m.EvidenceHash) - copy(dAtA[i:], m.EvidenceHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) - i-- - dAtA[i] = 0x6a + l = m.Version.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.ChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.LastResultsHash) > 0 { - i -= len(m.LastResultsHash) - copy(dAtA[i:], m.LastResultsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) - i-- - dAtA[i] = 0x62 + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) } - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x5a + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = m.LastBlockId.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.LastCommitHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.ConsensusHash) > 0 { - i -= len(m.ConsensusHash) - copy(dAtA[i:], m.ConsensusHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) - i-- - dAtA[i] = 0x52 + l = len(m.DataHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.NextValidatorsHash) > 0 { - i -= len(m.NextValidatorsHash) - copy(dAtA[i:], m.NextValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) - i-- - dAtA[i] = 0x4a + l = len(m.ValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.ValidatorsHash) > 0 { - i -= len(m.ValidatorsHash) - copy(dAtA[i:], m.ValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) - i-- - dAtA[i] = 0x42 + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.DataHash) > 0 { - i -= len(m.DataHash) - copy(dAtA[i:], m.DataHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) - i-- - dAtA[i] = 0x3a + l = len(m.ConsensusHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.LastCommitHash) > 0 { - i -= len(m.LastCommitHash) - copy(dAtA[i:], m.LastCommitHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) - i-- - dAtA[i] = 0x32 + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - { - size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + l = len(m.LastResultsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - i-- - dAtA[i] = 0x2a - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err4 != nil { - return 0, err4 + l = len(m.EvidenceHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - i -= n4 - i = encodeVarintTypes(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x22 - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0x12 + if m.Round != 0 { + n += 2 + sovTypes(uint64(m.Round)) } - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + l = len(m.Proof) + if l > 0 { + n += 2 + l + sovTypes(uint64(l)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *Data) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *SignedHeader) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *Data) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Data) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - 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 - } + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil -} - -func (m *Vote) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Commit != nil { + l = m.Commit.Size() + n += 1 + l + sovTypes(uint64(l)) } - return dAtA[:n], nil -} - -func (m *Vote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return n } -func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *LightBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x42 + if m.SignedHeader != nil { + l = m.SignedHeader.Size() + n += 1 + l + sovTypes(uint64(l)) } - if m.ValidatorIndex != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ValidatorIndex)) - i-- - dAtA[i] = 0x38 + if m.ValidatorSet != nil { + l = m.ValidatorSet.Size() + n += 1 + l + sovTypes(uint64(l)) } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x32 - } - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintTypes(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0x2a - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x18 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Commit) 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 *Commit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[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.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CommitSig) 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 *CommitSig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err9 != nil { - return 0, err9 - } - i -= n9 - i = encodeVarintTypes(dAtA, i, uint64(n9)) - i-- - dAtA[i] = 0x1a - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if m.BlockIdFlag != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.BlockIdFlag)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Proposal) 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 *Proposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x3a - } - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintTypes(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x32 - { - size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.PolRound != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.PolRound)) - i-- - dAtA[i] = 0x20 - } - if m.Round != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Round)) - i-- - dAtA[i] = 0x18 - } - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.Type != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignedHeader) 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 *SignedHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Commit != nil { - { - size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return n } -func (m *LightBlock) 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 *LightBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LightBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorSet != nil { - { - size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.SignedHeader != nil { - { - size, err := m.SignedHeader.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 *BlockMeta) 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 *BlockMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NumTxs != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs)) - i-- - dAtA[i] = 0x20 - } - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.BlockSize != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.BlockID.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 *TxProof) 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 *TxProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if len(m.RootHash) > 0 { - i -= len(m.RootHash) - copy(dAtA[i:], m.RootHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.RootHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PartSetHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Total != 0 { - n += 1 + sovTypes(uint64(m.Total)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Part) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Index != 0 { - n += 1 + sovTypes(uint64(m.Index)) - } - l = len(m.Bytes) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Proof.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *BlockID) 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.PartSetHeader.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *Header) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Version.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) - n += 1 + l + sovTypes(uint64(l)) - l = m.LastBlockId.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.LastCommitHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DataHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.NextValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ConsensusHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.LastResultsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.EvidenceHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ProposerAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Round != 0 { - n += 2 + sovTypes(uint64(m.Round)) - } - l = len(m.Proof) - if l > 0 { - n += 2 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Data) 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)) - } - } - return n -} - -func (m *Vote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.ValidatorIndex != 0 { - n += 1 + sovTypes(uint64(m.ValidatorIndex)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Commit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *CommitSig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockIdFlag != 0 { - n += 1 + sovTypes(uint64(m.BlockIdFlag)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Proposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovTypes(uint64(m.Type)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) - } - if m.PolRound != 0 { - n += 1 + sovTypes(uint64(m.PolRound)) - } - l = m.BlockID.Size() - n += 1 + l + sovTypes(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *SignedHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Commit != nil { - l = m.Commit.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *LightBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignedHeader != nil { - l = m.SignedHeader.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.ValidatorSet != nil { - l = m.ValidatorSet.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *BlockMeta) Size() (n int) { - if m == nil { - return 0 +func (m *BlockMeta) Size() (n int) { + if m == nil { + return 0 } var l int _ = l @@ -2184,1299 +842,21 @@ func (m *BlockMeta) Size() (n int) { if m.BlockSize != 0 { n += 1 + sovTypes(uint64(m.BlockSize)) } - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.NumTxs != 0 { - n += 1 + sovTypes(uint64(m.NumTxs)) - } - return n -} - -func (m *TxProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RootHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PartSetHeader) 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: PartSetHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PartSetHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 - 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 *Part) 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: Part: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bytes", 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.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...) - if m.Bytes == nil { - m.Bytes = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Proof.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 *BlockID) 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: BlockID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockID: 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) - } - 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 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartSetHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartSetHeader.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 *Header) 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: Header: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", 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.ChainID = string(dAtA[iNdEx:postIndex]) - 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 Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", 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.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastCommitHash == nil { - m.LastCommitHash = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataHash", 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.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) - if m.DataHash == nil { - m.DataHash = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", 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.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorsHash == nil { - m.ValidatorsHash = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.NextValidatorsHash == nil { - m.NextValidatorsHash = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", 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.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) - if m.ConsensusHash == nil { - m.ConsensusHash = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppHash", 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.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", 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.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastResultsHash == nil { - m.LastResultsHash = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", 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.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) - if m.EvidenceHash == nil { - m.EvidenceHash = []byte{} - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerAddress == nil { - m.ProposerAddress = []byte{} - } - iNdEx = postIndex - case 1000: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 1001: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", 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.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []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 *Data) 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: Data: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) - copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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 *Vote) 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 |= SignedMsgType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - 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 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) - } - m.Round = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Round |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndex", wireType) - } - m.ValidatorIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", 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.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []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 + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.NumTxs != 0 { + n += 1 + sovTypes(uint64(m.NumTxs)) } - return nil + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Commit) Unmarshal(dAtA []byte) error { +func (m *Header) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3499,17 +879,17 @@ func (m *Commit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Commit: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } - m.Height = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3519,16 +899,30 @@ func (m *Commit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) } - m.Round = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3538,14 +932,46 @@ func (m *Commit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Round |= int32(b&0x7F) << shift + 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.ChainID = string(dAtA[iNdEx:postIndex]) + 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 BlockID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3572,13 +998,13 @@ func (m *Commit) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3605,66 +1031,15 @@ func (m *Commit) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Signatures = append(m.Signatures, CommitSig{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.LastBlockId.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 *CommitSig) 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: CommitSig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitSig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockIdFlag", wireType) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) } - m.BlockIdFlag = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3674,14 +1049,29 @@ func (m *CommitSig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockIdFlag |= BlockIDFlag(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastCommitHash == nil { + m.LastCommitHash = []byte{} + } + iNdEx = postIndex + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -3708,16 +1098,16 @@ func (m *CommitSig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = append(m.ValidatorAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorAddress == nil { - m.ValidatorAddress = []byte{} + m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) + if m.DataHash == nil { + m.DataHash = []byte{} } iNdEx = postIndex - case 3: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3727,28 +1117,29 @@ func (m *CommitSig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err + m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorsHash == nil { + m.ValidatorsHash = []byte{} } iNdEx = postIndex - case 4: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -3775,66 +1166,16 @@ func (m *CommitSig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []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 *Proposal) 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) } - m.Type = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3844,16 +1185,31 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= SignedMsgType(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) + if m.ConsensusHash == nil { + m.ConsensusHash = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) } - m.Height = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3863,16 +1219,31 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) + if byteLen < 0 { + return ErrInvalidLengthTypes } - m.Round = 0 + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) + } + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3882,16 +1253,31 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Round |= int32(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PolRound", wireType) + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastResultsHash == nil { + m.LastResultsHash = []byte{} } - m.PolRound = 0 + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) + } + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3901,16 +1287,31 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PolRound |= int32(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) + if m.EvidenceHash == nil { + m.EvidenceHash = []byte{} + } + iNdEx = postIndex + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3920,30 +1321,31 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + case 1000: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) } - var msglen int + m.Round = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3953,28 +1355,14 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Round |= int32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: + case 1001: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -4001,9 +1389,9 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} + m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) + if m.Proof == nil { + m.Proof = []byte{} } iNdEx = postIndex default: @@ -4122,7 +1510,7 @@ func (m *SignedHeader) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Commit == nil { - m.Commit = &Commit{} + m.Commit = &types1.Commit{} } if err := m.Commit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4244,7 +1632,7 @@ func (m *LightBlock) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.ValidatorSet == nil { - m.ValidatorSet = &ValidatorSet{} + m.ValidatorSet = &types1.ValidatorSet{} } if err := m.ValidatorSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4425,160 +1813,6 @@ func (m *BlockMeta) Unmarshal(dAtA []byte) error { } return nil } -func (m *TxProof) 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: TxProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootHash", 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.RootHash = append(m.RootHash[:0], dAtA[iNdEx:postIndex]...) - if m.RootHash == nil { - m.RootHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", 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.Proof == nil { - m.Proof = &crypto.Proof{} - } - if err := m.Proof.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 skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/proto/ostracon/types/types.proto b/proto/ostracon/types/types.proto index 2384d5794..28ea9fbed 100644 --- a/proto/ostracon/types/types.proto +++ b/proto/ostracon/types/types.proto @@ -5,65 +5,23 @@ option go_package = "github.com/line/ostracon/proto/ostracon/types"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -import "ostracon/crypto/proof.proto"; -import "ostracon/version/types.proto"; -import "ostracon/types/validator.proto"; - -// BlockIdFlag indicates which BlcokID the signature is for -enum BlockIDFlag { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; -} - -// SignedMsgType is a type of signed message in the consensus. -enum SignedMsgType { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; -} - -// PartsetHeader -message PartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message Part { - uint32 index = 1; - bytes bytes = 2; - ostracon.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; -} - -// BlockID -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} +import "tendermint/crypto/proof.proto"; +import "tendermint/version/types.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/validator.proto"; // -------------------------------- // Header defines the structure of an Ostracon block header. message Header { // basic block info - ostracon.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data bytes last_commit_hash = 6; // commit from validators from the last block @@ -88,77 +46,19 @@ message Header { bytes proof = 1001; } -// Data contains the set of transactions included in the block -message Data { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - repeated bytes txs = 1; -} - -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; -} - -// Commit contains the evidence that a block was committed by a set of validators. -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; -} - -message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; -} - message SignedHeader { - Header header = 1; - Commit commit = 2; + Header header = 1; + tendermint.types.Commit commit = 2; } message LightBlock { - SignedHeader signed_header = 1; - ostracon.types.ValidatorSet validator_set = 2; + SignedHeader signed_header = 1; + tendermint.types.ValidatorSet validator_set = 2; } message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -message TxProof { - bytes root_hash = 1; - bytes data = 2; - ostracon.crypto.Proof proof = 3; + tendermint.types.BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + int64 block_size = 2; + Header header = 3 [(gogoproto.nullable) = false]; + int64 num_txs = 4; } diff --git a/proto/ostracon/types/validator.pb.go b/proto/ostracon/types/validator.pb.go deleted file mode 100644 index 4b5249603..000000000 --- a/proto/ostracon/types/validator.pb.go +++ /dev/null @@ -1,884 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/types/validator.proto - -package types - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - crypto "github.com/line/ostracon/proto/ostracon/crypto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ValidatorSet struct { - Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` - // Validator proposer = 2; // This field has been removed in Ostracon. - TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` -} - -func (m *ValidatorSet) Reset() { *m = ValidatorSet{} } -func (m *ValidatorSet) String() string { return proto.CompactTextString(m) } -func (*ValidatorSet) ProtoMessage() {} -func (*ValidatorSet) Descriptor() ([]byte, []int) { - return fileDescriptor_eeeaf81579407bf3, []int{0} -} -func (m *ValidatorSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorSet.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 *ValidatorSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorSet.Merge(m, src) -} -func (m *ValidatorSet) XXX_Size() int { - return m.Size() -} -func (m *ValidatorSet) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorSet.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorSet proto.InternalMessageInfo - -func (m *ValidatorSet) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *ValidatorSet) GetTotalVotingPower() int64 { - if m != nil { - return m.TotalVotingPower - } - return 0 -} - -type Validator struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - PubKey crypto.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"` - VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` - ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"` -} - -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_eeeaf81579407bf3, []int{1} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validator.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 *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(m, src) -} -func (m *Validator) XXX_Size() int { - return m.Size() -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -func (m *Validator) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *Validator) GetPubKey() crypto.PublicKey { - if m != nil { - return m.PubKey - } - return crypto.PublicKey{} -} - -func (m *Validator) GetVotingPower() int64 { - if m != nil { - return m.VotingPower - } - return 0 -} - -func (m *Validator) GetProposerPriority() int64 { - if m != nil { - return m.ProposerPriority - } - return 0 -} - -type SimpleValidator struct { - PubKey *crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - VotingPower int64 `protobuf:"varint,2,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` -} - -func (m *SimpleValidator) Reset() { *m = SimpleValidator{} } -func (m *SimpleValidator) String() string { return proto.CompactTextString(m) } -func (*SimpleValidator) ProtoMessage() {} -func (*SimpleValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_eeeaf81579407bf3, []int{2} -} -func (m *SimpleValidator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimpleValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimpleValidator.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 *SimpleValidator) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimpleValidator.Merge(m, src) -} -func (m *SimpleValidator) XXX_Size() int { - return m.Size() -} -func (m *SimpleValidator) XXX_DiscardUnknown() { - xxx_messageInfo_SimpleValidator.DiscardUnknown(m) -} - -var xxx_messageInfo_SimpleValidator proto.InternalMessageInfo - -func (m *SimpleValidator) GetPubKey() *crypto.PublicKey { - if m != nil { - return m.PubKey - } - return nil -} - -func (m *SimpleValidator) GetVotingPower() int64 { - if m != nil { - return m.VotingPower - } - return 0 -} - -func init() { - proto.RegisterType((*ValidatorSet)(nil), "ostracon.types.ValidatorSet") - proto.RegisterType((*Validator)(nil), "ostracon.types.Validator") - proto.RegisterType((*SimpleValidator)(nil), "ostracon.types.SimpleValidator") -} - -func init() { proto.RegisterFile("ostracon/types/validator.proto", fileDescriptor_eeeaf81579407bf3) } - -var fileDescriptor_eeeaf81579407bf3 = []byte{ - // 351 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x6e, 0xf2, 0x30, - 0x10, 0xc7, 0x63, 0x40, 0xa0, 0xcf, 0xa0, 0xaf, 0xad, 0xd5, 0x21, 0xcd, 0x90, 0x52, 0xa6, 0x48, - 0x6d, 0x13, 0x09, 0x26, 0x56, 0x96, 0x0e, 0x2c, 0x28, 0x48, 0x0c, 0x5d, 0xa2, 0x24, 0x58, 0xa9, - 0x45, 0xe0, 0x2c, 0xc7, 0x01, 0xf9, 0x2d, 0xfa, 0x28, 0x7d, 0x0c, 0x46, 0xc6, 0x4e, 0x55, 0x05, - 0x2f, 0x52, 0x91, 0x34, 0x49, 0x51, 0x5b, 0x75, 0x4b, 0xee, 0x77, 0xbe, 0xff, 0xcf, 0x3a, 0x63, - 0x13, 0x12, 0x29, 0xfc, 0x10, 0x56, 0x8e, 0x54, 0x9c, 0x26, 0xce, 0xda, 0x8f, 0xd9, 0xdc, 0x97, - 0x20, 0x6c, 0x2e, 0x40, 0x02, 0xf9, 0x5f, 0x70, 0x3b, 0xe3, 0xc6, 0x65, 0x04, 0x11, 0x64, 0xc8, - 0x39, 0x7e, 0xe5, 0x5d, 0x86, 0x51, 0x4e, 0x09, 0x85, 0xe2, 0x12, 0x9c, 0x05, 0x55, 0x49, 0xce, - 0x7a, 0x1b, 0xdc, 0x99, 0x15, 0x43, 0xa7, 0x54, 0x92, 0x21, 0xc6, 0x65, 0x48, 0xa2, 0xa3, 0x6e, - 0xdd, 0x6a, 0xf7, 0xaf, 0xec, 0xd3, 0x18, 0xbb, 0x3c, 0xe1, 0x7e, 0x69, 0x26, 0x77, 0x98, 0x48, - 0x90, 0x7e, 0xec, 0xad, 0x41, 0xb2, 0x55, 0xe4, 0x71, 0xd8, 0x50, 0xa1, 0xd7, 0xbb, 0xc8, 0xaa, - 0xbb, 0xe7, 0x19, 0x99, 0x65, 0x60, 0x72, 0xac, 0xf7, 0x5e, 0x10, 0xfe, 0x57, 0xce, 0x21, 0x3a, - 0x6e, 0xf9, 0xf3, 0xb9, 0xa0, 0xc9, 0x31, 0x13, 0x59, 0x1d, 0xb7, 0xf8, 0x25, 0x43, 0xdc, 0xe2, - 0x69, 0xe0, 0x2d, 0xa8, 0xd2, 0x6b, 0x5d, 0x64, 0xb5, 0xfb, 0x46, 0x65, 0x93, 0x5f, 0xc7, 0x9e, - 0xa4, 0x41, 0xcc, 0xc2, 0x31, 0x55, 0xa3, 0xc6, 0xf6, 0xed, 0x5a, 0x73, 0x9b, 0x3c, 0x0d, 0xc6, - 0x54, 0x91, 0x1b, 0xdc, 0xf9, 0x41, 0xa5, 0xbd, 0xae, 0x2c, 0xc8, 0x2d, 0xbe, 0xe0, 0x02, 0x38, - 0x24, 0x54, 0x78, 0x5c, 0x30, 0x10, 0x4c, 0x2a, 0xbd, 0x91, 0x2b, 0x17, 0x60, 0xf2, 0x59, 0xef, - 0x31, 0x7c, 0x36, 0x65, 0x4b, 0x1e, 0xd3, 0xca, 0x7b, 0x50, 0xd9, 0xa1, 0xbf, 0xec, 0x7e, 0xf5, - 0xaa, 0x7d, 0xf3, 0x1a, 0x3d, 0x6c, 0xf7, 0x26, 0xda, 0xed, 0x4d, 0xf4, 0xbe, 0x37, 0xd1, 0xf3, - 0xc1, 0xd4, 0x76, 0x07, 0x53, 0x7b, 0x3d, 0x98, 0xda, 0xe3, 0x7d, 0xc4, 0xe4, 0x53, 0x1a, 0xd8, - 0x21, 0x2c, 0x9d, 0x98, 0xad, 0xa8, 0x53, 0x2e, 0x37, 0xdf, 0xfb, 0xe9, 0x8b, 0x09, 0x9a, 0x59, - 0x75, 0xf0, 0x11, 0x00, 0x00, 0xff, 0xff, 0x44, 0x09, 0x04, 0x59, 0x4a, 0x02, 0x00, 0x00, -} - -func (m *ValidatorSet) 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 *ValidatorSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TotalVotingPower != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.TotalVotingPower)) - i-- - dAtA[i] = 0x18 - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintValidator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Validator) 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 *Validator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposerPriority != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.ProposerPriority)) - i-- - dAtA[i] = 0x20 - } - if m.VotingPower != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.VotingPower)) - i-- - dAtA[i] = 0x18 - } - { - size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintValidator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintValidator(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SimpleValidator) 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 *SimpleValidator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimpleValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.VotingPower != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.VotingPower)) - i-- - dAtA[i] = 0x10 - } - if m.PubKey != nil { - { - size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintValidator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { - offset -= sovValidator(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ValidatorSet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovValidator(uint64(l)) - } - } - if m.TotalVotingPower != 0 { - n += 1 + sovValidator(uint64(m.TotalVotingPower)) - } - return n -} - -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - l = m.PubKey.Size() - n += 1 + l + sovValidator(uint64(l)) - if m.VotingPower != 0 { - n += 1 + sovValidator(uint64(m.VotingPower)) - } - if m.ProposerPriority != 0 { - n += 1 + sovValidator(uint64(m.ProposerPriority)) - } - return n -} - -func (m *SimpleValidator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PubKey != nil { - l = m.PubKey.Size() - n += 1 + l + sovValidator(uint64(l)) - } - if m.VotingPower != 0 { - n += 1 + sovValidator(uint64(m.VotingPower)) - } - return n -} - -func sovValidator(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozValidator(x uint64) (n int) { - return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ValidatorSet) 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 ErrIntOverflowValidator - } - 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: ValidatorSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) - } - m.TotalVotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalVotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Validator) 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 ErrIntOverflowValidator - } - 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - m.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerPriority", wireType) - } - m.ProposerPriority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposerPriority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SimpleValidator) 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 ErrIntOverflowValidator - } - 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: SimpleValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SimpleValidator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PubKey == nil { - m.PubKey = &crypto.PublicKey{} - } - if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - m.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipValidator(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthValidator - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupValidator - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthValidator - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/ostracon/types/validator.proto b/proto/ostracon/types/validator.proto deleted file mode 100644 index 2e0b57b66..000000000 --- a/proto/ostracon/types/validator.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package ostracon.types; - -option go_package = "github.com/line/ostracon/proto/ostracon/types"; - -import "gogoproto/gogo.proto"; -import "ostracon/crypto/keys.proto"; - -message ValidatorSet { - repeated Validator validators = 1; - // Validator proposer = 2; // This field has been removed in Ostracon. - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - ostracon.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - ostracon.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; -} diff --git a/proto/ostracon/version/types.pb.go b/proto/ostracon/version/types.pb.go deleted file mode 100644 index 31852df8a..000000000 --- a/proto/ostracon/version/types.pb.go +++ /dev/null @@ -1,576 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ostracon/version/types.proto - -package version - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -type App struct { - Protocol uint64 `protobuf:"varint,1,opt,name=protocol,proto3" json:"protocol,omitempty"` - Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"` -} - -func (m *App) Reset() { *m = App{} } -func (m *App) String() string { return proto.CompactTextString(m) } -func (*App) ProtoMessage() {} -func (*App) Descriptor() ([]byte, []int) { - return fileDescriptor_b542608fc4467892, []int{0} -} -func (m *App) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_App.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 *App) XXX_Merge(src proto.Message) { - xxx_messageInfo_App.Merge(m, src) -} -func (m *App) XXX_Size() int { - return m.Size() -} -func (m *App) XXX_DiscardUnknown() { - xxx_messageInfo_App.DiscardUnknown(m) -} - -var xxx_messageInfo_App proto.InternalMessageInfo - -func (m *App) GetProtocol() uint64 { - if m != nil { - return m.Protocol - } - return 0 -} - -func (m *App) GetSoftware() string { - if m != nil { - return m.Software - } - return "" -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -type Consensus struct { - Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"` - App uint64 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"` -} - -func (m *Consensus) Reset() { *m = Consensus{} } -func (m *Consensus) String() string { return proto.CompactTextString(m) } -func (*Consensus) ProtoMessage() {} -func (*Consensus) Descriptor() ([]byte, []int) { - return fileDescriptor_b542608fc4467892, []int{1} -} -func (m *Consensus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Consensus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Consensus.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 *Consensus) XXX_Merge(src proto.Message) { - xxx_messageInfo_Consensus.Merge(m, src) -} -func (m *Consensus) XXX_Size() int { - return m.Size() -} -func (m *Consensus) XXX_DiscardUnknown() { - xxx_messageInfo_Consensus.DiscardUnknown(m) -} - -var xxx_messageInfo_Consensus proto.InternalMessageInfo - -func (m *Consensus) GetBlock() uint64 { - if m != nil { - return m.Block - } - return 0 -} - -func (m *Consensus) GetApp() uint64 { - if m != nil { - return m.App - } - return 0 -} - -func init() { - proto.RegisterType((*App)(nil), "ostracon.version.App") - proto.RegisterType((*Consensus)(nil), "ostracon.version.Consensus") -} - -func init() { proto.RegisterFile("ostracon/version/types.proto", fileDescriptor_b542608fc4467892) } - -var fileDescriptor_b542608fc4467892 = []byte{ - // 219 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0x2f, 0x2e, 0x29, - 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, - 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xea, 0x41, 0x65, 0xa5, - 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x92, 0x2d, 0x17, 0xb3, - 0x63, 0x41, 0x81, 0x90, 0x14, 0x17, 0x07, 0x98, 0x9f, 0x9c, 0x9f, 0x23, 0xc1, 0xa8, 0xc0, 0xa8, - 0xc1, 0x12, 0x04, 0xe7, 0x83, 0xe4, 0x8a, 0xf3, 0xd3, 0x4a, 0xca, 0x13, 0x8b, 0x52, 0x25, 0x98, - 0x14, 0x18, 0x35, 0x38, 0x83, 0xe0, 0x7c, 0x25, 0x4b, 0x2e, 0x4e, 0xe7, 0xfc, 0xbc, 0xe2, 0xd4, - 0xbc, 0xe2, 0xd2, 0x62, 0x21, 0x11, 0x2e, 0xd6, 0xa4, 0x9c, 0xfc, 0xe4, 0x6c, 0xa8, 0x09, 0x10, - 0x8e, 0x90, 0x00, 0x17, 0x73, 0x62, 0x41, 0x01, 0x58, 0x27, 0x4b, 0x10, 0x88, 0x69, 0xc5, 0xf2, - 0x62, 0x81, 0x3c, 0xa3, 0x93, 0xe7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, - 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, - 0xe9, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0x64, 0xe6, 0xa5, - 0xea, 0xc3, 0x7d, 0x0a, 0x71, 0x3e, 0xba, 0xc7, 0x93, 0xd8, 0xc0, 0xe2, 0xc6, 0x80, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x2e, 0x30, 0xa4, 0xfa, 0x13, 0x01, 0x00, 0x00, -} - -func (this *Consensus) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Consensus) - if !ok { - that2, ok := that.(Consensus) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Block != that1.Block { - return false - } - if this.App != that1.App { - return false - } - return true -} -func (m *App) 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 *App) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *App) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Software) > 0 { - i -= len(m.Software) - copy(dAtA[i:], m.Software) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Software))) - i-- - dAtA[i] = 0x12 - } - if m.Protocol != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Protocol)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Consensus) 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 *Consensus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Consensus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.App != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.App)) - i-- - dAtA[i] = 0x10 - } - if m.Block != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Block)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *App) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Protocol != 0 { - n += 1 + sovTypes(uint64(m.Protocol)) - } - l = len(m.Software) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Consensus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Block != 0 { - n += 1 + sovTypes(uint64(m.Block)) - } - if m.App != 0 { - n += 1 + sovTypes(uint64(m.App)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *App) 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: App: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: App: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - m.Protocol = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Protocol |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Software", 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.Software = 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 *Consensus) 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: Consensus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Consensus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - m.Block = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Block |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field App", wireType) - } - m.App = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.App |= uint64(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 skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proxy/app_conn.go b/proxy/app_conn.go index 9be854cf3..6d4d44170 100644 --- a/proxy/app_conn.go +++ b/proxy/app_conn.go @@ -1,8 +1,10 @@ package proxy import ( + "github.com/tendermint/tendermint/abci/types" + abcicli "github.com/line/ostracon/abci/client" - "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" ) //nolint @@ -17,7 +19,7 @@ type AppConnConsensus interface { InitChainSync(types.RequestInitChain) (*types.ResponseInitChain, error) - BeginBlockSync(types.RequestBeginBlock) (*types.ResponseBeginBlock, error) + BeginBlockSync(ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) DeliverTxAsync(types.RequestDeliverTx, abcicli.ResponseCallback) *abcicli.ReqRes EndBlockSync(types.RequestEndBlock) (*types.ResponseEndBlock, error) CommitSync() (*types.ResponseCommit, error) @@ -28,10 +30,10 @@ type AppConnMempool interface { Error() error CheckTxAsync(types.RequestCheckTx, abcicli.ResponseCallback) *abcicli.ReqRes - CheckTxSync(types.RequestCheckTx) (*types.ResponseCheckTx, error) + CheckTxSync(types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) - BeginRecheckTxSync(types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) - EndRecheckTxSync(types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) + BeginRecheckTxSync(ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) + EndRecheckTxSync(ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) FlushAsync(abcicli.ResponseCallback) *abcicli.ReqRes FlushSync() (*types.ResponseFlush, error) @@ -44,7 +46,7 @@ type AppConnQuery interface { InfoSync(types.RequestInfo) (*types.ResponseInfo, error) QuerySync(types.RequestQuery) (*types.ResponseQuery, error) - // SetOptionSync(key string, value string) (res types.Result) + // SetOptionSync(key string, value string) (res ocabci.Result) } type AppConnSnapshot interface { @@ -81,7 +83,7 @@ func (app *appConnConsensus) InitChainSync(req types.RequestInitChain) (*types.R return app.appConn.InitChainSync(req) } -func (app *appConnConsensus) BeginBlockSync(req types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { +func (app *appConnConsensus) BeginBlockSync(req ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) { return app.appConn.BeginBlockSync(req) } @@ -130,15 +132,15 @@ func (app *appConnMempool) CheckTxAsync(req types.RequestCheckTx, cb abcicli.Res return app.appConn.CheckTxAsync(req, cb) } -func (app *appConnMempool) CheckTxSync(req types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (app *appConnMempool) CheckTxSync(req types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) { return app.appConn.CheckTxSync(req) } -func (app *appConnMempool) BeginRecheckTxSync(req types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { +func (app *appConnMempool) BeginRecheckTxSync(req ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) { return app.appConn.BeginRecheckTxSync(req) } -func (app *appConnMempool) EndRecheckTxSync(req types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { +func (app *appConnMempool) EndRecheckTxSync(req ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) { return app.appConn.EndRecheckTxSync(req) } diff --git a/proxy/app_conn_test.go b/proxy/app_conn_test.go index f802567e1..7177ebd11 100644 --- a/proxy/app_conn_test.go +++ b/proxy/app_conn_test.go @@ -5,10 +5,11 @@ import ( "strings" "testing" + "github.com/tendermint/tendermint/abci/types" + abcicli "github.com/line/ostracon/abci/client" "github.com/line/ostracon/abci/example/kvstore" "github.com/line/ostracon/abci/server" - "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" tmrand "github.com/line/ostracon/libs/rand" ) diff --git a/proxy/mocks/app_conn_consensus.go b/proxy/mocks/app_conn_consensus.go index f6288916f..dbd0a90e0 100644 --- a/proxy/mocks/app_conn_consensus.go +++ b/proxy/mocks/app_conn_consensus.go @@ -3,10 +3,11 @@ package mocks import ( + types "github.com/tendermint/tendermint/abci/types" + abcicli "github.com/line/ostracon/abci/client" + ocabci "github.com/line/ostracon/abci/types" mock "github.com/stretchr/testify/mock" - - types "github.com/line/ostracon/abci/types" ) // AppConnConsensus is an autogenerated mock type for the AppConnConsensus type @@ -15,11 +16,11 @@ type AppConnConsensus struct { } // BeginBlockSync provides a mock function with given fields: _a0 -func (_m *AppConnConsensus) BeginBlockSync(_a0 types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { +func (_m *AppConnConsensus) BeginBlockSync(_a0 ocabci.RequestBeginBlock) (*types.ResponseBeginBlock, error) { ret := _m.Called(_a0) var r0 *types.ResponseBeginBlock - if rf, ok := ret.Get(0).(func(types.RequestBeginBlock) *types.ResponseBeginBlock); ok { + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginBlock) *types.ResponseBeginBlock); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { @@ -28,7 +29,7 @@ func (_m *AppConnConsensus) BeginBlockSync(_a0 types.RequestBeginBlock) (*types. } var r1 error - if rf, ok := ret.Get(1).(func(types.RequestBeginBlock) error); ok { + if rf, ok := ret.Get(1).(func(ocabci.RequestBeginBlock) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) diff --git a/proxy/mocks/app_conn_mempool.go b/proxy/mocks/app_conn_mempool.go index 446687a69..11fecf0e9 100644 --- a/proxy/mocks/app_conn_mempool.go +++ b/proxy/mocks/app_conn_mempool.go @@ -3,10 +3,11 @@ package mocks import ( - abcicli "github.com/line/ostracon/abci/client" mock "github.com/stretchr/testify/mock" + types "github.com/tendermint/tendermint/abci/types" - types "github.com/line/ostracon/abci/types" + abcicli "github.com/line/ostracon/abci/client" + ocabci "github.com/line/ostracon/abci/types" ) // AppConnMempool is an autogenerated mock type for the AppConnMempool type @@ -15,20 +16,20 @@ type AppConnMempool struct { } // BeginRecheckTxSync provides a mock function with given fields: _a0 -func (_m *AppConnMempool) BeginRecheckTxSync(_a0 types.RequestBeginRecheckTx) (*types.ResponseBeginRecheckTx, error) { +func (_m *AppConnMempool) BeginRecheckTxSync(_a0 ocabci.RequestBeginRecheckTx) (*ocabci.ResponseBeginRecheckTx, error) { ret := _m.Called(_a0) - var r0 *types.ResponseBeginRecheckTx - if rf, ok := ret.Get(0).(func(types.RequestBeginRecheckTx) *types.ResponseBeginRecheckTx); ok { + var r0 *ocabci.ResponseBeginRecheckTx + if rf, ok := ret.Get(0).(func(ocabci.RequestBeginRecheckTx) *ocabci.ResponseBeginRecheckTx); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseBeginRecheckTx) + r0 = ret.Get(0).(*ocabci.ResponseBeginRecheckTx) } } var r1 error - if rf, ok := ret.Get(1).(func(types.RequestBeginRecheckTx) error); ok { + if rf, ok := ret.Get(1).(func(ocabci.RequestBeginRecheckTx) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -54,15 +55,15 @@ func (_m *AppConnMempool) CheckTxAsync(_a0 types.RequestCheckTx, _a1 abcicli.Res } // CheckTxSync provides a mock function with given fields: _a0 -func (_m *AppConnMempool) CheckTxSync(_a0 types.RequestCheckTx) (*types.ResponseCheckTx, error) { +func (_m *AppConnMempool) CheckTxSync(_a0 types.RequestCheckTx) (*ocabci.ResponseCheckTx, error) { ret := _m.Called(_a0) - var r0 *types.ResponseCheckTx - if rf, ok := ret.Get(0).(func(types.RequestCheckTx) *types.ResponseCheckTx); ok { + var r0 *ocabci.ResponseCheckTx + if rf, ok := ret.Get(0).(func(types.RequestCheckTx) *ocabci.ResponseCheckTx); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseCheckTx) + r0 = ret.Get(0).(*ocabci.ResponseCheckTx) } } @@ -77,20 +78,20 @@ func (_m *AppConnMempool) CheckTxSync(_a0 types.RequestCheckTx) (*types.Response } // EndRecheckTxSync provides a mock function with given fields: _a0 -func (_m *AppConnMempool) EndRecheckTxSync(_a0 types.RequestEndRecheckTx) (*types.ResponseEndRecheckTx, error) { +func (_m *AppConnMempool) EndRecheckTxSync(_a0 ocabci.RequestEndRecheckTx) (*ocabci.ResponseEndRecheckTx, error) { ret := _m.Called(_a0) - var r0 *types.ResponseEndRecheckTx - if rf, ok := ret.Get(0).(func(types.RequestEndRecheckTx) *types.ResponseEndRecheckTx); ok { + var r0 *ocabci.ResponseEndRecheckTx + if rf, ok := ret.Get(0).(func(ocabci.RequestEndRecheckTx) *ocabci.ResponseEndRecheckTx); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseEndRecheckTx) + r0 = ret.Get(0).(*ocabci.ResponseEndRecheckTx) } } var r1 error - if rf, ok := ret.Get(1).(func(types.RequestEndRecheckTx) error); ok { + if rf, ok := ret.Get(1).(func(ocabci.RequestEndRecheckTx) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) diff --git a/proxy/mocks/app_conn_query.go b/proxy/mocks/app_conn_query.go index 43505497a..942311e02 100644 --- a/proxy/mocks/app_conn_query.go +++ b/proxy/mocks/app_conn_query.go @@ -5,7 +5,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" - types "github.com/line/ostracon/abci/types" + types "github.com/tendermint/tendermint/abci/types" ) // AppConnQuery is an autogenerated mock type for the AppConnQuery type diff --git a/proxy/mocks/app_conn_snapshot.go b/proxy/mocks/app_conn_snapshot.go index d4389edd5..d77f6a16b 100644 --- a/proxy/mocks/app_conn_snapshot.go +++ b/proxy/mocks/app_conn_snapshot.go @@ -5,7 +5,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" - types "github.com/line/ostracon/abci/types" + types "github.com/tendermint/tendermint/abci/types" ) // AppConnSnapshot is an autogenerated mock type for the AppConnSnapshot type diff --git a/proxy/version.go b/proxy/version.go index c2b65d3fc..476d403ec 100644 --- a/proxy/version.go +++ b/proxy/version.go @@ -1,7 +1,8 @@ package proxy import ( - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/version" ) diff --git a/rpc/client/evidence_test.go b/rpc/client/evidence_test.go index 325105464..b8bad4971 100644 --- a/rpc/client/evidence_test.go +++ b/rpc/client/evidence_test.go @@ -9,14 +9,16 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/abci/example/kvstore" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/crypto/ed25519" cryptoenc "github.com/line/ostracon/crypto/encoding" "github.com/line/ostracon/crypto/tmhash" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/privval" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/rpc/client" rpctest "github.com/line/ostracon/rpc/test" "github.com/line/ostracon/types" @@ -150,7 +152,7 @@ func TestBroadcastEvidence_DuplicateVoteEvidence(t *testing.T) { require.True(t, qres.IsOK()) var v abci.ValidatorUpdate - err = abci.ReadMessage(bytes.NewReader(qres.Value), &v) + err = ocabci.ReadMessage(bytes.NewReader(qres.Value), &v) require.NoError(t, err, "Error reading query result, value %v", qres.Value) pk, err := cryptoenc.PubKeyFromProto(&v.PubKey) diff --git a/rpc/client/mock/abci.go b/rpc/client/mock/abci.go index dbeafbfc2..6f3d78553 100644 --- a/rpc/client/mock/abci.go +++ b/rpc/client/mock/abci.go @@ -3,7 +3,9 @@ package mock import ( "context" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/proxy" "github.com/line/ostracon/rpc/client" @@ -15,7 +17,7 @@ import ( // so you can test app behavior from a client without needing // an entire ostracon node type ABCIApp struct { - App abci.Application + App ocabci.Application } var ( @@ -61,8 +63,8 @@ func (a ABCIApp) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*ctypes.Re } func (a ABCIApp) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) { - chRes := make(chan abci.ResponseCheckTx, 1) - a.App.CheckTxAsync(abci.RequestCheckTx{Tx: tx}, func(res abci.ResponseCheckTx) { + chRes := make(chan ocabci.ResponseCheckTx, 1) + a.App.CheckTxAsync(abci.RequestCheckTx{Tx: tx}, func(res ocabci.ResponseCheckTx) { chRes <- res }) c := <-chRes diff --git a/rpc/client/mock/abci_test.go b/rpc/client/mock/abci_test.go index b693dc6f6..a7545f285 100644 --- a/rpc/client/mock/abci_test.go +++ b/rpc/client/mock/abci_test.go @@ -9,8 +9,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/abci/example/kvstore" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/rpc/client" "github.com/line/ostracon/rpc/client/mock" @@ -37,7 +39,7 @@ func TestABCIMock(t *testing.T) { BroadcastCommit: mock.Call{ Args: goodTx, Response: &ctypes.ResultBroadcastTxCommit{ - CheckTx: abci.ResponseCheckTx{Data: bytes.HexBytes("stand")}, + CheckTx: ocabci.ResponseCheckTx{Data: bytes.HexBytes("stand")}, DeliverTx: abci.ResponseDeliverTx{Data: bytes.HexBytes("deliver")}, }, Error: errors.New("bad tx"), diff --git a/rpc/core/abci.go b/rpc/core/abci.go index c20082c55..e56446907 100644 --- a/rpc/core/abci.go +++ b/rpc/core/abci.go @@ -1,7 +1,8 @@ package core import ( - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/proxy" ctypes "github.com/line/ostracon/rpc/core/types" diff --git a/rpc/core/blocks_test.go b/rpc/core/blocks_test.go index 744498398..cd13f8b01 100644 --- a/rpc/core/blocks_test.go +++ b/rpc/core/blocks_test.go @@ -19,9 +19,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" tmstate "github.com/line/ostracon/proto/ostracon/state" ctypes "github.com/line/ostracon/rpc/core/types" rpctypes "github.com/line/ostracon/rpc/jsonrpc/types" diff --git a/rpc/core/mempool.go b/rpc/core/mempool.go index 361633834..a22cb50a9 100644 --- a/rpc/core/mempool.go +++ b/rpc/core/mempool.go @@ -6,7 +6,9 @@ import ( "fmt" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" mempl "github.com/line/ostracon/mempool" ctypes "github.com/line/ostracon/rpc/core/types" rpctypes "github.com/line/ostracon/rpc/jsonrpc/types" @@ -85,7 +87,7 @@ func BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadc return nil, fmt.Errorf("error on broadcastTxCommit: %v", err) } checkTxRes := checkTxResMsg.GetCheckTx() - if checkTxRes.Code != abci.CodeTypeOK { + if checkTxRes.Code != ocabci.CodeTypeOK { return &ctypes.ResultBroadcastTxCommit{ CheckTx: *checkTxRes, DeliverTx: abci.ResponseDeliverTx{}, diff --git a/rpc/core/types/responses.go b/rpc/core/types/responses.go index 870814a20..0ffd114ef 100644 --- a/rpc/core/types/responses.go +++ b/rpc/core/types/responses.go @@ -4,11 +4,13 @@ import ( "encoding/json" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/crypto" "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/p2p" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) @@ -179,15 +181,15 @@ type ResultBroadcastTx struct { // CheckTx and DeliverTx results type ResultBroadcastTxCommit struct { - CheckTx abci.ResponseCheckTx `json:"check_tx"` + CheckTx ocabci.ResponseCheckTx `json:"check_tx"` DeliverTx abci.ResponseDeliverTx `json:"deliver_tx"` Hash bytes.HexBytes `json:"hash"` Height int64 `json:"height"` } -// ResultCheckTx wraps abci.ResponseCheckTx. +// ResultCheckTx wraps ocabci.ResponseCheckTx. type ResultCheckTx struct { - abci.ResponseCheckTx + ocabci.ResponseCheckTx } // Result of querying for a tx diff --git a/rpc/grpc/api.go b/rpc/grpc/api.go index b1efca20a..35fe31736 100644 --- a/rpc/grpc/api.go +++ b/rpc/grpc/api.go @@ -3,7 +3,9 @@ package coregrpc import ( "context" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" core "github.com/line/ostracon/rpc/core" rpctypes "github.com/line/ostracon/rpc/jsonrpc/types" ) @@ -25,7 +27,7 @@ func (bapi *broadcastAPI) BroadcastTx(ctx context.Context, req *RequestBroadcast } return &ResponseBroadcastTx{ - CheckTx: &abci.ResponseCheckTx{ + CheckTx: &ocabci.ResponseCheckTx{ Code: res.CheckTx.Code, Data: res.CheckTx.Data, Log: res.CheckTx.Log, diff --git a/rpc/grpc/types.pb.go b/rpc/grpc/types.pb.go index cf80c8951..cc7103c2c 100644 --- a/rpc/grpc/types.pb.go +++ b/rpc/grpc/types.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" proto "github.com/gogo/protobuf/proto" types "github.com/line/ostracon/abci/types" + types1 "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -144,8 +145,8 @@ func (m *ResponsePing) XXX_DiscardUnknown() { var xxx_messageInfo_ResponsePing proto.InternalMessageInfo type ResponseBroadcastTx struct { - CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx,proto3" json:"check_tx,omitempty"` - DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx,proto3" json:"deliver_tx,omitempty"` + CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx,proto3" json:"check_tx,omitempty"` + DeliverTx *types1.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx,proto3" json:"deliver_tx,omitempty"` } func (m *ResponseBroadcastTx) Reset() { *m = ResponseBroadcastTx{} } @@ -188,7 +189,7 @@ func (m *ResponseBroadcastTx) GetCheckTx() *types.ResponseCheckTx { return nil } -func (m *ResponseBroadcastTx) GetDeliverTx() *types.ResponseDeliverTx { +func (m *ResponseBroadcastTx) GetDeliverTx() *types1.ResponseDeliverTx { if m != nil { return m.DeliverTx } @@ -205,27 +206,28 @@ func init() { func init() { proto.RegisterFile("ostracon/rpc/grpc/types.proto", fileDescriptor_907c7db099111068) } var fileDescriptor_907c7db099111068 = []byte{ - // 316 bytes of a gzipped FileDescriptorProto + // 333 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0x2f, 0x2e, 0x29, 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x2f, 0x2a, 0x48, 0xd6, 0x4f, 0x07, 0x11, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x82, 0x30, 0x69, 0xbd, 0xa2, 0x82, 0x64, 0x3d, - 0x90, 0xb4, 0x94, 0x24, 0x5c, 0x47, 0x62, 0x52, 0x72, 0x26, 0xb2, 0x6a, 0x25, 0x5e, 0x2e, 0xee, - 0xa0, 0xd4, 0xc2, 0xd2, 0xd4, 0xe2, 0x92, 0x80, 0xcc, 0xbc, 0x74, 0x25, 0x15, 0x2e, 0x21, 0x28, - 0xd7, 0xa9, 0x28, 0x3f, 0x31, 0x25, 0x39, 0xb1, 0xb8, 0x24, 0xa4, 0x42, 0x88, 0x8f, 0x8b, 0xa9, - 0xa4, 0x42, 0x82, 0x51, 0x81, 0x51, 0x83, 0x27, 0x88, 0xa9, 0xa4, 0x42, 0x89, 0x8f, 0x8b, 0x27, - 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x15, 0xac, 0x6b, 0x22, 0x23, 0x97, 0x30, 0x4c, 0x00, - 0x59, 0x9f, 0x25, 0x17, 0x47, 0x72, 0x46, 0x6a, 0x72, 0x76, 0x3c, 0x54, 0x37, 0xb7, 0x91, 0x9c, - 0x1e, 0xdc, 0x75, 0x20, 0xa7, 0xe8, 0xc1, 0x74, 0x39, 0x83, 0x94, 0x85, 0x54, 0x04, 0xb1, 0x27, - 0x43, 0x18, 0x42, 0xf6, 0x5c, 0x5c, 0x29, 0xa9, 0x39, 0x99, 0x65, 0xa9, 0x45, 0x20, 0xcd, 0x4c, - 0x60, 0xcd, 0x0a, 0x38, 0x34, 0xbb, 0x40, 0x14, 0x86, 0x54, 0x04, 0x71, 0xa6, 0xc0, 0x98, 0x46, - 0x5b, 0x19, 0xb9, 0x78, 0xe0, 0x6e, 0x71, 0x0c, 0xf0, 0x14, 0x72, 0xe7, 0x62, 0x01, 0x39, 0x56, - 0x08, 0xc9, 0x09, 0xb0, 0x00, 0xd2, 0x43, 0x0a, 0x02, 0x29, 0x79, 0xac, 0xf2, 0x08, 0xdf, 0x0a, - 0xc5, 0x70, 0x71, 0x23, 0x7b, 0x52, 0x15, 0xb7, 0x79, 0x48, 0xca, 0xa4, 0xd4, 0xf0, 0x18, 0x8b, - 0xa4, 0xce, 0xc9, 0xe5, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, - 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xb4, 0xd2, - 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x73, 0x32, 0xf3, 0x52, 0xf5, 0x31, - 0xd2, 0x81, 0x75, 0x72, 0x7e, 0x51, 0x2a, 0x88, 0x91, 0xc4, 0x06, 0x8e, 0x5d, 0x63, 0x40, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x64, 0xf2, 0x70, 0x9d, 0x2c, 0x02, 0x00, 0x00, + 0x90, 0xb4, 0x94, 0x24, 0x5c, 0x47, 0x62, 0x52, 0x72, 0x26, 0xb2, 0x6a, 0x29, 0xe9, 0x92, 0xd4, + 0xbc, 0x94, 0xd4, 0xa2, 0xdc, 0xcc, 0xbc, 0x12, 0x0c, 0x49, 0x25, 0x5e, 0x2e, 0xee, 0xa0, 0xd4, + 0xc2, 0xd2, 0xd4, 0xe2, 0x92, 0x80, 0xcc, 0xbc, 0x74, 0x25, 0x15, 0x2e, 0x21, 0x28, 0xd7, 0xa9, + 0x28, 0x3f, 0x31, 0x25, 0x39, 0xb1, 0xb8, 0x24, 0xa4, 0x42, 0x88, 0x8f, 0x8b, 0xa9, 0xa4, 0x42, + 0x82, 0x51, 0x81, 0x51, 0x83, 0x27, 0x88, 0xa9, 0xa4, 0x42, 0x89, 0x8f, 0x8b, 0x27, 0x28, 0xb5, + 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x15, 0xac, 0x6b, 0x32, 0x23, 0x97, 0x30, 0x4c, 0x00, 0x59, 0x9f, + 0x25, 0x17, 0x47, 0x72, 0x46, 0x6a, 0x72, 0x76, 0x3c, 0x54, 0x37, 0xb7, 0x91, 0x9c, 0x1e, 0xdc, + 0xe9, 0x20, 0xa7, 0xe8, 0xc1, 0x74, 0x39, 0x83, 0x94, 0x85, 0x54, 0x04, 0xb1, 0x27, 0x43, 0x18, + 0x42, 0x8e, 0x5c, 0x5c, 0x29, 0xa9, 0x39, 0x99, 0x65, 0xa9, 0x45, 0x20, 0xcd, 0x4c, 0x60, 0xcd, + 0x4a, 0x7a, 0x08, 0x9f, 0xa0, 0x6a, 0x77, 0x81, 0x28, 0x0d, 0xa9, 0x08, 0xe2, 0x4c, 0x81, 0x31, + 0x8d, 0xb6, 0x32, 0x72, 0xf1, 0xc0, 0x5d, 0xe3, 0x18, 0xe0, 0x29, 0xe4, 0xce, 0xc5, 0x02, 0x72, + 0xae, 0x10, 0x92, 0x23, 0x60, 0xe1, 0xa7, 0x87, 0x14, 0x08, 0x52, 0xf2, 0x58, 0xe5, 0x11, 0xfe, + 0x15, 0x8a, 0xe1, 0xe2, 0x46, 0xf6, 0xa6, 0x2a, 0x6e, 0xf3, 0x90, 0x94, 0x49, 0xa9, 0xe1, 0x31, + 0x16, 0x49, 0x9d, 0x93, 0xcb, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, + 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, + 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0x64, 0xe6, 0xa5, 0xea, + 0x63, 0x24, 0x13, 0xeb, 0xe4, 0xfc, 0xa2, 0x54, 0x10, 0x23, 0x89, 0x0d, 0x1c, 0xbf, 0xc6, 0x80, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x30, 0xb5, 0xd6, 0x4d, 0x4b, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -811,7 +813,7 @@ func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.DeliverTx == nil { - m.DeliverTx = &types.ResponseDeliverTx{} + m.DeliverTx = &types1.ResponseDeliverTx{} } if err := m.DeliverTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/state/execution.go b/state/execution.go index c081413e9..a62bf1632 100644 --- a/state/execution.go +++ b/state/execution.go @@ -5,7 +5,10 @@ import ( "fmt" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/crypto" cryptoenc "github.com/line/ostracon/crypto/encoding" "github.com/line/ostracon/crypto/vrf" @@ -13,7 +16,6 @@ import ( "github.com/line/ostracon/libs/log" mempl "github.com/line/ostracon/mempool" tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/proxy" "github.com/line/ostracon/types" canonictime "github.com/line/ostracon/types/time" @@ -350,13 +352,13 @@ func execBlockOnProxyApp( abciResponses.DeliverTxs = dtxs // Execute transactions and get hash. - proxyCb := func(req *abci.Request, res *abci.Response) { - if r, ok := res.Value.(*abci.Response_DeliverTx); ok { + proxyCb := func(req *ocabci.Request, res *ocabci.Response) { + if r, ok := res.Value.(*ocabci.Response_DeliverTx); ok { // TODO: make use of res.Log // TODO: make use of this info // Blocks may include invalid txs. txRes := r.DeliverTx - if txRes.Code == abci.CodeTypeOK { + if txRes.Code == ocabci.CodeTypeOK { validTxs++ } else { logger.Debug("invalid tx", "code", txRes.Code, "log", txRes.Log) @@ -383,7 +385,7 @@ func execBlockOnProxyApp( return nil, errors.New("nil header") } - abciResponses.BeginBlock, err = proxyAppConn.BeginBlockSync(abci.RequestBeginBlock{ + abciResponses.BeginBlock, err = proxyAppConn.BeginBlockSync(ocabci.RequestBeginBlock{ Hash: block.Hash(), Header: *pbh, LastCommitInfo: commitInfo, diff --git a/state/execution_test.go b/state/execution_test.go index 389d5b866..b72597724 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -9,7 +9,10 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" cryptoenc "github.com/line/ostracon/crypto/encoding" @@ -17,8 +20,6 @@ import ( "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/libs/log" mmock "github.com/line/ostracon/mempool/mock" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/proxy" sm "github.com/line/ostracon/state" "github.com/line/ostracon/state/mocks" diff --git a/state/export_test.go b/state/export_test.go index 73ceffb72..bdfe7e7fd 100644 --- a/state/export_test.go +++ b/state/export_test.go @@ -1,11 +1,11 @@ package state import ( + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) diff --git a/state/helpers_test.go b/state/helpers_test.go index 2392fd597..a3515774e 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -5,14 +5,15 @@ import ( "fmt" "time" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" tmrand "github.com/line/ostracon/libs/rand" tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/proxy" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" @@ -249,21 +250,21 @@ func randomGenesisDoc() *types.GenesisDoc { //---------------------------------------------------------------------------- type testApp struct { - abci.BaseApplication + ocabci.BaseApplication CommitVotes []abci.VoteInfo ByzantineValidators []abci.Evidence ValidatorUpdates []abci.ValidatorUpdate } -var _ abci.Application = (*testApp)(nil) +var _ ocabci.Application = (*testApp)(nil) var TestAppVersion uint64 = 66 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) BeginBlock(req ocabci.RequestBeginBlock) abci.ResponseBeginBlock { app.CommitVotes = req.LastCommitInfo.Votes app.ByzantineValidators = req.ByzantineValidators return abci.ResponseBeginBlock{} @@ -281,12 +282,12 @@ func (app *testApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx return abci.ResponseDeliverTx{Events: []abci.Event{}} } -func (app *testApp) CheckTxSync(req abci.RequestCheckTx) abci.ResponseCheckTx { - return abci.ResponseCheckTx{} +func (app *testApp) CheckTxSync(req abci.RequestCheckTx) ocabci.ResponseCheckTx { + return ocabci.ResponseCheckTx{} } -func (app *testApp) CheckTxAsync(req abci.RequestCheckTx, callback abci.CheckTxCallback) { - callback(abci.ResponseCheckTx{}) +func (app *testApp) CheckTxAsync(req abci.RequestCheckTx, callback ocabci.CheckTxCallback) { + callback(ocabci.ResponseCheckTx{}) } func (app *testApp) Commit() abci.ResponseCommit { diff --git a/state/indexer/block/kv/kv.go b/state/indexer/block/kv/kv.go index 7f93478d1..d90a4304c 100644 --- a/state/indexer/block/kv/kv.go +++ b/state/indexer/block/kv/kv.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/google/orderedcode" + abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/pubsub/query" "github.com/line/ostracon/state/indexer" "github.com/line/ostracon/types" diff --git a/state/indexer/block/kv/kv_test.go b/state/indexer/block/kv/kv_test.go index 6173197ff..5ce5634b4 100644 --- a/state/indexer/block/kv/kv_test.go +++ b/state/indexer/block/kv/kv_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" db "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/pubsub/query" blockidxkv "github.com/line/ostracon/state/indexer/block/kv" "github.com/line/ostracon/types" diff --git a/state/indexer/sink/psql/backport.go b/state/indexer/sink/psql/backport.go index 6e2a0984e..57c85b775 100644 --- a/state/indexer/sink/psql/backport.go +++ b/state/indexer/sink/psql/backport.go @@ -17,7 +17,8 @@ import ( "context" "errors" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/libs/pubsub/query" "github.com/line/ostracon/state/txindex" "github.com/line/ostracon/types" diff --git a/state/indexer/sink/psql/backport_test.go b/state/indexer/sink/psql/backport_test.go index ed36be7d0..d4834a69b 100644 --- a/state/indexer/sink/psql/backport_test.go +++ b/state/indexer/sink/psql/backport_test.go @@ -4,7 +4,8 @@ import ( "context" "testing" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/libs/pubsub/query" "github.com/line/ostracon/state/indexer" "github.com/line/ostracon/state/txindex" diff --git a/state/indexer/sink/psql/psql.go b/state/indexer/sink/psql/psql.go index 5aebb6863..d1641667c 100644 --- a/state/indexer/sink/psql/psql.go +++ b/state/indexer/sink/psql/psql.go @@ -9,8 +9,9 @@ import ( "strings" "time" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/gogo/protobuf/proto" - abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/pubsub/query" "github.com/line/ostracon/types" ) diff --git a/state/indexer/sink/psql/psql_test.go b/state/indexer/sink/psql/psql_test.go index 514a58f03..03792620f 100644 --- a/state/indexer/sink/psql/psql_test.go +++ b/state/indexer/sink/psql/psql_test.go @@ -12,9 +12,11 @@ import ( "testing" "time" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/adlio/schema" "github.com/gogo/protobuf/proto" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/types" "github.com/ory/dockertest" "github.com/ory/dockertest/docker" @@ -257,7 +259,7 @@ func txResultWithEvents(events []abci.Event) *abci.TxResult { Tx: types.Tx("HELLO WORLD"), Result: abci.ResponseDeliverTx{ Data: []byte{0}, - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, Log: "", Events: events, }, diff --git a/state/mocks/store.go b/state/mocks/store.go index c83c54cb1..7fc3bcbbc 100644 --- a/state/mocks/store.go +++ b/state/mocks/store.go @@ -3,13 +3,12 @@ package mocks import ( - ostraconstate "github.com/line/ostracon/proto/ostracon/state" - ostracontypes "github.com/line/ostracon/types" + types "github.com/tendermint/tendermint/proto/tendermint/types" mock "github.com/stretchr/testify/mock" + tmstate "github.com/line/ostracon/proto/ostracon/state" state "github.com/line/ostracon/state" - - types "github.com/line/ostracon/proto/ostracon/types" + ostracontypes "github.com/line/ostracon/types" ) // Store is an autogenerated mock type for the Store type @@ -67,15 +66,15 @@ func (_m *Store) Load() (state.State, error) { } // LoadABCIResponses provides a mock function with given fields: _a0 -func (_m *Store) LoadABCIResponses(_a0 int64) (*ostraconstate.ABCIResponses, error) { +func (_m *Store) LoadABCIResponses(_a0 int64) (*tmstate.ABCIResponses, error) { ret := _m.Called(_a0) - var r0 *ostraconstate.ABCIResponses - if rf, ok := ret.Get(0).(func(int64) *ostraconstate.ABCIResponses); ok { + var r0 *tmstate.ABCIResponses + if rf, ok := ret.Get(0).(func(int64) *tmstate.ABCIResponses); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*ostraconstate.ABCIResponses) + r0 = ret.Get(0).(*tmstate.ABCIResponses) } } @@ -227,11 +226,11 @@ func (_m *Store) Save(_a0 state.State) error { } // SaveABCIResponses provides a mock function with given fields: _a0, _a1 -func (_m *Store) SaveABCIResponses(_a0 int64, _a1 *ostraconstate.ABCIResponses) error { +func (_m *Store) SaveABCIResponses(_a0 int64, _a1 *tmstate.ABCIResponses) error { ret := _m.Called(_a0, _a1) var r0 error - if rf, ok := ret.Get(0).(func(int64, *ostraconstate.ABCIResponses) error); ok { + if rf, ok := ret.Get(0).(func(int64, *tmstate.ABCIResponses) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) diff --git a/state/rollback.go b/state/rollback.go index 4876083c2..c66507d75 100644 --- a/state/rollback.go +++ b/state/rollback.go @@ -4,8 +4,9 @@ import ( "errors" "fmt" - tmstate "github.com/line/ostracon/proto/ostracon/state" - tmversion "github.com/line/ostracon/proto/ostracon/version" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/version" ) diff --git a/state/rollback_test.go b/state/rollback_test.go index 7ff1193ba..ebbcbf4a0 100644 --- a/state/rollback_test.go +++ b/state/rollback_test.go @@ -5,12 +5,12 @@ import ( "testing" "github.com/stretchr/testify/require" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/tmhash" - tmstate "github.com/line/ostracon/proto/ostracon/state" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/state" "github.com/line/ostracon/state/mocks" "github.com/line/ostracon/types" diff --git a/state/state.go b/state/state.go index 300d99f2f..fc51cfcc1 100644 --- a/state/state.go +++ b/state/state.go @@ -7,10 +7,12 @@ import ( "os" "time" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/crypto" - tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" + ocstate "github.com/line/ostracon/proto/ostracon/state" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" "github.com/line/ostracon/version" @@ -140,12 +142,12 @@ func (state State) IsEmpty() bool { } // ToProto takes the local state type and returns the equivalent proto type -func (state *State) ToProto() (*tmstate.State, error) { +func (state *State) ToProto() (*ocstate.State, error) { if state == nil { return nil, errors.New("state is nil") } - sm := new(tmstate.State) + sm := new(ocstate.State) sm.Version = state.Version sm.ChainID = state.ChainID @@ -186,7 +188,7 @@ func (state *State) ToProto() (*tmstate.State, error) { } // FromProto takes a state proto message & returns the local state type -func FromProto(pb *tmstate.State) (*State, error) { //nolint:golint +func FromProto(pb *ocstate.State) (*State, error) { //nolint:golint if pb == nil { return nil, errors.New("nil State") } diff --git a/state/state_test.go b/state/state_test.go index 5e483c255..fd4aa3807 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -13,15 +13,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" "github.com/line/ostracon/crypto/ed25519" cryptoenc "github.com/line/ostracon/crypto/encoding" tmrand "github.com/line/ostracon/libs/rand" tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" diff --git a/state/store.go b/state/store.go index 0fec0d565..1a8f9ae64 100644 --- a/state/store.go +++ b/state/store.go @@ -5,13 +5,14 @@ import ( "fmt" "github.com/gogo/protobuf/proto" + abci "github.com/tendermint/tendermint/abci/types" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" tmmath "github.com/line/ostracon/libs/math" tmos "github.com/line/ostracon/libs/os" - tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocstate "github.com/line/ostracon/proto/ostracon/state" "github.com/line/ostracon/types" ) @@ -63,13 +64,13 @@ type Store interface { // LoadProofHash loads the proof hash at a given height LoadProofHash(int64) ([]byte, error) // LoadABCIResponses loads the abciResponse for a given height - LoadABCIResponses(int64) (*tmstate.ABCIResponses, error) + LoadABCIResponses(int64) (*ocstate.ABCIResponses, error) // LoadConsensusParams loads the consensus params for a given height LoadConsensusParams(int64) (tmproto.ConsensusParams, error) // Save overwrites the previous state with the updated one Save(State) error // SaveABCIResponses saves ABCIResponses for a given height - SaveABCIResponses(int64, *tmstate.ABCIResponses) error + SaveABCIResponses(int64, *ocstate.ABCIResponses) error // Bootstrap is used for bootstrapping state when not starting from a initial height. Bootstrap(State) error // PruneStates takes the height from which to start prning and which height stop at @@ -141,7 +142,7 @@ func (store dbStore) loadState(key []byte) (state State, err error) { return state, nil } - sp := new(tmstate.State) + sp := new(ocstate.State) err = proto.Unmarshal(buf, sp) if err != nil { @@ -366,7 +367,7 @@ func (store dbStore) PruneStates(from int64, to int64) error { // ResponseDeliverTx responses (see ABCIResults.Hash) // // See merkle.SimpleHashFromByteSlices -func ABCIResponsesResultsHash(ar *tmstate.ABCIResponses) []byte { +func ABCIResponsesResultsHash(ar *ocstate.ABCIResponses) []byte { return types.NewResults(ar.DeliverTxs).Hash() } @@ -376,7 +377,7 @@ func ABCIResponsesResultsHash(ar *tmstate.ABCIResponses) []byte { // This is useful for recovering from crashes where we called app.Commit and // before we called s.Save(). It can also be used to produce Merkle proofs of // the result of txs. -func (store dbStore) LoadABCIResponses(height int64) (*tmstate.ABCIResponses, error) { +func (store dbStore) LoadABCIResponses(height int64) (*ocstate.ABCIResponses, error) { buf, err := store.db.Get(calcABCIResponsesKey(height)) if err != nil { return nil, err @@ -386,7 +387,7 @@ func (store dbStore) LoadABCIResponses(height int64) (*tmstate.ABCIResponses, er return nil, ErrNoABCIResponsesForHeight{height} } - abciResponses := new(tmstate.ABCIResponses) + abciResponses := new(ocstate.ABCIResponses) err = abciResponses.Unmarshal(buf) if err != nil { // DATA HAS BEEN CORRUPTED OR THE SPEC HAS CHANGED @@ -404,7 +405,7 @@ func (store dbStore) LoadABCIResponses(height int64) (*tmstate.ABCIResponses, er // Merkle proofs. // // Exposed for testing. -func (store dbStore) SaveABCIResponses(height int64, abciResponses *tmstate.ABCIResponses) error { +func (store dbStore) SaveABCIResponses(height int64, abciResponses *ocstate.ABCIResponses) error { var dtxs []*abci.ResponseDeliverTx // strip nil values, for _, tx := range abciResponses.DeliverTxs { diff --git a/state/store_test.go b/state/store_test.go index fe6a9b7ac..49b6d571e 100644 --- a/state/store_test.go +++ b/state/store_test.go @@ -9,15 +9,16 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" cfg "github.com/line/ostracon/config" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" tmrand "github.com/line/ostracon/libs/rand" - tmstate "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocstate "github.com/line/ostracon/proto/ostracon/state" sm "github.com/line/ostracon/state" statemocks "github.com/line/ostracon/state/mocks" "github.com/line/ostracon/types" @@ -177,7 +178,7 @@ func TestPruneStates(t *testing.T) { require.NoError(t, err) currentHeight := state.LastBlockHeight + int64(1) - err = stateStore.SaveABCIResponses(currentHeight, &tmstate.ABCIResponses{ + err = stateStore.SaveABCIResponses(currentHeight, &ocstate.ABCIResponses{ DeliverTxs: []*abci.ResponseDeliverTx{ {Data: []byte{1}}, {Data: []byte{2}}, @@ -287,7 +288,7 @@ func TestPruneStatesDeleteErrHandle(t *testing.T) { } func TestABCIResponsesResultsHash(t *testing.T) { - responses := &tmstate.ABCIResponses{ + responses := &ocstate.ABCIResponses{ BeginBlock: &abci.ResponseBeginBlock{}, DeliverTxs: []*abci.ResponseDeliverTx{ {Code: 32, Data: []byte("Hello"), Log: "Huh?"}, diff --git a/state/txindex/indexer.go b/state/txindex/indexer.go index 621ab6e4e..64ff599c5 100644 --- a/state/txindex/indexer.go +++ b/state/txindex/indexer.go @@ -4,7 +4,8 @@ import ( "context" "errors" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/libs/pubsub/query" ) diff --git a/state/txindex/indexer_service.go b/state/txindex/indexer_service.go index 268cd2239..bb5d17466 100644 --- a/state/txindex/indexer_service.go +++ b/state/txindex/indexer_service.go @@ -3,7 +3,9 @@ package txindex import ( "context" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/service" "github.com/line/ostracon/state/indexer" "github.com/line/ostracon/types" @@ -136,7 +138,7 @@ func DeduplicateBatch(ops []*abci.TxResult, txIdxr TxIndexer) ([]*abci.TxResult, } // if it's already indexed in an older block and was successful, skip. - if old != nil && old.Result.Code == abci.CodeTypeOK { + if old != nil && old.Result.Code == ocabci.CodeTypeOK { continue } } diff --git a/state/txindex/indexer_service_test.go b/state/txindex/indexer_service_test.go index 59ff8fa17..1947153eb 100644 --- a/state/txindex/indexer_service_test.go +++ b/state/txindex/indexer_service_test.go @@ -5,9 +5,10 @@ import ( "time" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" db "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" blockidxkv "github.com/line/ostracon/state/indexer/block/kv" "github.com/line/ostracon/state/txindex" @@ -95,7 +96,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, }, }, abci.TxResult{ @@ -103,7 +104,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK + 1, + Code: ocabci.CodeTypeOK + 1, }, }, true, @@ -114,7 +115,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK + 1, + Code: ocabci.CodeTypeOK + 1, }, }, abci.TxResult{ @@ -122,7 +123,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK + 1, + Code: ocabci.CodeTypeOK + 1, }, }, false, @@ -133,7 +134,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, }, }, abci.TxResult{ @@ -141,7 +142,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, }, }, false, @@ -152,7 +153,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK + 1, + Code: ocabci.CodeTypeOK + 1, }, }, abci.TxResult{ @@ -160,7 +161,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK + 1, + Code: ocabci.CodeTypeOK + 1, }, }, false, @@ -171,7 +172,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, }, }, abci.TxResult{ @@ -179,7 +180,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK + 1, + Code: ocabci.CodeTypeOK + 1, }, }, true, @@ -190,7 +191,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK + 1, + Code: ocabci.CodeTypeOK + 1, }, }, abci.TxResult{ @@ -198,7 +199,7 @@ func TestTxIndexDuplicatePreviouslySuccessful(t *testing.T) { Index: 0, Tx: mockTx, Result: abci.ResponseDeliverTx{ - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, }, }, false, diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index 6855cf244..0f2b5ce17 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/gogo/protobuf/proto" + abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/pubsub/query" "github.com/line/ostracon/state/indexer" "github.com/line/ostracon/state/txindex" diff --git a/state/txindex/kv/kv_bench_test.go b/state/txindex/kv/kv_bench_test.go index 9f49cf4b9..5d4f5867b 100644 --- a/state/txindex/kv/kv_bench_test.go +++ b/state/txindex/kv/kv_bench_test.go @@ -7,9 +7,10 @@ import ( "io/ioutil" "testing" + abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/pubsub/query" "github.com/line/ostracon/types" ) @@ -49,7 +50,7 @@ func BenchmarkTxSearch(b *testing.B) { Tx: types.Tx(string(txBz)), Result: abci.ResponseDeliverTx{ Data: []byte{0}, - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, Log: "", Events: events, }, diff --git a/state/txindex/kv/kv_test.go b/state/txindex/kv/kv_test.go index 3dd8cd2f7..148a2c869 100644 --- a/state/txindex/kv/kv_test.go +++ b/state/txindex/kv/kv_test.go @@ -11,9 +11,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" db "github.com/tendermint/tm-db" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/pubsub/query" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/state/txindex" @@ -30,7 +31,7 @@ func TestTxIndex(t *testing.T) { Tx: tx, Result: abci.ResponseDeliverTx{ Data: []byte{0}, - Code: abci.CodeTypeOK, Log: "", Events: nil, + Code: ocabci.CodeTypeOK, Log: "", Events: nil, }, } hash := tx.Hash() @@ -53,7 +54,7 @@ func TestTxIndex(t *testing.T) { Tx: tx2, Result: abci.ResponseDeliverTx{ Data: []byte{0}, - Code: abci.CodeTypeOK, Log: "", Events: nil, + Code: ocabci.CodeTypeOK, Log: "", Events: nil, }, } hash2 := tx2.Hash() @@ -321,7 +322,7 @@ func txResultWithEvents(events []abci.Event) *abci.TxResult { Tx: tx, Result: abci.ResponseDeliverTx{ Data: []byte{0}, - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, Log: "", Events: events, }, @@ -347,7 +348,7 @@ func benchmarkTxIndex(txsCount int64, b *testing.B) { Tx: tx, Result: abci.ResponseDeliverTx{ Data: []byte{0}, - Code: abci.CodeTypeOK, + Code: ocabci.CodeTypeOK, Log: "", Events: []abci.Event{}, }, diff --git a/state/txindex/null/null.go b/state/txindex/null/null.go index 5654ced74..c40914f81 100644 --- a/state/txindex/null/null.go +++ b/state/txindex/null/null.go @@ -4,7 +4,8 @@ import ( "context" "errors" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/libs/pubsub/query" "github.com/line/ostracon/state/txindex" ) diff --git a/state/validation_test.go b/state/validation_test.go index 116ca5861..0e307c792 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -8,12 +8,13 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/libs/log" memmock "github.com/line/ostracon/mempool/mock" - tmproto "github.com/line/ostracon/proto/ostracon/types" sm "github.com/line/ostracon/state" "github.com/line/ostracon/state/mocks" "github.com/line/ostracon/types" diff --git a/statesync/messages.go b/statesync/messages.go index 5528f01f7..b07227bbf 100644 --- a/statesync/messages.go +++ b/statesync/messages.go @@ -6,7 +6,7 @@ import ( "github.com/gogo/protobuf/proto" - ssproto "github.com/line/ostracon/proto/ostracon/statesync" + ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" ) const ( diff --git a/statesync/messages_test.go b/statesync/messages_test.go index 4afb86d8d..3f7d713ae 100644 --- a/statesync/messages_test.go +++ b/statesync/messages_test.go @@ -7,7 +7,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" - ssproto "github.com/line/ostracon/proto/ostracon/statesync" + ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" + tmproto "github.com/line/ostracon/proto/ostracon/types" ) diff --git a/statesync/reactor.go b/statesync/reactor.go index e1df45354..ae632b6f2 100644 --- a/statesync/reactor.go +++ b/statesync/reactor.go @@ -5,11 +5,12 @@ import ( "sort" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" + "github.com/line/ostracon/config" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/p2p" - ssproto "github.com/line/ostracon/proto/ostracon/statesync" "github.com/line/ostracon/proxy" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" diff --git a/statesync/reactor_test.go b/statesync/reactor_test.go index 3b8ea29e9..e995a3a10 100644 --- a/statesync/reactor_test.go +++ b/statesync/reactor_test.go @@ -4,25 +4,25 @@ import ( "testing" "time" - "github.com/line/ostracon/config" - "github.com/line/ostracon/libs/log" - tmstate "github.com/line/ostracon/proto/ostracon/state" - tmversion "github.com/line/ostracon/proto/ostracon/version" - "github.com/line/ostracon/proxy" - sm "github.com/line/ostracon/state" - "github.com/line/ostracon/statesync/mocks" - "github.com/line/ostracon/types" - "github.com/line/ostracon/version" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + + "github.com/line/ostracon/config" + "github.com/line/ostracon/libs/log" "github.com/line/ostracon/p2p" p2pmocks "github.com/line/ostracon/p2p/mocks" - ssproto "github.com/line/ostracon/proto/ostracon/statesync" + "github.com/line/ostracon/proxy" proxymocks "github.com/line/ostracon/proxy/mocks" + sm "github.com/line/ostracon/state" + "github.com/line/ostracon/statesync/mocks" + "github.com/line/ostracon/types" + "github.com/line/ostracon/version" ) func TestReactor_Receive_ChunkRequest(t *testing.T) { diff --git a/statesync/stateprovider.go b/statesync/stateprovider.go index c76f00a93..74607eb97 100644 --- a/statesync/stateprovider.go +++ b/statesync/stateprovider.go @@ -6,6 +6,7 @@ import ( "strings" "time" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" dbm "github.com/tendermint/tm-db" "github.com/line/ostracon/crypto/vrf" @@ -16,7 +17,6 @@ import ( lighthttp "github.com/line/ostracon/light/provider/http" lightrpc "github.com/line/ostracon/light/rpc" lightdb "github.com/line/ostracon/light/store/db" - tmstate "github.com/line/ostracon/proto/ostracon/state" rpchttp "github.com/line/ostracon/rpc/client/http" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" diff --git a/statesync/stateprovider_test.go b/statesync/stateprovider_test.go index 4611faac6..3d344505f 100644 --- a/statesync/stateprovider_test.go +++ b/statesync/stateprovider_test.go @@ -9,21 +9,23 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/tendermint/tendermint/proto/tendermint/state" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" tmrand "github.com/line/ostracon/libs/rand" "github.com/line/ostracon/light" - "github.com/line/ostracon/proto/ostracon/state" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" ctypes "github.com/line/ostracon/rpc/core/types" rpcserver "github.com/line/ostracon/rpc/jsonrpc/server" rpctypes "github.com/line/ostracon/rpc/jsonrpc/types" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" "github.com/line/ostracon/version" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestNewLightClientStateProvider(t *testing.T) { diff --git a/statesync/syncer.go b/statesync/syncer.go index 4372a2f88..609be22ce 100644 --- a/statesync/syncer.go +++ b/statesync/syncer.go @@ -7,13 +7,14 @@ import ( "fmt" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" + "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/light" "github.com/line/ostracon/p2p" - ssproto "github.com/line/ostracon/proto/ostracon/statesync" "github.com/line/ostracon/proxy" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" diff --git a/statesync/syncer_test.go b/statesync/syncer_test.go index 6945e2673..4ff959fa6 100644 --- a/statesync/syncer_test.go +++ b/statesync/syncer_test.go @@ -12,15 +12,16 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmstate "github.com/tendermint/tendermint/proto/tendermint/state" + ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/config" "github.com/line/ostracon/libs/log" tmsync "github.com/line/ostracon/libs/sync" "github.com/line/ostracon/p2p" p2pmocks "github.com/line/ostracon/p2p/mocks" - tmstate "github.com/line/ostracon/proto/ostracon/state" - ssproto "github.com/line/ostracon/proto/ostracon/statesync" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/proxy" proxymocks "github.com/line/ostracon/proxy/mocks" sm "github.com/line/ostracon/state" diff --git a/store/store.go b/store/store.go index 51d8ad27b..7d2376525 100644 --- a/store/store.go +++ b/store/store.go @@ -7,9 +7,11 @@ import ( "github.com/gogo/protobuf/proto" dbm "github.com/tendermint/tm-db" + tmstore "github.com/tendermint/tendermint/proto/tendermint/store" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmsync "github.com/line/ostracon/libs/sync" - tmstore "github.com/line/ostracon/proto/ostracon/store" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" ) @@ -17,9 +19,9 @@ import ( BlockStore is a simple low level store for blocks. There are three types of information stored: - - BlockMeta: Meta information about each block - - Block part: Parts of each block, aggregated w/ PartSet - - Commit: The commit part of each block, for gossiping precommit votes + - BlockMeta: Meta information about each block + - Block part: Parts of each block, aggregated w/ PartSet + - Commit: The commit part of each block, for gossiping precommit votes Currently the precommit signatures are duplicated in the Block parts as well as the Commit. In the future this may change, perhaps by moving @@ -96,7 +98,7 @@ func (bs *BlockStore) LoadBlock(height int64) *types.Block { return nil } - pbb := new(tmproto.Block) + pbb := new(ocproto.Block) buf := []byte{} for i := 0; i < int(blockMeta.BlockID.PartSetHeader.Total); i++ { part := bs.LoadBlockPart(height, i) @@ -172,7 +174,7 @@ func (bs *BlockStore) LoadBlockPart(height int64, index int) *types.Part { // LoadBlockMeta returns the BlockMeta for the given height. // If no block is found for the given height, it returns nil. func (bs *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { - var pbbm = new(tmproto.BlockMeta) + var pbbm = new(ocproto.BlockMeta) bz, err := bs.db.Get(calcBlockMetaKey(height)) if err != nil { @@ -325,9 +327,10 @@ func (bs *BlockStore) PruneBlocks(height int64) (uint64, error) { // SaveBlock persists the given block, blockParts, and seenCommit to the underlying db. // blockParts: Must be parts of the block // seenCommit: The +2/3 precommits that were seen which committed at height. -// If all the nodes restart after committing a block, -// we need this to reload the precommits to catch-up nodes to the -// most recent height. Otherwise they'd stall at H-1. +// +// If all the nodes restart after committing a block, +// we need this to reload the precommits to catch-up nodes to the +// most recent height. Otherwise they'd stall at H-1. func (bs *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) { if block == nil { panic("BlockStore can only save a non-nil block") diff --git a/store/store_test.go b/store/store_test.go index b78b7f14d..2c6010933 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -14,12 +14,13 @@ import ( "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" + tmstore "github.com/tendermint/tendermint/proto/tendermint/store" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + cfg "github.com/line/ostracon/config" "github.com/line/ostracon/crypto" "github.com/line/ostracon/libs/log" tmrand "github.com/line/ostracon/libs/rand" - tmstore "github.com/line/ostracon/proto/ostracon/store" - tmversion "github.com/line/ostracon/proto/ostracon/version" sm "github.com/line/ostracon/state" "github.com/line/ostracon/types" tmtime "github.com/line/ostracon/types/time" diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index 643e21372..474bd1bf7 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -10,11 +10,13 @@ import ( "strconv" "time" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/proto/tendermint/crypto" + "github.com/line/ostracon/abci/example/code" - abci "github.com/line/ostracon/abci/types" + ocabci "github.com/line/ostracon/abci/types" cryptoenc "github.com/line/ostracon/crypto/encoding" "github.com/line/ostracon/libs/log" - "github.com/line/ostracon/proto/ostracon/crypto" "github.com/line/ostracon/version" ) @@ -25,7 +27,7 @@ const E2EAppVersion = 999 // to disk as JSON, taking state sync snapshots if requested. type Application struct { - abci.BaseApplication + ocabci.BaseApplication logger log.Logger state *State snapshots *SnapshotStore @@ -138,10 +140,10 @@ func (app *Application) InitChain(req abci.RequestInitChain) abci.ResponseInitCh } // CheckTx implements ABCI. -func (app *Application) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { +func (app *Application) CheckTx(req abci.RequestCheckTx) ocabci.ResponseCheckTx { _, _, err := parseTx(req.Tx) if err != nil { - return abci.ResponseCheckTx{ + return ocabci.ResponseCheckTx{ Code: code.CodeTypeEncodingError, Log: err.Error(), } @@ -151,7 +153,7 @@ func (app *Application) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { time.Sleep(app.cfg.CheckTxDelay) } - return abci.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1} + return ocabci.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1} } // DeliverTx implements ABCI. @@ -277,13 +279,13 @@ func (app *Application) Rollback() error { } // validatorUpdates generates a validator set update. -func (app *Application) validatorUpdates(height uint64) (abci.ValidatorUpdates, error) { +func (app *Application) validatorUpdates(height uint64) (ocabci.ValidatorUpdates, error) { updates := app.cfg.ValidatorUpdates[fmt.Sprintf("%v", height)] if len(updates) == 0 { return nil, nil } - valUpdates := abci.ValidatorUpdates{} + valUpdates := ocabci.ValidatorUpdates{} for keyString, power := range updates { keyBytes, err := base64.StdEncoding.DecodeString(keyString) @@ -299,7 +301,7 @@ func (app *Application) validatorUpdates(height uint64) (abci.ValidatorUpdates, if err != nil { return nil, fmt.Errorf("invalid crypto pubkey %q: %w", keyString, err) } - valUpdates = append(valUpdates, abci.NewValidatorUpdate(pubKey, int64(power))) + valUpdates = append(valUpdates, ocabci.NewValidatorUpdate(pubKey, int64(power))) } return valUpdates, nil } diff --git a/test/e2e/app/snapshots.go b/test/e2e/app/snapshots.go index 724d4de5c..bd6c8686a 100644 --- a/test/e2e/app/snapshots.go +++ b/test/e2e/app/snapshots.go @@ -9,7 +9,7 @@ import ( "path/filepath" "sync" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" ) const ( diff --git a/test/fuzz/p2p/pex/init-corpus/main.go b/test/fuzz/p2p/pex/init-corpus/main.go index f95d392ba..5a050f505 100644 --- a/test/fuzz/p2p/pex/init-corpus/main.go +++ b/test/fuzz/p2p/pex/init-corpus/main.go @@ -10,9 +10,10 @@ import ( "os" "path/filepath" + tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" + "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/p2p" - tmp2p "github.com/line/ostracon/proto/ostracon/p2p" ) func main() { diff --git a/test/kms/bench_test.go b/test/kms/bench_test.go index 08237e79e..8b072bea9 100644 --- a/test/kms/bench_test.go +++ b/test/kms/bench_test.go @@ -3,7 +3,6 @@ // // $ cd test/kms // $ go test -tags libsodium -bench . -benchmem -// package main import ( @@ -12,6 +11,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + + privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" + types2 "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/config" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" @@ -20,10 +24,8 @@ import ( tmnet "github.com/line/ostracon/libs/net" "github.com/line/ostracon/node" "github.com/line/ostracon/privval" - privvalproto "github.com/line/ostracon/proto/ostracon/privval" - types2 "github.com/line/ostracon/proto/ostracon/types" + ocprivvalproto "github.com/line/ostracon/proto/ostracon/privval" "github.com/line/ostracon/types" - "github.com/stretchr/testify/require" ) var logger = log.NewOCLogger(log.NewSyncWriter(os.Stdout)) @@ -182,8 +184,8 @@ func benchmarkVRFProof(b *testing.B, pv types.PrivValidator, pubKey crypto.PubKe } func ping(sl *privval.SignerListenerEndpoint) { - msg := privvalproto.Message{ - Sum: &privvalproto.Message_PingRequest{ + msg := ocprivvalproto.Message{ + Sum: &ocprivvalproto.Message_PingRequest{ PingRequest: &privvalproto.PingRequest{}, }, } diff --git a/third_party/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto new file mode 100644 index 000000000..8e3a90936 --- /dev/null +++ b/third_party/proto/tendermint/abci/types.proto @@ -0,0 +1,407 @@ +syntax = "proto3"; +package tendermint.abci; + +option go_package = "github.com/tendermint/tendermint/abci/types"; + +// For more information on gogo.proto, see: +// https://github.com/gogo/protobuf/blob/master/extensions.md +import "tendermint/crypto/proof.proto"; +import "tendermint/types/types.proto"; +import "tendermint/crypto/keys.proto"; +import "tendermint/types/params.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; + +// This file is copied from http://github.com/tendermint/abci +// NOTE: When using custom types, mind the warnings. +// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues + +//---------------------------------------- +// Request types + +message Request { + oneof value { + RequestEcho echo = 1; + RequestFlush flush = 2; + RequestInfo info = 3; + RequestSetOption set_option = 4; + RequestInitChain init_chain = 5; + RequestQuery query = 6; + RequestBeginBlock begin_block = 7; + RequestCheckTx check_tx = 8; + RequestDeliverTx deliver_tx = 9; + RequestEndBlock end_block = 10; + RequestCommit commit = 11; + RequestListSnapshots list_snapshots = 12; + RequestOfferSnapshot offer_snapshot = 13; + RequestLoadSnapshotChunk load_snapshot_chunk = 14; + RequestApplySnapshotChunk apply_snapshot_chunk = 15; + } +} + +message RequestEcho { + string message = 1; +} + +message RequestFlush {} + +message RequestInfo { + string version = 1; + uint64 block_version = 2; + uint64 p2p_version = 3; +} + +// nondeterministic +message RequestSetOption { + string key = 1; + string value = 2; +} + +message RequestInitChain { + google.protobuf.Timestamp time = 1 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + string chain_id = 2; + ConsensusParams consensus_params = 3; + repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; + bytes app_state_bytes = 5; + int64 initial_height = 6; +} + +message RequestQuery { + bytes data = 1; + string path = 2; + int64 height = 3; + bool prove = 4; +} + +message RequestBeginBlock { + bytes hash = 1; + tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; + LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; +} + +enum CheckTxType { + NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; + RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; +} + +message RequestCheckTx { + bytes tx = 1; + CheckTxType type = 2; +} + +message RequestDeliverTx { + bytes tx = 1; +} + +message RequestEndBlock { + int64 height = 1; +} + +message RequestCommit {} + +// lists available snapshots +message RequestListSnapshots { +} + +// offers a snapshot to the application +message RequestOfferSnapshot { + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height +} + +// loads a snapshot chunk +message RequestLoadSnapshotChunk { + uint64 height = 1; + uint32 format = 2; + uint32 chunk = 3; +} + +// Applies a snapshot chunk +message RequestApplySnapshotChunk { + uint32 index = 1; + bytes chunk = 2; + string sender = 3; +} + +//---------------------------------------- +// Response types + +message Response { + oneof value { + ResponseException exception = 1; + ResponseEcho echo = 2; + ResponseFlush flush = 3; + ResponseInfo info = 4; + ResponseSetOption set_option = 5; + ResponseInitChain init_chain = 6; + ResponseQuery query = 7; + ResponseBeginBlock begin_block = 8; + ResponseCheckTx check_tx = 9; + ResponseDeliverTx deliver_tx = 10; + ResponseEndBlock end_block = 11; + ResponseCommit commit = 12; + ResponseListSnapshots list_snapshots = 13; + ResponseOfferSnapshot offer_snapshot = 14; + ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + ResponseApplySnapshotChunk apply_snapshot_chunk = 16; + } +} + +// nondeterministic +message ResponseException { + string error = 1; +} + +message ResponseEcho { + string message = 1; +} + +message ResponseFlush {} + +message ResponseInfo { + string data = 1; + + string version = 2; + uint64 app_version = 3; + + int64 last_block_height = 4; + bytes last_block_app_hash = 5; +} + +// nondeterministic +message ResponseSetOption { + uint32 code = 1; + // bytes data = 2; + string log = 3; + string info = 4; +} + +message ResponseInitChain { + ConsensusParams consensus_params = 1; + repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; + bytes app_hash = 3; +} + +message ResponseQuery { + uint32 code = 1; + // bytes data = 2; // use "value" instead. + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 index = 5; + bytes key = 6; + bytes value = 7; + tendermint.crypto.ProofOps proof_ops = 8; + int64 height = 9; + string codespace = 10; +} + +message ResponseBeginBlock { + repeated Event events = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; +} + +message ResponseCheckTx { + uint32 code = 1; + bytes data = 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; + repeated Event events = 7 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; +} + +message ResponseDeliverTx { + uint32 code = 1; + bytes data = 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; + repeated Event events = 7 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic + string codespace = 8; +} + +message ResponseEndBlock { + repeated ValidatorUpdate validator_updates = 1 + [(gogoproto.nullable) = false]; + ConsensusParams consensus_param_updates = 2; + repeated Event events = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; +} + +message ResponseCommit { + // reserve 1 + bytes data = 2; + int64 retain_height = 3; +} + +message ResponseListSnapshots { + repeated Snapshot snapshots = 1; +} + +message ResponseOfferSnapshot { + Result result = 1; + + enum Result { + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + } +} + +message ResponseLoadSnapshotChunk { + bytes chunk = 1; +} + +message ResponseApplySnapshotChunk { + Result result = 1; + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban + + enum Result { + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + } +} + +//---------------------------------------- +// Misc. + +// ConsensusParams contains all consensus-relevant parameters +// that can be adjusted by the abci app +message ConsensusParams { + BlockParams block = 1; + tendermint.types.EvidenceParams evidence = 2; + tendermint.types.ValidatorParams validator = 3; + tendermint.types.VersionParams version = 4; +} + +// BlockParams contains limits on the block size. +message BlockParams { + // Note: must be greater than 0 + int64 max_bytes = 1; + // Note: must be greater or equal to -1 + int64 max_gas = 2; +} + +message LastCommitInfo { + int32 round = 1; + repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; +} + +// Event allows application developers to attach additional information to +// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. +// Later, transactions may be queried using these events. +message Event { + string type = 1; + repeated EventAttribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes,omitempty" + ]; +} + +// EventAttribute is a single key-value pair, associated with an event. +message EventAttribute { + bytes key = 1; + bytes value = 2; + bool index = 3; // nondeterministic +} + +// TxResult contains results of executing the transaction. +// +// One usage is indexing transaction results. +message TxResult { + int64 height = 1; + uint32 index = 2; + bytes tx = 3; + ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; +} + +//---------------------------------------- +// Blockchain Types + +// Validator +message Validator { + bytes address = 1; // The first 20 bytes of SHA256(public key) + // PubKey pub_key = 2 [(gogoproto.nullable)=false]; + int64 power = 3; // The voting power +} + +// ValidatorUpdate +message ValidatorUpdate { + tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; + int64 power = 2; +} + +// VoteInfo +message VoteInfo { + Validator validator = 1 [(gogoproto.nullable) = false]; + bool signed_last_block = 2; +} + +enum EvidenceType { + UNKNOWN = 0; + DUPLICATE_VOTE = 1; + LIGHT_CLIENT_ATTACK = 2; +} + +message Evidence { + EvidenceType type = 1; + // The offending validator + Validator validator = 2 [(gogoproto.nullable) = false]; + // The height when the offense occurred + int64 height = 3; + // The corresponding time where the offense occurred + google.protobuf.Timestamp time = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + // Total voting power of the validator set in case the ABCI application does + // not store historical validators. + // https://github.com/tendermint/tendermint/issues/4581 + int64 total_voting_power = 5; +} + +//---------------------------------------- +// State Sync Types + +message Snapshot { + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata +} + +//---------------------------------------- +// Service Definition + +service ABCIApplication { + rpc Echo(RequestEcho) returns (ResponseEcho); + rpc Flush(RequestFlush) returns (ResponseFlush); + rpc Info(RequestInfo) returns (ResponseInfo); + rpc SetOption(RequestSetOption) returns (ResponseSetOption); + rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); + rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); + rpc Query(RequestQuery) returns (ResponseQuery); + rpc Commit(RequestCommit) returns (ResponseCommit); + rpc InitChain(RequestInitChain) returns (ResponseInitChain); + rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); + rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); + rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); + rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); + rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); + rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); +} diff --git a/third_party/proto/tendermint/blockchain/types.proto b/third_party/proto/tendermint/blockchain/types.proto new file mode 100644 index 000000000..f5c143cf5 --- /dev/null +++ b/third_party/proto/tendermint/blockchain/types.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; +package tendermint.blockchain; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/blockchain"; + +import "tendermint/types/block.proto"; + +// BlockRequest requests a block for a specific height +message BlockRequest { + int64 height = 1; +} + +// NoBlockResponse informs the node that the peer does not have block at the requested height +message NoBlockResponse { + int64 height = 1; +} + +// BlockResponse returns block to the requested +message BlockResponse { + tendermint.types.Block block = 1; +} + +// StatusRequest requests the status of a peer. +message StatusRequest { +} + +// StatusResponse is a peer response to inform their status. +message StatusResponse { + int64 height = 1; + int64 base = 2; +} + +message Message { + oneof sum { + BlockRequest block_request = 1; + NoBlockResponse no_block_response = 2; + BlockResponse block_response = 3; + StatusRequest status_request = 4; + StatusResponse status_response = 5; + } +} diff --git a/third_party/proto/tendermint/consensus/types.proto b/third_party/proto/tendermint/consensus/types.proto new file mode 100644 index 000000000..6e1f41371 --- /dev/null +++ b/third_party/proto/tendermint/consensus/types.proto @@ -0,0 +1,92 @@ +syntax = "proto3"; +package tendermint.consensus; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/consensus"; + +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/libs/bits/types.proto"; + +// NewRoundStep is sent for every step taken in the ConsensusState. +// For every height/round/step transition +message NewRoundStep { + int64 height = 1; + int32 round = 2; + uint32 step = 3; + int64 seconds_since_start_time = 4; + int32 last_commit_round = 5; +} + +// NewValidBlock is sent when a validator observes a valid block B in some round r, +//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. +// In case the block is also committed, then IsCommit flag is set to true. +message NewValidBlock { + int64 height = 1; + int32 round = 2; + tendermint.types.PartSetHeader block_part_set_header = 3 [(gogoproto.nullable) = false]; + tendermint.libs.bits.BitArray block_parts = 4; + bool is_commit = 5; +} + +// Proposal is sent when a new block is proposed. +message Proposal { + tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; +} + +// ProposalPOL is sent when a previous proposal is re-proposed. +message ProposalPOL { + int64 height = 1; + int32 proposal_pol_round = 2; + tendermint.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false]; +} + +// BlockPart is sent when gossipping a piece of the proposed block. +message BlockPart { + int64 height = 1; + int32 round = 2; + tendermint.types.Part part = 3 [(gogoproto.nullable) = false]; +} + +// Vote is sent when voting for a proposal (or lack thereof). +message Vote { + tendermint.types.Vote vote = 1; +} + +// HasVote is sent to indicate that a particular vote has been received. +message HasVote { + int64 height = 1; + int32 round = 2; + tendermint.types.SignedMsgType type = 3; + int32 index = 4; +} + +// VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes. +message VoteSetMaj23 { + int64 height = 1; + int32 round = 2; + tendermint.types.SignedMsgType type = 3; + tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; +} + +// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID. +message VoteSetBits { + int64 height = 1; + int32 round = 2; + tendermint.types.SignedMsgType type = 3; + tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + tendermint.libs.bits.BitArray votes = 5 [(gogoproto.nullable) = false]; +} + +message Message { + oneof sum { + NewRoundStep new_round_step = 1; + NewValidBlock new_valid_block = 2; + Proposal proposal = 3; + ProposalPOL proposal_pol = 4; + BlockPart block_part = 5; + Vote vote = 6; + HasVote has_vote = 7; + VoteSetMaj23 vote_set_maj23 = 8; + VoteSetBits vote_set_bits = 9; + } +} diff --git a/proto/ostracon/consensus/wal.proto b/third_party/proto/tendermint/consensus/wal.proto similarity index 68% rename from proto/ostracon/consensus/wal.proto rename to third_party/proto/tendermint/consensus/wal.proto index 36c91a2ae..44afa2c0c 100644 --- a/proto/ostracon/consensus/wal.proto +++ b/third_party/proto/tendermint/consensus/wal.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package ostracon.consensus; +package tendermint.consensus; -option go_package = "github.com/line/ostracon/proto/ostracon/consensus"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/consensus"; import "gogoproto/gogo.proto"; -import "ostracon/consensus/types.proto"; -import "ostracon/types/events.proto"; +import "tendermint/consensus/types.proto"; +import "tendermint/types/events.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -32,10 +32,10 @@ message EndHeight { message WALMessage { oneof sum { - ostracon.types.EventDataRoundState event_data_round_state = 1; - MsgInfo msg_info = 2; - TimeoutInfo timeout_info = 3; - EndHeight end_height = 4; + tendermint.types.EventDataRoundState event_data_round_state = 1; + MsgInfo msg_info = 2; + TimeoutInfo timeout_info = 3; + EndHeight end_height = 4; } } diff --git a/proto/ostracon/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto similarity index 54% rename from proto/ostracon/crypto/keys.proto rename to third_party/proto/tendermint/crypto/keys.proto index c375549cb..16fd7adf3 100644 --- a/proto/ostracon/crypto/keys.proto +++ b/third_party/proto/tendermint/crypto/keys.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package ostracon.crypto; +package tendermint.crypto; -option go_package = "github.com/line/ostracon/proto/ostracon/crypto"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; import "gogoproto/gogo.proto"; -// PublicKey defines the keys available for use with Ostracon Validators +// PublicKey defines the keys available for use with Tendermint Validators message PublicKey { option (gogoproto.compare) = true; option (gogoproto.equal) = true; diff --git a/proto/ostracon/crypto/proof.proto b/third_party/proto/tendermint/crypto/proof.proto similarity index 88% rename from proto/ostracon/crypto/proof.proto rename to third_party/proto/tendermint/crypto/proof.proto index 7ea7b277f..975df7685 100644 --- a/proto/ostracon/crypto/proof.proto +++ b/third_party/proto/tendermint/crypto/proof.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package ostracon.crypto; +package tendermint.crypto; -option go_package = "github.com/line/ostracon/proto/ostracon/crypto"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/tendermint/libs/bits/types.proto b/third_party/proto/tendermint/libs/bits/types.proto new file mode 100644 index 000000000..3111d113a --- /dev/null +++ b/third_party/proto/tendermint/libs/bits/types.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +package tendermint.libs.bits; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; + +message BitArray { + int64 bits = 1; + repeated uint64 elems = 2; +} diff --git a/proto/ostracon/mempool/types.proto b/third_party/proto/tendermint/mempool/types.proto similarity index 52% rename from proto/ostracon/mempool/types.proto rename to third_party/proto/tendermint/mempool/types.proto index e71ab51ef..b55d9717b 100644 --- a/proto/ostracon/mempool/types.proto +++ b/third_party/proto/tendermint/mempool/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package ostracon.mempool; +package tendermint.mempool; -option go_package = "github.com/line/ostracon/proto/ostracon/mempool"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/mempool"; message Txs { repeated bytes txs = 1; diff --git a/proto/ostracon/p2p/pex.proto b/third_party/proto/tendermint/p2p/pex.proto similarity index 65% rename from proto/ostracon/p2p/pex.proto rename to third_party/proto/tendermint/p2p/pex.proto index 1439e6ac6..dfe238dbe 100644 --- a/proto/ostracon/p2p/pex.proto +++ b/third_party/proto/tendermint/p2p/pex.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package ostracon.p2p; +package tendermint.p2p; -option go_package = "github.com/line/ostracon/proto/ostracon/p2p"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; -import "ostracon/p2p/types.proto"; +import "tendermint/p2p/types.proto"; import "gogoproto/gogo.proto"; message PexRequest {} diff --git a/proto/ostracon/p2p/types.proto b/third_party/proto/tendermint/p2p/types.proto similarity index 90% rename from proto/ostracon/p2p/types.proto rename to third_party/proto/tendermint/p2p/types.proto index 4db191263..0d42ea400 100644 --- a/proto/ostracon/p2p/types.proto +++ b/third_party/proto/tendermint/p2p/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package ostracon.p2p; +package tendermint.p2p; -option go_package = "github.com/line/ostracon/proto/ostracon/p2p"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/tendermint/privval/types.proto b/third_party/proto/tendermint/privval/types.proto new file mode 100644 index 000000000..0fc8b61dc --- /dev/null +++ b/third_party/proto/tendermint/privval/types.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; +package tendermint.privval; + +import "tendermint/crypto/keys.proto"; +import "tendermint/types/types.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/privval"; + +enum Errors { + ERRORS_UNKNOWN = 0; + ERRORS_UNEXPECTED_RESPONSE = 1; + ERRORS_NO_CONNECTION = 2; + ERRORS_CONNECTION_TIMEOUT = 3; + ERRORS_READ_TIMEOUT = 4; + ERRORS_WRITE_TIMEOUT = 5; +} + +message RemoteSignerError { + int32 code = 1; + string description = 2; +} + +// PubKeyRequest requests the consensus public key from the remote signer. +message PubKeyRequest { + string chain_id = 1; +} + +// PubKeyResponse is a response message containing the public key. +message PubKeyResponse { + tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; + RemoteSignerError error = 2; +} + +// SignVoteRequest is a request to sign a vote +message SignVoteRequest { + tendermint.types.Vote vote = 1; + string chain_id = 2; +} + +// SignedVoteResponse is a response containing a signed vote or an error +message SignedVoteResponse { + tendermint.types.Vote vote = 1 [(gogoproto.nullable) = false]; + RemoteSignerError error = 2; +} + +// SignProposalRequest is a request to sign a proposal +message SignProposalRequest { + tendermint.types.Proposal proposal = 1; + string chain_id = 2; +} + +// SignedProposalResponse is response containing a signed proposal or an error +message SignedProposalResponse { + tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; + RemoteSignerError error = 2; +} + +// PingRequest is a request to confirm that the connection is alive. +message PingRequest {} + +// PingResponse is a response to confirm that the connection is alive. +message PingResponse {} + +message Message { + oneof sum { + PubKeyRequest pub_key_request = 1; + PubKeyResponse pub_key_response = 2; + SignVoteRequest sign_vote_request = 3; + SignedVoteResponse signed_vote_response = 4; + SignProposalRequest sign_proposal_request = 5; + SignedProposalResponse signed_proposal_response = 6; + PingRequest ping_request = 7; + PingResponse ping_response = 8; + } +} diff --git a/third_party/proto/tendermint/state/types.proto b/third_party/proto/tendermint/state/types.proto new file mode 100644 index 000000000..919da91e5 --- /dev/null +++ b/third_party/proto/tendermint/state/types.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; +package tendermint.state; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/state"; + +import "gogoproto/gogo.proto"; +import "tendermint/abci/types.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/validator.proto"; +import "tendermint/types/params.proto"; +import "tendermint/version/types.proto"; +import "google/protobuf/timestamp.proto"; + +// ABCIResponses retains the responses +// 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; +} + +// ValidatorsInfo represents the latest validator set, or the last height it changed +message ValidatorsInfo { + tendermint.types.ValidatorSet validator_set = 1; + int64 last_height_changed = 2; +} + +// ConsensusParamsInfo represents the latest consensus params, or the last height it changed +message ConsensusParamsInfo { + tendermint.types.ConsensusParams consensus_params = 1 [(gogoproto.nullable) = false]; + int64 last_height_changed = 2; +} + +message Version { + tendermint.version.Consensus consensus = 1 [(gogoproto.nullable) = false]; + string software = 2; +} + +message State { + Version version = 1 [(gogoproto.nullable) = false]; + + // immutable + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 initial_height = 14; + + // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) + int64 last_block_height = 3; + tendermint.types.BlockID last_block_id = 4 + [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; + google.protobuf.Timestamp last_block_time = 5 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // LastValidators is used to validate block.LastCommit. + // Validators are persisted to the database separately every time they change, + // so we can query for historical validator sets. + // Note that if s.LastBlockHeight causes a valset change, + // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 + // Extra +1 due to nextValSet delay. + tendermint.types.ValidatorSet next_validators = 6; + tendermint.types.ValidatorSet validators = 7; + tendermint.types.ValidatorSet last_validators = 8; + int64 last_height_validators_changed = 9; + + // Consensus parameters used for validating blocks. + // Changes returned by EndBlock and updated after Commit. + tendermint.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false]; + int64 last_height_consensus_params_changed = 11; + + // Merkle root of the results from executing prev block + bytes last_results_hash = 12; + + // the latest AppHash we've received from calling abci.Commit() + bytes app_hash = 13; +} diff --git a/proto/ostracon/statesync/types.proto b/third_party/proto/tendermint/statesync/types.proto similarity index 85% rename from proto/ostracon/statesync/types.proto rename to third_party/proto/tendermint/statesync/types.proto index 1470e93bf..8d4a714c1 100644 --- a/proto/ostracon/statesync/types.proto +++ b/third_party/proto/tendermint/statesync/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package ostracon.statesync; +package tendermint.statesync; -option go_package = "github.com/line/ostracon/proto/ostracon/statesync"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/statesync"; message Message { oneof sum { diff --git a/third_party/proto/tendermint/store/types.proto b/third_party/proto/tendermint/store/types.proto new file mode 100644 index 000000000..af2f97ad0 --- /dev/null +++ b/third_party/proto/tendermint/store/types.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +package tendermint.store; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/store"; + +message BlockStoreState { + int64 base = 1; + int64 height = 2; +} diff --git a/third_party/proto/tendermint/types/block.proto b/third_party/proto/tendermint/types/block.proto new file mode 100644 index 000000000..84e9bb15d --- /dev/null +++ b/third_party/proto/tendermint/types/block.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/evidence.proto"; + +message Block { + Header header = 1 [(gogoproto.nullable) = false]; + Data data = 2 [(gogoproto.nullable) = false]; + tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; + Commit last_commit = 4; +} diff --git a/proto/ostracon/types/canonical.proto b/third_party/proto/tendermint/types/canonical.proto similarity index 91% rename from proto/ostracon/types/canonical.proto rename to third_party/proto/tendermint/types/canonical.proto index 47348dfbf..e88fd6ffe 100644 --- a/proto/ostracon/types/canonical.proto +++ b/third_party/proto/tendermint/types/canonical.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package ostracon.types; +package tendermint.types; -option go_package = "github.com/line/ostracon/proto/ostracon/types"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; import "gogoproto/gogo.proto"; -import "ostracon/types/types.proto"; +import "tendermint/types/types.proto"; import "google/protobuf/timestamp.proto"; message CanonicalBlockID { diff --git a/proto/ostracon/types/events.proto b/third_party/proto/tendermint/types/events.proto similarity index 52% rename from proto/ostracon/types/events.proto rename to third_party/proto/tendermint/types/events.proto index 82e83593c..a1e5cc498 100644 --- a/proto/ostracon/types/events.proto +++ b/third_party/proto/tendermint/types/events.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package ostracon.types; +package tendermint.types; -option go_package = "github.com/line/ostracon/proto/ostracon/types"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; message EventDataRoundState { int64 height = 1; diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto new file mode 100644 index 000000000..3b234571b --- /dev/null +++ b/third_party/proto/tendermint/types/evidence.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/validator.proto"; + +message Evidence { + oneof sum { + DuplicateVoteEvidence duplicate_vote_evidence = 1; + LightClientAttackEvidence light_client_attack_evidence = 2; + } +} + +// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. +message DuplicateVoteEvidence { + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. +message LightClientAttackEvidence { + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; + repeated tendermint.types.Validator byzantine_validators = 3; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +message EvidenceList { + repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/ostracon/types/params.proto b/third_party/proto/tendermint/types/params.proto similarity index 95% rename from proto/ostracon/types/params.proto rename to third_party/proto/tendermint/types/params.proto index 37f39b47b..0de7d846f 100644 --- a/proto/ostracon/types/params.proto +++ b/third_party/proto/tendermint/types/params.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package ostracon.types; +package tendermint.types; -option go_package = "github.com/line/ostracon/proto/ostracon/types"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto new file mode 100644 index 000000000..7f7ea74ca --- /dev/null +++ b/third_party/proto/tendermint/types/types.proto @@ -0,0 +1,157 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "tendermint/crypto/proof.proto"; +import "tendermint/version/types.proto"; +import "tendermint/types/validator.proto"; + +// BlockIdFlag indicates which BlcokID the signature is for +enum BlockIDFlag { + option (gogoproto.goproto_enum_stringer) = true; + option (gogoproto.goproto_enum_prefix) = false; + + BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; + BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; + BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; + BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; +} + +// SignedMsgType is a type of signed message in the consensus. +enum SignedMsgType { + option (gogoproto.goproto_enum_stringer) = true; + option (gogoproto.goproto_enum_prefix) = false; + + SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; + // Votes + SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; + SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; + + // Proposals + SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; +} + +// PartsetHeader +message PartSetHeader { + uint32 total = 1; + bytes hash = 2; +} + +message Part { + uint32 index = 1; + bytes bytes = 2; + tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; +} + +// BlockID +message BlockID { + bytes hash = 1; + PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; +} + +// -------------------------------- + +// Header defines the structure of a Tendermint block header. +message Header { + // basic block info + tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // prev block info + BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + + // hashes of block data + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions + + // hashes from the app output from the prev block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + + // consensus info + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block +} + +// Data contains the set of transactions included in the block +message Data { + // Txs that will be applied by state @ block.Height+1. + // NOTE: not all txs here are valid. We're just agreeing on the order first. + // This means that block.AppHash does not include these txs. + repeated bytes txs = 1; +} + +// Vote represents a prevote, precommit, or commit vote from validators for +// consensus. +message Vote { + SignedMsgType type = 1; + int64 height = 2; + int32 round = 3; + BlockID block_id = 4 + [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; + bytes signature = 8; +} + +// Commit contains the evidence that a block was committed by a set of validators. +message Commit { + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; +} + +// CommitSig is a part of the Vote included in a Commit. +message CommitSig { + BlockIDFlag block_id_flag = 1; + bytes validator_address = 2; + google.protobuf.Timestamp timestamp = 3 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; +} + +message Proposal { + SignedMsgType type = 1; + int64 height = 2; + int32 round = 3; + int32 pol_round = 4; + BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + google.protobuf.Timestamp timestamp = 6 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; +} + +message SignedHeader { + Header header = 1; + Commit commit = 2; +} + +message LightBlock { + SignedHeader signed_header = 1; + tendermint.types.ValidatorSet validator_set = 2; +} + +message BlockMeta { + BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + int64 block_size = 2; + Header header = 3 [(gogoproto.nullable) = false]; + int64 num_txs = 4; +} + +// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. +message TxProof { + bytes root_hash = 1; + bytes data = 2; + tendermint.crypto.Proof proof = 3; +} diff --git a/third_party/proto/tendermint/types/validator.proto b/third_party/proto/tendermint/types/validator.proto new file mode 100644 index 000000000..49860b96d --- /dev/null +++ b/third_party/proto/tendermint/types/validator.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "tendermint/crypto/keys.proto"; + +message ValidatorSet { + repeated Validator validators = 1; + Validator proposer = 2; + int64 total_voting_power = 3; +} + +message Validator { + bytes address = 1; + tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; + int64 voting_power = 3; + int64 proposer_priority = 4; +} + +message SimpleValidator { + tendermint.crypto.PublicKey pub_key = 1; + int64 voting_power = 2; +} diff --git a/proto/ostracon/version/types.proto b/third_party/proto/tendermint/version/types.proto similarity index 84% rename from proto/ostracon/version/types.proto rename to third_party/proto/tendermint/version/types.proto index 135dbd49e..6061868bd 100644 --- a/proto/ostracon/version/types.proto +++ b/third_party/proto/tendermint/version/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package ostracon.version; +package tendermint.version; -option go_package = "github.com/line/ostracon/proto/ostracon/version"; +option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; import "gogoproto/gogo.proto"; diff --git a/tools/tm-signer-harness/internal/test_harness.go b/tools/tm-signer-harness/internal/test_harness.go index 521fecbdb..02b02710f 100644 --- a/tools/tm-signer-harness/internal/test_harness.go +++ b/tools/tm-signer-harness/internal/test_harness.go @@ -8,16 +8,15 @@ import ( "os/signal" "time" - "github.com/line/ostracon/crypto/tmhash" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/line/ostracon/crypto/ed25519" - "github.com/line/ostracon/privval" - "github.com/line/ostracon/state" - + "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/libs/log" tmnet "github.com/line/ostracon/libs/net" tmos "github.com/line/ostracon/libs/os" - tmproto "github.com/line/ostracon/proto/ostracon/types" + "github.com/line/ostracon/privval" + "github.com/line/ostracon/state" "github.com/line/ostracon/types" ) diff --git a/types/block.go b/types/block.go index 508f53e00..176a2d59c 100644 --- a/types/block.go +++ b/types/block.go @@ -7,12 +7,14 @@ import ( "strings" "time" - "github.com/line/ostracon/crypto/ed25519" - "github.com/gogo/protobuf/proto" gogotypes "github.com/gogo/protobuf/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/crypto" + "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/crypto/vrf" @@ -20,8 +22,7 @@ import ( tmbytes "github.com/line/ostracon/libs/bytes" tmmath "github.com/line/ostracon/libs/math" tmsync "github.com/line/ostracon/libs/sync" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/version" ) @@ -243,12 +244,12 @@ func (b *Block) StringShort() string { } // ToProto converts Block to protobuf -func (b *Block) ToProto() (*tmproto.Block, error) { +func (b *Block) ToProto() (*ocproto.Block, error) { if b == nil { return nil, errors.New("nil Block") } - pb := new(tmproto.Block) + pb := new(ocproto.Block) pb.Header = *b.Header.ToProto() pb.LastCommit = b.LastCommit.ToProto() @@ -265,7 +266,7 @@ func (b *Block) ToProto() (*tmproto.Block, error) { // FromProto sets a protobuf Block to the given pointer. // It returns an error if the block is invalid. -func BlockFromProto(bp *tmproto.Block) (*Block, error) { +func BlockFromProto(bp *ocproto.Block) (*Block, error) { if bp == nil { return nil, errors.New("nil block") } @@ -563,12 +564,12 @@ func (h *Header) StringIndented(indent string) string { } // ToProto converts Header to protobuf -func (h *Header) ToProto() *tmproto.Header { +func (h *Header) ToProto() *ocproto.Header { if h == nil { return nil } - return &tmproto.Header{ + return &ocproto.Header{ Version: h.Version, ChainID: h.ChainID, Height: h.Height, @@ -590,7 +591,7 @@ func (h *Header) ToProto() *tmproto.Header { // FromProto sets a protobuf Header to the given pointer. // It returns an error if the header is invalid. -func HeaderFromProto(ph *tmproto.Header) (Header, error) { +func HeaderFromProto(ph *ocproto.Header) (Header, error) { if ph == nil { return Header{}, errors.New("nil Header") } @@ -1182,13 +1183,13 @@ func (data *EvidenceData) StringIndented(indent string) string { } // ToProto converts EvidenceData to protobuf -func (data *EvidenceData) ToProto() (*tmproto.EvidenceList, error) { +func (data *EvidenceData) ToProto() (*ocproto.EvidenceList, error) { if data == nil { return nil, errors.New("nil evidence data") } - evi := new(tmproto.EvidenceList) - eviBzs := make([]tmproto.Evidence, len(data.Evidence)) + evi := new(ocproto.EvidenceList) + eviBzs := make([]ocproto.Evidence, len(data.Evidence)) for i := range data.Evidence { protoEvi, err := EvidenceToProto(data.Evidence[i]) if err != nil { @@ -1202,7 +1203,7 @@ func (data *EvidenceData) ToProto() (*tmproto.EvidenceList, error) { } // FromProto sets a protobuf EvidenceData to the given pointer. -func (data *EvidenceData) FromProto(eviData *tmproto.EvidenceList) error { +func (data *EvidenceData) FromProto(eviData *ocproto.EvidenceList) error { if eviData == nil { return errors.New("nil evidenceData") } diff --git a/types/block_test.go b/types/block_test.go index b14ae9bf0..aecbd18bb 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -17,6 +17,9 @@ import ( gogotypes "github.com/gogo/protobuf/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/crypto/tmhash" @@ -24,8 +27,6 @@ import ( "github.com/line/ostracon/libs/bits" "github.com/line/ostracon/libs/bytes" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" tmtime "github.com/line/ostracon/types/time" "github.com/line/ostracon/version" ) diff --git a/types/canonical.go b/types/canonical.go index c554ef18e..3b170c0d8 100644 --- a/types/canonical.go +++ b/types/canonical.go @@ -3,7 +3,8 @@ package types import ( "time" - tmproto "github.com/line/ostracon/proto/ostracon/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtime "github.com/line/ostracon/types/time" ) diff --git a/types/canonical_test.go b/types/canonical_test.go index 5c3622af3..66517c9d7 100644 --- a/types/canonical_test.go +++ b/types/canonical_test.go @@ -4,9 +4,10 @@ import ( "reflect" "testing" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/tmhash" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) func TestCanonicalizeBlockID(t *testing.T) { diff --git a/types/event_bus.go b/types/event_bus.go index 2bd602e6e..f294dc0b6 100644 --- a/types/event_bus.go +++ b/types/event_bus.go @@ -4,7 +4,8 @@ import ( "context" "fmt" - "github.com/line/ostracon/abci/types" + "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/libs/log" tmpubsub "github.com/line/ostracon/libs/pubsub" "github.com/line/ostracon/libs/service" @@ -227,7 +228,7 @@ func (b *EventBus) PublishEventValidatorSetUpdates(data EventDataValidatorSetUpd return b.Publish(EventValidatorSetUpdates, data) } -//----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- type NopEventBus struct{} func (NopEventBus) Subscribe( diff --git a/types/event_bus_test.go b/types/event_bus_test.go index f0e93a754..baa257a23 100644 --- a/types/event_bus_test.go +++ b/types/event_bus_test.go @@ -10,7 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmpubsub "github.com/line/ostracon/libs/pubsub" tmquery "github.com/line/ostracon/libs/pubsub/query" tmrand "github.com/line/ostracon/libs/rand" diff --git a/types/events.go b/types/events.go index 770b06bab..6cf1885af 100644 --- a/types/events.go +++ b/types/events.go @@ -3,7 +3,8 @@ package types import ( "fmt" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmjson "github.com/line/ostracon/libs/json" tmpubsub "github.com/line/ostracon/libs/pubsub" tmquery "github.com/line/ostracon/libs/pubsub/query" diff --git a/types/evidence.go b/types/evidence.go index 3ac0e94cd..cb00a9468 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -9,12 +9,14 @@ import ( "strings" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/crypto/tmhash" tmjson "github.com/line/ostracon/libs/json" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" ) func MaxEvidenceBytes(ev Evidence) int64 { @@ -156,10 +158,10 @@ func (dve *DuplicateVoteEvidence) ValidateBasic() error { } // ToProto encodes DuplicateVoteEvidence to protobuf -func (dve *DuplicateVoteEvidence) ToProto() *tmproto.DuplicateVoteEvidence { +func (dve *DuplicateVoteEvidence) ToProto() *ocproto.DuplicateVoteEvidence { voteB := dve.VoteB.ToProto() voteA := dve.VoteA.ToProto() - tp := tmproto.DuplicateVoteEvidence{ + tp := ocproto.DuplicateVoteEvidence{ VoteA: voteA, VoteB: voteB, TotalVotingPower: dve.TotalVotingPower, @@ -170,7 +172,7 @@ func (dve *DuplicateVoteEvidence) ToProto() *tmproto.DuplicateVoteEvidence { } // DuplicateVoteEvidenceFromProto decodes protobuf into DuplicateVoteEvidence -func DuplicateVoteEvidenceFromProto(pb *tmproto.DuplicateVoteEvidence) (*DuplicateVoteEvidence, error) { +func DuplicateVoteEvidenceFromProto(pb *ocproto.DuplicateVoteEvidence) (*DuplicateVoteEvidence, error) { if pb == nil { return nil, errors.New("nil duplicate vote evidence") } @@ -382,7 +384,7 @@ func (l *LightClientAttackEvidence) ValidateBasic() error { } // ToProto encodes LightClientAttackEvidence to protobuf -func (l *LightClientAttackEvidence) ToProto() (*tmproto.LightClientAttackEvidence, error) { +func (l *LightClientAttackEvidence) ToProto() (*ocproto.LightClientAttackEvidence, error) { conflictingBlock, err := l.ConflictingBlock.ToProto() if err != nil { return nil, err @@ -397,7 +399,7 @@ func (l *LightClientAttackEvidence) ToProto() (*tmproto.LightClientAttackEvidenc byzVals[idx] = valpb } - return &tmproto.LightClientAttackEvidence{ + return &ocproto.LightClientAttackEvidence{ ConflictingBlock: conflictingBlock, CommonHeight: l.CommonHeight, ByzantineValidators: byzVals, @@ -407,7 +409,7 @@ func (l *LightClientAttackEvidence) ToProto() (*tmproto.LightClientAttackEvidenc } // LightClientAttackEvidenceFromProto decodes protobuf -func LightClientAttackEvidenceFromProto(lpb *tmproto.LightClientAttackEvidence) (*LightClientAttackEvidence, error) { +func LightClientAttackEvidenceFromProto(lpb *ocproto.LightClientAttackEvidence) (*LightClientAttackEvidence, error) { if lpb == nil { return nil, errors.New("empty light client attack evidence") } @@ -478,7 +480,7 @@ func (evl EvidenceList) Has(evidence Evidence) bool { // EvidenceToProto is a generalized function for encoding evidence that conforms to the // evidence interface to protobuf -func EvidenceToProto(evidence Evidence) (*tmproto.Evidence, error) { +func EvidenceToProto(evidence Evidence) (*ocproto.Evidence, error) { if evidence == nil { return nil, errors.New("nil evidence") } @@ -486,8 +488,8 @@ func EvidenceToProto(evidence Evidence) (*tmproto.Evidence, error) { switch evi := evidence.(type) { case *DuplicateVoteEvidence: pbev := evi.ToProto() - return &tmproto.Evidence{ - Sum: &tmproto.Evidence_DuplicateVoteEvidence{ + return &ocproto.Evidence{ + Sum: &ocproto.Evidence_DuplicateVoteEvidence{ DuplicateVoteEvidence: pbev, }, }, nil @@ -497,8 +499,8 @@ func EvidenceToProto(evidence Evidence) (*tmproto.Evidence, error) { if err != nil { return nil, err } - return &tmproto.Evidence{ - Sum: &tmproto.Evidence_LightClientAttackEvidence{ + return &ocproto.Evidence{ + Sum: &ocproto.Evidence_LightClientAttackEvidence{ LightClientAttackEvidence: pbev, }, }, nil @@ -510,15 +512,15 @@ func EvidenceToProto(evidence Evidence) (*tmproto.Evidence, error) { // EvidenceFromProto is a generalized function for decoding protobuf into the // evidence interface -func EvidenceFromProto(evidence *tmproto.Evidence) (Evidence, error) { +func EvidenceFromProto(evidence *ocproto.Evidence) (Evidence, error) { if evidence == nil { return nil, errors.New("nil evidence") } switch evi := evidence.Sum.(type) { - case *tmproto.Evidence_DuplicateVoteEvidence: + case *ocproto.Evidence_DuplicateVoteEvidence: return DuplicateVoteEvidenceFromProto(evi.DuplicateVoteEvidence) - case *tmproto.Evidence_LightClientAttackEvidence: + case *ocproto.Evidence_LightClientAttackEvidence: return LightClientAttackEvidenceFromProto(evi.LightClientAttackEvidence) default: return nil, errors.New("evidence is not recognized") diff --git a/types/evidence_test.go b/types/evidence_test.go index 7c653315a..c4ab9a358 100644 --- a/types/evidence_test.go +++ b/types/evidence_test.go @@ -8,11 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/tmhash" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/version" ) diff --git a/types/genesis.go b/types/genesis.go index d316a4bc6..255ce0402 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -8,11 +8,12 @@ import ( "os" "time" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" tmbytes "github.com/line/ostracon/libs/bytes" tmjson "github.com/line/ostracon/libs/json" tmos "github.com/line/ostracon/libs/os" - tmproto "github.com/line/ostracon/proto/ostracon/types" tmtime "github.com/line/ostracon/types/time" ) diff --git a/types/light_test.go b/types/light_test.go index 69ed380c0..e0f4a14b6 100644 --- a/types/light_test.go +++ b/types/light_test.go @@ -7,8 +7,9 @@ import ( "github.com/stretchr/testify/assert" + tmversion "github.com/tendermint/tendermint/proto/tendermint/version" + "github.com/line/ostracon/crypto" - tmversion "github.com/line/ostracon/proto/ostracon/version" "github.com/line/ostracon/version" ) diff --git a/types/params.go b/types/params.go index 428ee3b87..fc26efde0 100644 --- a/types/params.go +++ b/types/params.go @@ -5,9 +5,10 @@ import ( "fmt" "time" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/tmhash" - tmproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/version" ) diff --git a/types/params_test.go b/types/params_test.go index 7e68cf665..37d004309 100644 --- a/types/params_test.go +++ b/types/params_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - abci "github.com/line/ostracon/abci/types" - tmproto "github.com/line/ostracon/proto/ostracon/types" + "github.com/stretchr/testify/assert" ) var ( diff --git a/types/part_set.go b/types/part_set.go index 7485592e6..3932cd0c6 100644 --- a/types/part_set.go +++ b/types/part_set.go @@ -6,13 +6,14 @@ import ( "fmt" "io" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/libs/bits" tmbytes "github.com/line/ostracon/libs/bytes" tmjson "github.com/line/ostracon/libs/json" tmmath "github.com/line/ostracon/libs/math" tmsync "github.com/line/ostracon/libs/sync" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) var ( diff --git a/types/priv_validator.go b/types/priv_validator.go index 56c021491..2fd34f6e9 100644 --- a/types/priv_validator.go +++ b/types/priv_validator.go @@ -5,9 +5,10 @@ import ( "errors" "fmt" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) // PrivValidator defines the functionality of a local Ostracon validator diff --git a/types/proposal.go b/types/proposal.go index 978cf2e1f..450f85493 100644 --- a/types/proposal.go +++ b/types/proposal.go @@ -5,9 +5,10 @@ import ( "fmt" "time" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmbytes "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/libs/protoio" - tmproto "github.com/line/ostracon/proto/ostracon/types" tmtime "github.com/line/ostracon/types/time" ) diff --git a/types/proposal_test.go b/types/proposal_test.go index e6d55e193..c8e5c8b1f 100644 --- a/types/proposal_test.go +++ b/types/proposal_test.go @@ -9,10 +9,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/libs/protoio" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) var ( diff --git a/types/protobuf.go b/types/protobuf.go index 3b5c4b7f7..8ab4b371b 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -1,12 +1,14 @@ package types import ( - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" cryptoenc "github.com/line/ostracon/crypto/encoding" "github.com/line/ostracon/crypto/secp256k1" - tmproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" ) //------------------------------------------------------- @@ -32,8 +34,8 @@ var OC2PB = oc2pb{} type oc2pb struct{} -func (oc2pb) Header(header *Header) tmproto.Header { - return tmproto.Header{ +func (oc2pb) Header(header *Header) ocproto.Header { + return ocproto.Header{ Version: header.Version, ChainID: header.ChainID, Height: header.Height, diff --git a/types/protobuf_test.go b/types/protobuf_test.go index 3c53aafbe..e5bdaa82c 100644 --- a/types/protobuf_test.go +++ b/types/protobuf_test.go @@ -3,19 +3,17 @@ package types import ( "testing" - "github.com/line/ostracon/crypto/secp256k1" - "github.com/golang/protobuf/proto" // nolint: staticcheck // still used by gogoproto - "github.com/tendermint/go-amino" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/go-amino" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/proto/tendermint/version" - abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" cryptoenc "github.com/line/ostracon/crypto/encoding" - "github.com/line/ostracon/proto/ostracon/version" + "github.com/line/ostracon/crypto/secp256k1" "github.com/line/ostracon/types/time" ) diff --git a/types/results.go b/types/results.go index 6560d89d3..251c1a5a6 100644 --- a/types/results.go +++ b/types/results.go @@ -1,7 +1,8 @@ package types import ( - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/line/ostracon/crypto/merkle" ) diff --git a/types/results_test.go b/types/results_test.go index ef505c48c..5b1be3466 100644 --- a/types/results_test.go +++ b/types/results_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - abci "github.com/line/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" ) func TestABCIResults(t *testing.T) { diff --git a/types/signed_msg_type.go b/types/signed_msg_type.go index f75bf8ab7..4ab5685a7 100644 --- a/types/signed_msg_type.go +++ b/types/signed_msg_type.go @@ -1,6 +1,6 @@ package types -import tmproto "github.com/line/ostracon/proto/ostracon/types" +import tmproto "github.com/tendermint/tendermint/proto/tendermint/types" // IsVoteTypeValid returns true if t is a valid vote type. func IsVoteTypeValid(t tmproto.SignedMsgType) bool { diff --git a/types/test_util.go b/types/test_util.go index 0b1af754c..367fd0631 100644 --- a/types/test_util.go +++ b/types/test_util.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - tmproto "github.com/line/ostracon/proto/ostracon/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) func MakeCommit(blockID BlockID, height int64, round int32, diff --git a/types/tx.go b/types/tx.go index 41f3120e6..debff8f59 100644 --- a/types/tx.go +++ b/types/tx.go @@ -5,10 +5,11 @@ import ( "errors" "fmt" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/crypto/tmhash" tmbytes "github.com/line/ostracon/libs/bytes" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) // Tx is an arbitrary byte array. diff --git a/types/tx_test.go b/types/tx_test.go index c8e239834..8308eaac0 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -7,9 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmrand "github.com/line/ostracon/libs/rand" ctest "github.com/line/ostracon/libs/test" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) func makeTxs(cnt, size int) Txs { diff --git a/types/validator.go b/types/validator.go index e868e6c39..9fb69b9f6 100644 --- a/types/validator.go +++ b/types/validator.go @@ -6,10 +6,11 @@ import ( "fmt" "strings" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" ce "github.com/line/ostracon/crypto/encoding" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) // Volatile state for each Validator diff --git a/types/validator_set.go b/types/validator_set.go index 209cfb2b8..6bfbf4a85 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -10,11 +10,12 @@ import ( "sort" "strings" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/crypto/tmhash" tmmath "github.com/line/ostracon/libs/math" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) const ( diff --git a/types/validator_set_test.go b/types/validator_set_test.go index d4490cb18..ef199f12b 100644 --- a/types/validator_set_test.go +++ b/types/validator_set_test.go @@ -13,12 +13,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" tmmath "github.com/line/ostracon/libs/math" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) func TestValidatorSetBasic(t *testing.T) { @@ -1641,7 +1641,7 @@ func TestValidatorSetProtoBuf(t *testing.T) { } } -//--------------------- +// --------------------- // Sort validators by priority and address type validatorsByPriority []*Validator @@ -1682,9 +1682,8 @@ func (tvals testValsByVotingPower) Swap(i, j int) { tvals[i], tvals[j] = tvals[j], tvals[i] } -//------------------------------------- +// ------------------------------------- // Benchmark tests -// func BenchmarkUpdates(b *testing.B) { const ( n = 100 diff --git a/types/vote.go b/types/vote.go index 52defe9cc..4c0e6b9ac 100644 --- a/types/vote.go +++ b/types/vote.go @@ -6,11 +6,12 @@ import ( "fmt" "time" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" tmbytes "github.com/line/ostracon/libs/bytes" "github.com/line/ostracon/libs/protoio" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) const ( diff --git a/types/vote_set.go b/types/vote_set.go index 49808311e..e6733c521 100644 --- a/types/vote_set.go +++ b/types/vote_set.go @@ -5,11 +5,12 @@ import ( "fmt" "strings" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/libs/bits" tmjson "github.com/line/ostracon/libs/json" tmsync "github.com/line/ostracon/libs/sync" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) const ( diff --git a/types/vote_set_test.go b/types/vote_set_test.go index 9884d718a..fb9f921bb 100644 --- a/types/vote_set_test.go +++ b/types/vote_set_test.go @@ -6,10 +6,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/line/ostracon/crypto" tmrand "github.com/line/ostracon/libs/rand" - tmproto "github.com/line/ostracon/proto/ostracon/types" tmtime "github.com/line/ostracon/types/time" ) diff --git a/types/vote_test.go b/types/vote_test.go index 277a3f3a7..c80becbe2 100644 --- a/types/vote_test.go +++ b/types/vote_test.go @@ -9,11 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/ed25519" "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/libs/protoio" - tmproto "github.com/line/ostracon/proto/ostracon/types" ) func examplePrevote() *Vote {