Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2070 from ethcore/config-files
Browse files Browse the repository at this point in the history
Config files
  • Loading branch information
rphmeier authored Sep 14, 2016
2 parents 77a3bf1 + 27d30fc commit c8533a3
Show file tree
Hide file tree
Showing 13 changed files with 1,208 additions and 256 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ansi_term = "0.7"
lazy_static = "0.2"
regex = "0.1"
isatty = "0.1"
toml = "0.2"
ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" }
fdlimit = { path = "util/fdlimit" }
ethcore = { path = "ethcore" }
Expand Down
2 changes: 1 addition & 1 deletion parity/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn execute_export(cmd: ExportBlockchain) -> Result<String, String> {
// Setup panic handler
let panic_handler = PanicHandler::new_in_arc();

let format = cmd.format.unwrap_or_else(Default::default);
let format = cmd.format.unwrap_or_default();

// load spec file
let spec = try!(cmd.spec.spec());
Expand Down
98 changes: 98 additions & 0 deletions parity/cli/config.full.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
[parity]
mode = "active"
mode_timeout = 300
mode_alarm = 3600
chain = "homestead"
db_path = "$HOME/.parity"
keys_path = "$HOME/.parity/keys"
identity = ""

[account]
unlock = ["0xdeadbeefcafe0000000000000000000000000000"]
password = ["~/.safe/password.file"]
keys_iterations = 10240

[signer]
force = false
disable = false
port = 8180
interface = "127.0.0.1"
path = "$HOME/.parity/signer"

[network]
disable = false
port = 30303
min_peers = 25
max_peers = 50
nat = "any"
id = "0x1"
bootnodes = []
discovery = true

reserved_only = false
reserved_peers = "./path_to_file"

[rpc]
disable = false
port = 8545
interface = "local"
cors = "null"
apis = ["web3", "eth", "net", "personal", "ethcore", "traces", "rpc"]
hosts = ["none"]

[ipc]
disable = false
path = "$HOME/.parity/jsonrpc.ipc"
apis = ["web3", "eth", "net", "personal", "ethcore", "traces", "rpc"]

[dapps]
disable = false
port = 8080
interface = "local"
hosts = ["none"]
path = "$HOME/.parity/dapps"
# authorization:
user = "test_user"
pass = "test_pass"

[mining]
author = "0xdeadbeefcafe0000000000000000000000000001"
force_sealing = true
reseal_on_txs = "all"
reseal_min_period = 4000
work_queue_size = 20
relay_set = "cheap"
usd_per_tx = "0"
usd_per_eth = "auto"
price_update_period = "hourly"
gas_floor_target = "4700000"
gas_cap = "6283184"
tx_queue_size = 1024
tx_gas_limit = "6283184"
extra_data = "Parity"
remove_solved = false
notify_work = ["http://localhost:3001"]

[footprint]
tracing = "auto"
pruning = "auto"
cache_size_db = 64
cache_size_blocks = 8
cache_size_queue = 50
cache_size = 128 # Overrides above caches with total size
fast_and_loose = false
db_compaction = "ssd"
fat_db = false

[snapshots]
disable_periodic = false

[vm]
jit = false

[misc]
logging = "own_tx=trace"
log_file = "/var/log/parity.log"
color = true


2 changes: 2 additions & 0 deletions parity/cli/config.invalid1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[account
unlock = "0x1"
4 changes: 4 additions & 0 deletions parity/cli/config.invalid2.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[account]
unlock = "0x1"
passwd = []

63 changes: 63 additions & 0 deletions parity/cli/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[parity]
mode = "dark"
mode_timeout = 15
mode_alarm = 10
chain = "./chain.json"

[account]
unlock = ["0x1", "0x2", "0x3"]
password = ["passwdfile path"]

[signer]
disable = true

[network]
disable = false
discovery = true
nat = "any"
min_peers = 10
max_peers = 20

reserved_only = true
reserved_peers = "./path/to/reserved_peers"


[rpc]
disable = true
port = 8180

[ipc]
apis = ["rpc", "eth"]

[dapps]
port = 8080
user = "username"
pass = "password"

[mining]
author = "0xdeadbeefcafe0000000000000000000000000001"
force_sealing = true
reseal_on_txs = "all"
reseal_min_period = 4000
price_update_period = "hourly"
tx_queue_size = 2048

[footprint]
tracing = "on"
pruning = "fast"
cache_size_db = 128
cache_size_blocks = 16
cache_size_queue = 100
db_compaction = "ssd"
fat_db = true

[snapshots]
disable_periodic = true

[vm]
jit = false

[misc]
logging = "own_tx=trace"
log_file = "/var/log/parity.log"
color = true
Loading

0 comments on commit c8533a3

Please sign in to comment.