blockrelay

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const StandardBuilderCategory = "standard"

StandardBuilderCategory is the default category for builders.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuilderConfig

type BuilderConfig struct {
	// Category is the category applied to the builder.
	Category string
	// Factor is a percentage multiplier applied to the proposal score from the builder.
	Factor *big.Int
	// Offset is an offset applied to the proposal score from the builder.
	Offset *big.Int
}

BuilderConfig is the configuration for builders.

type ConfigVersion added in v1.7.0

type ConfigVersion int

ConfigVersion defines the spec version of the configuration in a response.

const (
	// ConfigVersionV1 is data applicable for the first version of the configuration.
	ConfigVersionV1 ConfigVersion = iota
	// ConfigVersionV2 is data applicable for the second version of the configuration.
	ConfigVersionV2
)

func (*ConfigVersion) MarshalJSON added in v1.7.0

func (c *ConfigVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*ConfigVersion) String added in v1.7.0

func (c *ConfigVersion) String() string

String returns a string representation of the version.

func (*ConfigVersion) UnmarshalJSON added in v1.7.0

func (c *ConfigVersion) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ExecutionConfigProvider

type ExecutionConfigProvider interface {
	Service

	// ProposerConfig returns the proposer configuration for the given validator.
	ProposerConfig(ctx context.Context,
		account e2wtypes.Account,
		pubkey phase0.BLSPubKey,
	) (
		*beaconblockproposer.ProposerConfig,
		error,
	)
}

ExecutionConfigProvider is the interface for providing execution configuration.

type ExecutionConfigurator added in v1.7.0

type ExecutionConfigurator interface {
	// ProposerConfig returns the proposer configuration for the given validator,
	ProposerConfig(ctx context.Context,
		account e2wtypes.Account,
		pubkey phase0.BLSPubKey,
		fallbackFeeRecipient bellatrix.ExecutionAddress,
		fallbackGasLimit uint64,
	) (
		*beaconblockproposer.ProposerConfig,
		error,
	)
}

ExecutionConfigurator is the interface providing proposer configuration information.

func UnmarshalJSON added in v1.7.0

func UnmarshalJSON(data []byte) (ExecutionConfigurator, error)

UnmarshalJSON unmarshals an execution configurator.

type Service

type Service interface{}

Service is the block relay service.

type ValidatorRegistrationsSubmitter

type ValidatorRegistrationsSubmitter interface {
	Service

	// SubmitValidatorRegistrations submits validator registrations for the given accounts.
	SubmitValidatorRegistrations(ctx context.Context,
		accounts map[phase0.ValidatorIndex]e2wtypes.Account,
	) error
}

ValidatorRegistrationsSubmitter is the interface for a submitter of validator registrations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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