Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Defaults = Config{ SyncMode: downloader.FullSync, NetworkId: 32659, LightPeers: 100, DatabaseCache: 512, TrieCleanCache: 256, TrieDirtyCache: 256, TrieTimeout: 60 * time.Minute, Miner: miner.Config{ GasCeil: 30_000_000, GasPrice: big.NewInt(params.GWei), Recommit: 3 * time.Second, }, TxPool: core.DefaultTxPoolConfig, RPCGasCap: 50_000_000, RPCEVMTimeout: 10 * time.Second, GPO: FullNodeGPO, RPCTxFeeCap: 1, }
Defaults contains default settings for use on the Ethereum main net.
View Source
var FullNodeGPO = gasprice.Config{ Blocks: 20, Percentile: 60, MaxHeaderHistory: 1024, MaxBlockHistory: 1024, MaxPrice: gasprice.DefaultMaxPrice, IgnorePrice: gasprice.DefaultIgnorePrice, }
FullNodeGPO contains default gasprice oracle settings for full node.
View Source
var LightClientGPO = gasprice.Config{ Blocks: 2, Percentile: 60, MaxHeaderHistory: 300, MaxBlockHistory: 5, MaxPrice: gasprice.DefaultMaxPrice, IgnorePrice: gasprice.DefaultIgnorePrice, }
LightClientGPO contains default gasprice oracle settings for light client.
Functions ¶
func CreateConsensusEngine ¶
func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, db ethdb.Database) consensus.Engine
CreateConsensusEngine creates a consensus engine for the given chain configuration.
Types ¶
type Config ¶
type Config struct {
// The genesis block, which is inserted if the database is empty.
// If nil, the Ethereum main net block is used.
Genesis *core.Genesis `toml:",omitempty"`
// Protocol options
NetworkId uint64 // Network ID to use for selecting peers to connect to
SyncMode downloader.SyncMode
NoPruning bool // Whether to disable pruning and flush everything to disk
// Light client options
LightServ int `toml:",omitempty"` // Maximum percentage of time allowed for serving LES requests
LightPeers int `toml:",omitempty"` // Maximum number of LES client peers
// Database options
SkipBcVersionCheck bool `toml:"-"`
DatabaseHandles int `toml:"-"`
DatabaseCache int
TrieCleanCache int
TrieDirtyCache int
TrieTimeout time.Duration
Preimages bool
// Mining options
Miner miner.Config
// Transaction pool options
TxPool core.TxPoolConfig
// Gas Price Oracle options
GPO gasprice.Config
// Enables tracking of SHA3 preimages in the VM
EnablePreimageRecording bool
// Miscellaneous options
DocRoot string `toml:"-"`
// RPCGasCap is the global gas cap for eth-call variants.
RPCGasCap uint64
// RPCEVMTimeout is the global timeout for eth-call.
RPCEVMTimeout time.Duration
// RPCTxFeeCap is the global transaction fee(price * gaslimit) cap for
// send-transction variants. The unit is ether.
RPCTxFeeCap float64
}
func (Config) MarshalTOML ¶
MarshalTOML marshals as TOML.
func (*Config) UnmarshalTOML ¶
UnmarshalTOML unmarshals from TOML.
Click to show internal directories.
Click to hide internal directories.