mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Merge pull request #964 from maticnetwork/pebble
internal/cli: add db.engine flag
This commit is contained in:
commit
d0f0cef267
13 changed files with 23 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ chain = "mainnet"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
db.engine = "leveldb"
|
||||||
# keystore = "/var/lib/bor/keystore"
|
# keystore = "/var/lib/bor/keystore"
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ verbosity = 3 # Logging verbosity for the server (5=trace|4=de
|
||||||
vmdebug = false # Record information useful for VM and contract debugging
|
vmdebug = false # Record information useful for VM and contract debugging
|
||||||
datadir = "var/lib/bor" # Path of the data directory to store information
|
datadir = "var/lib/bor" # Path of the data directory to store information
|
||||||
ancient = "" # Data directory for ancient chain segments (default = inside chaindata)
|
ancient = "" # Data directory for ancient chain segments (default = inside chaindata)
|
||||||
|
db.engine = "leveldb" # Used to select leveldb or pebble as database (default = leveldb)
|
||||||
keystore = "" # Path of the directory where keystores are located
|
keystore = "" # Path of the directory where keystores are located
|
||||||
"rpc.batchlimit" = 100 # Maximum number of messages in a batch (default=100, use 0 for no limits)
|
"rpc.batchlimit" = 100 # Maximum number of messages in a batch (default=100, use 0 for no limits)
|
||||||
"rpc.returndatalimit" = 100000 # Maximum size (in bytes) a result of an rpc request could have (default=100000, use 0 for no limits)
|
"rpc.returndatalimit" = 100000 # Maximum size (in bytes) a result of an rpc request could have (default=100000, use 0 for no limits)
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ The ```bor server``` command runs the Bor client.
|
||||||
|
|
||||||
- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata)
|
- ```datadir.ancient```: Data directory for ancient chain segments (default = inside chaindata)
|
||||||
|
|
||||||
|
- ```db.engine```: Backing database implementation to use ('leveldb' or 'pebble') (default: leveldb)
|
||||||
|
|
||||||
- ```keystore```: Path of the directory where keystores are located
|
- ```keystore```: Path of the directory where keystores are located
|
||||||
|
|
||||||
- ```rpc.batchlimit```: Maximum number of messages in a batch (default=100, use 0 for no limits) (default: 100)
|
- ```rpc.batchlimit```: Maximum number of messages in a batch (default=100, use 0 for no limits) (default: 100)
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,9 @@ type Config struct {
|
||||||
// Ancient is the directory to store the state in
|
// Ancient is the directory to store the state in
|
||||||
Ancient string `hcl:"ancient,optional" toml:"ancient,optional"`
|
Ancient string `hcl:"ancient,optional" toml:"ancient,optional"`
|
||||||
|
|
||||||
|
// DBEngine is used to select leveldb or pebble as database
|
||||||
|
DBEngine string `hcl:"dbengine,optional" toml:"dbengine,optional"`
|
||||||
|
|
||||||
// KeyStoreDir is the directory to store keystores
|
// KeyStoreDir is the directory to store keystores
|
||||||
KeyStoreDir string `hcl:"keystore,optional" toml:"keystore,optional"`
|
KeyStoreDir string `hcl:"keystore,optional" toml:"keystore,optional"`
|
||||||
|
|
||||||
|
|
@ -592,6 +595,7 @@ func DefaultConfig() *Config {
|
||||||
EnablePreimageRecording: false,
|
EnablePreimageRecording: false,
|
||||||
DataDir: DefaultDataDir(),
|
DataDir: DefaultDataDir(),
|
||||||
Ancient: "",
|
Ancient: "",
|
||||||
|
DBEngine: "leveldb",
|
||||||
Logging: &LoggingConfig{
|
Logging: &LoggingConfig{
|
||||||
Vmodule: "",
|
Vmodule: "",
|
||||||
Json: false,
|
Json: false,
|
||||||
|
|
@ -1278,6 +1282,7 @@ func (c *Config) buildNode() (*node.Config, error) {
|
||||||
cfg := &node.Config{
|
cfg := &node.Config{
|
||||||
Name: clientIdentifier,
|
Name: clientIdentifier,
|
||||||
DataDir: c.DataDir,
|
DataDir: c.DataDir,
|
||||||
|
DBEngine: c.DBEngine,
|
||||||
KeyStoreDir: c.KeyStoreDir,
|
KeyStoreDir: c.KeyStoreDir,
|
||||||
UseLightweightKDF: c.Accounts.UseLightweightKDF,
|
UseLightweightKDF: c.Accounts.UseLightweightKDF,
|
||||||
InsecureUnlockAllowed: c.Accounts.AllowInsecureUnlock,
|
InsecureUnlockAllowed: c.Accounts.AllowInsecureUnlock,
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,12 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Value: &c.cliConfig.Ancient,
|
Value: &c.cliConfig.Ancient,
|
||||||
Default: c.cliConfig.Ancient,
|
Default: c.cliConfig.Ancient,
|
||||||
})
|
})
|
||||||
|
f.StringFlag(&flagset.StringFlag{
|
||||||
|
Name: "db.engine",
|
||||||
|
Usage: "Backing database implementation to use ('leveldb' or 'pebble')",
|
||||||
|
Value: &c.cliConfig.DBEngine,
|
||||||
|
Default: c.cliConfig.DBEngine,
|
||||||
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "keystore",
|
Name: "keystore",
|
||||||
Usage: "Path of the directory where keystores are located",
|
Usage: "Path of the directory where keystores are located",
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ chain = "mainnet"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = ""
|
# keystore = ""
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ chain = "mainnet"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = ""
|
# keystore = ""
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ chain = "mainnet"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = "$BOR_DIR/keystore"
|
# keystore = "$BOR_DIR/keystore"
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ chain = "mainnet"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = "$BOR_DIR/keystore"
|
# keystore = "$BOR_DIR/keystore"
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ chain = "mumbai"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = ""
|
# keystore = ""
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ chain = "mumbai"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = ""
|
# keystore = ""
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ chain = "mumbai"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = "$BOR_DIR/keystore"
|
# keystore = "$BOR_DIR/keystore"
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ chain = "mumbai"
|
||||||
# vmdebug = false
|
# vmdebug = false
|
||||||
datadir = "/var/lib/bor/data"
|
datadir = "/var/lib/bor/data"
|
||||||
# ancient = ""
|
# ancient = ""
|
||||||
|
# db.engine = "leveldb"
|
||||||
# keystore = "$BOR_DIR/keystore"
|
# keystore = "$BOR_DIR/keystore"
|
||||||
# "rpc.batchlimit" = 100
|
# "rpc.batchlimit" = 100
|
||||||
# "rpc.returndatalimit" = 100000
|
# "rpc.returndatalimit" = 100000
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue