eth

package
v3.0.0-alpha5.0...-c974331 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 112 Imported by: 0

Documentation

Overview

Package eth implements the Ethereum protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveContents

func RemoveContents(dirname string) error

RemoveContents is like os.RemoveAll, but preserve dir itself

Types

type Config

type Config = ethconfig.Config

Config contains the configuration options of the ETH protocol. Deprecated: use ethconfig.Config instead.

type Ethereum

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

Ethereum implements the Ethereum full node service.

func New

func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger log.Logger) (*Ethereum, error)

New creates a new Ethereum object (including the initialisation of the common Ethereum object)

func (*Ethereum) APIs

func (s *Ethereum) APIs() []rpc.API

func (*Ethereum) AddPeer

func (*Ethereum) BlockIO

func (*Ethereum) ChainConfig

func (s *Ethereum) ChainConfig() *chain.Config

func (*Ethereum) ChainDB

func (s *Ethereum) ChainDB() kv.RwDB

func (*Ethereum) ChainKV

func (s *Ethereum) ChainKV() kv.RwDB

func (*Ethereum) DataDir

func (s *Ethereum) DataDir() string

func (*Ethereum) Etherbase

func (s *Ethereum) Etherbase() (eb libcommon.Address, err error)

func (*Ethereum) ExecutionModule

func (s *Ethereum) ExecutionModule() *eth1.EthereumExecutionModule

func (*Ethereum) Init

func (s *Ethereum) Init(stack *node.Node, config *ethconfig.Config, chainConfig *chain.Config) error

func (*Ethereum) IsMining

func (s *Ethereum) IsMining() bool

func (*Ethereum) NetPeerCount

func (s *Ethereum) NetPeerCount() (uint64, error)

func (*Ethereum) NetVersion

func (s *Ethereum) NetVersion() (uint64, error)

func (*Ethereum) NodesInfo

func (s *Ethereum) NodesInfo(limit int) (*remote.NodesInfoReply, error)

func (*Ethereum) Notifications

func (s *Ethereum) Notifications() *shards.Notifications

func (*Ethereum) Peers

func (s *Ethereum) Peers(ctx context.Context) (*remote.PeersReply, error)

func (*Ethereum) PipelineStagedSync

func (s *Ethereum) PipelineStagedSync() *stagedsync.Sync

func (*Ethereum) Protocols

func (s *Ethereum) Protocols() []p2p.Protocol

Protocols returns all the currently configured network protocols to start.

func (*Ethereum) Sentinel

func (s *Ethereum) Sentinel() rpcsentinel.SentinelClient

func (*Ethereum) SentryControlServer

func (s *Ethereum) SentryControlServer() *sentry_multi_client.MultiClient

func (*Ethereum) SentryCtx

func (s *Ethereum) SentryCtx() context.Context

func (*Ethereum) StagedSync

func (s *Ethereum) StagedSync() *stagedsync.Sync

func (*Ethereum) Start

func (s *Ethereum) Start() error

Start implements node.Lifecycle, starting all internal goroutines needed by the Ethereum protocol implementation.

func (*Ethereum) StartMining

func (s *Ethereum) StartMining(ctx context.Context, db kv.RwDB, stateDiffClient *direct.StateDiffClientDirect, mining *stagedsync.Sync, miner stagedsync.MiningState, gasPrice *uint256.Int, quitCh chan struct{}, heimdallStore heimdall.Store, tmpDir string, logger log.Logger) error

StartMining starts the miner with the given number of CPU threads. If mining is already running, this method adjust the number of threads allowed to use and updates the minimum price required by the transaction pool.

func (*Ethereum) Stop

func (s *Ethereum) Stop() error

Stop implements node.Service, terminating all internal goroutines used by the Ethereum protocol.

func (*Ethereum) TxpoolServer

func (s *Ethereum) TxpoolServer() txpoolproto.TxpoolServer

Directories

Path Synopsis
Package ethconfig contains the configuration of the ETH and LES protocols.
Package ethconfig contains the configuration of the ETH and LES protocols.
protocols
eth
Package tracers is a manager for transaction tracing engines.
Package tracers is a manager for transaction tracing engines.
js
js/internal/tracers
Package tracers contains the actual JavaScript tracer assets.
Package tracers contains the actual JavaScript tracer assets.
native
Package native is a collection of tracers written in go.
Package native is a collection of tracers written in go.

Jump to

Keyboard shortcuts

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