geth

package
v1.4.22 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenesisBootstrapper

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

GenesisBootstrapper needs to write genesis file, static node file, then run a command like 'geth init'

func NewGenesisBootstrapper

func NewGenesisBootstrapper(dataDir string, genesisFileURL string, nodePath string, cmdArgs []string, logger *zap.Logger) *GenesisBootstrapper

func (*GenesisBootstrapper) Bootstrap

func (b *GenesisBootstrapper) Bootstrap() error

type Superviser

type Superviser struct {
	*nodemanager.Superviser
	// contains filtered or unexported fields
}

func NewGethSuperviser

func NewGethSuperviser(
	binary string,
	dataDir string,
	nodeIPCPath string,
	arguments []string,
	isReader bool,
	debugDeepMind bool,
	headBlockUpdateFunc nodeManager.HeadBlockUpdater,
	enforcePeersStr string,
	logToZap bool,
	appLogger *zap.Logger,
	nodelogger *zap.Logger,
) (*Superviser, error)

func (*Superviser) AddPeer

func (s *Superviser) AddPeer(peer string) error

AddPeer sends a command through IPC socket to connect geth to the given peer

func (*Superviser) EnsurePeersByDNS

func (s *Superviser) EnsurePeersByDNS(wantedPeersHostnames []string)

EnsurePeersByDNS periodically checks IP addresses on the given FQDNs, calls /v1/server_id on port 8080 (or other if specified in hostname) and adds them as peers wantedPeersHostnames can point to the headless service name in k8s

func (*Superviser) GetCommand

func (s *Superviser) GetCommand() string

func (*Superviser) GetName

func (s *Superviser) GetName() string

func (*Superviser) LastSeenBlockNum

func (s *Superviser) LastSeenBlockNum() uint64

func (*Superviser) MarshalLogObject

func (s *Superviser) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*Superviser) Monitor

func (s *Superviser) Monitor()

Monitor periodically checks the head block num and block time, as well as the enode string (server ID)

func (*Superviser) ServerID

func (s *Superviser) ServerID() (string, error)

func (*Superviser) UpdateLastBlockSeen added in v1.4.12

func (s *Superviser) UpdateLastBlockSeen(blockNum uint64)

type TarballBootstrapper

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

func NewTarballBootstrapper

func NewTarballBootstrapper(
	url string,
	dataDir string,
	logger *zap.Logger,
) *TarballBootstrapper

func (*TarballBootstrapper) Bootstrap

func (b *TarballBootstrapper) Bootstrap() error

Jump to

Keyboard shortcuts

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