Documentation
¶
Index ¶
- func WithBaseService(svc service.BaseService) service.Option[Service]
- func WithBuilderConfig(cfg *config.Config) service.Option[Service]
- func WithLocalBuilder(builder PayloadBuilder) service.Option[Service]
- func WithRandaoProcessor(rp RandaoProcessor) service.Option[Service]
- func WithRemoteBuilders(builders ...PayloadBuilder) service.Option[Service]
- func WithSigner(signer core.BLSSigner) service.Option[Service]
- type PayloadBuilder
- type RandaoProcessor
- type Service
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 ¶
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.
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 ¶
func (s *Service) RequestBestBlock( ctx context.Context, st state.BeaconState, slot primitives.Slot, ) (beacontypes.BeaconBlock, *datypes.BlobSidecars, error)
RequestBestBlock builds a new beacon block.
Click to show internal directories.
Click to hide internal directories.