mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
commit
8808c231df
7 changed files with 481 additions and 298 deletions
|
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/ethereum/go-ethereum/core"
|
||||||
|
"github.com/ethereum/go-ethereum/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Chain struct {
|
type Chain struct {
|
||||||
|
|
@ -59,5 +60,19 @@ func importChain(content []byte) (*Chain, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if chain.Genesis == nil {
|
||||||
|
log.Info("Try reading as legacy genesis")
|
||||||
|
var genesis core.Genesis
|
||||||
|
if err := json.Unmarshal(content, &genesis); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if genesis.Config != nil {
|
||||||
|
chain.Genesis = &genesis
|
||||||
|
chain.NetworkId = genesis.Config.ChainID.Uint64()
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("unable to parse chain config")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return chain, nil
|
return chain, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,16 @@ func TestChain_ImportFromFile(t *testing.T) {
|
||||||
args: args{filename: "test_files/chain_test.json"},
|
args: args{filename: "test_files/chain_test.json"},
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "ImportFromFile correct legacy json file",
|
||||||
|
args: args{filename: "test_files/chain_legacy_test.json"},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ImportFromFile wrong json file",
|
||||||
|
args: args{filename: "test_files/wrong_chain.json"},
|
||||||
|
wantErr: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "ImportFromFile nonexistent json file",
|
name: "ImportFromFile nonexistent json file",
|
||||||
args: args{filename: "test_files/chain_test_nonexistent.json"},
|
args: args{filename: "test_files/chain_test_nonexistent.json"},
|
||||||
|
|
|
||||||
83
internal/cli/server/chains/test_files/chain_legacy_test.json
Normal file
83
internal/cli/server/chains/test_files/chain_legacy_test.json
Normal file
File diff suppressed because one or more lines are too long
1
internal/cli/server/chains/test_files/wrong_chain.json
Normal file
1
internal/cli/server/chains/test_files/wrong_chain.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
|
|
@ -935,9 +935,15 @@ func (c *Config) buildNode() (*node.Config, error) {
|
||||||
if cfg.P2P.StaticNodes, err = parseBootnodes(c.P2P.Discovery.StaticNodes); err != nil {
|
if cfg.P2P.StaticNodes, err = parseBootnodes(c.P2P.Discovery.StaticNodes); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if len(cfg.P2P.StaticNodes) == 0 {
|
||||||
|
cfg.P2P.StaticNodes = cfg.StaticNodes()
|
||||||
|
}
|
||||||
if cfg.P2P.TrustedNodes, err = parseBootnodes(c.P2P.Discovery.TrustedNodes); err != nil {
|
if cfg.P2P.TrustedNodes, err = parseBootnodes(c.P2P.Discovery.TrustedNodes); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if len(cfg.P2P.TrustedNodes) == 0 {
|
||||||
|
cfg.P2P.TrustedNodes = cfg.TrustedNodes()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.P2P.NoDiscover {
|
if c.P2P.NoDiscover {
|
||||||
|
|
@ -950,14 +956,9 @@ func (c *Config) buildNode() (*node.Config, error) {
|
||||||
|
|
||||||
func (c *Config) Merge(cc ...*Config) error {
|
func (c *Config) Merge(cc ...*Config) error {
|
||||||
for _, elem := range cc {
|
for _, elem := range cc {
|
||||||
if err := mergo.Merge(c, elem, mergo.WithOverride, mergo.WithAppendSlice); err != nil {
|
if err := mergo.Merge(c, elem, mergo.WithOverwriteWithEmptyValue, mergo.WithAppendSlice); err != nil {
|
||||||
return fmt.Errorf("failed to merge configurations: %v", err)
|
return fmt.Errorf("failed to merge configurations: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// override max peers
|
|
||||||
if elem.P2P.MaxPeers == 0 {
|
|
||||||
c.P2P.MaxPeers = 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,14 +54,11 @@ func TestConfigMerge(t *testing.T) {
|
||||||
}
|
}
|
||||||
expected := &Config{
|
expected := &Config{
|
||||||
Chain: "1",
|
Chain: "1",
|
||||||
NoSnapshot: true,
|
NoSnapshot: false,
|
||||||
RequiredBlocks: map[string]string{
|
RequiredBlocks: map[string]string{
|
||||||
"a": "b",
|
"a": "b",
|
||||||
"b": "c",
|
"b": "c",
|
||||||
},
|
},
|
||||||
TxPool: &TxPoolConfig{
|
|
||||||
LifeTime: 5 * time.Second,
|
|
||||||
},
|
|
||||||
P2P: &P2PConfig{
|
P2P: &P2PConfig{
|
||||||
MaxPeers: 10,
|
MaxPeers: 10,
|
||||||
Discovery: &P2PDiscovery{
|
Discovery: &P2PDiscovery{
|
||||||
|
|
|
||||||
|
|
@ -13,21 +13,25 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "chain",
|
Name: "chain",
|
||||||
Usage: "Name of the chain to sync",
|
Usage: "Name of the chain to sync",
|
||||||
Value: &c.cliConfig.Chain,
|
Value: &c.cliConfig.Chain,
|
||||||
|
Default: c.cliConfig.Chain,
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "name",
|
Name: "name",
|
||||||
Usage: "Name/Identity of the node",
|
Usage: "Name/Identity of the node",
|
||||||
Value: &c.cliConfig.Name,
|
Value: &c.cliConfig.Name,
|
||||||
|
Default: c.cliConfig.Name,
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "log-level",
|
Name: "log-level",
|
||||||
Usage: "Set log level for the server",
|
Usage: "Set log level for the server",
|
||||||
Value: &c.cliConfig.LogLevel,
|
Value: &c.cliConfig.LogLevel,
|
||||||
|
Default: c.cliConfig.LogLevel,
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "datadir",
|
Name: "datadir",
|
||||||
Usage: "Path of the data directory to store information",
|
Usage: "Path of the data directory to store information",
|
||||||
Value: &c.cliConfig.DataDir,
|
Value: &c.cliConfig.DataDir,
|
||||||
|
Default: c.cliConfig.DataDir,
|
||||||
})
|
})
|
||||||
f.SliceStringFlag(&flagset.SliceStringFlag{
|
f.SliceStringFlag(&flagset.SliceStringFlag{
|
||||||
Name: "config",
|
Name: "config",
|
||||||
|
|
@ -38,11 +42,13 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "syncmode",
|
Name: "syncmode",
|
||||||
Usage: `Blockchain sync mode ("fast", "full", or "snap")`,
|
Usage: `Blockchain sync mode ("fast", "full", or "snap")`,
|
||||||
Value: &c.cliConfig.SyncMode,
|
Value: &c.cliConfig.SyncMode,
|
||||||
|
Default: c.cliConfig.SyncMode,
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "gcmode",
|
Name: "gcmode",
|
||||||
Usage: `Blockchain garbage collection mode ("full", "archive")`,
|
Usage: `Blockchain garbage collection mode ("full", "archive")`,
|
||||||
Value: &c.cliConfig.GcMode,
|
Value: &c.cliConfig.GcMode,
|
||||||
|
Default: c.cliConfig.GcMode,
|
||||||
})
|
})
|
||||||
f.MapStringFlag(&flagset.MapStringFlag{
|
f.MapStringFlag(&flagset.MapStringFlag{
|
||||||
Name: "requiredblocks",
|
Name: "requiredblocks",
|
||||||
|
|
@ -53,6 +59,7 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "no-snapshot",
|
Name: "no-snapshot",
|
||||||
Usage: `Disables the snapshot-database mode (default = false)`,
|
Usage: `Disables the snapshot-database mode (default = false)`,
|
||||||
Value: &c.cliConfig.NoSnapshot,
|
Value: &c.cliConfig.NoSnapshot,
|
||||||
|
Default: c.cliConfig.NoSnapshot,
|
||||||
})
|
})
|
||||||
|
|
||||||
// heimdall
|
// heimdall
|
||||||
|
|
@ -60,11 +67,13 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "bor.heimdall",
|
Name: "bor.heimdall",
|
||||||
Usage: "URL of Heimdall service",
|
Usage: "URL of Heimdall service",
|
||||||
Value: &c.cliConfig.Heimdall.URL,
|
Value: &c.cliConfig.Heimdall.URL,
|
||||||
|
Default: c.cliConfig.Heimdall.URL,
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "bor.withoutheimdall",
|
Name: "bor.withoutheimdall",
|
||||||
Usage: "Run without Heimdall service (for testing purpose)",
|
Usage: "Run without Heimdall service (for testing purpose)",
|
||||||
Value: &c.cliConfig.Heimdall.Without,
|
Value: &c.cliConfig.Heimdall.Without,
|
||||||
|
Default: c.cliConfig.Heimdall.Without,
|
||||||
})
|
})
|
||||||
|
|
||||||
// txpool options
|
// txpool options
|
||||||
|
|
@ -78,60 +87,70 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "txpool.nolocals",
|
Name: "txpool.nolocals",
|
||||||
Usage: "Disables price exemptions for locally submitted transactions",
|
Usage: "Disables price exemptions for locally submitted transactions",
|
||||||
Value: &c.cliConfig.TxPool.NoLocals,
|
Value: &c.cliConfig.TxPool.NoLocals,
|
||||||
|
Default: c.cliConfig.TxPool.NoLocals,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "txpool.journal",
|
Name: "txpool.journal",
|
||||||
Usage: "Disk journal for local transaction to survive node restarts",
|
Usage: "Disk journal for local transaction to survive node restarts",
|
||||||
Value: &c.cliConfig.TxPool.Journal,
|
Value: &c.cliConfig.TxPool.Journal,
|
||||||
|
Default: c.cliConfig.TxPool.Journal,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.DurationFlag(&flagset.DurationFlag{
|
f.DurationFlag(&flagset.DurationFlag{
|
||||||
Name: "txpool.rejournal",
|
Name: "txpool.rejournal",
|
||||||
Usage: "Time interval to regenerate the local transaction journal",
|
Usage: "Time interval to regenerate the local transaction journal",
|
||||||
Value: &c.cliConfig.TxPool.Rejournal,
|
Value: &c.cliConfig.TxPool.Rejournal,
|
||||||
|
Default: c.cliConfig.TxPool.Rejournal,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "txpool.pricelimit",
|
Name: "txpool.pricelimit",
|
||||||
Usage: "Minimum gas price limit to enforce for acceptance into the pool",
|
Usage: "Minimum gas price limit to enforce for acceptance into the pool",
|
||||||
Value: &c.cliConfig.TxPool.PriceLimit,
|
Value: &c.cliConfig.TxPool.PriceLimit,
|
||||||
|
Default: c.cliConfig.TxPool.PriceLimit,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "txpool.pricebump",
|
Name: "txpool.pricebump",
|
||||||
Usage: "Price bump percentage to replace an already existing transaction",
|
Usage: "Price bump percentage to replace an already existing transaction",
|
||||||
Value: &c.cliConfig.TxPool.PriceBump,
|
Value: &c.cliConfig.TxPool.PriceBump,
|
||||||
|
Default: c.cliConfig.TxPool.PriceBump,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "txpool.accountslots",
|
Name: "txpool.accountslots",
|
||||||
Usage: "Minimum number of executable transaction slots guaranteed per account",
|
Usage: "Minimum number of executable transaction slots guaranteed per account",
|
||||||
Value: &c.cliConfig.TxPool.AccountSlots,
|
Value: &c.cliConfig.TxPool.AccountSlots,
|
||||||
|
Default: c.cliConfig.TxPool.AccountSlots,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "txpool.globalslots",
|
Name: "txpool.globalslots",
|
||||||
Usage: "Maximum number of executable transaction slots for all accounts",
|
Usage: "Maximum number of executable transaction slots for all accounts",
|
||||||
Value: &c.cliConfig.TxPool.GlobalSlots,
|
Value: &c.cliConfig.TxPool.GlobalSlots,
|
||||||
|
Default: c.cliConfig.TxPool.GlobalSlots,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "txpool.accountqueue",
|
Name: "txpool.accountqueue",
|
||||||
Usage: "Maximum number of non-executable transaction slots permitted per account",
|
Usage: "Maximum number of non-executable transaction slots permitted per account",
|
||||||
Value: &c.cliConfig.TxPool.AccountQueue,
|
Value: &c.cliConfig.TxPool.AccountQueue,
|
||||||
|
Default: c.cliConfig.TxPool.AccountQueue,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "txpool.globalqueue",
|
Name: "txpool.globalqueue",
|
||||||
Usage: "Maximum number of non-executable transaction slots for all accounts",
|
Usage: "Maximum number of non-executable transaction slots for all accounts",
|
||||||
Value: &c.cliConfig.TxPool.GlobalQueue,
|
Value: &c.cliConfig.TxPool.GlobalQueue,
|
||||||
|
Default: c.cliConfig.TxPool.GlobalQueue,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
f.DurationFlag(&flagset.DurationFlag{
|
f.DurationFlag(&flagset.DurationFlag{
|
||||||
Name: "txpool.lifetime",
|
Name: "txpool.lifetime",
|
||||||
Usage: "Maximum amount of time non-executable transaction are queued",
|
Usage: "Maximum amount of time non-executable transaction are queued",
|
||||||
Value: &c.cliConfig.TxPool.LifeTime,
|
Value: &c.cliConfig.TxPool.LifeTime,
|
||||||
|
Default: c.cliConfig.TxPool.LifeTime,
|
||||||
Group: "Transaction Pool",
|
Group: "Transaction Pool",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -140,24 +159,28 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "mine",
|
Name: "mine",
|
||||||
Usage: "Enable mining",
|
Usage: "Enable mining",
|
||||||
Value: &c.cliConfig.Sealer.Enabled,
|
Value: &c.cliConfig.Sealer.Enabled,
|
||||||
|
Default: c.cliConfig.Sealer.Enabled,
|
||||||
Group: "Sealer",
|
Group: "Sealer",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "miner.etherbase",
|
Name: "miner.etherbase",
|
||||||
Usage: "Public address for block mining rewards (default = first account)",
|
Usage: "Public address for block mining rewards (default = first account)",
|
||||||
Value: &c.cliConfig.Sealer.Etherbase,
|
Value: &c.cliConfig.Sealer.Etherbase,
|
||||||
|
Default: c.cliConfig.Sealer.Etherbase,
|
||||||
Group: "Sealer",
|
Group: "Sealer",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "miner.extradata",
|
Name: "miner.extradata",
|
||||||
Usage: "Block extra data set by the miner (default = client version)",
|
Usage: "Block extra data set by the miner (default = client version)",
|
||||||
Value: &c.cliConfig.Sealer.ExtraData,
|
Value: &c.cliConfig.Sealer.ExtraData,
|
||||||
|
Default: c.cliConfig.Sealer.ExtraData,
|
||||||
Group: "Sealer",
|
Group: "Sealer",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "miner.gaslimit",
|
Name: "miner.gaslimit",
|
||||||
Usage: "Target gas ceiling for mined blocks",
|
Usage: "Target gas ceiling for mined blocks",
|
||||||
Value: &c.cliConfig.Sealer.GasCeil,
|
Value: &c.cliConfig.Sealer.GasCeil,
|
||||||
|
Default: c.cliConfig.Sealer.GasCeil,
|
||||||
Group: "Sealer",
|
Group: "Sealer",
|
||||||
})
|
})
|
||||||
f.BigIntFlag(&flagset.BigIntFlag{
|
f.BigIntFlag(&flagset.BigIntFlag{
|
||||||
|
|
@ -172,6 +195,7 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "ethstats",
|
Name: "ethstats",
|
||||||
Usage: "Reporting URL of a ethstats service (nodename:secret@host:port)",
|
Usage: "Reporting URL of a ethstats service (nodename:secret@host:port)",
|
||||||
Value: &c.cliConfig.Ethstats,
|
Value: &c.cliConfig.Ethstats,
|
||||||
|
Default: c.cliConfig.Ethstats,
|
||||||
})
|
})
|
||||||
|
|
||||||
// gas price oracle
|
// gas price oracle
|
||||||
|
|
@ -179,11 +203,13 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "gpo.blocks",
|
Name: "gpo.blocks",
|
||||||
Usage: "Number of recent blocks to check for gas prices",
|
Usage: "Number of recent blocks to check for gas prices",
|
||||||
Value: &c.cliConfig.Gpo.Blocks,
|
Value: &c.cliConfig.Gpo.Blocks,
|
||||||
|
Default: c.cliConfig.Gpo.Blocks,
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "gpo.percentile",
|
Name: "gpo.percentile",
|
||||||
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices",
|
Usage: "Suggested gas price is the given percentile of a set of recent transaction gas prices",
|
||||||
Value: &c.cliConfig.Gpo.Percentile,
|
Value: &c.cliConfig.Gpo.Percentile,
|
||||||
|
Default: c.cliConfig.Gpo.Percentile,
|
||||||
})
|
})
|
||||||
f.BigIntFlag(&flagset.BigIntFlag{
|
f.BigIntFlag(&flagset.BigIntFlag{
|
||||||
Name: "gpo.maxprice",
|
Name: "gpo.maxprice",
|
||||||
|
|
@ -201,60 +227,70 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "cache",
|
Name: "cache",
|
||||||
Usage: "Megabytes of memory allocated to internal caching (default = 4096 mainnet full node)",
|
Usage: "Megabytes of memory allocated to internal caching (default = 4096 mainnet full node)",
|
||||||
Value: &c.cliConfig.Cache.Cache,
|
Value: &c.cliConfig.Cache.Cache,
|
||||||
|
Default: c.cliConfig.Cache.Cache,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "cache.database",
|
Name: "cache.database",
|
||||||
Usage: "Percentage of cache memory allowance to use for database io",
|
Usage: "Percentage of cache memory allowance to use for database io",
|
||||||
Value: &c.cliConfig.Cache.PercDatabase,
|
Value: &c.cliConfig.Cache.PercDatabase,
|
||||||
|
Default: c.cliConfig.Cache.PercDatabase,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "cache.trie",
|
Name: "cache.trie",
|
||||||
Usage: "Percentage of cache memory allowance to use for trie caching (default = 15% full mode, 30% archive mode)",
|
Usage: "Percentage of cache memory allowance to use for trie caching (default = 15% full mode, 30% archive mode)",
|
||||||
Value: &c.cliConfig.Cache.PercTrie,
|
Value: &c.cliConfig.Cache.PercTrie,
|
||||||
|
Default: c.cliConfig.Cache.PercTrie,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "cache.trie.journal",
|
Name: "cache.trie.journal",
|
||||||
Usage: "Disk journal directory for trie cache to survive node restarts",
|
Usage: "Disk journal directory for trie cache to survive node restarts",
|
||||||
Value: &c.cliConfig.Cache.Journal,
|
Value: &c.cliConfig.Cache.Journal,
|
||||||
|
Default: c.cliConfig.Cache.Journal,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.DurationFlag(&flagset.DurationFlag{
|
f.DurationFlag(&flagset.DurationFlag{
|
||||||
Name: "cache.trie.rejournal",
|
Name: "cache.trie.rejournal",
|
||||||
Usage: "Time interval to regenerate the trie cache journal",
|
Usage: "Time interval to regenerate the trie cache journal",
|
||||||
Value: &c.cliConfig.Cache.Rejournal,
|
Value: &c.cliConfig.Cache.Rejournal,
|
||||||
|
Default: c.cliConfig.Cache.Rejournal,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "cache.gc",
|
Name: "cache.gc",
|
||||||
Usage: "Percentage of cache memory allowance to use for trie pruning (default = 25% full mode, 0% archive mode)",
|
Usage: "Percentage of cache memory allowance to use for trie pruning (default = 25% full mode, 0% archive mode)",
|
||||||
Value: &c.cliConfig.Cache.PercGc,
|
Value: &c.cliConfig.Cache.PercGc,
|
||||||
|
Default: c.cliConfig.Cache.PercGc,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "cache.snapshot",
|
Name: "cache.snapshot",
|
||||||
Usage: "Percentage of cache memory allowance to use for snapshot caching (default = 10% full mode, 20% archive mode)",
|
Usage: "Percentage of cache memory allowance to use for snapshot caching (default = 10% full mode, 20% archive mode)",
|
||||||
Value: &c.cliConfig.Cache.PercSnapshot,
|
Value: &c.cliConfig.Cache.PercSnapshot,
|
||||||
|
Default: c.cliConfig.Cache.PercSnapshot,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "cache.noprefetch",
|
Name: "cache.noprefetch",
|
||||||
Usage: "Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data)",
|
Usage: "Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data)",
|
||||||
Value: &c.cliConfig.Cache.NoPrefetch,
|
Value: &c.cliConfig.Cache.NoPrefetch,
|
||||||
|
Default: c.cliConfig.Cache.NoPrefetch,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "cache.preimages",
|
Name: "cache.preimages",
|
||||||
Usage: "Enable recording the SHA3/keccak preimages of trie keys",
|
Usage: "Enable recording the SHA3/keccak preimages of trie keys",
|
||||||
Value: &c.cliConfig.Cache.Preimages,
|
Value: &c.cliConfig.Cache.Preimages,
|
||||||
|
Default: c.cliConfig.Cache.Preimages,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "txlookuplimit",
|
Name: "txlookuplimit",
|
||||||
Usage: "Number of recent blocks to maintain transactions index for (default = about 56 days, 0 = entire chain)",
|
Usage: "Number of recent blocks to maintain transactions index for (default = about 56 days, 0 = entire chain)",
|
||||||
Value: &c.cliConfig.Cache.TxLookupLimit,
|
Value: &c.cliConfig.Cache.TxLookupLimit,
|
||||||
|
Default: c.cliConfig.Cache.TxLookupLimit,
|
||||||
Group: "Cache",
|
Group: "Cache",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -263,24 +299,28 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "rpc.gascap",
|
Name: "rpc.gascap",
|
||||||
Usage: "Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)",
|
Usage: "Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite)",
|
||||||
Value: &c.cliConfig.JsonRPC.GasCap,
|
Value: &c.cliConfig.JsonRPC.GasCap,
|
||||||
|
Default: c.cliConfig.JsonRPC.GasCap,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.Float64Flag(&flagset.Float64Flag{
|
f.Float64Flag(&flagset.Float64Flag{
|
||||||
Name: "rpc.txfeecap",
|
Name: "rpc.txfeecap",
|
||||||
Usage: "Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)",
|
Usage: "Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)",
|
||||||
Value: &c.cliConfig.JsonRPC.TxFeeCap,
|
Value: &c.cliConfig.JsonRPC.TxFeeCap,
|
||||||
|
Default: c.cliConfig.JsonRPC.TxFeeCap,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "ipcdisable",
|
Name: "ipcdisable",
|
||||||
Usage: "Disable the IPC-RPC server",
|
Usage: "Disable the IPC-RPC server",
|
||||||
Value: &c.cliConfig.JsonRPC.IPCDisable,
|
Value: &c.cliConfig.JsonRPC.IPCDisable,
|
||||||
|
Default: c.cliConfig.JsonRPC.IPCDisable,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "ipcpath",
|
Name: "ipcpath",
|
||||||
Usage: "Filename for IPC socket/pipe within the datadir (explicit paths escape it)",
|
Usage: "Filename for IPC socket/pipe within the datadir (explicit paths escape it)",
|
||||||
Value: &c.cliConfig.JsonRPC.IPCPath,
|
Value: &c.cliConfig.JsonRPC.IPCPath,
|
||||||
|
Default: c.cliConfig.JsonRPC.IPCPath,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.SliceStringFlag(&flagset.SliceStringFlag{
|
f.SliceStringFlag(&flagset.SliceStringFlag{
|
||||||
|
|
@ -301,24 +341,28 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "http",
|
Name: "http",
|
||||||
Usage: "Enable the HTTP-RPC server",
|
Usage: "Enable the HTTP-RPC server",
|
||||||
Value: &c.cliConfig.JsonRPC.Http.Enabled,
|
Value: &c.cliConfig.JsonRPC.Http.Enabled,
|
||||||
|
Default: c.cliConfig.JsonRPC.Http.Enabled,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "http.addr",
|
Name: "http.addr",
|
||||||
Usage: "HTTP-RPC server listening interface",
|
Usage: "HTTP-RPC server listening interface",
|
||||||
Value: &c.cliConfig.JsonRPC.Http.Host,
|
Value: &c.cliConfig.JsonRPC.Http.Host,
|
||||||
|
Default: c.cliConfig.JsonRPC.Http.Host,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "http.port",
|
Name: "http.port",
|
||||||
Usage: "HTTP-RPC server listening port",
|
Usage: "HTTP-RPC server listening port",
|
||||||
Value: &c.cliConfig.JsonRPC.Http.Port,
|
Value: &c.cliConfig.JsonRPC.Http.Port,
|
||||||
|
Default: c.cliConfig.JsonRPC.Http.Port,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "http.rpcprefix",
|
Name: "http.rpcprefix",
|
||||||
Usage: "HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths.",
|
Usage: "HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all paths.",
|
||||||
Value: &c.cliConfig.JsonRPC.Http.Prefix,
|
Value: &c.cliConfig.JsonRPC.Http.Prefix,
|
||||||
|
Default: c.cliConfig.JsonRPC.Http.Prefix,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.SliceStringFlag(&flagset.SliceStringFlag{
|
f.SliceStringFlag(&flagset.SliceStringFlag{
|
||||||
|
|
@ -333,24 +377,28 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "ws",
|
Name: "ws",
|
||||||
Usage: "Enable the WS-RPC server",
|
Usage: "Enable the WS-RPC server",
|
||||||
Value: &c.cliConfig.JsonRPC.Ws.Enabled,
|
Value: &c.cliConfig.JsonRPC.Ws.Enabled,
|
||||||
|
Default: c.cliConfig.JsonRPC.Ws.Enabled,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "ws.addr",
|
Name: "ws.addr",
|
||||||
Usage: "WS-RPC server listening interface",
|
Usage: "WS-RPC server listening interface",
|
||||||
Value: &c.cliConfig.JsonRPC.Ws.Host,
|
Value: &c.cliConfig.JsonRPC.Ws.Host,
|
||||||
|
Default: c.cliConfig.JsonRPC.Ws.Host,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "ws.port",
|
Name: "ws.port",
|
||||||
Usage: "WS-RPC server listening port",
|
Usage: "WS-RPC server listening port",
|
||||||
Value: &c.cliConfig.JsonRPC.Ws.Port,
|
Value: &c.cliConfig.JsonRPC.Ws.Port,
|
||||||
|
Default: c.cliConfig.JsonRPC.Ws.Port,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "ws.rpcprefix",
|
Name: "ws.rpcprefix",
|
||||||
Usage: "HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths.",
|
Usage: "HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths.",
|
||||||
Value: &c.cliConfig.JsonRPC.Ws.Prefix,
|
Value: &c.cliConfig.JsonRPC.Ws.Prefix,
|
||||||
|
Default: c.cliConfig.JsonRPC.Ws.Prefix,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
f.SliceStringFlag(&flagset.SliceStringFlag{
|
f.SliceStringFlag(&flagset.SliceStringFlag{
|
||||||
|
|
@ -365,6 +413,7 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "graphql",
|
Name: "graphql",
|
||||||
Usage: "Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if an HTTP server is started as well.",
|
Usage: "Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if an HTTP server is started as well.",
|
||||||
Value: &c.cliConfig.JsonRPC.Graphql.Enabled,
|
Value: &c.cliConfig.JsonRPC.Graphql.Enabled,
|
||||||
|
Default: c.cliConfig.JsonRPC.Graphql.Enabled,
|
||||||
Group: "JsonRPC",
|
Group: "JsonRPC",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -373,12 +422,14 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "bind",
|
Name: "bind",
|
||||||
Usage: "Network binding address",
|
Usage: "Network binding address",
|
||||||
Value: &c.cliConfig.P2P.Bind,
|
Value: &c.cliConfig.P2P.Bind,
|
||||||
|
Default: c.cliConfig.P2P.Bind,
|
||||||
Group: "P2P",
|
Group: "P2P",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "port",
|
Name: "port",
|
||||||
Usage: "Network listening port",
|
Usage: "Network listening port",
|
||||||
Value: &c.cliConfig.P2P.Port,
|
Value: &c.cliConfig.P2P.Port,
|
||||||
|
Default: c.cliConfig.P2P.Port,
|
||||||
Group: "P2P",
|
Group: "P2P",
|
||||||
})
|
})
|
||||||
f.SliceStringFlag(&flagset.SliceStringFlag{
|
f.SliceStringFlag(&flagset.SliceStringFlag{
|
||||||
|
|
@ -391,30 +442,35 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "maxpeers",
|
Name: "maxpeers",
|
||||||
Usage: "Maximum number of network peers (network disabled if set to 0)",
|
Usage: "Maximum number of network peers (network disabled if set to 0)",
|
||||||
Value: &c.cliConfig.P2P.MaxPeers,
|
Value: &c.cliConfig.P2P.MaxPeers,
|
||||||
|
Default: c.cliConfig.P2P.MaxPeers,
|
||||||
Group: "P2P",
|
Group: "P2P",
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "maxpendpeers",
|
Name: "maxpendpeers",
|
||||||
Usage: "Maximum number of pending connection attempts (defaults used if set to 0)",
|
Usage: "Maximum number of pending connection attempts (defaults used if set to 0)",
|
||||||
Value: &c.cliConfig.P2P.MaxPendPeers,
|
Value: &c.cliConfig.P2P.MaxPendPeers,
|
||||||
|
Default: c.cliConfig.P2P.MaxPendPeers,
|
||||||
Group: "P2P",
|
Group: "P2P",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "nat",
|
Name: "nat",
|
||||||
Usage: "NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>)",
|
Usage: "NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>)",
|
||||||
Value: &c.cliConfig.P2P.NAT,
|
Value: &c.cliConfig.P2P.NAT,
|
||||||
|
Default: c.cliConfig.P2P.NAT,
|
||||||
Group: "P2P",
|
Group: "P2P",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "nodiscover",
|
Name: "nodiscover",
|
||||||
Usage: "Disables the peer discovery mechanism (manual peer addition)",
|
Usage: "Disables the peer discovery mechanism (manual peer addition)",
|
||||||
Value: &c.cliConfig.P2P.NoDiscover,
|
Value: &c.cliConfig.P2P.NoDiscover,
|
||||||
|
Default: c.cliConfig.P2P.NoDiscover,
|
||||||
Group: "P2P",
|
Group: "P2P",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "v5disc",
|
Name: "v5disc",
|
||||||
Usage: "Enables the experimental RLPx V5 (Topic Discovery) mechanism",
|
Usage: "Enables the experimental RLPx V5 (Topic Discovery) mechanism",
|
||||||
Value: &c.cliConfig.P2P.Discovery.V5Enabled,
|
Value: &c.cliConfig.P2P.Discovery.V5Enabled,
|
||||||
|
Default: c.cliConfig.P2P.Discovery.V5Enabled,
|
||||||
Group: "P2P",
|
Group: "P2P",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -423,42 +479,49 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "metrics",
|
Name: "metrics",
|
||||||
Usage: "Enable metrics collection and reporting",
|
Usage: "Enable metrics collection and reporting",
|
||||||
Value: &c.cliConfig.Telemetry.Enabled,
|
Value: &c.cliConfig.Telemetry.Enabled,
|
||||||
|
Default: c.cliConfig.Telemetry.Enabled,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "metrics.expensive",
|
Name: "metrics.expensive",
|
||||||
Usage: "Enable expensive metrics collection and reporting",
|
Usage: "Enable expensive metrics collection and reporting",
|
||||||
Value: &c.cliConfig.Telemetry.Expensive,
|
Value: &c.cliConfig.Telemetry.Expensive,
|
||||||
|
Default: c.cliConfig.Telemetry.Expensive,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "metrics.influxdb",
|
Name: "metrics.influxdb",
|
||||||
Usage: "Enable metrics export/push to an external InfluxDB database (v1)",
|
Usage: "Enable metrics export/push to an external InfluxDB database (v1)",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.V1Enabled,
|
Value: &c.cliConfig.Telemetry.InfluxDB.V1Enabled,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.V1Enabled,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.influxdb.endpoint",
|
Name: "metrics.influxdb.endpoint",
|
||||||
Usage: "InfluxDB API endpoint to report metrics to",
|
Usage: "InfluxDB API endpoint to report metrics to",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.Endpoint,
|
Value: &c.cliConfig.Telemetry.InfluxDB.Endpoint,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.Endpoint,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.influxdb.database",
|
Name: "metrics.influxdb.database",
|
||||||
Usage: "InfluxDB database name to push reported metrics to",
|
Usage: "InfluxDB database name to push reported metrics to",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.Database,
|
Value: &c.cliConfig.Telemetry.InfluxDB.Database,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.Database,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.influxdb.username",
|
Name: "metrics.influxdb.username",
|
||||||
Usage: "Username to authorize access to the database",
|
Usage: "Username to authorize access to the database",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.Username,
|
Value: &c.cliConfig.Telemetry.InfluxDB.Username,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.Username,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.influxdb.password",
|
Name: "metrics.influxdb.password",
|
||||||
Usage: "Password to authorize access to the database",
|
Usage: "Password to authorize access to the database",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.Password,
|
Value: &c.cliConfig.Telemetry.InfluxDB.Password,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.Password,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.MapStringFlag(&flagset.MapStringFlag{
|
f.MapStringFlag(&flagset.MapStringFlag{
|
||||||
|
|
@ -471,12 +534,14 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "metrics.prometheus-addr",
|
Name: "metrics.prometheus-addr",
|
||||||
Usage: "Address for Prometheus Server",
|
Usage: "Address for Prometheus Server",
|
||||||
Value: &c.cliConfig.Telemetry.PrometheusAddr,
|
Value: &c.cliConfig.Telemetry.PrometheusAddr,
|
||||||
|
Default: c.cliConfig.Telemetry.PrometheusAddr,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.opencollector-endpoint",
|
Name: "metrics.opencollector-endpoint",
|
||||||
Usage: "OpenCollector Endpoint (host:port)",
|
Usage: "OpenCollector Endpoint (host:port)",
|
||||||
Value: &c.cliConfig.Telemetry.OpenCollectorEndpoint,
|
Value: &c.cliConfig.Telemetry.OpenCollectorEndpoint,
|
||||||
|
Default: c.cliConfig.Telemetry.OpenCollectorEndpoint,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
// influx db v2
|
// influx db v2
|
||||||
|
|
@ -484,24 +549,28 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "metrics.influxdbv2",
|
Name: "metrics.influxdbv2",
|
||||||
Usage: "Enable metrics export/push to an external InfluxDB v2 database",
|
Usage: "Enable metrics export/push to an external InfluxDB v2 database",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.V2Enabled,
|
Value: &c.cliConfig.Telemetry.InfluxDB.V2Enabled,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.V2Enabled,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.influxdb.token",
|
Name: "metrics.influxdb.token",
|
||||||
Usage: "Token to authorize access to the database (v2 only)",
|
Usage: "Token to authorize access to the database (v2 only)",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.Token,
|
Value: &c.cliConfig.Telemetry.InfluxDB.Token,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.Token,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.influxdb.bucket",
|
Name: "metrics.influxdb.bucket",
|
||||||
Usage: "InfluxDB bucket name to push reported metrics to (v2 only)",
|
Usage: "InfluxDB bucket name to push reported metrics to (v2 only)",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.Bucket,
|
Value: &c.cliConfig.Telemetry.InfluxDB.Bucket,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.Bucket,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "metrics.influxdb.organization",
|
Name: "metrics.influxdb.organization",
|
||||||
Usage: "InfluxDB organization name (v2 only)",
|
Usage: "InfluxDB organization name (v2 only)",
|
||||||
Value: &c.cliConfig.Telemetry.InfluxDB.Organization,
|
Value: &c.cliConfig.Telemetry.InfluxDB.Organization,
|
||||||
|
Default: c.cliConfig.Telemetry.InfluxDB.Organization,
|
||||||
Group: "Telemetry",
|
Group: "Telemetry",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -516,24 +585,28 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "password",
|
Name: "password",
|
||||||
Usage: "Password file to use for non-interactive password input",
|
Usage: "Password file to use for non-interactive password input",
|
||||||
Value: &c.cliConfig.Accounts.PasswordFile,
|
Value: &c.cliConfig.Accounts.PasswordFile,
|
||||||
|
Default: c.cliConfig.Accounts.PasswordFile,
|
||||||
Group: "Account Management",
|
Group: "Account Management",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "allow-insecure-unlock",
|
Name: "allow-insecure-unlock",
|
||||||
Usage: "Allow insecure account unlocking when account-related RPCs are exposed by http",
|
Usage: "Allow insecure account unlocking when account-related RPCs are exposed by http",
|
||||||
Value: &c.cliConfig.Accounts.AllowInsecureUnlock,
|
Value: &c.cliConfig.Accounts.AllowInsecureUnlock,
|
||||||
|
Default: c.cliConfig.Accounts.AllowInsecureUnlock,
|
||||||
Group: "Account Management",
|
Group: "Account Management",
|
||||||
})
|
})
|
||||||
f.BoolFlag(&flagset.BoolFlag{
|
f.BoolFlag(&flagset.BoolFlag{
|
||||||
Name: "lightkdf",
|
Name: "lightkdf",
|
||||||
Usage: "Reduce key-derivation RAM & CPU usage at some expense of KDF strength",
|
Usage: "Reduce key-derivation RAM & CPU usage at some expense of KDF strength",
|
||||||
Value: &c.cliConfig.Accounts.UseLightweightKDF,
|
Value: &c.cliConfig.Accounts.UseLightweightKDF,
|
||||||
|
Default: c.cliConfig.Accounts.UseLightweightKDF,
|
||||||
Group: "Account Management",
|
Group: "Account Management",
|
||||||
})
|
})
|
||||||
f.BoolFlag((&flagset.BoolFlag{
|
f.BoolFlag((&flagset.BoolFlag{
|
||||||
Name: "disable-bor-wallet",
|
Name: "disable-bor-wallet",
|
||||||
Usage: "Disable the personal wallet endpoints",
|
Usage: "Disable the personal wallet endpoints",
|
||||||
Value: &c.cliConfig.Accounts.DisableBorWallet,
|
Value: &c.cliConfig.Accounts.DisableBorWallet,
|
||||||
|
Default: c.cliConfig.Accounts.DisableBorWallet,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// grpc
|
// grpc
|
||||||
|
|
@ -541,6 +614,7 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "grpc.addr",
|
Name: "grpc.addr",
|
||||||
Usage: "Address and port to bind the GRPC server",
|
Usage: "Address and port to bind the GRPC server",
|
||||||
Value: &c.cliConfig.GRPC.Addr,
|
Value: &c.cliConfig.GRPC.Addr,
|
||||||
|
Default: c.cliConfig.GRPC.Addr,
|
||||||
})
|
})
|
||||||
|
|
||||||
// developer
|
// developer
|
||||||
|
|
@ -548,11 +622,13 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Name: "dev",
|
Name: "dev",
|
||||||
Usage: "Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled",
|
Usage: "Enable developer mode with ephemeral proof-of-authority network and a pre-funded developer account, mining enabled",
|
||||||
Value: &c.cliConfig.Developer.Enabled,
|
Value: &c.cliConfig.Developer.Enabled,
|
||||||
|
Default: c.cliConfig.Developer.Enabled,
|
||||||
})
|
})
|
||||||
f.Uint64Flag(&flagset.Uint64Flag{
|
f.Uint64Flag(&flagset.Uint64Flag{
|
||||||
Name: "dev.period",
|
Name: "dev.period",
|
||||||
Usage: "Block period to use in developer mode (0 = mine only if transaction pending)",
|
Usage: "Block period to use in developer mode (0 = mine only if transaction pending)",
|
||||||
Value: &c.cliConfig.Developer.Period,
|
Value: &c.cliConfig.Developer.Period,
|
||||||
|
Default: c.cliConfig.Developer.Period,
|
||||||
})
|
})
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue