diff --git a/.github/actions/bls/action.yml b/.github/actions/bls/action.yml index 89137c285c..ff0c6c0e65 100644 --- a/.github/actions/bls/action.yml +++ b/.github/actions/bls/action.yml @@ -15,7 +15,7 @@ runs: steps: - uses: actions/setup-go@v2 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v2 with: submodules: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0654267eda..1d12d21264 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -54,7 +54,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -79,7 +79,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 3cacbf21f6..37ad746aa6 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 @@ -31,7 +31,7 @@ jobs: run: | set -euo pipefail - readonly MOCKERY=2.33.2 # N.B. no leading "v" + readonly MOCKERY=2.41.0 # N.B. no leading "v" curl -sL "https://github.com/vektra/mockery/releases/download/v${MOCKERY}/mockery_${MOCKERY}_Linux_x86_64.tar.gz" | tar -C /usr/local/bin -xzf - make mockery 2>/dev/null @@ -49,7 +49,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 with: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4ad1c3f2b2..cffc4a55f5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,7 +36,7 @@ jobs: platforms: all - name: Set up Docker Build - uses: docker/setup-buildx-action@v3.0.0 + uses: docker/setup-buildx-action@v3.1.0 - name: Login to DockerHub if: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 72788c0a6b..dbac069913 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -28,10 +28,10 @@ jobs: steps: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.0.0 + uses: docker/setup-buildx-action@v3.1.0 - uses: actions/checkout@v4 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7f63aef214..4c03bd68ec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,7 +32,7 @@ jobs: submodules: true - uses: actions/setup-go@v5.0.0 with: - go-version: "^1.21" + go-version: "^1.22" - uses: technote-space/get-diff-action@v6 with: PATTERNS: | @@ -48,7 +48,7 @@ jobs: name: Install BLS library if: "env.GIT_DIFF != ''" - - uses: golangci/golangci-lint-action@v3.7.0 + - uses: golangci/golangci-lint-action@v4.0.0 with: # Required: the version of golangci-lint is required and # must be specified without patch version: we always use the diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c3c4e4bd2..00ab524425 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - name: Build uses: goreleaser/goreleaser-action@v5 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6660932e42..c2d3634624 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.0 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 063042c439..75ea89ad6e 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -4,8 +4,8 @@ # * compile - builds final binaries # * image - creates final image of minimal size -ARG ALIPNE_VERSION=3.17 -ARG GOLANG_VERSION=1.21 +ARG ALIPNE_VERSION=3.19 +ARG GOLANG_VERSION=1.22 ################################# # STAGE 1: install dependencies # ################################# @@ -93,7 +93,7 @@ COPY --from=compile /src/tenderdash/build/tenderdash /src/tenderdash/build/abcid # You can overwrite these before the first run to influence # config.json and genesis.json. Additionally, you can override # CMD to add parameters to `tenderdash node`. -ENV PROXY_APP=kvstore MONIKER=dockernode CHAIN_ID=dockerchain +ENV PROXY_APP=kvstore MONIKER=dockernode CHAIN_ID=dockerchain ABCI="" COPY ./DOCKER/docker-entrypoint.sh /usr/local/bin/ diff --git a/DOCKER/docker-entrypoint.sh b/DOCKER/docker-entrypoint.sh index bd080c46f5..0863cfd022 100755 --- a/DOCKER/docker-entrypoint.sh +++ b/DOCKER/docker-entrypoint.sh @@ -15,8 +15,14 @@ if [ ! -d "$TMHOME/config" ]; then -e 's/^prometheus\s*=.*/prometheus = true/' \ "$TMHOME/config/config.toml" + if [ -n "$ABCI" ]; then + sed -i \ + -e "s/^abci\s*=.*/abci = \"$ABCI\"/" \ + "$TMHOME/config/config.toml" + fi + jq ".chain_id = \"$CHAIN_ID\" | .consensus_params.block.time_iota_ms = \"500\"" \ - "$TMHOME/config/genesis.json" > "$TMHOME/config/genesis.json.new" + "$TMHOME/config/genesis.json" >"$TMHOME/config/genesis.json.new" mv "$TMHOME/config/genesis.json.new" "$TMHOME/config/genesis.json" fi diff --git a/README.md b/README.md index 533c2d79ad..f485db6d79 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ to notify you of vulnerabilities and fixes in Tendermint Core. You can subscribe | Requirement | Notes | |-------------|------------------| -| Go version | Go1.21 or higher | +| Go version | Go1.22 or higher | ### Install diff --git a/abci/client/client.go b/abci/client/client.go index c5afa771e2..82a4dd2bce 100644 --- a/abci/client/client.go +++ b/abci/client/client.go @@ -42,6 +42,8 @@ func NewClient(logger log.Logger, addr, transport string, mustConnect bool) (Cli return NewSocketClient(logger, addr, mustConnect), nil case "grpc": return NewGRPCClient(logger, addr, mustConnect), nil + case "routed": + return NewRoutedClientWithAddr(logger, addr, mustConnect) default: return nil, fmt.Errorf("unknown abci transport %s", transport) } diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 984e97ef7e..433a0cb60d 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -18,6 +18,10 @@ type Client struct { func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ApplySnapshotChunk") + } + var r0 *types.ResponseApplySnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok { @@ -44,6 +48,10 @@ func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestAppl func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *types.ResponseCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { @@ -70,6 +78,10 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*type func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Echo") + } + var r0 *types.ResponseEcho var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*types.ResponseEcho, error)); ok { @@ -96,6 +108,10 @@ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, er func (_m *Client) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -110,6 +126,10 @@ func (_m *Client) Error() error { func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExtendVote") + } + var r0 *types.ResponseExtendVote var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok { @@ -136,6 +156,10 @@ func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 *types.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok { @@ -162,6 +186,10 @@ func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeB func (_m *Client) Flush(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -176,6 +204,10 @@ func (_m *Client) Flush(_a0 context.Context) error { func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Info") + } + var r0 *types.ResponseInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)); ok { @@ -202,6 +234,10 @@ func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.Resp func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InitChain") + } + var r0 *types.ResponseInitChain var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok { @@ -228,6 +264,10 @@ func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (* func (_m *Client) IsRunning() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsRunning") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -242,6 +282,10 @@ func (_m *Client) IsRunning() bool { func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListSnapshots") + } + var r0 *types.ResponseListSnapshots var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok { @@ -268,6 +312,10 @@ func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnaps func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSnapshotChunk") + } + var r0 *types.ResponseLoadSnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok { @@ -294,6 +342,10 @@ func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadS func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OfferSnapshot") + } + var r0 *types.ResponseOfferSnapshot var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok { @@ -320,6 +372,10 @@ func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnap func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PrepareProposal") + } + var r0 *types.ResponsePrepareProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok { @@ -346,6 +402,10 @@ func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepare func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 *types.ResponseProcessProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok { @@ -372,6 +432,10 @@ func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcess func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *types.ResponseQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)); ok { @@ -398,6 +462,10 @@ func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.Re func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -412,6 +480,10 @@ func (_m *Client) Start(_a0 context.Context) error { func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 *types.ResponseVerifyVoteExtension var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok { diff --git a/abci/client/routed_client.go b/abci/client/routed_client.go new file mode 100644 index 0000000000..6743073db6 --- /dev/null +++ b/abci/client/routed_client.go @@ -0,0 +1,375 @@ +package abciclient + +import ( + "context" + "fmt" + "reflect" + "runtime" + "strings" + "time" + + "github.com/hashicorp/go-multierror" + + "github.com/dashpay/tenderdash/abci/types" + "github.com/dashpay/tenderdash/libs/log" + "github.com/dashpay/tenderdash/libs/service" +) + +type routedClient struct { + service.Service + logger log.Logger + routing Routing + defaultClient ClientInfo +} + +var _ Client = (*routedClient)(nil) + +type RequestType string +type Routing map[RequestType][]ClientInfo + +type ClientInfo struct { + Client + // ClientID is an unique, human-readable, client identifier + ClientID string +} + +// NewRoutedClientWithAddr returns a new ABCI client that routes requests to multiple +// underlying clients based on the request type. +// +// It takes a comma-separated list of routing rules, consisting of colon-separated: request type, transport, address. +// Special request type "*" is used for default client. +// +// Example: +// +// ``` +// +// "Info:socket:unix:///tmp/socket.1,Info:socket:unix:///tmp/socket.2,CheckTx:socket:unix:///tmp/socket.1,*:socket:unix:///tmp/socket.3" +// +// ``` +// +// # Arguments +// - `logger` - The logger to use for the client. +// - `addr` - comma-separated list of routing rules, consisting of request type, transport name and client address separated with colon. +// Special request type "*" is used for default client. +func NewRoutedClientWithAddr(logger log.Logger, addr string, mustConnect bool) (Client, error) { + // Split the routing rules + routing := make(Routing) + clients := make(map[string]Client) + var defaultClient Client + + rules := strings.Split(addr, ",") + + for _, rule := range rules { + parts := strings.SplitN(rule, ":", 3) + if len(parts) != 3 { + return nil, fmt.Errorf("invalid routing rule: %s", rule) + } + requestType := strings.TrimSpace(parts[0]) + transport := strings.TrimSpace(parts[1]) + address := strings.TrimSpace(parts[2]) + + // Create a new client if it doesn't exist + clientName := fmt.Sprintf("%s:%s", transport, address) + if _, ok := clients[clientName]; !ok { + c, err := NewClient(logger, address, transport, mustConnect) + if err != nil { + return nil, err + } + clients[clientName] = c + } + + // Add the client to the routing table + if requestType == "*" { + if defaultClient != nil { + return nil, fmt.Errorf("multiple default clients") + } + defaultClient = clients[clientName] + continue + } + + client := clients[clientName] + routing[RequestType(requestType)] = append(routing[RequestType(requestType)], ClientInfo{client, clientName}) + } + + if defaultClient == nil { + return nil, fmt.Errorf("no default client defined for routed client address %s", addr) + } + + return NewRoutedClient(logger, defaultClient, routing) +} + +// NewRoutedClient returns a new ABCI client that routes requests to the +// appropriate underlying client based on the request type. +// +// # Arguments +// +// - `logger` - The logger to use for the client. +// - `defaultClient` - The default client to use when no specific client is +// configured for a request type. +// - `routing` - The clients to route requests to. +// +// See docs of routedClient.delegate() for more details about implemented logic. +func NewRoutedClient(logger log.Logger, defaultClient Client, routing Routing) (Client, error) { + defaultClientID := "" + if s, ok := defaultClient.(fmt.Stringer); ok { + defaultClientID = fmt.Sprintf("DEFAULT:%s", s.String()) + } else { + defaultClientID = "DEFAULT" + } + + cli := &routedClient{ + logger: logger, + routing: routing, + defaultClient: ClientInfo{defaultClient, defaultClientID}, + } + + cli.Service = service.NewBaseService(logger, "RoutedClient", cli) + return cli, nil +} + +func (cli *routedClient) OnStart(ctx context.Context) error { + var errs error + for _, clients := range cli.routing { + for _, client := range clients { + if !client.IsRunning() { + if err := client.Start(ctx); err != nil { + errs = multierror.Append(errs, err) + } + } + } + } + + if !cli.defaultClient.IsRunning() { + if err := cli.defaultClient.Start(ctx); err != nil { + errs = multierror.Append(errs, err) + } + } + + return errs +} + +func (cli *routedClient) OnStop() { + for _, clients := range cli.routing { + for _, client := range clients { + if client.IsRunning() { + switch c := client.Client.(type) { + case *socketClient: + c.Stop() + case *localClient: + c.Stop() + case *grpcClient: + c.Stop() + } + } + } + } +} + +// delegate calls the given function on the appropriate client with the given +// arguments. +// +// It executes the given function on all clients configured in the routing table. +// If no client is configured for the given function, it calls the function on the +// default client. +// +// If more than one client is configured for the given function, it calls the +// function on each client in turn, and returns first result where any of returned +// values is non-zero. Results of subsequent calls are silently dropped. +// +// If all clients return only zero values, it returns response from last client, which is effectively +// also a zero value. +// +// If the function returns only 1 value, it assumes it is of type `error`. +// Otherwise it assumes response is `result, error`. +// +// When a function call returns an error, error is returned and remaining functions are NOT called. +func (cli *routedClient) delegate(args ...interface{}) (firstResult any, err error) { + // Get the caller function name; it will be our request type + pc, _, _, _ := runtime.Caller(1) + funcObj := runtime.FuncForPC(pc) + funcName := funcObj.Name() + // remove package name + funcName = funcName[strings.LastIndex(funcName, ".")+1:] + + clients, ok := cli.routing[RequestType(funcName)] + if !ok { + clients = []ClientInfo{cli.defaultClient} + cli.logger.Trace("no client found for method, falling back to default client", "method", funcName) + } + // client that provided first non-zero result + winner := "" + + startAll := time.Now() + + var ret any + for _, client := range clients { + start := time.Now() + + zerosReturned, results := cli.call(client, funcName, args...) + if ret, err = parseReturned(funcName, results); err != nil { + cli.logger.Error("abci client returned error", "client_id", client.ClientID, "err", err) + return ret, err + } + + // return first non-zero result + if !zerosReturned && firstResult == nil { + firstResult = ret + winner = client.ClientID + } + + cli.logger.Trace("routed ABCI request to a client", + "method", funcName, + "client_id", client.ClientID, + "nil", zerosReturned, + "took", time.Since(start).String()) + } + + cli.logger.Trace("routed ABCI request execution successful", + "method", funcName, + "client_id", winner, + "took", time.Since(startAll).String(), + "nil", firstResult == nil) + + if firstResult == nil { + firstResult = ret + } + + return firstResult, err +} + +// call calls the given function on the given client with the given arguments. +// It returns whether all returned values are zero, and these values itself. +func (cli *routedClient) call(client Client, funcName string, args ...interface{}) (onlyZeros bool, result []interface{}) { + method := reflect.ValueOf(client).MethodByName(funcName) + if !method.IsValid() { + panic(fmt.Sprintf("no method %s on client %T", funcName, client)) + } + + arguments := make([]reflect.Value, 0, len(args)) + for _, arg := range args { + arguments = append(arguments, reflect.ValueOf(arg)) + } + + values := method.Call(arguments) + + onlyZeros = true + + result = make([]interface{}, 0, len(values)) + for _, v := range values { + if !v.IsZero() { + onlyZeros = false + } + result = append(result, v.Interface()) + } + + return onlyZeros, result +} + +func parseReturned(funcName string, ret []interface{}) (any, error) { + switch len(ret) { + case 0: + // should never happen + return nil, fmt.Errorf("no result from any client for ABCI method %s", funcName) + case 1: + err, _ := ret[0].(error) + return nil, err + + case 2: + err, _ := ret[1].(error) + return ret[0], err + default: + panic(fmt.Sprintf("unexpected number of return values: %d", len(ret))) + } +} + +// Error returns an error if the client was stopped abruptly. +func (cli *routedClient) Error() error { + var errs error + for _, clients := range cli.routing { + for _, client := range clients { + err := client.Error() + if err != nil { + errs = multierror.Append(errs, err) + } + } + } + + return errs +} + +/// Implement the Application interface + +func (cli *routedClient) Flush(ctx context.Context) error { + _, err := cli.delegate(ctx) + return err +} + +func (cli *routedClient) Echo(ctx context.Context, msg string) (*types.ResponseEcho, error) { + result, err := cli.delegate(ctx, msg) + return result.(*types.ResponseEcho), err +} + +func (cli *routedClient) Info(ctx context.Context, req *types.RequestInfo) (*types.ResponseInfo, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseInfo), err +} + +func (cli *routedClient) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseCheckTx), err +} + +func (cli *routedClient) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseQuery), err +} + +func (cli *routedClient) InitChain(ctx context.Context, req *types.RequestInitChain) (*types.ResponseInitChain, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseInitChain), err +} + +func (cli *routedClient) ListSnapshots(ctx context.Context, req *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseListSnapshots), err +} + +func (cli *routedClient) OfferSnapshot(ctx context.Context, req *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseOfferSnapshot), err +} + +func (cli *routedClient) LoadSnapshotChunk(ctx context.Context, req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseLoadSnapshotChunk), err +} + +func (cli *routedClient) ApplySnapshotChunk(ctx context.Context, req *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseApplySnapshotChunk), err +} + +func (cli *routedClient) PrepareProposal(ctx context.Context, req *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponsePrepareProposal), err +} + +func (cli *routedClient) ProcessProposal(ctx context.Context, req *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseProcessProposal), err +} + +func (cli *routedClient) ExtendVote(ctx context.Context, req *types.RequestExtendVote) (*types.ResponseExtendVote, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseExtendVote), err +} + +func (cli *routedClient) VerifyVoteExtension(ctx context.Context, req *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseVerifyVoteExtension), err +} + +func (cli *routedClient) FinalizeBlock(ctx context.Context, req *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { + result, err := cli.delegate(ctx, req) + return result.(*types.ResponseFinalizeBlock), err +} diff --git a/abci/client/routed_client_test.go b/abci/client/routed_client_test.go new file mode 100644 index 0000000000..b796bf6ec6 --- /dev/null +++ b/abci/client/routed_client_test.go @@ -0,0 +1,152 @@ +package abciclient_test + +import ( + "context" + "fmt" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + abciclient "github.com/dashpay/tenderdash/abci/client" + "github.com/dashpay/tenderdash/abci/server" + "github.com/dashpay/tenderdash/abci/types" + "github.com/dashpay/tenderdash/abci/types/mocks" + "github.com/dashpay/tenderdash/libs/log" +) + +// TestRouting tests the RoutedClient. +// +// Given 3 clients: defaultApp, consensusApp and queryApp: +// * when a request of type Info is made, it should be routed to defaultApp +// * when a request of type FinalizeBlock is made, it should be first routed to queryApp, then to consensusApp +// * when a request of type CheckTx is made, it should be routed to queryApp +// * when a request of type PrepareProposal is made, it should be routed to to consensusApp +func TestRouting(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + // infoMtx blocks Info until we finish the test + var infoMtx sync.Mutex + infoMtx.Lock() + infoExecuted := false + + logger := log.NewTestingLogger(t) + + defaultApp, defaultSocket := startApp(ctx, t, logger, "default") + defer defaultApp.AssertExpectations(t) + + defaultApp.On("Info", mock.Anything, mock.Anything).Return(&types.ResponseInfo{ + Data: "info", + }, nil).Run(func(_args mock.Arguments) { + t.Log("Info: before lock") + infoMtx.Lock() + defer infoMtx.Unlock() + t.Log("Info: after lock") + infoExecuted = true + }).Once() + + queryApp, querySocket := startApp(ctx, t, logger, "query") + defer queryApp.AssertExpectations(t) + queryApp.On("CheckTx", mock.Anything, mock.Anything).Return(&types.ResponseCheckTx{ + Priority: 1, + }, nil).Once() + queryApp.On("FinalizeBlock", mock.Anything, mock.Anything).Return(&types.ResponseFinalizeBlock{}, nil).Once() + + consensusApp, consensusSocket := startApp(ctx, t, logger, "consensus") + defer consensusApp.AssertExpectations(t) + consensusApp.On("PrepareProposal", mock.Anything, mock.Anything).Return(&types.ResponsePrepareProposal{ + AppHash: []byte("apphash"), + }, nil).Once() + consensusApp.On("FinalizeBlock", mock.Anything, mock.Anything).Return(&types.ResponseFinalizeBlock{ + RetainHeight: 1, + }, nil).Once() + + addr := fmt.Sprintf("CheckTx:socket:%s", querySocket) + + fmt.Sprintf(",FinalizeBlock:socket:%s,FinalizeBlock:socket:%s", querySocket, consensusSocket) + + fmt.Sprintf(",PrepareProposal:socket:%s", consensusSocket) + + fmt.Sprintf(",*:socket:%s", defaultSocket) + + logger.Info("configuring routed abci client with address", "addr", addr) + routedClient, err := abciclient.NewRoutedClientWithAddr(logger, addr, true) + assert.NoError(t, err) + err = routedClient.Start(ctx) + assert.NoError(t, err) + + // Test routing + wg := sync.WaitGroup{} + + // Info is called from separate thread, as we want it to block + // to see if we can execute other calls (on other clients) without blocking + wg.Add(1) + go func() { + // info is locked, so it should finish last + _, err := routedClient.Info(ctx, &types.RequestInfo{}) + require.NoError(t, err) + wg.Done() + }() + + // CheckTx + _, err = routedClient.CheckTx(ctx, &types.RequestCheckTx{}) + assert.NoError(t, err) + + // FinalizeBlock + _, err = routedClient.FinalizeBlock(ctx, &types.RequestFinalizeBlock{}) + assert.NoError(t, err) + + // PrepareProposal + _, err = routedClient.PrepareProposal(ctx, &types.RequestPrepareProposal{}) + assert.NoError(t, err) + + // unlock info + assert.False(t, infoExecuted) + infoMtx.Unlock() + wg.Wait() + assert.True(t, infoExecuted) +} + +func startApp(ctx context.Context, t *testing.T, logger log.Logger, id string) (*mocks.Application, string) { + app := mocks.NewApplication(t) + defer app.AssertExpectations(t) + + addr := fmt.Sprintf("unix://%s/%s", t.TempDir(), "/socket."+id) + + server, err := server.NewServer(logger, addr, "socket", app) + require.NoError(t, err) + err = server.Start(ctx) + require.NoError(t, err) + + return app, addr +} + +// / TestRoutedClientGrpc tests the RoutedClient correctly forwards requests to a gRPC server. +func TestRoutedClientGrpc(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) + defer cancel() + + logger := log.NewTestingLogger(t) + + // app := types.NewBaseApplication() + app := mocks.NewApplication(t) + defer app.AssertExpectations(t) + app.On("Echo", mock.Anything, mock.Anything).Return( + func(_ctx context.Context, msg *types.RequestEcho) (*types.ResponseEcho, error) { + return &types.ResponseEcho{Message: msg.Message}, nil + }).Maybe() + app.On("Info", mock.Anything, mock.Anything).Return(&types.ResponseInfo{}, nil).Once() + + grpcServer := server.NewGRPCServer(logger, "tcp://127.0.0.1:1234", app) + require.NoError(t, grpcServer.Start(ctx)) + + addr := "*:grpc:127.0.0.1:1234" + logger.Info("configuring routed abci client with address", "addr", addr) + client, err := abciclient.NewRoutedClientWithAddr(logger, addr, true) + require.NoError(t, err) + require.NoError(t, client.Start(ctx)) + + _, err = client.Info(ctx, &types.RequestInfo{}) + assert.NoError(t, err) + +} diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index 26adc2318f..9dacbc71d5 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -99,6 +99,14 @@ func (cli *socketClient) OnStop() { cli.drainQueue() } +func (cli *socketClient) String() string { + if err := cli.Error(); err != nil { + return fmt.Sprintf("%T(%s):err=%s", cli, cli.addr, err.Error()) + } + + return fmt.Sprintf("%T(%s)", cli, cli.addr) +} + // Error returns an error if the client was stopped abruptly. func (cli *socketClient) Error() error { cli.mtx.Lock() diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index b7504090ba..ab04ac3c71 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -3,9 +3,9 @@ package kvstore import ( "bytes" "context" - "encoding/json" "errors" "fmt" + "io" "path" "strconv" "time" @@ -228,7 +228,12 @@ func newApplication(stateStore StoreFactory, opts ...OptFunc) (*Application, err defer in.Close() if err := app.LastCommittedState.Load(in); err != nil { - return nil, fmt.Errorf("load state: %w", err) + // EOF means we most likely don't have any state yet + if !errors.Is(err, io.EOF) { + return nil, fmt.Errorf("load state: %w", err) + } else { + app.logger.Debug("no state found, using initial state") + } } app.snapshots, err = NewSnapshotStore(path.Join(app.cfg.Dir, "snapshots")) @@ -264,9 +269,9 @@ func (app *Application) InitChain(_ context.Context, req *abci.RequestInitChain) } // Overwrite state based on AppStateBytes + // Note this is not optimal from memory perspective; use chunked state sync instead if len(req.AppStateBytes) > 0 { - err := json.Unmarshal(req.AppStateBytes, &app.LastCommittedState) - if err != nil { + if err := app.LastCommittedState.Load(bytes.NewBuffer(req.AppStateBytes)); err != nil { return &abci.ResponseInitChain{}, err } } @@ -398,7 +403,8 @@ func (app *Application) FinalizeBlock(_ context.Context, req *abci.RequestFinali appHash := tmbytes.HexBytes(req.Block.Header.AppHash) roundState, ok := app.roundStates[roundKey(appHash, req.Height, req.Round)] if !ok { - return &abci.ResponseFinalizeBlock{}, fmt.Errorf("state with apphash %s not found", appHash) + return &abci.ResponseFinalizeBlock{}, fmt.Errorf("state with apphash %s at height %d round %d not found", + appHash, req.Height, req.Round) } if roundState.GetHeight() != req.Height { return &abci.ResponseFinalizeBlock{}, @@ -530,14 +536,15 @@ func (app *Application) ApplySnapshotChunk(_ context.Context, req *abci.RequestA } if app.offerSnapshot.isFull() { - chunks := app.offerSnapshot.bytes() - err := json.Unmarshal(chunks, &app.LastCommittedState) - if err != nil { + chunks := app.offerSnapshot.reader() + defer chunks.Close() + + if err := app.LastCommittedState.Load(chunks); err != nil { return &abci.ResponseApplySnapshotChunk{}, fmt.Errorf("cannot unmarshal state: %w", err) } + app.logger.Info("restored state snapshot", "height", app.LastCommittedState.GetHeight(), - "json", string(chunks), "apphash", app.LastCommittedState.GetAppHash(), "snapshot_height", app.offerSnapshot.snapshot.Height, "snapshot_apphash", app.offerSnapshot.appHash, diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index 0041c0e4ff..66274fe414 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -136,7 +136,8 @@ func TestPersistentKVStoreKV(t *testing.T) { data, err := os.ReadFile(path.Join(dir, "state.json")) require.NoError(t, err) - assert.Contains(t, string(data), fmt.Sprintf(`"%s":"%s"`, key, value)) + + assert.Contains(t, string(data), fmt.Sprintf(`"key":"%s","value":"%s"`, key, value)) } func TestPersistentKVStoreInfo(t *testing.T) { diff --git a/abci/example/kvstore/snapshots.go b/abci/example/kvstore/snapshots.go index e3d7db80ef..271d5cf021 100644 --- a/abci/example/kvstore/snapshots.go +++ b/abci/example/kvstore/snapshots.go @@ -1,12 +1,13 @@ -//nolint:gosec package kvstore import ( "bytes" + "crypto/sha256" "encoding/hex" "encoding/json" "errors" "fmt" + "io" "os" "path/filepath" @@ -97,20 +98,31 @@ func (s *SnapshotStore) Create(state State) (abci.Snapshot, error) { s.Lock() defer s.Unlock() - bz, err := json.Marshal(state) + height := state.GetHeight() + + filename := filepath.Join(s.dir, fmt.Sprintf("%v.json", height)) + f, err := os.Create(filename) if err != nil { return abci.Snapshot{}, err } - height := state.GetHeight() + defer f.Close() + + hasher := sha256.New() + writer := io.MultiWriter(f, hasher) + + if err := state.Save(writer); err != nil { + f.Close() + // Cleanup incomplete file; ignore errors during cleanup + _ = os.Remove(filename) + return abci.Snapshot{}, err + } + snapshot := abci.Snapshot{ Height: uint64(height), Version: 1, - Hash: crypto.Checksum(bz), - } - err = os.WriteFile(filepath.Join(s.dir, fmt.Sprintf("%v.json", height)), bz, 0644) - if err != nil { - return abci.Snapshot{}, err + Hash: hasher.Sum(nil), } + s.metadata = append(s.metadata, snapshot) err = s.saveMetadata() if err != nil { @@ -216,6 +228,44 @@ func (s *offerSnapshot) bytes() []byte { return buf.Bytes() } +// reader returns a reader for the snapshot data. +func (s *offerSnapshot) reader() io.ReadCloser { + chunks := s.chunks.Values() + reader := &chunkedReader{chunks: chunks} + + return reader +} + +type chunkedReader struct { + chunks [][]byte + index int + offset int +} + +func (r *chunkedReader) Read(p []byte) (n int, err error) { + if r.chunks == nil { + return 0, io.EOF + } + for n < len(p) && r.index < len(r.chunks) { + copyCount := copy(p[n:], r.chunks[r.index][r.offset:]) + n += copyCount + r.offset += copyCount + if r.offset >= len(r.chunks[r.index]) { + r.index++ + r.offset = 0 + } + } + if r.index >= len(r.chunks) { + err = io.EOF + } + return +} + +func (r *chunkedReader) Close() error { + r.chunks = nil + return nil +} + // makeChunkItem returns the chunk at a given index from the full byte slice. func makeChunkItem(chunks *ds.OrderedMap[string, []byte], chunkID []byte) chunkItem { chunkIDStr := hex.EncodeToString(chunkID) diff --git a/abci/example/kvstore/state.go b/abci/example/kvstore/state.go index 0bf2b47a83..8a9e47602c 100644 --- a/abci/example/kvstore/state.go +++ b/abci/example/kvstore/state.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "io" + "net/url" dbm "github.com/tendermint/tm-db" @@ -19,8 +20,6 @@ import ( // Caller of State methods should do proper concurrency locking (eg. mutexes) type State interface { dbm.DB - json.Marshaler - json.Unmarshaler // Save writes full content of this state to some output Save(output io.Writer) error @@ -50,7 +49,7 @@ type State interface { } type kvState struct { - dbm.DB + dbm.DB `json:"-"` // Height of the state. Special value of 0 means zero state. Height int64 `json:"height"` InitialHeight int64 `json:"initial_height,omitempty"` @@ -182,98 +181,99 @@ func (state *kvState) UpdateAppHash(lastCommittedState State, _txs types1.Txs, t return nil } +// Load state from the reader. +// It expects json-encoded kvState, followed by all items from the state. +// +// As a special case, io.EOF when reading the header means that the state is empty. func (state *kvState) Load(from io.Reader) error { if state == nil || state.DB == nil { return errors.New("cannot load into nil state") } - stateBytes, err := io.ReadAll(from) - if err != nil { - return fmt.Errorf("kvState read: %w", err) + // We reuse DB as we can use atomic batches to load items. + newState := NewKvState(state.DB, state.InitialHeight).(*kvState) + + decoder := json.NewDecoder(from) + if err := decoder.Decode(&newState); err != nil { + return fmt.Errorf("error reading state header: %w", err) } - if len(stateBytes) == 0 { - return nil // NOOP + + // Load items to state DB + batch := newState.DB.NewBatch() + defer batch.Close() + + if err := resetDB(newState.DB, batch); err != nil { + return err } - err = json.Unmarshal(stateBytes, &state) - if err != nil { - return fmt.Errorf("kvState unmarshal: %w", err) + item := exportItem{} + var err error + for err = decoder.Decode(&item); err == nil; err = decoder.Decode(&item) { + key, err := url.QueryUnescape(item.Key) + if err != nil { + return fmt.Errorf("error restoring state item key %+v: %w", item, err) + } + value, err := url.QueryUnescape(item.Value) + if err != nil { + return fmt.Errorf("error restoring state item value %+v: %w", item, err) + } + + if err := batch.Set([]byte(key), []byte(value)); err != nil { + return fmt.Errorf("error restoring state item %+v: %w", item, err) + } } - return nil -} + if !errors.Is(err, io.EOF) { + return err + } -func (state kvState) Save(to io.Writer) error { - stateBytes, err := json.Marshal(state) - if err != nil { - return fmt.Errorf("kvState marshal: %w", err) + // commit changes + if err := batch.Write(); err != nil { + return fmt.Errorf("error finalizing restore batch: %w", err) } - _, err = to.Write(stateBytes) - if err != nil { - return fmt.Errorf("kvState write: %w", err) + // copy loaded values to the state + state.InitialHeight = newState.InitialHeight + state.Height = newState.Height + state.Round = newState.Round + state.AppHash = newState.AppHash + // apphash cannot be nil,zero-length + if len(state.AppHash) == 0 { + state.AppHash = make(tmbytes.HexBytes, crypto.DefaultAppHashSize) } return nil } -type StateExport struct { - Height *int64 `json:"height,omitempty"` - InitialHeight *int64 `json:"initial_height,omitempty"` - AppHash tmbytes.HexBytes `json:"app_hash,omitempty"` - Items map[string]string `json:"items,omitempty"` // we store items as string-encoded values -} +// Save saves state to the writer. +// First it puts json-encoded kvState, followed by all items from the state. +func (state kvState) Save(to io.Writer) error { + encoder := json.NewEncoder(to) + if err := encoder.Encode(state); err != nil { + return fmt.Errorf("kvState marshal: %w", err) + } -// MarshalJSON implements json.Marshaler -func (state kvState) MarshalJSON() ([]byte, error) { iter, err := state.DB.Iterator(nil, nil) if err != nil { - return nil, err + return fmt.Errorf("error creating state iterator: %w", err) } defer iter.Close() - height := state.Height - initialHeight := state.InitialHeight - apphash := state.GetAppHash() - - export := StateExport{ - Height: &height, - InitialHeight: &initialHeight, - AppHash: apphash, - Items: nil, - } - for ; iter.Valid(); iter.Next() { - if export.Items == nil { - export.Items = map[string]string{} + key := url.QueryEscape(string(iter.Key())) + value := url.QueryEscape(string(iter.Value())) + item := exportItem{Key: key, Value: value} + if err := encoder.Encode(item); err != nil { + return fmt.Errorf("error encoding state item %+v: %w", item, err) } - export.Items[string(iter.Key())] = string(iter.Value()) } - return json.Marshal(&export) + return nil } -// UnmarshalJSON implements json.Unmarshaler. -// Note that it unmarshals only existing (non-nil) values. -// If unmarshaled data contains a nil value (eg. is not present in json), these will stay intact. -func (state *kvState) UnmarshalJSON(data []byte) error { - - export := StateExport{} - if err := json.Unmarshal(data, &export); err != nil { - return err - } - - if export.Height != nil { - state.Height = *export.Height - } - if export.InitialHeight != nil { - state.InitialHeight = *export.InitialHeight - } - if export.AppHash != nil { - state.AppHash = export.AppHash - } - - return state.persistItems(export.Items) +type exportItem struct { + Key string `json:"key"` + Value string `json:"value"` } func (state *kvState) Close() error { @@ -282,23 +282,3 @@ func (state *kvState) Close() error { } return nil } - -func (state *kvState) persistItems(items map[string]string) error { - if items == nil { - return nil - } - batch := state.DB.NewBatch() - defer batch.Close() - - if len(items) > 0 { - if err := resetDB(state.DB, batch); err != nil { - return err - } - for key, value := range items { - if err := batch.Set([]byte(key), []byte(value)); err != nil { - return err - } - } - } - return batch.Write() -} diff --git a/abci/example/kvstore/state_test.go b/abci/example/kvstore/state_test.go index e2ba12102d..e65f14950e 100644 --- a/abci/example/kvstore/state_test.go +++ b/abci/example/kvstore/state_test.go @@ -1,7 +1,7 @@ package kvstore import ( - "encoding/json" + "bytes" "testing" "github.com/stretchr/testify/assert" @@ -27,14 +27,17 @@ func TestStateMarshalUnmarshal(t *testing.T) { assert.NoError(t, state.UpdateAppHash(state, nil, nil)) apphash := state.GetAppHash() - encoded, err := json.MarshalIndent(state, "", " ") + encoded := bytes.NewBuffer(nil) + err := state.Save(encoded) require.NoError(t, err) assert.NotEmpty(t, encoded) - t.Log(string(encoded)) + + t.Log("encoded:", encoded.String()) decoded := NewKvState(dbm.NewMemDB(), 1) - err = json.Unmarshal(encoded, &decoded) + err = decoded.Load(encoded) require.NoError(t, err) + decoded.Print() v1, err := decoded.Get([]byte("key1")) require.NoError(t, err) @@ -44,14 +47,14 @@ func TestStateMarshalUnmarshal(t *testing.T) { require.NoError(t, err) assert.EqualValues(t, []byte("value2"), v2) - v3, err := decoded.Get([]byte("key2")) + v3, err := decoded.Get(key3) require.NoError(t, err) - assert.EqualValues(t, []byte("value2"), v3) + assert.EqualValues(t, value3, v3) assert.EqualValues(t, apphash, decoded.GetAppHash()) } -func TestStateUnmarshal(t *testing.T) { +func TestStateLoad(t *testing.T) { const initialHeight = 12345678 zeroAppHash := make(tmbytes.HexBytes, crypto.DefaultAppHashSize) type keyVals struct { @@ -89,11 +92,10 @@ func TestStateUnmarshal(t *testing.T) { name: "full", encoded: []byte(`{ "height": 6531, - "app_hash": "1C9ECEC90E28D2461650418635878A5C91E49F47586ECF75F2B0CBB94E897112", - "items": { - "key1": "value1", - "key2": "value2" - }}`), + "app_hash": "1C9ECEC90E28D2461650418635878A5C91E49F47586ECF75F2B0CBB94E897112" + } + {"key":"key1","value":"value1"} + {"key":"key2","value":"value2"}`), expectHeight: 6531, expectAppHash: tmbytes.MustHexDecode("1C9ECEC90E28D2461650418635878A5C91E49F47586ECF75F2B0CBB94E897112"), expectKeyVals: []keyVals{ @@ -106,7 +108,7 @@ func TestStateUnmarshal(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { decoded := NewKvState(dbm.NewMemDB(), initialHeight) - err := json.Unmarshal(tc.encoded, &decoded) + err := decoded.Load(bytes.NewBuffer(tc.encoded)) if tc.expectDecodeError { require.Error(t, err, "decode error expected") } else { diff --git a/abci/example/kvstore/tx.go b/abci/example/kvstore/tx.go index 2c10d6e952..18330adad9 100644 --- a/abci/example/kvstore/tx.go +++ b/abci/example/kvstore/tx.go @@ -119,7 +119,7 @@ func execTx(tx types.Tx, roundState State) (abci.ExecTxResult, error) { // execPrepareTx is noop. tx data is considered as placeholder // and is substitute at the PrepareProposal. -func execPrepareTx(_tx []byte) (abci.ExecTxResult, error) { +func execPrepareTx(_ []byte) (abci.ExecTxResult, error) { // noop return abci.ExecTxResult{}, nil } diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index e7767821d9..04ca3c5777 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -18,6 +18,10 @@ type Application struct { func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ApplySnapshotChunk") + } + var r0 *types.ResponseApplySnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok { @@ -44,6 +48,10 @@ func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.Reques func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *types.ResponseCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { @@ -70,6 +78,10 @@ func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) ( func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExtendVote") + } + var r0 *types.ResponseExtendVote var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok { @@ -96,6 +108,10 @@ func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendV func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 *types.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok { @@ -122,6 +138,10 @@ func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFina func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Info") + } + var r0 *types.ResponseInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)); ok { @@ -148,6 +168,10 @@ func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InitChain") + } + var r0 *types.ResponseInitChain var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok { @@ -174,6 +198,10 @@ func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChai func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListSnapshots") + } + var r0 *types.ResponseListSnapshots var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok { @@ -200,6 +228,10 @@ func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestList func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSnapshotChunk") + } + var r0 *types.ResponseLoadSnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok { @@ -226,6 +258,10 @@ func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.Request func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OfferSnapshot") + } + var r0 *types.ResponseOfferSnapshot var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok { @@ -252,6 +288,10 @@ func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOffe func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PrepareProposal") + } + var r0 *types.ResponsePrepareProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok { @@ -278,6 +318,10 @@ func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPr func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 *types.ResponseProcessProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok { @@ -304,6 +348,10 @@ func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestPr func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *types.ResponseQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)); ok { @@ -330,6 +378,10 @@ func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*typ func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 *types.ResponseVerifyVoteExtension var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok { diff --git a/abci/types/types.go b/abci/types/types.go index 23779998d4..abf8fbcf82 100644 --- a/abci/types/types.go +++ b/abci/types/types.go @@ -235,10 +235,9 @@ func (m *ValidatorUpdate) UnmarshalJSON(b []byte) error { // non-deterministic fields. The input response is not modified. func deterministicExecTxResult(response *ExecTxResult) *ExecTxResult { return &ExecTxResult{ - Code: response.Code, - Data: response.Data, - GasWanted: response.GasWanted, - GasUsed: response.GasUsed, + Code: response.Code, + Data: response.Data, + GasUsed: response.GasUsed, } } diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 9d6b484742..affea0bb3b 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -3492,12 +3492,11 @@ func (m *EventAttribute) GetIndex() bool { // ExecTxResult contains results of executing one individual transaction. type ExecTxResult 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,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + 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"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // Type & Key-Value events for indexing transactions (e.g. by account). Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` @@ -3564,13 +3563,6 @@ func (m *ExecTxResult) GetInfo() string { return "" } -func (m *ExecTxResult) GetGasWanted() int64 { - if m != nil { - return m.GasWanted - } - return 0 -} - func (m *ExecTxResult) GetGasUsed() int64 { if m != nil { return m.GasUsed @@ -4317,236 +4309,236 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xcd, 0x73, 0x1b, 0x57, - 0x72, 0xc7, 0xe0, 0x1b, 0x8d, 0xaf, 0xe1, 0x23, 0x25, 0x41, 0x90, 0x44, 0xd2, 0xa3, 0xd8, 0x92, - 0x65, 0x9b, 0xb4, 0xa5, 0xd8, 0xb2, 0x63, 0x27, 0x55, 0x20, 0x08, 0x05, 0x94, 0x28, 0x92, 0x1e, - 0x82, 0x74, 0x39, 0x8e, 0x3d, 0x35, 0x04, 0x1e, 0x89, 0xb1, 0x00, 0xcc, 0x78, 0x66, 0x40, 0x81, - 0xbe, 0x26, 0x4e, 0xa5, 0x7c, 0xf2, 0x3f, 0xe0, 0x5b, 0x72, 0xcc, 0x25, 0xa7, 0x54, 0x0e, 0x49, - 0xed, 0xcd, 0x5b, 0x7b, 0xf1, 0x71, 0x2f, 0xab, 0x75, 0xc9, 0x97, 0xad, 0xbd, 0xed, 0x69, 0x6f, - 0x5b, 0x5b, 0xef, 0x63, 0x3e, 0x81, 0xc1, 0x87, 0xe5, 0xaa, 0xad, 0xbd, 0xe1, 0xf5, 0xeb, 0xee, - 0x79, 0x1f, 0xfd, 0xba, 0xfb, 0xfd, 0xfa, 0x01, 0xae, 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, 0xcf, 0xc1, 0x0b, 0xee, 0x7c, 0x4f, - 0x88, 0xab, 0x73, 0x96, 0xdc, 0xb6, 0xb6, 0xbe, 0x7b, 0xbe, 0x2a, 0x7c, 0xff, 0x7c, 0x55, 0xf8, - 0xe1, 0xf9, 0xaa, 0xf0, 0xcd, 0x8f, 0xab, 0xb1, 0xef, 0x7f, 0x5c, 0x8d, 0xfd, 0xfa, 0xc7, 0xd5, - 0xd8, 0x3f, 0xdd, 0x3e, 0xd3, 0xec, 0xee, 0xf0, 0x64, 0xa3, 0xad, 0xf7, 0xe9, 0x3f, 0x38, 0x0c, - 0xf5, 0x62, 0x93, 0xe9, 0x24, 0x2d, 0xdf, 0xff, 0x44, 0x4e, 0xd2, 0x34, 0xd6, 0xdd, 0xfb, 0x73, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x14, 0xac, 0xb9, 0x47, 0x32, 0x00, 0x00, + // 3664 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xcb, 0x73, 0x1b, 0xc7, + 0xd1, 0xc7, 0xe2, 0x8d, 0xc6, 0x6b, 0x39, 0xa4, 0x24, 0x08, 0x92, 0x48, 0x7a, 0xf5, 0xd9, 0x92, + 0x65, 0x9b, 0xb4, 0xa5, 0xcf, 0x96, 0xfd, 0xd9, 0x5f, 0xaa, 0x00, 0x10, 0x0a, 0x28, 0x51, 0x24, + 0xbd, 0x04, 0xe9, 0x72, 0x1c, 0x7b, 0x6b, 0x09, 0x0c, 0x89, 0xb5, 0x00, 0xec, 0x7a, 0x77, 0x41, + 0x81, 0xbe, 0x26, 0x4e, 0xa5, 0x7c, 0xf2, 0x3f, 0xe0, 0x5b, 0x72, 0xcc, 0x25, 0xa7, 0x54, 0x0e, + 0x49, 0xe5, 0xe6, 0x54, 0x2e, 0x3e, 0xe6, 0x12, 0xc5, 0x25, 0x5f, 0x52, 0xb9, 0xf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44, 0x97, 0xbb, 0xc2, 0x6f, 0x9c, 0xff, + 0x88, 0x7a, 0x2b, 0xe4, 0xa1, 0x26, 0x93, 0x00, 0x0e, 0xe1, 0x7b, 0x03, 0x1c, 0xe1, 0x17, 0x5e, + 0xf4, 0x01, 0xac, 0x04, 0xb0, 0x0f, 0x27, 0xf9, 0x8b, 0x2d, 0x06, 0x81, 0x44, 0x7c, 0xb9, 0x88, + 0xdb, 0x83, 0x3e, 0x84, 0x2b, 0x34, 0x8d, 0x0d, 0x49, 0x30, 0xe3, 0xf3, 0x25, 0x98, 0x97, 0x88, + 0x8e, 0xda, 0x84, 0x24, 0x33, 0x04, 0x18, 0x49, 0x84, 0x01, 0x23, 0xff, 0x12, 0x3c, 0xbb, 0x71, + 0xa1, 0x91, 0x96, 0xde, 0x66, 0xf6, 0x95, 0x97, 0xe9, 0x6f, 0x72, 0x49, 0xe9, 0xea, 0xa7, 0xdc, + 0x44, 0xc8, 0x4f, 0xc2, 0xe5, 0x82, 0xf6, 0x19, 0x1e, 0xa8, 0x56, 0x20, 0xa1, 0xf5, 0xdb, 0x78, + 0xc8, 0xad, 0x80, 0x35, 0x88, 0xec, 0x23, 0x7c, 0xce, 0xf7, 0x9a, 0xfc, 0x24, 0x7c, 0xf4, 0x20, + 0xd0, 0x58, 0x94, 0x93, 0x59, 0x03, 0xbd, 0x09, 0x19, 0x5a, 0x79, 0x51, 0x74, 0xc3, 0xe2, 0xa1, + 0x26, 0x90, 0x11, 0xb1, 0x2a, 0xc9, 0xc6, 0x3e, 0xe1, 0xd9, 0x33, 0x2c, 0x39, 0x6d, 0xf0, 0x5f, + 0xbe, 0x9c, 0x25, 0x1d, 0xc8, 0x59, 0xae, 0x42, 0x86, 0x8c, 0xde, 0x32, 0xd4, 0x16, 0xa6, 0x61, + 0x22, 0x23, 0x7b, 0x04, 0xe9, 0x0f, 0x02, 0x14, 0x47, 0x22, 0xd7, 0xc4, 0xb9, 0x3b, 0xc7, 0x26, + 0x1a, 0x84, 0x8a, 0xc6, 0x66, 0x7f, 0x0d, 0xe0, 0x54, 0xb5, 0x94, 0xc7, 0x6a, 0xdf, 0xc6, 0x6d, + 0xbe, 0x04, 0x99, 0x53, 0xd5, 0x7a, 0x8f, 0x12, 0x82, 0x83, 0x49, 0x8c, 0x0c, 0xc6, 0x07, 0x56, + 0x24, 0xfd, 0x60, 0x05, 0x2a, 0x43, 0xda, 0x30, 0x35, 0xdd, 0xd4, 0xec, 0x73, 0xba, 0x26, 0x31, + 0xd9, 0x6d, 0x4b, 0xfb, 0x70, 0x61, 0x62, 0xd0, 0x44, 0x77, 0x21, 0xe3, 0xc5, 0x5b, 0x81, 0xe6, + 0x86, 0x53, 0x30, 0x20, 0x8f, 0x97, 0x2c, 0xc9, 0x85, 0x89, 0x61, 0x13, 0xd5, 0x21, 0x69, 0x62, + 0x6b, 0xd0, 0x65, 0xb9, 0x6a, 0xe1, 0xf6, 0x2b, 0xf3, 0x85, 0x5b, 0x42, 0x1d, 0x74, 0x6d, 0x99, + 0x0b, 0x4b, 0x1f, 0x41, 0x92, 0x51, 0x50, 0x16, 0x52, 0x87, 0xbb, 0x0f, 0x76, 0xf7, 0xde, 0xdb, + 0x15, 0x23, 0x08, 0x20, 0x59, 0xa9, 0xd5, 0xea, 0xfb, 0x4d, 0x51, 0x40, 0x19, 0x48, 0x54, 0xaa, + 0x7b, 0x72, 0x53, 0x8c, 0x12, 0xb2, 0x5c, 0xbf, 0x5f, 0xaf, 0x35, 0xc5, 0x18, 0x5a, 0x82, 0x3c, + 0xfb, 0xad, 0xdc, 0xdb, 0x93, 0x1f, 0x56, 0x9a, 0x62, 0xdc, 0x47, 0x3a, 0xa8, 0xef, 0x6e, 0xd5, + 0x65, 0x31, 0x21, 0xbd, 0x06, 0x97, 0x43, 0x03, 0xb4, 0x07, 0x13, 0x09, 0x3e, 0x98, 0x48, 0xfa, + 0x3a, 0x4a, 0x6e, 0x20, 0x61, 0x51, 0x17, 0xdd, 0x1f, 0x99, 0xf8, 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31, 0x9e, 0xe3, 0x59, 0x70, 0x79, 0x9e, 0x2a, 0x1a, + 0x32, 0x60, 0x79, 0xd2, 0x4d, 0x78, 0x91, 0x57, 0xc2, 0xe5, 0x85, 0x8a, 0x6b, 0xc4, 0x9e, 0x83, + 0x77, 0xda, 0xf9, 0x5e, 0x0d, 0x97, 0xe7, 0xac, 0xb2, 0x55, 0xab, 0x5f, 0x3d, 0x5d, 0x15, 0xbe, + 0x7e, 0xba, 0x2a, 0x7c, 0xf3, 0x74, 0x55, 0xf8, 0xe2, 0xdb, 0xd5, 0xc8, 0xd7, 0xdf, 0xae, 0x46, + 0xfe, 0xfa, 0xed, 0x6a, 0xe4, 0x27, 0x37, 0x4f, 0x35, 0xbb, 0x33, 0x38, 0xde, 0x68, 0xe9, 0x3d, + 0xfa, 0xa7, 0x0d, 0x43, 0x3d, 0xdf, 0x64, 0x3a, 0x49, 0xcb, 0xf7, 0xd7, 0x90, 0xe3, 0x24, 0x8d, + 0x75, 0x77, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x01, 0x57, 0x30, 0x3e, 0x3a, 0x32, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -7756,11 +7748,6 @@ func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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) @@ -9530,9 +9517,6 @@ func (m *ExecTxResult) Size() (n int) { 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)) } @@ -16618,25 +16602,6 @@ func (m *ExecTxResult) Unmarshal(dAtA []byte) error { } 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) diff --git a/abci/types/types_test.go b/abci/types/types_test.go index b55ffe8bec..a46581c3fd 100644 --- a/abci/types/types_test.go +++ b/abci/types/types_test.go @@ -53,7 +53,6 @@ func TestHashDeterministicFieldsOnly(t *testing.T) { Data: []byte("transaction"), Log: "nondeterministic data: abc", Info: "nondeterministic data: abc", - GasWanted: 1000, GasUsed: 1000, Events: []abci.Event{}, Codespace: "nondeterministic.data.abc", @@ -63,7 +62,6 @@ func TestHashDeterministicFieldsOnly(t *testing.T) { Data: []byte("transaction"), Log: "nondeterministic data: def", Info: "nondeterministic data: def", - GasWanted: 1000, GasUsed: 1000, Events: []abci.Event{}, Codespace: "nondeterministic.data.def", diff --git a/cmd/tenderdash/commands/run_node.go b/cmd/tenderdash/commands/run_node.go index 8abe55755c..7ad2cb782d 100644 --- a/cmd/tenderdash/commands/run_node.go +++ b/cmd/tenderdash/commands/run_node.go @@ -51,7 +51,7 @@ func AddNodeFlags(cmd *cobra.Command, conf *cfg.Config) { conf.ProxyApp, "proxy app address, or one of: 'kvstore',"+ " 'persistent_kvstore', 'e2e' or 'noop' for local testing.") - cmd.Flags().String("abci", conf.ABCI, "specify abci transport (socket | grpc)") + cmd.Flags().String("abci", conf.ABCI, "specify abci transport (socket | grpc | routed)") // rpc flags cmd.Flags().String("rpc.laddr", conf.RPC.ListenAddress, "RPC listen address. Port required") diff --git a/config/config.go b/config/config.go index 985236acef..6600d8e357 100644 --- a/config/config.go +++ b/config/config.go @@ -165,7 +165,7 @@ type BaseConfig struct { //nolint: maligned // This should be set in viper so it can unmarshal into this struct RootDir string `mapstructure:"home"` - // TCP or UNIX socket address of the ABCI application, + // TCP or UNIX socket address of the ABCI application,or routing rules for routed ABCI client, // or the name of an ABCI application compiled in with the Tendermint binary ProxyApp string `mapstructure:"proxy-app"` @@ -223,7 +223,7 @@ type BaseConfig struct { //nolint: maligned // A JSON file containing the private key to use for p2p authenticated encryption NodeKey string `mapstructure:"node-key-file"` - // Mechanism to connect to the ABCI application: socket | grpc + // Mechanism to connect to the ABCI application: socket | grpc | routed ABCI string `mapstructure:"abci"` // If true, query the ABCI app on connecting to a new peer diff --git a/config/toml.go b/config/toml.go index d3e7aa2eca..7eb8bcc845 100644 --- a/config/toml.go +++ b/config/toml.go @@ -87,7 +87,12 @@ const defaultConfigTemplate = `# This is a TOML config file. ####################################################################### # TCP or UNIX socket address of the ABCI application, +# or routing rules for routed multi-app setup, # or the name of an ABCI application compiled in with the Tendermint binary +# Example for routed multi-app setup: +# abci = "routed" +# proxy-app = "Info:socket:unix:///tmp/socket.1,Info:socket:unix:///tmp/socket.2,CheckTx:socket:unix:///tmp/socket.1,*:socket:unix:///tmp/socket.3" + proxy-app = "{{ .BaseConfig.ProxyApp }}" # A custom human readable name for this node @@ -146,7 +151,7 @@ genesis-file = "{{ js .BaseConfig.Genesis }}" # Path to the JSON file containing the private key to use for node authentication in the p2p protocol node-key-file = "{{ js .BaseConfig.NodeKey }}" -# Mechanism to connect to the ABCI application: socket | grpc +# Mechanism to connect to the ABCI application: socket | grpc | routed abci = "{{ .BaseConfig.ABCI }}" # If true, query the ABCI app on connecting to a new peer diff --git a/dash/core/mocks/client.go b/dash/core/mocks/client.go index 8f5b8e7ba6..19511f16ac 100644 --- a/dash/core/mocks/client.go +++ b/dash/core/mocks/client.go @@ -18,6 +18,10 @@ type Client struct { func (_m *Client) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Client) Close() error { func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetNetworkInfo") + } + var r0 *btcjson.GetNetworkInfoResult var r1 error if rf, ok := ret.Get(0).(func() (*btcjson.GetNetworkInfoResult, error)); ok { @@ -58,6 +66,10 @@ func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.MasternodelistResultJSON, error) { ret := _m.Called(filter) + if len(ret) == 0 { + panic("no return value specified for MasternodeListJSON") + } + var r0 map[string]btcjson.MasternodelistResultJSON var r1 error if rf, ok := ret.Get(0).(func(string) (map[string]btcjson.MasternodelistResultJSON, error)); ok { @@ -84,6 +96,10 @@ func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.Masterno func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MasternodeStatus") + } + var r0 *btcjson.MasternodeStatusResult var r1 error if rf, ok := ret.Get(0).(func() (*btcjson.MasternodeStatusResult, error)); ok { @@ -110,6 +126,10 @@ func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { func (_m *Client) Ping() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -124,6 +144,10 @@ func (_m *Client) Ping() error { func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBytes) (*btcjson.QuorumInfoResult, error) { ret := _m.Called(quorumType, quorumHash) + if len(ret) == 0 { + panic("no return value specified for QuorumInfo") + } + var r0 *btcjson.QuorumInfoResult var r1 error if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes) (*btcjson.QuorumInfoResult, error)); ok { @@ -150,6 +174,10 @@ func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBy func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, quorumHash bytes.HexBytes) (*btcjson.QuorumSignResult, error) { ret := _m.Called(quorumType, requestID, messageHash, quorumHash) + if len(ret) == 0 { + panic("no return value specified for QuorumSign") + } + var r0 *btcjson.QuorumSignResult var r1 error if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (*btcjson.QuorumSignResult, error)); ok { @@ -176,6 +204,10 @@ func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexByt func (_m *Client) QuorumVerify(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes) (bool, error) { ret := _m.Called(quorumType, requestID, messageHash, signature, quorumHash) + if len(ret) == 0 { + panic("no return value specified for QuorumVerify") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (bool, error)); ok { diff --git a/docs/tutorials/go-built-in.md b/docs/tutorials/go-built-in.md index 8ef441d827..3568be7736 100644 --- a/docs/tutorials/go-built-in.md +++ b/docs/tutorials/go-built-in.md @@ -43,7 +43,7 @@ Verify that you have the latest version of Go installed: ```sh $ go version -go version go1.21.x darwin/amd64 +go version go1.22.x darwin/amd64 ``` Note that the exact patch number may differ as Go releases come out. @@ -596,7 +596,7 @@ This will populate the `go.mod` with a release number followed by a hash for Ten ```go module github.com//kvstore -go 1.21 +go 1.22 require ( github.com/dgraph-io/badger/v3 v3.2103.2 diff --git a/docs/tutorials/go.md b/docs/tutorials/go.md index aebe066ab0..25b4deb6a4 100644 --- a/docs/tutorials/go.md +++ b/docs/tutorials/go.md @@ -454,7 +454,7 @@ This will populate the `go.mod` with a release number followed by a hash for Ten ```go module github.com//kvstore -go 1.21 +go 1.22 require ( github.com/dgraph-io/badger/v3 v3.2103.2 diff --git a/go.mod b/go.mod index b607624ccf..2c7a5d95ed 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dashpay/tenderdash -go 1.21 +go 1.22 require ( github.com/BurntSushi/toml v1.3.2 @@ -52,7 +52,7 @@ require ( github.com/creachadair/taskgroup v0.3.2 github.com/go-pkgz/jrpc v0.2.0 github.com/google/go-cmp v0.6.0 - github.com/vektra/mockery/v2 v2.33.2 + github.com/vektra/mockery/v2 v2.41.0 gotest.tools v2.2.0+incompatible ) @@ -72,7 +72,7 @@ require ( github.com/butuzov/mirror v1.1.0 // indirect github.com/catenacyber/perfsprint v0.2.0 // indirect github.com/ccojocar/zxcvbn-go v1.0.1 // indirect - github.com/chigopher/pathlib v0.15.0 // indirect + github.com/chigopher/pathlib v0.19.1 // indirect github.com/containerd/containerd v1.6.6 // indirect github.com/containerd/typeurl v1.0.2 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect @@ -90,6 +90,7 @@ require ( github.com/go-pkgz/expirable-cache v0.0.3 // indirect github.com/go-pkgz/rest v1.5.0 // indirect github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect + github.com/huandu/xstrings v1.4.0 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/jinzhu/copier v0.3.5 // indirect github.com/kkHAIKE/contextcheck v1.1.4 // indirect diff --git a/go.sum b/go.sum index cde3e72466..2d03878a93 100644 --- a/go.sum +++ b/go.sum @@ -167,8 +167,8 @@ github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoG github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= -github.com/chigopher/pathlib v0.15.0 h1:1pg96WL3iC1/YyWV4UJSl3E0GBf4B+h5amBtsbAAieY= -github.com/chigopher/pathlib v0.15.0/go.mod h1:3+YPPV21mU9vyw8Mjp+F33CyCfE6iOzinpiqBcccv7I= +github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= +github.com/chigopher/pathlib v0.19.1/go.mod h1:tzC1dZLW8o33UQpWkNkhvPwL5n4yyFRFm/jL1YGWFvY= 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= @@ -511,6 +511,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= 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= @@ -888,8 +890,8 @@ github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89 github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= -github.com/vektra/mockery/v2 v2.33.2 h1:znIUwQ3FxnA5jvPy8irYBoiIqMZhuOJhoPOJYNoTJqU= -github.com/vektra/mockery/v2 v2.33.2/go.mod h1:9lREs4VEeQiUS3rizYQx1saxHu2JiIhThP0q9+fDegM= +github.com/vektra/mockery/v2 v2.41.0 h1:miv6vazLja/sknB/Rv1ZyKzxOG24QJgIPNN1renwkrs= +github.com/vektra/mockery/v2 v2.41.0/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/internal/evidence/mocks/block_store.go b/internal/evidence/mocks/block_store.go index 344c2f7992..41fff57cde 100644 --- a/internal/evidence/mocks/block_store.go +++ b/internal/evidence/mocks/block_store.go @@ -16,6 +16,10 @@ type BlockStore struct { func (_m *BlockStore) Height() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Height") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *BlockStore) Height() int64 { func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -46,6 +54,10 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { r0 = rf(height) diff --git a/internal/libs/clist/clist.go b/internal/libs/clist/clist.go index cb01b3f0d8..26ca2e124a 100644 --- a/internal/libs/clist/clist.go +++ b/internal/libs/clist/clist.go @@ -14,7 +14,8 @@ to ensure garbage collection of removed elements. import ( "fmt" - sync "github.com/sasha-s/go-deadlock" + // This is performance-critical code, so we don't use go-deadlock + "sync" ) // MaxLength is the max allowed number of elements a linked list is diff --git a/internal/mempool/mocks/mempool.go b/internal/mempool/mocks/mempool.go index 890e3d7b41..6f4996f400 100644 --- a/internal/mempool/mocks/mempool.go +++ b/internal/mempool/mocks/mempool.go @@ -23,6 +23,10 @@ type Mempool struct { func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, cb func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error { ret := _m.Called(ctx, tx, cb, txInfo) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error); ok { r0 = rf(ctx, tx, cb, txInfo) @@ -47,6 +51,10 @@ func (_m *Mempool) Flush() { func (_m *Mempool) FlushAppConn(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for FlushAppConn") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -66,6 +74,10 @@ func (_m *Mempool) Lock() { func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { ret := _m.Called(maxBytes, maxGas) + if len(ret) == 0 { + panic("no return value specified for ReapMaxBytesMaxGas") + } + var r0 types.Txs if rf, ok := ret.Get(0).(func(int64, int64) types.Txs); ok { r0 = rf(maxBytes, maxGas) @@ -82,6 +94,10 @@ func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { func (_m *Mempool) ReapMaxTxs(max int) types.Txs { ret := _m.Called(max) + if len(ret) == 0 { + panic("no return value specified for ReapMaxTxs") + } + var r0 types.Txs if rf, ok := ret.Get(0).(func(int) types.Txs); ok { r0 = rf(max) @@ -98,6 +114,10 @@ func (_m *Mempool) ReapMaxTxs(max int) types.Txs { func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { ret := _m.Called(txKey) + if len(ret) == 0 { + panic("no return value specified for RemoveTxByKey") + } + var r0 error if rf, ok := ret.Get(0).(func(types.TxKey) error); ok { r0 = rf(txKey) @@ -112,6 +132,10 @@ func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { func (_m *Mempool) Size() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -126,6 +150,10 @@ func (_m *Mempool) Size() int { func (_m *Mempool) SizeBytes() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SizeBytes") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -140,6 +168,10 @@ func (_m *Mempool) SizeBytes() int64 { func (_m *Mempool) TxsAvailable() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxsAvailable") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -161,6 +193,10 @@ func (_m *Mempool) Unlock() { func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool) error { ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc, bool) error); ok { r0 = rf(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck) diff --git a/internal/p2p/client/mocks/block_client.go b/internal/p2p/client/mocks/block_client.go index b094d38ccb..5d1e5a90ce 100644 --- a/internal/p2p/client/mocks/block_client.go +++ b/internal/p2p/client/mocks/block_client.go @@ -23,6 +23,10 @@ type BlockClient struct { func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error) { ret := _m.Called(ctx, height, peerID) + if len(ret) == 0 { + panic("no return value specified for GetBlock") + } + var r0 *promise.Promise[*blocksync.BlockResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)); ok { @@ -49,6 +53,10 @@ func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types. func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetSyncStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -63,6 +71,10 @@ func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { func (_m *BlockClient) Send(ctx context.Context, msg interface{}) error { ret := _m.Called(ctx, msg) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { r0 = rf(ctx, msg) diff --git a/internal/p2p/client/mocks/snapshot_client.go b/internal/p2p/client/mocks/snapshot_client.go index e2eb8d643d..a88f2e269b 100644 --- a/internal/p2p/client/mocks/snapshot_client.go +++ b/internal/p2p/client/mocks/snapshot_client.go @@ -22,6 +22,10 @@ type SnapshotClient struct { func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32) (*promise.Promise[*statesync.ChunkResponse], error) { ret := _m.Called(ctx, peerID, height, format, index) + if len(ret) == 0 { + panic("no return value specified for GetChunk") + } + var r0 *promise.Promise[*statesync.ChunkResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64, uint32, uint32) (*promise.Promise[*statesync.ChunkResponse], error)); ok { @@ -48,6 +52,10 @@ func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, hei func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error) { ret := _m.Called(ctx, peerID, height) + if len(ret) == 0 { + panic("no return value specified for GetLightBlock") + } + var r0 *promise.Promise[*statesync.LightBlockResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.LightBlockResponse], error)); ok { @@ -74,6 +82,10 @@ func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error) { ret := _m.Called(ctx, peerID, height) + if len(ret) == 0 { + panic("no return value specified for GetParams") + } + var r0 *promise.Promise[*statesync.ParamsResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.ParamsResponse], error)); ok { @@ -100,6 +112,10 @@ func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, he func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) error { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for GetSnapshots") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID) error); ok { r0 = rf(ctx, peerID) diff --git a/internal/p2p/mocks/channel.go b/internal/p2p/mocks/channel.go index ebee0c7670..b24f2d48a7 100644 --- a/internal/p2p/mocks/channel.go +++ b/internal/p2p/mocks/channel.go @@ -18,6 +18,10 @@ type Channel struct { func (_m *Channel) Err() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Err") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Channel) Err() error { func (_m *Channel) Receive(_a0 context.Context) *p2p.ChannelIterator { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Receive") + } + var r0 *p2p.ChannelIterator if rf, ok := ret.Get(0).(func(context.Context) *p2p.ChannelIterator); ok { r0 = rf(_a0) @@ -48,6 +56,10 @@ func (_m *Channel) Receive(_a0 context.Context) *p2p.ChannelIterator { func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, p2p.Envelope) error); ok { r0 = rf(_a0, _a1) @@ -62,6 +74,10 @@ func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SendError") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, p2p.PeerError) error); ok { r0 = rf(_a0, _a1) @@ -76,6 +92,10 @@ func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { func (_m *Channel) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/internal/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go index 447bb925ab..879950b6a1 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -27,6 +27,10 @@ type Connection struct { func (_m *Connection) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -41,6 +45,10 @@ func (_m *Connection) Close() error { func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error) { ret := _m.Called(_a0, _a1, _a2, _a3) + if len(ret) == 0 { + panic("no return value specified for Handshake") + } + var r0 types.NodeInfo var r1 crypto.PubKey var r2 error @@ -74,6 +82,10 @@ func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 type func (_m *Connection) LocalEndpoint() p2p.Endpoint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LocalEndpoint") + } + var r0 p2p.Endpoint if rf, ok := ret.Get(0).(func() p2p.Endpoint); ok { r0 = rf() @@ -88,6 +100,10 @@ func (_m *Connection) LocalEndpoint() p2p.Endpoint { func (_m *Connection) ReceiveMessage(_a0 context.Context) (conn.ChannelID, []byte, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ReceiveMessage") + } + var r0 conn.ChannelID var r1 []byte var r2 error @@ -121,6 +137,10 @@ func (_m *Connection) ReceiveMessage(_a0 context.Context) (conn.ChannelID, []byt func (_m *Connection) RemoteEndpoint() p2p.Endpoint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoteEndpoint") + } + var r0 p2p.Endpoint if rf, ok := ret.Get(0).(func() p2p.Endpoint); ok { r0 = rf() @@ -135,6 +155,10 @@ func (_m *Connection) RemoteEndpoint() p2p.Endpoint { func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 []byte) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for SendMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, conn.ChannelID, []byte) error); ok { r0 = rf(_a0, _a1, _a2) @@ -149,6 +173,10 @@ func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 [ func (_m *Connection) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/internal/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go index 0901d27c84..6fbaccacaa 100644 --- a/internal/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -21,6 +21,10 @@ type Transport struct { func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Accept") + } + var r0 p2p.Connection var r1 error if rf, ok := ret.Get(0).(func(context.Context) (p2p.Connection, error)); ok { @@ -52,6 +56,10 @@ func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor) { func (_m *Transport) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -66,6 +74,10 @@ func (_m *Transport) Close() error { func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Dial") + } + var r0 p2p.Connection var r1 error if rf, ok := ret.Get(0).(func(context.Context, *p2p.Endpoint) (p2p.Connection, error)); ok { @@ -92,6 +104,10 @@ func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connectio func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Endpoint") + } + var r0 *p2p.Endpoint var r1 error if rf, ok := ret.Get(0).(func() (*p2p.Endpoint, error)); ok { @@ -118,6 +134,10 @@ func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Listen") + } + var r0 error if rf, ok := ret.Get(0).(func(*p2p.Endpoint) error); ok { r0 = rf(_a0) @@ -132,6 +152,10 @@ func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { func (_m *Transport) Protocols() []p2p.Protocol { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Protocols") + } + var r0 []p2p.Protocol if rf, ok := ret.Get(0).(func() []p2p.Protocol); ok { r0 = rf() @@ -148,6 +172,10 @@ func (_m *Transport) Protocols() []p2p.Protocol { func (_m *Transport) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/internal/state/indexer/mocks/event_sink.go b/internal/state/indexer/mocks/event_sink.go index 45d3f22c8a..8288781bc0 100644 --- a/internal/state/indexer/mocks/event_sink.go +++ b/internal/state/indexer/mocks/event_sink.go @@ -24,6 +24,10 @@ type EventSink struct { func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetTxByHash") + } + var r0 *types.TxResult var r1 error if rf, ok := ret.Get(0).(func([]byte) (*types.TxResult, error)); ok { @@ -50,6 +54,10 @@ func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for HasBlock") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(int64) (bool, error)); ok { @@ -74,6 +82,10 @@ func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeader) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for IndexBlockEvents") + } + var r0 error if rf, ok := ret.Get(0).(func(tenderdashtypes.EventDataNewBlockHeader) error); ok { r0 = rf(_a0) @@ -88,6 +100,10 @@ func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeade func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for IndexTxEvents") + } + var r0 error if rf, ok := ret.Get(0).(func([]*types.TxResult) error); ok { r0 = rf(_a0) @@ -102,6 +118,10 @@ func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([]int64, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SearchBlockEvents") + } + var r0 []int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]int64, error)); ok { @@ -128,6 +148,10 @@ func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([ func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*types.TxResult, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SearchTxEvents") + } + var r0 []*types.TxResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]*types.TxResult, error)); ok { @@ -154,6 +178,10 @@ func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*t func (_m *EventSink) Stop() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -168,6 +196,10 @@ func (_m *EventSink) Stop() error { func (_m *EventSink) Type() indexer.EventSinkType { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Type") + } + var r0 indexer.EventSinkType if rf, ok := ret.Get(0).(func() indexer.EventSinkType); ok { r0 = rf() diff --git a/internal/state/mocks/block_store.go b/internal/state/mocks/block_store.go index f4a0636d78..63873d194a 100644 --- a/internal/state/mocks/block_store.go +++ b/internal/state/mocks/block_store.go @@ -17,6 +17,10 @@ type BlockStore struct { func (_m *BlockStore) Base() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Base") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -31,6 +35,10 @@ func (_m *BlockStore) Base() int64 { func (_m *BlockStore) CoreChainLockedHeight() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreChainLockedHeight") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -45,6 +53,10 @@ func (_m *BlockStore) CoreChainLockedHeight() uint32 { func (_m *BlockStore) Height() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Height") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -59,6 +71,10 @@ func (_m *BlockStore) Height() int64 { func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LoadBaseMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func() *types.BlockMeta); ok { r0 = rf() @@ -75,6 +91,10 @@ func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { func (_m *BlockStore) LoadBlock(height int64) *types.Block { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlock") + } + var r0 *types.Block if rf, ok := ret.Get(0).(func(int64) *types.Block); ok { r0 = rf(height) @@ -91,6 +111,10 @@ func (_m *BlockStore) LoadBlock(height int64) *types.Block { func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for LoadBlockByHash") + } + var r0 *types.Block if rf, ok := ret.Get(0).(func([]byte) *types.Block); ok { r0 = rf(hash) @@ -107,6 +131,10 @@ func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -123,6 +151,10 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { r0 = rf(height) @@ -139,6 +171,10 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMetaByHash") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func([]byte) *types.BlockMeta); ok { r0 = rf(hash) @@ -155,6 +191,10 @@ func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { ret := _m.Called(height, index) + if len(ret) == 0 { + panic("no return value specified for LoadBlockPart") + } + var r0 *types.Part if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok { r0 = rf(height, index) @@ -171,6 +211,10 @@ func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { func (_m *BlockStore) LoadSeenCommit() *types.Commit { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LoadSeenCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func() *types.Commit); ok { r0 = rf() @@ -187,6 +231,10 @@ func (_m *BlockStore) LoadSeenCommit() *types.Commit { func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadSeenCommitAt") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -203,6 +251,10 @@ func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for PruneBlocks") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(int64) (uint64, error)); ok { @@ -232,6 +284,10 @@ func (_m *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, s func (_m *BlockStore) Size() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() diff --git a/internal/state/mocks/evidence_pool.go b/internal/state/mocks/evidence_pool.go index 162d1035d3..ff16885fbd 100644 --- a/internal/state/mocks/evidence_pool.go +++ b/internal/state/mocks/evidence_pool.go @@ -20,6 +20,10 @@ type EvidencePool struct { func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AddEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) error); ok { r0 = rf(_a0, _a1) @@ -34,6 +38,10 @@ func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) err func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceList) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.EvidenceList) error); ok { r0 = rf(_a0, _a1) @@ -48,6 +56,10 @@ func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceLis func (_m *EvidencePool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64) { ret := _m.Called(maxBytes) + if len(ret) == 0 { + panic("no return value specified for PendingEvidence") + } + var r0 []types.Evidence var r1 int64 if rf, ok := ret.Get(0).(func(int64) ([]types.Evidence, int64)); ok { diff --git a/internal/state/mocks/executor.go b/internal/state/mocks/executor.go index daa92ee0dc..e287c60cc0 100644 --- a/internal/state/mocks/executor.go +++ b/internal/state/mocks/executor.go @@ -20,6 +20,10 @@ type Executor struct { func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, blockID, block, commit) + if len(ret) == 0 { + panic("no return value specified for ApplyBlock") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(context.Context, state.State, types.BlockID, *types.Block, *types.Commit) (state.State, error)); ok { @@ -44,6 +48,10 @@ func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID typ func (_m *Executor) CreateProposalBlock(ctx context.Context, height int64, round int32, _a3 state.State, commit *types.Commit, proposerProTxHash []byte, proposedAppVersion uint64) (*types.Block, state.CurrentRoundState, error) { ret := _m.Called(ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion) + if len(ret) == 0 { + panic("no return value specified for CreateProposalBlock") + } + var r0 *types.Block var r1 state.CurrentRoundState var r2 error @@ -82,6 +90,10 @@ func (_m *Executor) ExtendVote(ctx context.Context, vote *types.Vote) { func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, uncommittedState, blockID, block, commit) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(context.Context, state.State, state.CurrentRoundState, types.BlockID, *types.Block, *types.Commit) (state.State, error)); ok { @@ -106,6 +118,10 @@ func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommit func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, round int32, _a3 state.State, verify bool) (state.CurrentRoundState, error) { ret := _m.Called(ctx, block, round, _a3, verify) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 state.CurrentRoundState var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.Block, int32, state.State, bool) (state.CurrentRoundState, error)); ok { @@ -130,6 +146,10 @@ func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, rou func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *types.Block) error { ret := _m.Called(ctx, _a1, block) + if len(ret) == 0 { + panic("no return value specified for ValidateBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, state.State, *types.Block) error); ok { r0 = rf(ctx, _a1, block) @@ -144,6 +164,10 @@ func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *t func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, block *types.Block) error { ret := _m.Called(ctx, _a1, uncommittedState, block) + if len(ret) == 0 { + panic("no return value specified for ValidateBlockWithRoundState") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, state.State, state.CurrentRoundState, *types.Block) error); ok { r0 = rf(ctx, _a1, uncommittedState, block) @@ -158,6 +182,10 @@ func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.S func (_m *Executor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) error { ret := _m.Called(ctx, vote) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *types.Vote) error); ok { r0 = rf(ctx, vote) diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go index 8f8fc65857..4a7fa92190 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -20,6 +20,10 @@ type Store struct { func (_m *Store) Bootstrap(_a0 state.State) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Bootstrap") + } + var r0 error if rf, ok := ret.Get(0).(func(state.State) error); ok { r0 = rf(_a0) @@ -34,6 +38,10 @@ func (_m *Store) Bootstrap(_a0 state.State) error { func (_m *Store) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *Store) Close() error { func (_m *Store) Load() (state.State, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Load") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func() (state.State, error)); ok { @@ -72,6 +84,10 @@ func (_m *Store) Load() (state.State, error) { func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadABCIResponses") + } + var r0 *tendermintstate.ABCIResponses var r1 error if rf, ok := ret.Get(0).(func(int64) (*tendermintstate.ABCIResponses, error)); ok { @@ -98,6 +114,10 @@ func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, e func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadConsensusParams") + } + var r0 types.ConsensusParams var r1 error if rf, ok := ret.Get(0).(func(int64) (types.ConsensusParams, error)); ok { @@ -122,6 +142,10 @@ func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadValidators") + } + var r0 *types.ValidatorSet var r1 error if rf, ok := ret.Get(0).(func(int64) (*types.ValidatorSet, error)); ok { @@ -148,6 +172,10 @@ func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) { func (_m *Store) PruneStates(_a0 int64) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PruneStates") + } + var r0 error if rf, ok := ret.Get(0).(func(int64) error); ok { r0 = rf(_a0) @@ -162,6 +190,10 @@ func (_m *Store) PruneStates(_a0 int64) error { func (_m *Store) Save(_a0 state.State) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Save") + } + var r0 error if rf, ok := ret.Get(0).(func(state.State) error); ok { r0 = rf(_a0) @@ -176,6 +208,10 @@ func (_m *Store) Save(_a0 state.State) error { func (_m *Store) SaveABCIResponses(_a0 int64, _a1 tendermintstate.ABCIResponses) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SaveABCIResponses") + } + var r0 error if rf, ok := ret.Get(0).(func(int64, tendermintstate.ABCIResponses) error); ok { r0 = rf(_a0, _a1) @@ -190,6 +226,10 @@ func (_m *Store) SaveABCIResponses(_a0 int64, _a1 tendermintstate.ABCIResponses) func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for SaveValidatorSets") + } + var r0 error if rf, ok := ret.Get(0).(func(int64, int64, *types.ValidatorSet) error); ok { r0 = rf(_a0, _a1, _a2) diff --git a/internal/statesync/mocks/state_provider.go b/internal/statesync/mocks/state_provider.go index b4301dffcb..73b6b7b372 100644 --- a/internal/statesync/mocks/state_provider.go +++ b/internal/statesync/mocks/state_provider.go @@ -23,6 +23,10 @@ type StateProvider struct { func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexBytes, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for AppHash") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (bytes.HexBytes, error)); ok { @@ -49,6 +53,10 @@ func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexB func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *types.Commit var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (*types.Commit, error)); ok { @@ -75,6 +83,10 @@ func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Comm func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for State") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (state.State, error)); ok { diff --git a/libs/store/mocks/store.go b/libs/store/mocks/store.go index aa0d3779b8..f8d1989f64 100644 --- a/libs/store/mocks/store.go +++ b/libs/store/mocks/store.go @@ -16,6 +16,10 @@ type Store[K comparable, V interface{}] struct { func (_m *Store[K, V]) All() []V { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []V if rf, ok := ret.Get(0).(func() []V); ok { r0 = rf() @@ -37,6 +41,10 @@ func (_m *Store[K, V]) Delete(key K) { func (_m *Store[K, V]) Get(key K) (V, bool) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 V var r1 bool if rf, ok := ret.Get(0).(func(K) (V, bool)); ok { @@ -61,6 +69,10 @@ func (_m *Store[K, V]) Get(key K) (V, bool) { func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for GetAndDelete") + } + var r0 V var r1 bool if rf, ok := ret.Get(0).(func(K) (V, bool)); ok { @@ -85,6 +97,10 @@ func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { func (_m *Store[K, V]) IsZero() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsZero") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -99,6 +115,10 @@ func (_m *Store[K, V]) IsZero() bool { func (_m *Store[K, V]) Len() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Len") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -118,6 +138,10 @@ func (_m *Store[K, V]) Put(key K, data V) { func (_m *Store[K, V]) Query(spec store.QueryFunc[K, V], limit int) []V { ret := _m.Called(spec, limit) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 []V if rf, ok := ret.Get(0).(func(store.QueryFunc[K, V], int) []V); ok { r0 = rf(spec, limit) diff --git a/light/provider/mocks/provider.go b/light/provider/mocks/provider.go index 93042ab3dc..24cd675bf9 100644 --- a/light/provider/mocks/provider.go +++ b/light/provider/mocks/provider.go @@ -19,6 +19,10 @@ type Provider struct { func (_m *Provider) ID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -33,6 +37,10 @@ func (_m *Provider) ID() string { func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for LightBlock") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64) (*types.LightBlock, error)); ok { @@ -59,6 +67,10 @@ func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightB func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ReportEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) error); ok { r0 = rf(_a0, _a1) diff --git a/light/rpc/mocks/light_client.go b/light/rpc/mocks/light_client.go index deb22f7d2a..8d53cd4f91 100644 --- a/light/rpc/mocks/light_client.go +++ b/light/rpc/mocks/light_client.go @@ -21,6 +21,10 @@ type LightClient struct { func (_m *LightClient) ChainID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -35,6 +39,10 @@ func (_m *LightClient) ChainID() string { func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *types.LightClientInfo if rf, ok := ret.Get(0).(func(context.Context) *types.LightClientInfo); ok { r0 = rf(ctx) @@ -51,6 +59,10 @@ func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for TrustedLightBlock") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(int64) (*types.LightBlock, error)); ok { @@ -77,6 +89,10 @@ func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, now) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, time.Time) (*types.LightBlock, error)); ok { @@ -103,6 +119,10 @@ func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightB func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, height, now) + if len(ret) == 0 { + panic("no return value specified for VerifyLightBlockAtHeight") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) (*types.LightBlock, error)); ok { diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 2ee78dee8c..60046c011a 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -733,12 +733,13 @@ message EventAttribute { // ExecTxResult contains results of executing one individual transaction. message ExecTxResult { - uint32 code = 1; // Response code within codespace; by convention, 0 means success. - bytes data = 2; // Result bytes, if any (arbitrary data, not interpreted by Tenderdash). - string log = 3; // The output of the application's logger. May be non-deterministic. - string info = 4; // Additional information. May be non-deterministic. - int64 gas_wanted = 5; // Amount of gas requested for transaction. - int64 gas_used = 6; // Amount of gas consumed by transaction. + uint32 code = 1; // Response code within codespace; by convention, 0 means success. + bytes data = 2; // Result bytes, if any (arbitrary data, not interpreted by Tenderdash). + string log = 3; // The output of the application's logger. May be non-deterministic. + string info = 4; // Additional information. May be non-deterministic. + reserved "gas_wanted"; + reserved 5; + int64 gas_used = 6; // Amount of gas consumed by transaction. // Type & Key-Value events for indexing transactions (e.g. by account). repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; diff --git a/rpc/client/mocks/abci_client.go b/rpc/client/mocks/abci_client.go index fc06ed551d..3d0cc35ca5 100644 --- a/rpc/client/mocks/abci_client.go +++ b/rpc/client/mocks/abci_client.go @@ -24,6 +24,10 @@ type ABCIClient struct { func (_m *ABCIClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } + var r0 *coretypes.ResultABCIInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { @@ -50,6 +54,10 @@ func (_m *ABCIClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, func (_m *ABCIClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { @@ -76,6 +84,10 @@ func (_m *ABCIClient) ABCIQuery(ctx context.Context, path string, data bytes.Hex func (_m *ABCIClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { @@ -102,6 +114,10 @@ func (_m *ABCIClient) ABCIQueryWithOptions(ctx context.Context, path string, dat func (_m *ABCIClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTx") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -128,6 +144,10 @@ func (_m *ABCIClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes func (_m *ABCIClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -154,6 +174,10 @@ func (_m *ABCIClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*core func (_m *ABCIClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } + var r0 *coretypes.ResultBroadcastTxCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { @@ -180,6 +204,10 @@ func (_m *ABCIClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*cor func (_m *ABCIClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { diff --git a/rpc/client/mocks/client.go b/rpc/client/mocks/client.go index 22533b3666..c62a3347a0 100644 --- a/rpc/client/mocks/client.go +++ b/rpc/client/mocks/client.go @@ -24,6 +24,10 @@ type Client struct { func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } + var r0 *coretypes.ResultABCIInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { @@ -50,6 +54,10 @@ func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, erro func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { @@ -76,6 +84,10 @@ func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexByte func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { @@ -102,6 +114,10 @@ func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data by func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { @@ -128,6 +144,10 @@ func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBl func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { @@ -154,6 +174,10 @@ func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*corety func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + var r0 *coretypes.ResultBlockResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { @@ -180,6 +204,10 @@ func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.R func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + var r0 *coretypes.ResultBlockSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { @@ -206,6 +234,10 @@ func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perP func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + var r0 *coretypes.ResultBlockchainInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { @@ -232,6 +264,10 @@ func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } + var r0 *coretypes.ResultBroadcastEvidence var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { @@ -258,6 +294,10 @@ func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*c func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTx") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -284,6 +324,10 @@ func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.Res func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -310,6 +354,10 @@ func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretype func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } + var r0 *coretypes.ResultBroadcastTxCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { @@ -336,6 +384,10 @@ func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretyp func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -362,6 +414,10 @@ func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *coretypes.ResultCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { @@ -388,6 +444,10 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultC func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *coretypes.ResultCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { @@ -414,6 +474,10 @@ func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultC func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + var r0 *coretypes.ResultConsensusParams var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { @@ -440,6 +504,10 @@ func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretype func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } + var r0 *coretypes.ResultConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { @@ -466,6 +534,10 @@ func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensu func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } + var r0 *coretypes.ResultDumpConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { @@ -492,6 +564,10 @@ func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDump func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 *coretypes.ResultEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { @@ -518,6 +594,10 @@ func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*co func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Genesis") + } + var r0 *coretypes.ResultGenesis var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { @@ -544,6 +624,10 @@ func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } + var r0 *coretypes.ResultGenesisChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { @@ -570,6 +654,10 @@ func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.Resu func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { @@ -596,6 +684,10 @@ func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultH func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { @@ -622,6 +714,10 @@ func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coret func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Health") + } + var r0 *coretypes.ResultHealth var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { @@ -648,6 +744,10 @@ func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } + var r0 *coretypes.ResultNetInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { @@ -674,6 +774,10 @@ func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -700,6 +804,10 @@ func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUncon func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RemoveTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { r0 = rf(_a0, _a1) @@ -714,6 +822,10 @@ func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -728,6 +840,10 @@ func (_m *Client) Start(_a0 context.Context) error { func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *coretypes.ResultStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { @@ -761,6 +877,10 @@ func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 <-chan coretypes.ResultEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { @@ -787,6 +907,10 @@ func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) + if len(ret) == 0 { + panic("no return value specified for Tx") + } + var r0 *coretypes.ResultTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { @@ -813,6 +937,10 @@ func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*cor func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + var r0 *coretypes.ResultTxSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { @@ -839,6 +967,10 @@ func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page * func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -865,6 +997,10 @@ func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) ( func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, subscriber, query) @@ -879,6 +1015,10 @@ func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query stri func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, subscriber) @@ -893,6 +1033,10 @@ func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *coretypes.ResultValidators var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { diff --git a/rpc/client/mocks/events_client.go b/rpc/client/mocks/events_client.go index 092e7b15e6..469ce79ada 100644 --- a/rpc/client/mocks/events_client.go +++ b/rpc/client/mocks/events_client.go @@ -18,6 +18,10 @@ type EventsClient struct { func (_m *EventsClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 *coretypes.ResultEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { diff --git a/rpc/client/mocks/evidence_client.go b/rpc/client/mocks/evidence_client.go index 1b7817a0f1..fbd8316844 100644 --- a/rpc/client/mocks/evidence_client.go +++ b/rpc/client/mocks/evidence_client.go @@ -20,6 +20,10 @@ type EvidenceClient struct { func (_m *EvidenceClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } + var r0 *coretypes.ResultBroadcastEvidence var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { diff --git a/rpc/client/mocks/history_client.go b/rpc/client/mocks/history_client.go index 280e1738a1..f4ae961c72 100644 --- a/rpc/client/mocks/history_client.go +++ b/rpc/client/mocks/history_client.go @@ -18,6 +18,10 @@ type HistoryClient struct { func (_m *HistoryClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + var r0 *coretypes.ResultBlockchainInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { @@ -44,6 +48,10 @@ func (_m *HistoryClient) BlockchainInfo(ctx context.Context, minHeight int64, ma func (_m *HistoryClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Genesis") + } + var r0 *coretypes.ResultGenesis var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { @@ -70,6 +78,10 @@ func (_m *HistoryClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, func (_m *HistoryClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } + var r0 *coretypes.ResultGenesisChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { diff --git a/rpc/client/mocks/mempool_client.go b/rpc/client/mocks/mempool_client.go index 66c296e1fd..f294b23de2 100644 --- a/rpc/client/mocks/mempool_client.go +++ b/rpc/client/mocks/mempool_client.go @@ -20,6 +20,10 @@ type MempoolClient struct { func (_m *MempoolClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *coretypes.ResultCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { @@ -46,6 +50,10 @@ func (_m *MempoolClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes. func (_m *MempoolClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -72,6 +80,10 @@ func (_m *MempoolClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.Resu func (_m *MempoolClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RemoveTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { r0 = rf(_a0, _a1) @@ -86,6 +98,10 @@ func (_m *MempoolClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { func (_m *MempoolClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { diff --git a/rpc/client/mocks/network_client.go b/rpc/client/mocks/network_client.go index f365a8a4c3..f9ae2ea916 100644 --- a/rpc/client/mocks/network_client.go +++ b/rpc/client/mocks/network_client.go @@ -18,6 +18,10 @@ type NetworkClient struct { func (_m *NetworkClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + var r0 *coretypes.ResultConsensusParams var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { @@ -44,6 +48,10 @@ func (_m *NetworkClient) ConsensusParams(ctx context.Context, height *int64) (*c func (_m *NetworkClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } + var r0 *coretypes.ResultConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { @@ -70,6 +78,10 @@ func (_m *NetworkClient) ConsensusState(_a0 context.Context) (*coretypes.ResultC func (_m *NetworkClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } + var r0 *coretypes.ResultDumpConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { @@ -96,6 +108,10 @@ func (_m *NetworkClient) DumpConsensusState(_a0 context.Context) (*coretypes.Res func (_m *NetworkClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Health") + } + var r0 *coretypes.ResultHealth var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { @@ -122,6 +138,10 @@ func (_m *NetworkClient) Health(_a0 context.Context) (*coretypes.ResultHealth, e func (_m *NetworkClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } + var r0 *coretypes.ResultNetInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { diff --git a/rpc/client/mocks/remote_client.go b/rpc/client/mocks/remote_client.go index a09c863c8f..1708786162 100644 --- a/rpc/client/mocks/remote_client.go +++ b/rpc/client/mocks/remote_client.go @@ -24,6 +24,10 @@ type RemoteClient struct { func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } + var r0 *coretypes.ResultABCIInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { @@ -50,6 +54,10 @@ func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { @@ -76,6 +84,10 @@ func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.H func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { @@ -102,6 +114,10 @@ func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, d func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { @@ -128,6 +144,10 @@ func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.Re func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { @@ -154,6 +174,10 @@ func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (* func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + var r0 *coretypes.ResultBlockResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { @@ -180,6 +204,10 @@ func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coret func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + var r0 *coretypes.ResultBlockSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { @@ -206,6 +234,10 @@ func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + var r0 *coretypes.ResultBlockchainInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { @@ -232,6 +264,10 @@ func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, max func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } + var r0 *coretypes.ResultBroadcastEvidence var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { @@ -258,6 +294,10 @@ func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidenc func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTx") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -284,6 +324,10 @@ func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretyp func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -310,6 +354,10 @@ func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*co func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } + var r0 *coretypes.ResultBroadcastTxCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { @@ -336,6 +384,10 @@ func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*c func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -362,6 +414,10 @@ func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*cor func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *coretypes.ResultCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { @@ -388,6 +444,10 @@ func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.R func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *coretypes.ResultCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { @@ -414,6 +474,10 @@ func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.R func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + var r0 *coretypes.ResultConsensusParams var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { @@ -440,6 +504,10 @@ func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*co func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } + var r0 *coretypes.ResultConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { @@ -466,6 +534,10 @@ func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultCo func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } + var r0 *coretypes.ResultDumpConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { @@ -492,6 +564,10 @@ func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.Resu func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 *coretypes.ResultEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { @@ -518,6 +594,10 @@ func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Genesis") + } + var r0 *coretypes.ResultGenesis var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { @@ -544,6 +624,10 @@ func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } + var r0 *coretypes.ResultGenesisChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { @@ -570,6 +654,10 @@ func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretype func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { @@ -596,6 +684,10 @@ func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.R func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { @@ -622,6 +714,10 @@ func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) ( func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Health") + } + var r0 *coretypes.ResultHealth var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { @@ -648,6 +744,10 @@ func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, er func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } + var r0 *coretypes.ResultNetInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { @@ -674,6 +774,10 @@ func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -700,6 +804,10 @@ func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.Resul func (_m *RemoteClient) Remote() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Remote") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -714,6 +822,10 @@ func (_m *RemoteClient) Remote() string { func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RemoveTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { r0 = rf(_a0, _a1) @@ -728,6 +840,10 @@ func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { func (_m *RemoteClient) Start(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -742,6 +858,10 @@ func (_m *RemoteClient) Start(_a0 context.Context) error { func (_m *RemoteClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *coretypes.ResultStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { @@ -775,6 +895,10 @@ func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 <-chan coretypes.ResultEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { @@ -801,6 +925,10 @@ func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) + if len(ret) == 0 { + panic("no return value specified for Tx") + } + var r0 *coretypes.ResultTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { @@ -827,6 +955,10 @@ func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + var r0 *coretypes.ResultTxSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { @@ -853,6 +985,10 @@ func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -879,6 +1015,10 @@ func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage * func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, subscriber, query) @@ -893,6 +1033,10 @@ func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, quer func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, subscriber) @@ -907,6 +1051,10 @@ func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) e func (_m *RemoteClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *coretypes.ResultValidators var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { diff --git a/rpc/client/mocks/sign_client.go b/rpc/client/mocks/sign_client.go index 9d312d993d..dea02efa1d 100644 --- a/rpc/client/mocks/sign_client.go +++ b/rpc/client/mocks/sign_client.go @@ -21,6 +21,10 @@ type SignClient struct { func (_m *SignClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { @@ -47,6 +51,10 @@ func (_m *SignClient) Block(ctx context.Context, height *int64) (*coretypes.Resu func (_m *SignClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { @@ -73,6 +81,10 @@ func (_m *SignClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*co func (_m *SignClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + var r0 *coretypes.ResultBlockResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { @@ -99,6 +111,10 @@ func (_m *SignClient) BlockResults(ctx context.Context, height *int64) (*coretyp func (_m *SignClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + var r0 *coretypes.ResultBlockSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { @@ -125,6 +141,10 @@ func (_m *SignClient) BlockSearch(ctx context.Context, query string, page *int, func (_m *SignClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *coretypes.ResultCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { @@ -151,6 +171,10 @@ func (_m *SignClient) Commit(ctx context.Context, height *int64) (*coretypes.Res func (_m *SignClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { @@ -177,6 +201,10 @@ func (_m *SignClient) Header(ctx context.Context, height *int64) (*coretypes.Res func (_m *SignClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { @@ -203,6 +231,10 @@ func (_m *SignClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*c func (_m *SignClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) + if len(ret) == 0 { + panic("no return value specified for Tx") + } + var r0 *coretypes.ResultTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { @@ -229,6 +261,10 @@ func (_m *SignClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) ( func (_m *SignClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + var r0 *coretypes.ResultTxSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { @@ -255,6 +291,10 @@ func (_m *SignClient) TxSearch(ctx context.Context, query string, prove bool, pa func (_m *SignClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *coretypes.ResultValidators var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { diff --git a/rpc/client/mocks/status_client.go b/rpc/client/mocks/status_client.go index 7094efff07..71f5a6f6a5 100644 --- a/rpc/client/mocks/status_client.go +++ b/rpc/client/mocks/status_client.go @@ -18,6 +18,10 @@ type StatusClient struct { func (_m *StatusClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *coretypes.ResultStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { diff --git a/rpc/client/mocks/subscription_client.go b/rpc/client/mocks/subscription_client.go index 512da36df5..84095a2b03 100644 --- a/rpc/client/mocks/subscription_client.go +++ b/rpc/client/mocks/subscription_client.go @@ -25,6 +25,10 @@ func (_m *SubscriptionClient) Subscribe(ctx context.Context, subscriber string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 <-chan coretypes.ResultEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { @@ -51,6 +55,10 @@ func (_m *SubscriptionClient) Subscribe(ctx context.Context, subscriber string, func (_m *SubscriptionClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, subscriber, query) @@ -65,6 +73,10 @@ func (_m *SubscriptionClient) Unsubscribe(ctx context.Context, subscriber string func (_m *SubscriptionClient) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, subscriber) diff --git a/scripts/mockery_generate.sh b/scripts/mockery_generate.sh index 3c7e8d3e46..1d00aef13f 100755 --- a/scripts/mockery_generate.sh +++ b/scripts/mockery_generate.sh @@ -6,7 +6,7 @@ # runs the published Docker container. This legerdemain is so that the CI build # and a local build can work off the same script. # -VERSION=v2.33.2 +VERSION=v2.41.0 if ! mockery --version 2>/dev/null | grep $VERSION; then echo "Please install mockery $VERSION" diff --git a/spec/abci++/api.md b/spec/abci++/api.md index 19b0f4945f..e04abeba19 100644 --- a/spec/abci++/api.md +++ b/spec/abci++/api.md @@ -142,7 +142,6 @@ ExecTxResult contains results of executing one individual transaction. | data | [bytes](#bytes) | | Result bytes, if any (arbitrary data, not interpreted by Tenderdash). | | log | [string](#string) | | The output of the application's logger. May be non-deterministic. | | info | [string](#string) | | Additional information. May be non-deterministic. | -| gas_wanted | [int64](#int64) | | Amount of gas requested for transaction. | | gas_used | [int64](#int64) | | Amount of gas consumed by transaction. | | events | [Event](#tendermint-abci-Event) | repeated | Type & Key-Value events for indexing transactions (e.g. by account). | | codespace | [string](#string) | | Namespace for the code. | diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index 686add6add..db5c852c71 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -1,6 +1,6 @@ ## Stage 1 and 2 is copied from /DOCKER/Dockerfile -ARG ALIPNE_VERSION=3.17 -ARG GOLANG_VERSION=1.21 +ARG ALIPNE_VERSION=3.19 +ARG GOLANG_VERSION=1.22 ################################# # STAGE 1: install dependencies # ################################# diff --git a/test/e2e/generator/generate.go b/test/e2e/generator/generate.go index c6877afc42..2fbc995cd3 100644 --- a/test/e2e/generator/generate.go +++ b/test/e2e/generator/generate.go @@ -1,14 +1,12 @@ package main import ( - "encoding/json" "fmt" "math/rand" "sort" "strings" "time" - "github.com/dashpay/tenderdash/abci/example/kvstore" e2e "github.com/dashpay/tenderdash/test/e2e/pkg" "github.com/dashpay/tenderdash/types" ) @@ -20,7 +18,11 @@ var ( "topology": {"single", "quad", "large"}, "initialState": { "{}", - `{"items": {"initial01": "a", "initial02": "b", "initial03": "c"}}`, + `{} + {"key":"initial01","value":"a"} + {"key":"initial02","value":"b"} + {"key":"initial03","value":"c"} + `, }, "validators": {"genesis", "initchain"}, @@ -113,13 +115,8 @@ type Options struct { // generateTestnet generates a single testnet with the given options. func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, error) { - initialState := kvstore.StateExport{} - if opt["initialState"] != nil { - data := opt["initialState"].(string) - if err := json.Unmarshal([]byte(data), &initialState); err != nil { - return e2e.Manifest{}, fmt.Errorf("unmarshal initialState: %w", err) - } - } + initialState := opt["initialState"].(string) + manifest := e2e.Manifest{ IPv6: ipv6.Choose(r).(bool), InitialState: initialState, diff --git a/test/e2e/networks/dashcore.toml b/test/e2e/networks/dashcore.toml index 41032e045c..aa70916364 100644 --- a/test/e2e/networks/dashcore.toml +++ b/test/e2e/networks/dashcore.toml @@ -2,14 +2,14 @@ # functionality with a single network. initial_height = 1000 -initial_state = { items = { initial01 = "a", initial02 = "b", initial03 = "c" } } +initial_state = '{} { "key":"initial01","value":"a"}{"key":"initial02","value":"b"}{"key":"initial03","value":"c"}' initial_core_chain_locked_height = 3400 queue_type = "priority" log_level = "debug" - -max_block_size = 1048576 # 1 MB -max_evidence_size = 102400 # 100 kB +# Tune block size for TestApp_TxTooBig +max_block_size = 262144 # 0.25 MB +max_evidence_size = 52428 # 50 kB [chainlock_updates] 1000 = 3450 diff --git a/test/e2e/networks/rotate.toml b/test/e2e/networks/rotate.toml index c29b5c4be9..736e56765c 100644 --- a/test/e2e/networks/rotate.toml +++ b/test/e2e/networks/rotate.toml @@ -2,14 +2,15 @@ # functionality with a single network. initial_height = 1000 -initial_state = { items = { initial01 = "a", initial02 = "b", initial03 = "c" } } +initial_state = '{}{ "key": "initial01","value":"a"} {"key":"initial02","value":"b"} {"key":"initial03" ,"value":"c" }' initial_core_chain_locked_height = 3400 -init_app_core_chain_locked_height = 2308 # should override initial_core_chain_locked_height +init_app_core_chain_locked_height = 2308 # should override initial_core_chain_locked_height queue_type = "priority" log_level = "debug" -max_block_size = 1048576 # 1 MB -max_evidence_size = 102400 # 100 kB +# Tune block size for TestApp_TxTooBig +max_block_size = 262144 # 0.25 MB +max_evidence_size = 52428 # 50 kB [chainlock_updates] 1000 = 3450 diff --git a/test/e2e/pkg/manifest.go b/test/e2e/pkg/manifest.go index 7e9a8d52bd..a070b2b398 100644 --- a/test/e2e/pkg/manifest.go +++ b/test/e2e/pkg/manifest.go @@ -7,8 +7,6 @@ import ( "time" "github.com/BurntSushi/toml" - - "github.com/dashpay/tenderdash/abci/example/kvstore" ) // Manifest represents a TOML testnet manifest. @@ -31,7 +29,7 @@ type Manifest struct { // InitialState is an initial set of key/value pairs for the application, // set in genesis. Defaults to nothing. - InitialState kvstore.StateExport `toml:"initial_state"` + InitialState string `toml:"initial_state"` // Validators is the initial validator set in genesis, given as node names // and power (for Dash power must all be set to default power): diff --git a/test/e2e/pkg/testnet.go b/test/e2e/pkg/testnet.go index 29f76c6f1a..44ca245d28 100644 --- a/test/e2e/pkg/testnet.go +++ b/test/e2e/pkg/testnet.go @@ -15,7 +15,6 @@ import ( "github.com/dashpay/dashd-go/btcjson" - "github.com/dashpay/tenderdash/abci/example/kvstore" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/crypto" "github.com/dashpay/tenderdash/crypto/bls12381" @@ -77,7 +76,7 @@ type Testnet struct { Dir string IP *net.IPNet InitialHeight int64 - InitialState kvstore.StateExport + InitialState string Validators ValidatorsMap ValidatorUpdates map[int64]ValidatorsMap Nodes []*Node diff --git a/test/e2e/runner/setup.go b/test/e2e/runner/setup.go index ac90b00123..b46d101857 100644 --- a/test/e2e/runner/setup.go +++ b/test/e2e/runner/setup.go @@ -5,7 +5,6 @@ import ( "context" "encoding/base64" "encoding/hex" - "encoding/json" "errors" "fmt" "os" @@ -202,13 +201,9 @@ func MakeGenesis(testnet *e2e.Testnet, genesisTime time.Time) (types.GenesisDoc, sort.Slice(genesis.Validators, func(i, j int) bool { return strings.Compare(genesis.Validators[i].Name, genesis.Validators[j].Name) == -1 }) - if len(testnet.InitialState.Items) > 0 { - appState, err := json.Marshal(testnet.InitialState) - if err != nil { - return genesis, err - } - genesis.AppState = appState - } + + genesis.AppState = []byte(testnet.InitialState) + return genesis, genesis.ValidateAndComplete() } diff --git a/test/e2e/tests/app_test.go b/test/e2e/tests/app_test.go index d302242c1f..470c523bfe 100644 --- a/test/e2e/tests/app_test.go +++ b/test/e2e/tests/app_test.go @@ -6,13 +6,18 @@ import ( "fmt" "math/big" "math/rand" + "os" + "sort" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + db "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/abci/example/code" + "github.com/dashpay/tenderdash/abci/example/kvstore" + tmbytes "github.com/dashpay/tenderdash/libs/bytes" tmrand "github.com/dashpay/tenderdash/libs/rand" "github.com/dashpay/tenderdash/rpc/client/http" e2e "github.com/dashpay/tenderdash/test/e2e/pkg" @@ -26,17 +31,24 @@ const ( // Tests that any initial state given in genesis has made it into the app. func TestApp_InitialState(t *testing.T) { testNode(t, func(ctx context.Context, t *testing.T, node e2e.Node) { - if len(node.Testnet.InitialState.Items) == 0 { - return - } client, err := node.Client() require.NoError(t, err) - for k, v := range node.Testnet.InitialState.Items { - resp, err := client.ABCIQuery(ctx, "", []byte(k)) + state := kvstore.NewKvState(db.NewMemDB(), 0) + err = state.Load(bytes.NewBufferString(node.Testnet.InitialState)) + require.NoError(t, err) + iter, err := state.Iterator(nil, nil) + require.NoError(t, err) + + for iter.Valid() { + k := iter.Key() + v := iter.Value() + resp, err := client.ABCIQuery(ctx, "", k) require.NoError(t, err) - assert.Equal(t, k, string(resp.Response.Key)) - assert.Equal(t, v, string(resp.Response.Value)) + assert.Equal(t, k, resp.Response.Key) + assert.Equal(t, v, resp.Response.Value) + + iter.Next() } }) } @@ -195,12 +207,61 @@ func TestApp_Tx(t *testing.T) { // when I submit them to the node, // then the first transaction should be committed before the last one. func TestApp_TxTooBig(t *testing.T) { - const timeout = 60 * time.Second + // Pair of txs, last must be in block later than first + type txPair struct { + firstTxHash tmbytes.HexBytes + lastTxHash tmbytes.HexBytes + } + + /// timeout for broadcast to single node + const broadcastTimeout = 5 * time.Second + /// Timeout to read response from single node + const readTimeout = 1 * time.Second + /// Time to process whole mempool + const includeInBlockTimeout = 75 * time.Second + + mainCtx, cancel := context.WithCancel(context.Background()) + defer cancel() + + testnet := loadTestnet(t) + nodes := testnet.Nodes + + if name := os.Getenv("E2E_NODE"); name != "" { + node := testnet.LookupNode(name) + require.NotNil(t, node, "node %q not found in testnet %q", name, testnet.Name) + nodes = []*e2e.Node{node} + } else { + sort.Slice(nodes, func(i, j int) bool { + return nodes[i].Name < nodes[j].Name + }) + } + + // we will use last client to check if txs were included in block, so we + // define it outside the loop + var client *http.HTTP + outcome := make([]txPair, 0, len(nodes)) + + start := time.Now() + /// Send to each node more txs than we can fit into block + for _, node := range nodes { + ctx, cancel := context.WithTimeout(mainCtx, broadcastTimeout) + defer cancel() + + if ctx.Err() != nil { + t.Fatalf("context canceled before broadcasting to all nodes") + } + node := *node + + if node.Stateless() { + continue + } + + t.Logf("broadcasting to %s", node.Name) - testNode(t, func(ctx context.Context, t *testing.T, node e2e.Node) { session := rand.Int63() - client, err := node.Client() + var err error + client, err = node.Client() require.NoError(t, err) // FIXME: ConsensusParams is broken for last height, this is just workaround @@ -237,9 +298,26 @@ func TestApp_TxTooBig(t *testing.T) { assert.NoError(t, err, "failed to broadcast tx %06x", i) } - lastTxHash := tx.Hash() + outcome = append(outcome, txPair{ + firstTxHash: firstTxHash, + lastTxHash: tx.Hash(), + }) + } + + t.Logf("submitted txs in %s", time.Since(start).String()) + + successful := 0 + // now we check if these txs were committed within timeout + require.Eventuallyf(t, func() bool { + failed := false + successful = 0 + for _, item := range outcome { + ctx, cancel := context.WithTimeout(mainCtx, readTimeout) + defer cancel() + + firstTxHash := item.firstTxHash + lastTxHash := item.lastTxHash - require.Eventuallyf(t, func() bool { // last tx should be committed later than first lastTxResp, err := client.Tx(ctx, lastTxHash, false) if err == nil { @@ -262,22 +340,17 @@ func TestApp_TxTooBig(t *testing.T) { ) assert.Less(t, firstTxResp.Height, lastTxResp.Height, "first tx should in block before last tx") - return true + successful++ + } else { + failed = true } + } - return false - }, - timeout, // timeout - time.Second, // interval - "submitted tx %X wasn't committed after %v", - lastTxHash, timeout, - ) - - // abciResp, err := client.ABCIQuery(ctx, "", []byte(lastTxKey)) - // require.NoError(t, err) - // assert.Equal(t, code.CodeTypeOK, abciResp.Response.Code) - // assert.Equal(t, lastTxKey, string(abciResp.Response.Key)) - // assert.Equal(t, lastTxHash, types.Tx(abciResp.Response.Value).Hash()) - }) - + return !failed + }, + includeInBlockTimeout, // timeout + time.Second, // interval + "submitted transactions were not committed after %s", + includeInBlockTimeout.String(), + ) } diff --git a/test/fuzz/README.md b/test/fuzz/README.md index b43dd8041f..2a16020eba 100644 --- a/test/fuzz/README.md +++ b/test/fuzz/README.md @@ -1,7 +1,7 @@ # fuzz Fuzzing for various packages in Tendermint using the fuzzing infrastructure included in -Go 1.21. +Go 1.22. Inputs: diff --git a/types/genesis.go b/types/genesis.go index c98872fdd9..3af46b108e 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -75,7 +75,7 @@ type GenesisDoc struct { ConsensusParams *ConsensusParams Validators []GenesisValidator AppHash tmbytes.HexBytes - AppState json.RawMessage + AppState []byte // dash fields InitialCoreChainLockedHeight uint32 `json:"initial_core_chain_locked_height"` @@ -92,7 +92,7 @@ type genesisDocJSON struct { ConsensusParams *ConsensusParams `json:"consensus_params,omitempty"` Validators []GenesisValidator `json:"validators,omitempty"` AppHash tmbytes.HexBytes `json:"app_hash,omitempty"` - AppState json.RawMessage `json:"app_state,omitempty"` + AppState []byte `json:"app_state,omitempty"` // dash fields InitialCoreChainLockedHeight uint32 `json:"initial_core_chain_locked_height,omitempty"` diff --git a/types/genesis_test.go b/types/genesis_test.go index 92a918f01d..344c189fb8 100644 --- a/types/genesis_test.go +++ b/types/genesis_test.go @@ -2,6 +2,7 @@ package types import ( + "encoding/base64" "encoding/json" "fmt" "os" @@ -202,7 +203,8 @@ func TestGenesisCorrect(t *testing.T) { func TestBasicGenesisDoc(t *testing.T) { // test a good one by raw json - genDocBytes := []byte( + appState := base64.StdEncoding.AppendEncode(nil, []byte(`{"account_owner": "Bob"}`)) + genDocBytes := []byte(fmt.Sprintf( `{ "genesis_time": "0001-01-01T00:00:00Z", "chain_id": "test-chain-QDKdJr", @@ -222,7 +224,7 @@ func TestBasicGenesisDoc(t *testing.T) { "validator_quorum_hash":"43FF39CC1F41B9FC63DFA5B1EDF3F0CA3AD5CAFAE4B12B4FE9263B08BB50C4CC", "validator_quorum_type":100, "app_hash":"", - "app_state":{"account_owner": "Bob"}, + "app_state":"%s", "consensus_params": { "synchrony": {"precision": "1", "message_delay": "10"}, "timeout": { @@ -237,8 +239,8 @@ func TestBasicGenesisDoc(t *testing.T) { "block": {"max_bytes": "100"}, "evidence": {"max_age_num_blocks": "100", "max_age_duration": "10"} } - }`, - ) + }`, appState, + )) _, err := GenesisDocFromJSON(genDocBytes) assert.NoError(t, err, "expected no error for good genDoc json") diff --git a/types/mocks/block_event_publisher.go b/types/mocks/block_event_publisher.go index 8cd1f3d266..8f5c17f637 100644 --- a/types/mocks/block_event_publisher.go +++ b/types/mocks/block_event_publisher.go @@ -16,6 +16,10 @@ type BlockEventPublisher struct { func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventNewBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataNewBlock) error); ok { r0 = rf(_a0) @@ -30,6 +34,10 @@ func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNewBlockHeader) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventNewBlockHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataNewBlockHeader) error); ok { r0 = rf(_a0) @@ -44,6 +52,10 @@ func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNew func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvidence) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventNewEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataNewEvidence) error); ok { r0 = rf(_a0) @@ -58,6 +70,10 @@ func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvi func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventTx") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataTx) error); ok { r0 = rf(_a0) @@ -72,6 +88,10 @@ func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { func (_m *BlockEventPublisher) PublishEventValidatorSetUpdates(_a0 types.EventDataValidatorSetUpdate) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventValidatorSetUpdates") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataValidatorSetUpdate) error); ok { r0 = rf(_a0) diff --git a/types/mocks/priv_validator.go b/types/mocks/priv_validator.go index 9f75bf3771..4fff072e51 100644 --- a/types/mocks/priv_validator.go +++ b/types/mocks/priv_validator.go @@ -28,6 +28,10 @@ type PrivValidator struct { func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash bytes.HexBytes) *types.Validator { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for ExtractIntoValidator") + } + var r0 *types.Validator if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *types.Validator); ok { r0 = rf(ctx, quorumHash) @@ -44,6 +48,10 @@ func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash by func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetFirstQuorumHash") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { @@ -70,6 +78,10 @@ func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexBytes) (int64, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetHeight") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (int64, error)); ok { @@ -94,6 +106,10 @@ func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexByte func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PrivKey, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetPrivateKey") + } + var r0 crypto.PrivKey var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PrivKey, error)); ok { @@ -120,6 +136,10 @@ func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.Hex func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetProTxHash") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { @@ -146,6 +166,10 @@ func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, erro func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetPubKey") + } + var r0 crypto.PubKey var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { @@ -172,6 +196,10 @@ func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexByte func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetThresholdPublicKey") + } + var r0 crypto.PubKey var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { @@ -198,6 +226,10 @@ func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash b func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal) (bytes.HexBytes, error) { ret := _m.Called(ctx, chainID, quorumType, quorumHash, proposal) + if len(ret) == 0 { + panic("no return value specified for SignProposal") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) (bytes.HexBytes, error)); ok { @@ -224,6 +256,10 @@ func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quoru func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger) error { ret := _m.Called(ctx, chainID, quorumType, quorumHash, vote, logger) + if len(ret) == 0 { + panic("no return value specified for SignVote") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Vote, log.Logger) error); ok { r0 = rf(ctx, chainID, quorumType, quorumHash, vote, logger) diff --git a/types/vote_extension.go b/types/vote_extension.go index 784da379a5..c141df34aa 100644 --- a/types/vote_extension.go +++ b/types/vote_extension.go @@ -482,10 +482,7 @@ func (e ThresholdRawVoteExtension) SignItem(_ string, height int64, round int32, // that reversal. msgHash := tmbytes.Reverse(ext.Extension) - signItem, err := NewSignItemFromHash(quorumType, quorumHash, signRequestID, msgHash), nil - if err != nil { - return SignItem{}, err - } + signItem := NewSignItemFromHash(quorumType, quorumHash, signRequestID, msgHash) // signItem.Msg left empty by purpose, as we don't want hash to be checked in Verify() return signItem, nil diff --git a/version/version.go b/version/version.go index 900ecf4957..32920fa07a 100644 --- a/version/version.go +++ b/version/version.go @@ -11,7 +11,7 @@ const ( // when not using git describe. It is formatted with semantic versioning. TMVersionDefault = "0.14.0-dev.2" // ABCISemVer is the semantic version of the ABCI library - ABCISemVer = "0.25.0" + ABCISemVer = "0.25.1" ABCIVersion = ABCISemVer )