Documentation ¶
Index ¶
- func ConvertKzgCommitmentToVersionedHash(commitment []byte) common.Hash
- type BeaconNode
- func (b *BeaconNode) GetBeaconBlock(ctx context.Context, identifier string, ignoreMetrics ...bool) (*spec.VersionedSignedBeaconBlock, error)
- func (b *BeaconNode) LazyLoadBeaconBlock(identifier 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 ¶
This section is empty.
Functions ¶
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) 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) LazyLoadBeaconBlock ¶
func (b *BeaconNode) LazyLoadBeaconBlock(identifier 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:""` // 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"` // BeaconNodeHeaders is a map of headers to send to the beacon node. BeaconNodeHeaders map[string]string `yaml:"beaconNodeHeaders"` // 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.