Documentation ¶
Index ¶
- Variables
- type BlockBuilder
- type Option
- type Service
- func (s *Service) Configured() bool
- func (s *Service) GetHeader(ctx context.Context, slot primitives.Slot, parentHash [32]byte, ...) (builder.SignedBid, error)
- func (s *Service) RegisterValidator(ctx context.Context, reg []*ethpb.SignedValidatorRegistrationV1) error
- func (s *Service) RegistrationByValidatorID(ctx context.Context, id primitives.ValidatorIndex) (*ethpb.ValidatorRegistrationV1, error)
- func (s *Service) Start()
- func (s *Service) Status() error
- func (s *Service) Stop() error
- func (s *Service) SubmitBlindedBlock(ctx context.Context, b interfaces.ReadOnlySignedBeaconBlock) (interfaces.ExecutionData, *v1.BlobsBundle, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNoBuilder = errors.New("builder endpoint not configured")
ErrNoBuilder is used when builder endpoint is not configured.
Functions ¶
This section is empty.
Types ¶
type BlockBuilder ¶
type BlockBuilder interface { SubmitBlindedBlock(ctx context.Context, block interfaces.ReadOnlySignedBeaconBlock) (interfaces.ExecutionData, *v1.BlobsBundle, error) GetHeader(ctx context.Context, slot primitives.Slot, parentHash [32]byte, pubKey [48]byte) (builder.SignedBid, error) RegisterValidator(ctx context.Context, reg []*ethpb.SignedValidatorRegistrationV1) error RegistrationByValidatorID(ctx context.Context, id primitives.ValidatorIndex) (*ethpb.ValidatorRegistrationV1, error) Configured() bool }
BlockBuilder defines the interface for interacting with the block builder
type Option ¶
func FlagOptions ¶
FlagOptions for builder service flag configurations.
func WithBuilderClient ¶
func WithBuilderClient(client builder.BuilderClient) Option
WithBuilderClient sets the builder client for the beacon chain builder service.
func WithDatabase ¶
func WithDatabase(beaconDB db.HeadAccessDatabase) Option
WithDatabase for head access.
func WithHeadFetcher ¶
func WithHeadFetcher(svc blockchain.HeadFetcher) Option
WithHeadFetcher gets the head info from chain service.
func WithRegistrationCache ¶
func WithRegistrationCache() Option
WithRegistrationCache uses a cache for the validator registrations instead of a persistent db.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines a service that provides a client for interacting with the beacon chain and MEV relay network.
func NewService ¶
NewService instantiates a new service.
func (*Service) Configured ¶
Configured returns true if the user has configured a builder client.
func (*Service) GetHeader ¶
func (s *Service) GetHeader(ctx context.Context, slot primitives.Slot, parentHash [32]byte, pubKey [48]byte) (builder.SignedBid, error)
GetHeader retrieves the header for a given slot and parent hash from the builder relay network.
func (*Service) RegisterValidator ¶
func (s *Service) RegisterValidator(ctx context.Context, reg []*ethpb.SignedValidatorRegistrationV1) error
RegisterValidator registers a validator with the builder relay network. It also saves the registration object to the DB.
func (*Service) RegistrationByValidatorID ¶
func (s *Service) RegistrationByValidatorID(ctx context.Context, id primitives.ValidatorIndex) (*ethpb.ValidatorRegistrationV1, error)
RegistrationByValidatorID returns either the values from the cache or db.
func (*Service) SubmitBlindedBlock ¶
func (s *Service) SubmitBlindedBlock(ctx context.Context, b interfaces.ReadOnlySignedBeaconBlock) (interfaces.ExecutionData, *v1.BlobsBundle, error)
SubmitBlindedBlock submits a blinded block to the builder relay network.