config

package
v0.0.0-...-2662d33 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEthereumBootnodes

func GetEthereumBootnodes() []*enode.Node

GetEthereumBootnodes returns the default Ethereum bootnodes in enode format.

Types

type DiscConfig

type DiscConfig struct {
	IP         string
	UDP        int
	TCP        int
	DBPath     string
	ForkDigest [4]byte
	LogPath    string
	Bootnodes  []*enode.Node
	NatsURL    string
}
var DefaultDiscConfig DiscConfig = DiscConfig{
	IP:         "0.0.0.0",
	UDP:        9000,
	TCP:        9000,
	DBPath:     "",
	ForkDigest: [4]byte{0x6a, 0x95, 0xa1, 0xa9},
	LogPath:    "discovery_events.log",
	Bootnodes:  GetEthereumBootnodes(),
}

func (*DiscConfig) Eth2EnrEntry

func (d *DiscConfig) Eth2EnrEntry() (enr.Entry, error)

type NodeConfig

type NodeConfig struct {
	PrivateKey        *crypto.Secp256k1PrivateKey
	BeaconConfig      *params.BeaconChainConfig
	ForkDigest        [4]byte
	Encoder           encoder.NetworkEncoding
	DialTimeout       time.Duration
	ConcurrentDialers int
	IP                string
	Port              int
	NatsURL           string
	LogPath           string
}

NodeConfig holds additional configuration options for the node.

var DefaultNodeConfig NodeConfig = NodeConfig{
	PrivateKey:        nil,
	BeaconConfig:      nil,
	ForkDigest:        [4]byte{0x6a, 0x95, 0xa1, 0xa9},
	Encoder:           encoder.SszNetworkEncoder{},
	DialTimeout:       10 * time.Second,
	ConcurrentDialers: 64,
	IP:                "0.0.0.0",
	Port:              9000,
	LogPath:           "metadata_events.log",
}

Jump to

Keyboard shortcuts

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