static

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "static"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BootNodes []string        `yaml:"bootNodes"`
	DiscV4    bool            `yaml:"discV4" default:"true"`
	DiscV5    bool            `yaml:"discV5" default:"true"`
	Restart   time.Duration   `yaml:"restart" default:"2m"`
	Execution ExecutionConfig `yaml:"execution"`
	Consensus ConsensusConfig `yaml:"consensus"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ConsensusConfig added in v1.7.3

type ConsensusConfig struct {
	// RetryAttempts is the maximum number of retry attempts for dialing a peer.
	RetryAttempts int `yaml:"retryAttempts" default:"1"`
	// RetryDelay is the backoff delay between retry attempts.
	RetryDelay time.Duration `yaml:"retryDelay" default:"2s"`
	// DialTimeout is the timeout for dialing a peer.
	DialTimeout time.Duration `yaml:"dialTimeout" default:"5s"`
	// DialConcurrency is the number of concurrent dial attempts.
	DialConcurrency int `yaml:"dialConcurrency" default:"10"`
	// CooloffDuration is the duration to wait before retrying a failed peer.
	CooloffDuration time.Duration `yaml:"cooloffDuration" default:"10s"`
	// ConnectionTimeout is the timeout for establishing a connection.
	ConnectionTimeout time.Duration `yaml:"connectionTimeout" default:"30s"`
}

ConsensusConfig holds configuration for consensus layer node discovery dialing.

type ExecutionConfig added in v1.7.3

type ExecutionConfig struct {
	// RetryAttempts is the maximum number of retry attempts for dialing a peer.
	RetryAttempts uint `yaml:"retryAttempts" default:"5"`
	// RetryDelay is the delay between retry attempts.
	RetryDelay time.Duration `yaml:"retryDelay" default:"5s"`
	// DialTimeout is the timeout for dialing a peer.
	DialTimeout time.Duration `yaml:"dialTimeout" default:"15s"`
	// BootstrapRPCURL is an optional execution JSON-RPC endpoint used to build
	// our own Status message and serve lightweight block/header/body/receipt
	// requests during the eth handshake. When set, discovery becomes a more
	// useful peer and recovers connections that would otherwise drop after
	// Status exchange.
	BootstrapRPCURL string `yaml:"bootstrapRpcUrl" default:""`
}

ExecutionConfig holds configuration for execution layer node discovery dialing.

type Static

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

func New

func New(config *Config, handler func(ctx context.Context, node *enode.Node, source string) error, log observability.ContextualLogger) (*Static, error)

func (*Static) GetForkDigests added in v1.3.0

func (s *Static) GetForkDigests() []string

func (*Static) GetForkIdHashes added in v1.3.0

func (s *Static) GetForkIdHashes() []string

func (*Static) GetNetworkIds added in v1.3.0

func (s *Static) GetNetworkIds() []uint64

func (*Static) Start

func (s *Static) Start(ctx context.Context) error

func (*Static) Stop

func (s *Static) Stop(ctx context.Context) error

func (*Static) Type

func (s *Static) Type() string

Jump to

Keyboard shortcuts

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