Documentation ¶
Index ¶
- func NewEthConfigUrfave(ctx *cli.Context, nodeConfig *nodecfg.Config) *ethconfig.Config
- func NewNodConfigUrfave(ctx *cli.Context) *nodecfg.Config
- func NewNodeConfig() *nodecfg.Config
- func RemoveContents(dir string) error
- type Config
- type ErigonNode
- type Ethereum
- func (s *Ethereum) APIs() []rpc.API
- func (s *Ethereum) ChainConfig() *chain.Config
- func (s *Ethereum) ChainDB() kv.RwDB
- func (s *Ethereum) ChainKV() kv.RwDB
- func (s *Ethereum) Etherbase() (eb libcommon.Address, err error)
- func (s *Ethereum) IsMining() bool
- func (s *Ethereum) NetPeerCount() (uint64, error)
- func (s *Ethereum) NetVersion() (uint64, error)
- func (s *Ethereum) NodesInfo(limit int) (*remote.NodesInfoReply, error)
- func (s *Ethereum) Notifications() *shards.Notifications
- func (s *Ethereum) Peers(ctx context.Context) (*remote.PeersReply, error)
- func (s *Ethereum) Protocols() []p2p.Protocol
- func (s *Ethereum) SentryControlServer() *sentry.MultiClient
- func (s *Ethereum) SentryCtx() context.Context
- func (s *Ethereum) StagedSync() *sync_stages.Sync
- func (s *Ethereum) Start() error
- func (s *Ethereum) StartMining(ctx context.Context, db kv.RwDB, mining *sync_stages.Sync, ...) error
- func (s *Ethereum) Stop() error
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEthConfigUrfave ¶
func NewNodConfigUrfave ¶
func NewNodeConfig ¶
func RemoveContents ¶
RemoveContents is like os.RemoveAll, but preserve dir itself
Types ¶
type Config ¶
Config contains the configuration options of the ETH protocol. Deprecated: use ethconfig.Config instead.
type ErigonNode ¶
type ErigonNode struct {
// contains filtered or unexported fields
}
ErigonNode represents a single node, that runs sync and p2p network. it also can export the private endpoint for RPC daemon, etc.
func NewNode ¶
func NewNode( nodeConfig *nodecfg.Config, ethConfig *ethconfig.Config, logger log.Logger, ) (*ErigonNode, error)
New creates a new `ErigonNode`. * ctx - `*cli.Context` from the main function. Necessary to be able to configure the node based on the command-line flags * sync - `stagedsync.StagedSync`, an instance of staged sync, setup just as needed. * optionalParams - additional parameters for running a node.
func (*ErigonNode) Serve ¶
func (eri *ErigonNode) Serve() error
Serve runs the node and blocks the execution. It returns when the node is existed.
type Ethereum ¶
type Ethereum struct {
// contains filtered or unexported fields
}
Ethereum implements the Ethereum full node service.
func NewBackend ¶
New creates a new Ethereum object (including the initialisation of the common Ethereum object)
func (*Ethereum) ChainConfig ¶
func (*Ethereum) NetPeerCount ¶
func (*Ethereum) NetVersion ¶
func (*Ethereum) NodesInfo ¶
func (s *Ethereum) NodesInfo(limit int) (*remote.NodesInfoReply, error)
func (*Ethereum) Notifications ¶
func (s *Ethereum) Notifications() *shards.Notifications
func (*Ethereum) Protocols ¶
Protocols returns all the currently configured network protocols to start.
func (*Ethereum) SentryControlServer ¶
func (s *Ethereum) SentryControlServer() *sentry.MultiClient
func (*Ethereum) StagedSync ¶
func (s *Ethereum) StagedSync() *sync_stages.Sync
func (*Ethereum) Start ¶
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, mining *sync_stages.Sync, cfg params.MiningConfig, gasPrice *uint256.Int, quitCh chan struct{}, tmpDir string) 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.
type Params ¶
Params contains optional parameters for creating a node. * GitCommit is a commit from which then node was built. * CustomBuckets is a `map[string]dbutils.TableCfgItem`, that contains bucket name and its properties.
NB: You have to declare your custom buckets here to be able to use them in the app.