builder

package
v3.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: GPL-3.0 Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

type Option func(s *Service) error

func FlagOptions

func FlagOptions(c *cli.Context) ([]Option, error)

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

func NewService(ctx context.Context, opts ...Option) (*Service, error)

NewService instantiates a new service.

func (*Service) Configured

func (s *Service) Configured() bool

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) Start

func (s *Service) Start()

Start initializes the service.

func (*Service) Status

func (s *Service) Status() error

Status retrieves the status of the builder relay network.

func (*Service) Stop

func (*Service) Stop() error

Stop halts the service.

func (*Service) SubmitBlindedBlock

SubmitBlindedBlock submits a blinded block to the builder relay network.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL