diff --git a/validator/node/node.go b/validator/node/node.go index f8bb0c56a..67d92e32b 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -660,6 +660,8 @@ func (c *ValidatorClient) registerRPCService(router *mux.Router) error { ClientGrpcRetryDelay: grpcRetryDelay, ClientGrpcHeaders: strings.Split(grpcHeaders, ","), ClientWithCert: clientCert, + BeaconApiTimeout: time.Second * 30, + BeaconApiEndpoint: c.cliCtx.String(flags.BeaconRESTApiProviderFlag.Name), Router: router, }) return c.services.RegisterService(server) diff --git a/validator/rpc/server.go b/validator/rpc/server.go index 13dc6332e..10cdc6de6 100644 --- a/validator/rpc/server.go +++ b/validator/rpc/server.go @@ -53,6 +53,8 @@ type Config struct { GenesisFetcher client.GenesisFetcher WalletInitializedFeed *event.Feed NodeGatewayEndpoint string + BeaconApiEndpoint string + BeaconApiTimeout time.Duration Router *mux.Router Wallet *wallet.Wallet } @@ -130,6 +132,8 @@ func NewServer(ctx context.Context, cfg *Config) *Server { validatorMonitoringPort: cfg.ValidatorMonitoringPort, validatorGatewayHost: cfg.ValidatorGatewayHost, validatorGatewayPort: cfg.ValidatorGatewayPort, + beaconApiTimeout: cfg.BeaconApiTimeout, + beaconApiEndpoint: cfg.BeaconApiEndpoint, router: cfg.Router, } // immediately register routes to override any catchalls