Documentation ¶
Index ¶
- Variables
- func ConvertKzgCommitmentToVersionedHash(commitment []byte) common.Hash
- func CountConsecutiveEmptyBytes(byteArray []byte, threshold int) int
- type BeaconNode
- func (b *BeaconNode) DeleteValidatorsFromCache(stateID string)
- func (b *BeaconNode) Duties() *services.DutiesService
- func (b *BeaconNode) GetBeaconBlock(ctx context.Context, identifier string, ignoreMetrics ...bool) (*spec.VersionedSignedBeaconBlock, error)
- func (b *BeaconNode) GetValidators(ctx context.Context, identifier string) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
- func (b *BeaconNode) LazyLoadBeaconBlock(identifier string)
- func (b *BeaconNode) LazyLoadValidators(stateID string)
- func (b *BeaconNode) Metadata() *services.MetadataService
- func (b *BeaconNode) Node() beacon.Node
- func (b *BeaconNode) OnReady(_ context.Context, callback func(ctx context.Context) error)
- func (b *BeaconNode) Start(ctx context.Context) error
- func (b *BeaconNode) Synced(ctx context.Context) error
- type Config
- type Metrics
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ForkNamePhase0 = "PHASE0" ForkNameAltair = "ALTAIR" ForkNameBellatrix = "BELLATRIX" ForkNameCapella = "CAPELLA" ForkNameDeneb = "DENEB" ForkNameElectra = "ELECTRA" )
Functions ¶
func CountConsecutiveEmptyBytes ¶ added in v0.0.146
Types ¶
type BeaconNode ¶
type BeaconNode struct {
// contains filtered or unexported fields
}
func NewBeaconNode ¶
func NewBeaconNode(ctx context.Context, name string, config *Config, log logrus.FieldLogger) (*BeaconNode, error)
func (*BeaconNode) DeleteValidatorsFromCache ¶ added in v0.0.177
func (b *BeaconNode) DeleteValidatorsFromCache(stateID string)
func (*BeaconNode) Duties ¶ added in v0.0.139
func (b *BeaconNode) Duties() *services.DutiesService
func (*BeaconNode) GetBeaconBlock ¶
func (b *BeaconNode) GetBeaconBlock(ctx context.Context, identifier string, ignoreMetrics ...bool) (*spec.VersionedSignedBeaconBlock, error)
GetBeaconBlock returns a beacon block by its identifier. Blocks can be cached internally.
func (*BeaconNode) GetValidators ¶ added in v0.0.177
func (b *BeaconNode) GetValidators(ctx context.Context, identifier string) (map[phase0.ValidatorIndex]*apiv1.Validator, error)
GetValidators returns a list of validators by its identifier. Validators can be cached internally.
func (*BeaconNode) LazyLoadBeaconBlock ¶
func (b *BeaconNode) LazyLoadBeaconBlock(identifier string)
func (*BeaconNode) LazyLoadValidators ¶ added in v0.0.177
func (b *BeaconNode) LazyLoadValidators(stateID string)
func (*BeaconNode) Metadata ¶
func (b *BeaconNode) Metadata() *services.MetadataService
func (*BeaconNode) Node ¶
func (b *BeaconNode) Node() beacon.Node
type Config ¶
type Config struct { // The address of the Beacon node to connect to BeaconNodeAddress string `yaml:"beaconNodeAddress"` // OverrideNetworkName is the name of the network to use for the sentry. // If not set, the network name will be retrieved from the beacon node. OverrideNetworkName string `yaml:"overrideNetworkName" default:""` // BeaconNodeHeaders is a map of headers to send to the beacon node. BeaconNodeHeaders map[string]string `yaml:"beaconNodeHeaders"` // BlockCacheSize is the number of blocks to cache. BlockCacheSize uint64 `yaml:"blockCacheSize" default:"1000"` // BlockCacheTTL is the time to live for blocks in the cache. BlockCacheTTL human.Duration `yaml:"blockCacheTtl" default:"1h"` // BlockPreloadWorkers is the number of workers to use for preloading blocks. BlockPreloadWorkers uint64 `yaml:"blockPreloadWorkers" default:"5"` // BlockPreloadQueueSize is the size of the queue for preloading blocks. BlockPreloadQueueSize uint64 `yaml:"blockPreloadQueueSize" default:"5000"` }
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func (*Metrics) IncBlockCacheHit ¶
func (*Metrics) IncBlockCacheMiss ¶
func (*Metrics) IncBlocksFetchErrors ¶
func (*Metrics) IncBlocksFetched ¶
func (*Metrics) SetPreloadBlockQueueSize ¶
Click to show internal directories.
Click to hide internal directories.