aboutsummaryrefslogtreecommitdiff
path: root/eth/gen_config.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/gen_config.go')
-rw-r--r--eth/gen_config.go59
1 files changed, 47 insertions, 12 deletions
diff --git a/eth/gen_config.go b/eth/gen_config.go
index d34f0b3..423d6bb 100644
--- a/eth/gen_config.go
+++ b/eth/gen_config.go
@@ -3,7 +3,6 @@
package eth
import (
- "math/big"
"time"
"github.com/ava-labs/coreth/consensus/ethash"
@@ -11,8 +10,8 @@ import (
"github.com/ava-labs/coreth/eth/gasprice"
"github.com/ava-labs/coreth/miner"
"github.com/ava-labs/coreth/params"
- "github.com/ava-labs/go-ethereum/common"
- "github.com/ava-labs/go-ethereum/eth/downloader"
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/eth/downloader"
)
// MarshalTOML marshals as TOML.
@@ -21,13 +20,16 @@ func (c Config) MarshalTOML() (interface{}, error) {
Genesis *core.Genesis `toml:",omitempty"`
NetworkId uint64
SyncMode downloader.SyncMode
+ DiscoveryURLs []string
NoPruning bool
NoPrefetch bool
+ TxLookupLimit uint64 `toml:",omitempty"`
Whitelist map[uint64]common.Hash `toml:"-"`
LightServ int `toml:",omitempty"`
LightIngress int `toml:",omitempty"`
LightEgress int `toml:",omitempty"`
LightPeers int `toml:",omitempty"`
+ LightNoPrune bool `toml:",omitempty"`
UltraLightServers []string `toml:",omitempty"`
UltraLightFraction int `toml:",omitempty"`
UltraLightOnlyAnnounce bool `toml:",omitempty"`
@@ -36,8 +38,11 @@ func (c Config) MarshalTOML() (interface{}, error) {
DatabaseCache int
DatabaseFreezer string
TrieCleanCache int
+ TrieCleanCacheJournal string `toml:",omitempty"`
+ TrieCleanCacheRejournal time.Duration `toml:",omitempty"`
TrieDirtyCache int
TrieTimeout time.Duration
+ SnapshotCache int
Miner miner.Config
Ethash ethash.Config
TxPool core.TxPoolConfig
@@ -46,23 +51,26 @@ func (c Config) MarshalTOML() (interface{}, error) {
DocRoot string `toml:"-"`
EWASMInterpreter string
EVMInterpreter string
- RPCGasCap *big.Int `toml:",omitempty"`
+ RPCGasCap uint64 `toml:",omitempty"`
+ RPCTxFeeCap float64 `toml:",omitempty"`
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
- OverrideIstanbul *big.Int
ManualCanonical bool
}
var enc Config
enc.Genesis = c.Genesis
enc.NetworkId = c.NetworkId
enc.SyncMode = c.SyncMode
+ enc.DiscoveryURLs = c.DiscoveryURLs
enc.NoPruning = c.NoPruning
enc.NoPrefetch = c.NoPrefetch
+ enc.TxLookupLimit = c.TxLookupLimit
enc.Whitelist = c.Whitelist
enc.LightServ = c.LightServ
enc.LightIngress = c.LightIngress
enc.LightEgress = c.LightEgress
enc.LightPeers = c.LightPeers
+ enc.LightNoPrune = c.LightNoPrune
enc.UltraLightServers = c.UltraLightServers
enc.UltraLightFraction = c.UltraLightFraction
enc.UltraLightOnlyAnnounce = c.UltraLightOnlyAnnounce
@@ -71,8 +79,11 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.DatabaseCache = c.DatabaseCache
enc.DatabaseFreezer = c.DatabaseFreezer
enc.TrieCleanCache = c.TrieCleanCache
+ enc.TrieCleanCacheJournal = c.TrieCleanCacheJournal
+ enc.TrieCleanCacheRejournal = c.TrieCleanCacheRejournal
enc.TrieDirtyCache = c.TrieDirtyCache
enc.TrieTimeout = c.TrieTimeout
+ enc.SnapshotCache = c.SnapshotCache
enc.Miner = c.Miner
enc.Ethash = c.Ethash
enc.TxPool = c.TxPool
@@ -82,9 +93,9 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.EWASMInterpreter = c.EWASMInterpreter
enc.EVMInterpreter = c.EVMInterpreter
enc.RPCGasCap = c.RPCGasCap
+ enc.RPCTxFeeCap = c.RPCTxFeeCap
enc.Checkpoint = c.Checkpoint
enc.CheckpointOracle = c.CheckpointOracle
- enc.OverrideIstanbul = c.OverrideIstanbul
enc.ManualCanonical = c.ManualCanonical
return &enc, nil
}
@@ -95,13 +106,16 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
Genesis *core.Genesis `toml:",omitempty"`
NetworkId *uint64
SyncMode *downloader.SyncMode
+ DiscoveryURLs []string
NoPruning *bool
NoPrefetch *bool
+ TxLookupLimit *uint64 `toml:",omitempty"`
Whitelist map[uint64]common.Hash `toml:"-"`
LightServ *int `toml:",omitempty"`
LightIngress *int `toml:",omitempty"`
LightEgress *int `toml:",omitempty"`
LightPeers *int `toml:",omitempty"`
+ LightNoPrune *bool `toml:",omitempty"`
UltraLightServers []string `toml:",omitempty"`
UltraLightFraction *int `toml:",omitempty"`
UltraLightOnlyAnnounce *bool `toml:",omitempty"`
@@ -110,8 +124,11 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
DatabaseCache *int
DatabaseFreezer *string
TrieCleanCache *int
+ TrieCleanCacheJournal *string `toml:",omitempty"`
+ TrieCleanCacheRejournal *time.Duration `toml:",omitempty"`
TrieDirtyCache *int
TrieTimeout *time.Duration
+ SnapshotCache *int
Miner *miner.Config
Ethash *ethash.Config
TxPool *core.TxPoolConfig
@@ -120,10 +137,10 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
DocRoot *string `toml:"-"`
EWASMInterpreter *string
EVMInterpreter *string
- RPCGasCap *big.Int `toml:",omitempty"`
+ RPCGasCap *uint64 `toml:",omitempty"`
+ RPCTxFeeCap *float64 `toml:",omitempty"`
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
- OverrideIstanbul *big.Int
ManualCanonical *bool
}
var dec Config
@@ -139,12 +156,18 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.SyncMode != nil {
c.SyncMode = *dec.SyncMode
}
+ if dec.DiscoveryURLs != nil {
+ c.DiscoveryURLs = dec.DiscoveryURLs
+ }
if dec.NoPruning != nil {
c.NoPruning = *dec.NoPruning
}
if dec.NoPrefetch != nil {
c.NoPrefetch = *dec.NoPrefetch
}
+ if dec.TxLookupLimit != nil {
+ c.TxLookupLimit = *dec.TxLookupLimit
+ }
if dec.Whitelist != nil {
c.Whitelist = dec.Whitelist
}
@@ -160,6 +183,9 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.LightPeers != nil {
c.LightPeers = *dec.LightPeers
}
+ if dec.LightNoPrune != nil {
+ c.LightNoPrune = *dec.LightNoPrune
+ }
if dec.UltraLightServers != nil {
c.UltraLightServers = dec.UltraLightServers
}
@@ -184,12 +210,21 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.TrieCleanCache != nil {
c.TrieCleanCache = *dec.TrieCleanCache
}
+ if dec.TrieCleanCacheJournal != nil {
+ c.TrieCleanCacheJournal = *dec.TrieCleanCacheJournal
+ }
+ if dec.TrieCleanCacheRejournal != nil {
+ c.TrieCleanCacheRejournal = *dec.TrieCleanCacheRejournal
+ }
if dec.TrieDirtyCache != nil {
c.TrieDirtyCache = *dec.TrieDirtyCache
}
if dec.TrieTimeout != nil {
c.TrieTimeout = *dec.TrieTimeout
}
+ if dec.SnapshotCache != nil {
+ c.SnapshotCache = *dec.SnapshotCache
+ }
if dec.Miner != nil {
c.Miner = *dec.Miner
}
@@ -215,7 +250,10 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
c.EVMInterpreter = *dec.EVMInterpreter
}
if dec.RPCGasCap != nil {
- c.RPCGasCap = dec.RPCGasCap
+ c.RPCGasCap = *dec.RPCGasCap
+ }
+ if dec.RPCTxFeeCap != nil {
+ c.RPCTxFeeCap = *dec.RPCTxFeeCap
}
if dec.Checkpoint != nil {
c.Checkpoint = dec.Checkpoint
@@ -223,9 +261,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.CheckpointOracle != nil {
c.CheckpointOracle = dec.CheckpointOracle
}
- if dec.OverrideIstanbul != nil {
- c.OverrideIstanbul = dec.OverrideIstanbul
- }
if dec.ManualCanonical != nil {
c.ManualCanonical = *dec.ManualCanonical
}