mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Merge pull request #614 from maticnetwork/ancient-datadir
Added ancient datadir flag and toml field
This commit is contained in:
commit
dd64fa160c
12 changed files with 24 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ chain = "mainnet"
|
|||
# identity = "Pratiks-MacBook-Pro.local"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = "/var/lib/bor/keystore"
|
||||
syncmode = "full"
|
||||
# gcmode = "full"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ chain = "mainnet" # Name of the chain to sync ("mumbai", "mainnet") o
|
|||
identity = "Annon-Identity" # Name/Identity of the node (default = OS hostname)
|
||||
log-level = "INFO" # Set log level for the server
|
||||
datadir = "var/lib/bor" # Path of the data directory to store information
|
||||
ancient = "" # Data directory for ancient chain segments (default = inside chaindata)
|
||||
keystore = "" # Path of the directory where keystores are located
|
||||
syncmode = "full" # Blockchain sync mode (only "full" sync supported)
|
||||
gcmode = "full" # Blockchain garbage collection mode ("full", "archive")
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ type Config struct {
|
|||
// DataDir is the directory to store the state in
|
||||
DataDir string `hcl:"datadir,optional" toml:"datadir,optional"`
|
||||
|
||||
// Ancient is the directory to store the state in
|
||||
Ancient string `hcl:"ancient,optional" toml:"ancient,optional"`
|
||||
|
||||
// KeyStoreDir is the directory to store keystores
|
||||
KeyStoreDir string `hcl:"keystore,optional" toml:"keystore,optional"`
|
||||
|
||||
|
|
@ -398,6 +401,7 @@ func DefaultConfig() *Config {
|
|||
RequiredBlocks: map[string]string{},
|
||||
LogLevel: "INFO",
|
||||
DataDir: DefaultDataDir(),
|
||||
Ancient: "",
|
||||
P2P: &P2PConfig{
|
||||
MaxPeers: 50,
|
||||
MaxPendPeers: 50,
|
||||
|
|
@ -879,6 +883,10 @@ func (c *Config) buildEth(stack *node.Node, accountManager *accounts.Manager) (*
|
|||
n.BorLogs = c.BorLogs
|
||||
n.DatabaseHandles = dbHandles
|
||||
|
||||
if c.Ancient != "" {
|
||||
n.DatabaseFreezer = c.Ancient
|
||||
}
|
||||
|
||||
return &n, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ func (c *Command) Flags() *flagset.Flagset {
|
|||
Value: &c.cliConfig.DataDir,
|
||||
Default: c.cliConfig.DataDir,
|
||||
})
|
||||
f.StringFlag(&flagset.StringFlag{
|
||||
Name: "datadir.ancient",
|
||||
Usage: "Data directory for ancient chain segments (default = inside chaindata)",
|
||||
Value: &c.cliConfig.Ancient,
|
||||
Default: c.cliConfig.Ancient,
|
||||
})
|
||||
f.StringFlag(&flagset.StringFlag{
|
||||
Name: "keystore",
|
||||
Usage: "Path of the directory where keystores are located",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ chain = "mainnet"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = ""
|
||||
syncmode = "full"
|
||||
gcmode = "archive"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ chain = "mainnet"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = ""
|
||||
syncmode = "full"
|
||||
# gcmode = "full"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ chain = "mainnet"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = "$BOR_DIR/keystore"
|
||||
syncmode = "full"
|
||||
# gcmode = "full"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ chain = "mainnet"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = "$BOR_DIR/keystore"
|
||||
syncmode = "full"
|
||||
# gcmode = "full"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ chain = "mumbai"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = ""
|
||||
syncmode = "full"
|
||||
gcmode = "archive"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ chain = "mumbai"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = ""
|
||||
syncmode = "full"
|
||||
# gcmode = "full"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ chain = "mumbai"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = "$BOR_DIR/keystore"
|
||||
syncmode = "full"
|
||||
# gcmode = "full"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ chain = "mumbai"
|
|||
# identity = "node_name"
|
||||
# log-level = "INFO"
|
||||
datadir = "/var/lib/bor/data"
|
||||
# ancient = ""
|
||||
# keystore = "$BOR_DIR/keystore"
|
||||
syncmode = "full"
|
||||
# gcmode = "full"
|
||||
|
|
|
|||
Loading…
Reference in a new issue