diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b184ba172273..012c5efbf0a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -442,6 +442,7 @@ jobs: id: git_diff with: PATTERNS: | + contrib/rosetta/* tools/rosetta/**/*.go tools/rosetta/go.mod tools/rosetta/go.sum diff --git a/contrib/rosetta/configuration/data.sh b/contrib/rosetta/configuration/data.sh index 338b1058c31e..017b2e642f9c 100644 --- a/contrib/rosetta/configuration/data.sh +++ b/contrib/rosetta/configuration/data.sh @@ -33,7 +33,7 @@ sed -i 's/127.0.0.1/0.0.0.0/g' /root/.simapp/config/config.toml # start simd echo starting simd... -simd start --pruning=nothing --api.enable true & +simd start --pruning=nothing & pid=$! echo simd started with PID $pid diff --git a/contrib/rosetta/docker-compose.yaml b/contrib/rosetta/docker-compose.yaml index fc439e6fb3f2..c5c4cc3eb12d 100644 --- a/contrib/rosetta/docker-compose.yaml +++ b/contrib/rosetta/docker-compose.yaml @@ -3,7 +3,7 @@ version: "3" services: cosmos: image: rosetta-ci:latest - command: ["simd", "start", "--pruning", "nothing", "--grpc.enable", "true", "--grpc.address", "0.0.0.0:9090", "--grpc-web.enable", "true", "--api.enable", "true"] + command: ["simd", "start", "--pruning", "nothing", "--grpc.enable", "true", "--grpc.address", "0.0.0.0:9090", "--grpc-web.enable", "true"] ports: - 9090:9090 - 26657:26657 diff --git a/server/start.go b/server/start.go index e31b599c5f6a..9522663c3cb0 100644 --- a/server/start.go +++ b/server/start.go @@ -441,6 +441,17 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App } } + // If gRPC is enabled but API is not, we need to start the gRPC server + // without the API server. If the API server is enabled, we've already + // started the grpc server. + if config.GRPC.Enable && !config.API.Enable { + grpcSrv, err = servergrpc.StartGRPCServer(clientCtx, app, config.GRPC) + if err != nil { + return err + } + defer grpcSrv.Stop() + } + // At this point it is safe to block the process if we're in gRPC only mode as // we do not need to handle any Tendermint related processes. if gRPCOnly {