builder

package
v0.1.1-experimental.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBaseService

func WithBaseService(svc service.BaseService) service.Option[Service]

WithBaseService sets the base service.

func WithBuilderConfig

func WithBuilderConfig(cfg *config.Config) service.Option[Service]

WithBuilderConfig sets the builder config.

func WithLocalBuilder

func WithLocalBuilder(builder PayloadBuilder) service.Option[Service]

WithLocalBuilder sets the local builder.

func WithRandaoProcessor

func WithRandaoProcessor(rp RandaoProcessor) service.Option[Service]

WithRandaoProcessor sets the randao processor.

func WithRemoteBuilders

func WithRemoteBuilders(builders ...PayloadBuilder) service.Option[Service]

WithRemoteBuilders sets the remote builders.

func WithSigner

func WithSigner(signer core.BLSSigner) service.Option[Service]

WithSigner sets the signer.

Types

type PayloadBuilder

type PayloadBuilder interface {
	GetBestPayload(
		ctx context.Context,
		st state.BeaconState,
		slot primitives.Slot,
		parentBlockRoot primitives.Root,
		parentEth1Hash primitives.ExecutionHash,
	) (enginetypes.ExecutionPayload, *engine.BlobsBundleV1, bool, error)
}

PayloadBuilder represents a service that is responsible for building eth1 blocks.

type RandaoProcessor

type RandaoProcessor interface {
	// BuildReveal generates a RANDAO reveal based on the given beacon state.
	// It returns a Reveal object and any error encountered during the process.
	BuildReveal(st state.BeaconState) (primitives.BLSSignature, error)
}

RandaoProcessor defines the interface for processing RANDAO reveals.

type Service

type Service struct {
	service.BaseService
	// contains filtered or unexported fields
}

Service is responsible for building beacon blocks.

func (*Service) LocalBuilder

func (s *Service) LocalBuilder() PayloadBuilder

LocalBuilder returns the local builder.

func (*Service) RequestBestBlock

RequestBestBlock builds a new beacon block.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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