beacon

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The address of the Beacon node to connect to
	NodeAddress string `yaml:"nodeAddress"`
	// BeaconNodeHeaders is a map of headers to send to the beacon node.
	NodeHeaders map[string]string `yaml:"nodeHeaders"`
	// BeaconSubscriptions is a list of beacon subscriptions to subscribe to.
	BeaconSubscriptions *[]string `yaml:"beaconSubscriptions"`
	// InvalidGossipVerifiedBlocksPath is the path to watch for invalid gossip verified blocks from the beacon node.
	InvalidGossipVerifiedBlocksPath *string `yaml:"invalidGossipVerifiedBlocksPath"`
	// InvalidGossipVerifiedBlobsPath is the path to watch for invalid gossip verified blobs from the beacon node.
	InvalidGossipVerifiedBlobsPath *string `yaml:"invalidGossipVerifiedBlobsPath"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Node

type Node struct {
	// contains filtered or unexported fields
}

func NewNode

func NewNode(ctx context.Context, log logrus.FieldLogger, name, overrideNetworkName string, config *Config) *Node

func (*Node) GetVersionImmuneBlock added in v0.0.21

func (b *Node) GetVersionImmuneBlock(ctx context.Context, blockID string) (*VersionImmuneBlock, error)

func (*Node) Metadata

func (b *Node) Metadata() *services.MetadataService

func (*Node) Node

func (b *Node) Node() bn.Node

func (*Node) OnReady

func (b *Node) OnReady(_ context.Context, callback func(ctx context.Context) error)

func (*Node) Start

func (b *Node) Start(ctx context.Context) error

func (*Node) Synced

func (b *Node) Synced(ctx context.Context) error

type VersionImmuneBlock added in v0.0.21

type VersionImmuneBlock struct {
	Data struct {
		Message struct {
			Body struct {
				ExecutionPayload struct {
					BlockNumber string `json:"block_number"`
					BlockHash   string `json:"block_hash"`
				} `json:"execution_payload"`
			} `json:"body"`
		} `json:"message"`
	} `json:"data"`
}

VersionImmuneBlock is a block that is immune to version changes. If this structure changes, good luck with your upgrade.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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