From 50317129a0ff69eebc1d61cdfc3e75d1145ecd47 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Wed, 29 Jun 2022 10:00:12 -0700 Subject: [PATCH 1/2] RPC adds builder service --- beacon-chain/builder/service.go | 1 + beacon-chain/node/node.go | 1 + beacon-chain/rpc/BUILD.bazel | 1 + beacon-chain/rpc/service.go | 3 +++ 4 files changed, 6 insertions(+) diff --git a/beacon-chain/builder/service.go b/beacon-chain/builder/service.go index 70b6eccdcd0f..1d5f47399e87 100644 --- a/beacon-chain/builder/service.go +++ b/beacon-chain/builder/service.go @@ -60,6 +60,7 @@ func NewService(ctx context.Context, opts ...Option) (*Service, error) { return nil, err } s.c = c + log.WithField("endpoint", c.NodeURL()).Info("Builder has configured") } return s, nil } diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index 8be9ef6ecaef..11addedeb4ef 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -841,6 +841,7 @@ func (b *BeaconNode) registerRPCService() error { MaxMsgSize: maxMsgSize, ProposerIdsCache: b.proposerIdsCache, ExecutionEngineCaller: web3Service, + BlockBuilder: b.fetchBuilderService(), }) return b.services.RegisterService(rpcService) diff --git a/beacon-chain/rpc/BUILD.bazel b/beacon-chain/rpc/BUILD.bazel index fcff389c8cea..2e9fda950141 100644 --- a/beacon-chain/rpc/BUILD.bazel +++ b/beacon-chain/rpc/BUILD.bazel @@ -10,6 +10,7 @@ go_library( visibility = ["//beacon-chain:__subpackages__"], deps = [ "//beacon-chain/blockchain:go_default_library", + "//beacon-chain/builder:go_default_library", "//beacon-chain/cache:go_default_library", "//beacon-chain/cache/depositcache:go_default_library", "//beacon-chain/core/feed/block:go_default_library", diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index a228d96c8162..ded86b79637f 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -14,6 +14,7 @@ import ( grpcopentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing" grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" + "github.com/prysmaticlabs/prysm/beacon-chain/builder" "github.com/prysmaticlabs/prysm/beacon-chain/cache" "github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache" blockfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/block" @@ -112,6 +113,7 @@ type Config struct { ExecutionEngineCaller powchain.EngineCaller ProposerIdsCache *cache.ProposerPayloadIDsCache OptimisticModeFetcher blockchain.OptimisticModeFetcher + BlockBuilder builder.BlockBuilder } // NewService instantiates a new RPC service instance that will @@ -216,6 +218,7 @@ func (s *Service) Start() { ExecutionEngineCaller: s.cfg.ExecutionEngineCaller, BeaconDB: s.cfg.BeaconDB, ProposerSlotIndexCache: s.cfg.ProposerIdsCache, + BlockBuilder: s.cfg.BlockBuilder, } validatorServerV1 := &validator.Server{ HeadFetcher: s.cfg.HeadFetcher, From 2c88a9a5dbda40a7bb8781e48005bdd7c466eed6 Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Wed, 29 Jun 2022 13:11:51 -0400 Subject: [PATCH 2/2] Update beacon-chain/builder/service.go --- beacon-chain/builder/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/builder/service.go b/beacon-chain/builder/service.go index 1d5f47399e87..b028c86322bb 100644 --- a/beacon-chain/builder/service.go +++ b/beacon-chain/builder/service.go @@ -60,7 +60,7 @@ func NewService(ctx context.Context, opts ...Option) (*Service, error) { return nil, err } s.c = c - log.WithField("endpoint", c.NodeURL()).Info("Builder has configured") + log.WithField("endpoint", c.NodeURL()).Info("Builder has been configured") } return s, nil }