Documentation ¶
Index ¶
- Variables
- type BlockBuilder
- type Option
- type Service
- func (s *Service) Configured() bool
- func (s *Service) GetHeader(ctx context.Context, slot types.Slot, parentHash [32]byte, pubKey [48]byte) (*ethpb.SignedBuilderBid, error)
- func (s *Service) RegisterValidator(ctx context.Context, reg []*ethpb.SignedValidatorRegistrationV1) error
- func (s *Service) Start()
- func (s *Service) Status() error
- func (*Service) Stop() error
- func (s *Service) SubmitBlindedBlock(ctx context.Context, b *ethpb.SignedBlindedBeaconBlockBellatrix) (*v1.ExecutionPayload, 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 *ethpb.SignedBlindedBeaconBlockBellatrix) (*v1.ExecutionPayload, error) GetHeader(ctx context.Context, slot types.Slot, parentHash [32]byte, pubKey [48]byte) (*ethpb.SignedBuilderBid, error) RegisterValidator(ctx context.Context, reg []*ethpb.SignedValidatorRegistrationV1) 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 ¶ added in v3.1.2
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.
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 types.Slot, parentHash [32]byte, pubKey [48]byte) (*ethpb.SignedBuilderBid, 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) SubmitBlindedBlock ¶
func (s *Service) SubmitBlindedBlock(ctx context.Context, b *ethpb.SignedBlindedBeaconBlockBellatrix) (*v1.ExecutionPayload, error)
SubmitBlindedBlock submits a blinded block to the builder relay network.