Merge remote-tracking branch 'parity/master' into bft
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[parity]
|
||||
mode = "active"
|
||||
mode = "last"
|
||||
mode_timeout = 300
|
||||
mode_alarm = 3600
|
||||
chain = "homestead"
|
||||
@@ -12,7 +12,7 @@ unlock = ["0xdeadbeefcafe0000000000000000000000000000"]
|
||||
password = ["~/.safe/password.file"]
|
||||
keys_iterations = 10240
|
||||
|
||||
[signer]
|
||||
[ui]
|
||||
force = false
|
||||
disable = false
|
||||
port = 8180
|
||||
@@ -25,7 +25,7 @@ port = 30303
|
||||
min_peers = 25
|
||||
max_peers = 50
|
||||
nat = "any"
|
||||
id = "0x1"
|
||||
id = 1
|
||||
bootnodes = []
|
||||
discovery = true
|
||||
warp = true
|
||||
@@ -41,13 +41,13 @@ disable = false
|
||||
port = 8545
|
||||
interface = "local"
|
||||
cors = "null"
|
||||
apis = ["web3", "eth", "net", "ethcore", "traces", "rpc", "personal_safe"]
|
||||
apis = ["web3", "eth", "net", "parity", "traces", "rpc"]
|
||||
hosts = ["none"]
|
||||
|
||||
[ipc]
|
||||
disable = false
|
||||
path = "$HOME/.parity/jsonrpc.ipc"
|
||||
apis = ["web3", "eth", "net", "ethcore", "traces", "rpc", "personal_safe"]
|
||||
apis = ["web3", "eth", "net", "parity", "parity_accounts", "personal", "traces", "rpc"]
|
||||
|
||||
[dapps]
|
||||
disable = false
|
||||
|
||||
@@ -8,7 +8,7 @@ chain = "./chain.json"
|
||||
unlock = ["0x1", "0x2", "0x3"]
|
||||
password = ["passwdfile path"]
|
||||
|
||||
[signer]
|
||||
[ui]
|
||||
disable = true
|
||||
|
||||
[network]
|
||||
|
||||
@@ -46,7 +46,7 @@ usage! {
|
||||
flag_testnet: bool,
|
||||
flag_import_geth_keys: bool,
|
||||
flag_datadir: Option<String>,
|
||||
flag_networkid: Option<String>,
|
||||
flag_networkid: Option<usize>,
|
||||
flag_peers: Option<u16>,
|
||||
flag_nodekey: Option<String>,
|
||||
flag_nodiscover: bool,
|
||||
@@ -74,7 +74,7 @@ usage! {
|
||||
}
|
||||
{
|
||||
// -- Operating Options
|
||||
flag_mode: String = "active", or |c: &Config| otry!(c.parity).mode.clone(),
|
||||
flag_mode: String = "last", or |c: &Config| otry!(c.parity).mode.clone(),
|
||||
flag_mode_timeout: u64 = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(),
|
||||
flag_mode_alarm: u64 = 3600u64, or |c: &Config| otry!(c.parity).mode_alarm.clone(),
|
||||
flag_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(),
|
||||
@@ -90,22 +90,20 @@ usage! {
|
||||
flag_keys_iterations: u32 = 10240u32,
|
||||
or |c: &Config| otry!(c.account).keys_iterations.clone(),
|
||||
|
||||
flag_force_signer: bool = false,
|
||||
or |c: &Config| otry!(c.signer).force.clone(),
|
||||
flag_no_signer: bool = false,
|
||||
or |c: &Config| otry!(c.signer).disable.clone(),
|
||||
flag_signer_port: u16 = 8180u16,
|
||||
or |c: &Config| otry!(c.signer).port.clone(),
|
||||
flag_signer_interface: String = "local",
|
||||
or |c: &Config| otry!(c.signer).interface.clone(),
|
||||
flag_signer_path: String = "$HOME/.parity/signer",
|
||||
or |c: &Config| otry!(c.signer).path.clone(),
|
||||
flag_force_ui: bool = false,
|
||||
or |c: &Config| otry!(c.ui).force.clone(),
|
||||
flag_no_ui: bool = false,
|
||||
or |c: &Config| otry!(c.ui).disable.clone(),
|
||||
flag_ui_port: u16 = 8180u16,
|
||||
or |c: &Config| otry!(c.ui).port.clone(),
|
||||
flag_ui_interface: String = "local",
|
||||
or |c: &Config| otry!(c.ui).interface.clone(),
|
||||
flag_ui_path: String = "$HOME/.parity/signer",
|
||||
or |c: &Config| otry!(c.ui).path.clone(),
|
||||
// NOTE [todr] For security reasons don't put this to config files
|
||||
flag_signer_no_validation: bool = false, or |_| None,
|
||||
flag_ui_no_validation: bool = false, or |_| None,
|
||||
|
||||
// -- Networking Options
|
||||
flag_no_network: bool = false,
|
||||
or |c: &Config| otry!(c.network).disable.clone(),
|
||||
flag_warp: bool = false,
|
||||
or |c: &Config| otry!(c.network).warp.clone(),
|
||||
flag_port: u16 = 30303u16,
|
||||
@@ -122,7 +120,7 @@ usage! {
|
||||
or |c: &Config| otry!(c.network).nat.clone(),
|
||||
flag_allow_ips: String = "all",
|
||||
or |c: &Config| otry!(c.network).allow_ips.clone(),
|
||||
flag_network_id: Option<String> = None,
|
||||
flag_network_id: Option<usize> = None,
|
||||
or |c: &Config| otry!(c.network).id.clone().map(Some),
|
||||
flag_bootnodes: Option<String> = None,
|
||||
or |c: &Config| otry!(c.network).bootnodes.clone().map(|vec| Some(vec.join(","))),
|
||||
@@ -145,7 +143,7 @@ usage! {
|
||||
or |c: &Config| otry!(c.rpc).interface.clone(),
|
||||
flag_jsonrpc_cors: Option<String> = None,
|
||||
or |c: &Config| otry!(c.rpc).cors.clone().map(Some),
|
||||
flag_jsonrpc_apis: String = "web3,eth,net,ethcore,traces,rpc,personal_safe",
|
||||
flag_jsonrpc_apis: String = "web3,eth,net,parity,traces,rpc",
|
||||
or |c: &Config| otry!(c.rpc).apis.clone().map(|vec| vec.join(",")),
|
||||
flag_jsonrpc_hosts: String = "none",
|
||||
or |c: &Config| otry!(c.rpc).hosts.clone().map(|vec| vec.join(",")),
|
||||
@@ -155,7 +153,7 @@ usage! {
|
||||
or |c: &Config| otry!(c.ipc).disable.clone(),
|
||||
flag_ipc_path: String = "$HOME/.parity/jsonrpc.ipc",
|
||||
or |c: &Config| otry!(c.ipc).path.clone(),
|
||||
flag_ipc_apis: String = "web3,eth,net,ethcore,traces,rpc,personal_safe",
|
||||
flag_ipc_apis: String = "web3,eth,net,parity,parity_accounts,traces,rpc",
|
||||
or |c: &Config| otry!(c.ipc).apis.clone().map(|vec| vec.join(",")),
|
||||
|
||||
// DAPPS
|
||||
@@ -273,7 +271,7 @@ usage! {
|
||||
struct Config {
|
||||
parity: Option<Operating>,
|
||||
account: Option<Account>,
|
||||
signer: Option<Signer>,
|
||||
ui: Option<Ui>,
|
||||
network: Option<Network>,
|
||||
rpc: Option<Rpc>,
|
||||
ipc: Option<Ipc>,
|
||||
@@ -304,7 +302,7 @@ struct Account {
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, PartialEq, RustcDecodable)]
|
||||
struct Signer {
|
||||
struct Ui {
|
||||
force: Option<bool>,
|
||||
disable: Option<bool>,
|
||||
port: Option<u16>,
|
||||
@@ -323,7 +321,7 @@ struct Network {
|
||||
max_pending_peers: Option<u16>,
|
||||
nat: Option<String>,
|
||||
allow_ips: Option<String>,
|
||||
id: Option<String>,
|
||||
id: Option<usize>,
|
||||
bootnodes: Option<Vec<String>>,
|
||||
discovery: Option<bool>,
|
||||
node_key: Option<String>,
|
||||
@@ -420,7 +418,7 @@ struct Misc {
|
||||
mod tests {
|
||||
use super::{
|
||||
Args, ArgsError,
|
||||
Config, Operating, Account, Signer, Network, Rpc, Ipc, Dapps, Mining, Footprint, Snapshots, VM, Misc
|
||||
Config, Operating, Account, Ui, Network, Rpc, Ipc, Dapps, Mining, Footprint, Snapshots, VM, Misc
|
||||
};
|
||||
use toml;
|
||||
|
||||
@@ -500,7 +498,7 @@ mod tests {
|
||||
arg_path: vec![],
|
||||
|
||||
// -- Operating Options
|
||||
flag_mode: "active".into(),
|
||||
flag_mode: "last".into(),
|
||||
flag_mode_timeout: 300u64,
|
||||
flag_mode_alarm: 3600u64,
|
||||
flag_chain: "xyz".into(),
|
||||
@@ -513,15 +511,14 @@ mod tests {
|
||||
flag_password: vec!["~/.safe/password.file".into()],
|
||||
flag_keys_iterations: 10240u32,
|
||||
|
||||
flag_force_signer: false,
|
||||
flag_no_signer: false,
|
||||
flag_signer_port: 8180u16,
|
||||
flag_signer_interface: "127.0.0.1".into(),
|
||||
flag_signer_path: "$HOME/.parity/signer".into(),
|
||||
flag_signer_no_validation: false,
|
||||
flag_force_ui: false,
|
||||
flag_no_ui: false,
|
||||
flag_ui_port: 8180u16,
|
||||
flag_ui_interface: "127.0.0.1".into(),
|
||||
flag_ui_path: "$HOME/.parity/signer".into(),
|
||||
flag_ui_no_validation: false,
|
||||
|
||||
// -- Networking Options
|
||||
flag_no_network: false,
|
||||
flag_warp: true,
|
||||
flag_port: 30303u16,
|
||||
flag_min_peers: 25u16,
|
||||
@@ -530,7 +527,7 @@ mod tests {
|
||||
flag_snapshot_peers: 0u16,
|
||||
flag_allow_ips: "all".into(),
|
||||
flag_nat: "any".into(),
|
||||
flag_network_id: Some("0x1".into()),
|
||||
flag_network_id: Some(1),
|
||||
flag_bootnodes: Some("".into()),
|
||||
flag_no_discovery: false,
|
||||
flag_node_key: None,
|
||||
@@ -543,13 +540,13 @@ mod tests {
|
||||
flag_jsonrpc_port: 8545u16,
|
||||
flag_jsonrpc_interface: "local".into(),
|
||||
flag_jsonrpc_cors: Some("null".into()),
|
||||
flag_jsonrpc_apis: "web3,eth,net,ethcore,traces,rpc,personal_safe".into(),
|
||||
flag_jsonrpc_apis: "web3,eth,net,parity,traces,rpc".into(),
|
||||
flag_jsonrpc_hosts: "none".into(),
|
||||
|
||||
// IPC
|
||||
flag_no_ipc: false,
|
||||
flag_ipc_path: "$HOME/.parity/jsonrpc.ipc".into(),
|
||||
flag_ipc_apis: "web3,eth,net,ethcore,traces,rpc,personal_safe".into(),
|
||||
flag_ipc_apis: "web3,eth,net,parity,parity_accounts,personal,traces,rpc".into(),
|
||||
|
||||
// DAPPS
|
||||
flag_no_dapps: false,
|
||||
@@ -683,7 +680,7 @@ mod tests {
|
||||
password: Some(vec!["passwdfile path".into()]),
|
||||
keys_iterations: None,
|
||||
}),
|
||||
signer: Some(Signer {
|
||||
ui: Some(Ui {
|
||||
force: None,
|
||||
disable: Some(true),
|
||||
port: None,
|
||||
|
||||
@@ -18,11 +18,12 @@ Usage:
|
||||
|
||||
Operating Options:
|
||||
--mode MODE Set the operating mode. MODE can be one of:
|
||||
last - Uses the last-used mode, active if none.
|
||||
active - Parity continuously syncs the chain.
|
||||
passive - Parity syncs initially, then sleeps and
|
||||
wakes regularly to resync.
|
||||
dark - Parity syncs only when an external interface
|
||||
is active. (default: {flag_mode}).
|
||||
dark - Parity syncs only when the RPC is active.
|
||||
offline - Parity doesn't sync. (default: {flag_mode}).
|
||||
--mode-timeout SECS Specify the number of seconds before inactivity
|
||||
timeout occurs when mode is dark or passive
|
||||
(default: {flag_mode_timeout}).
|
||||
@@ -31,8 +32,8 @@ Operating Options:
|
||||
(default: {flag_mode_alarm}).
|
||||
--chain CHAIN Specify the blockchain type. CHAIN may be either a
|
||||
JSON chain specification file or olympic, frontier,
|
||||
homestead, mainnet, morden, classic, expanse or
|
||||
testnet (default: {flag_chain}).
|
||||
homestead, mainnet, morden, classic, expanse,
|
||||
testnet or dev (default: {flag_chain}).
|
||||
-d --db-path PATH Specify the database & configuration directory path
|
||||
(default: {flag_db_path}).
|
||||
--keys-path PATH Specify the path for JSON key files to be found
|
||||
@@ -42,31 +43,31 @@ Operating Options:
|
||||
Account Options:
|
||||
--unlock ACCOUNTS Unlock ACCOUNTS for the duration of the execution.
|
||||
ACCOUNTS is a comma-delimited list of addresses.
|
||||
Implies --no-signer. (default: {flag_unlock:?})
|
||||
Implies --no-ui. (default: {flag_unlock:?})
|
||||
--password FILE Provide a file containing a password for unlocking
|
||||
an account. Leading and trailing whitespace is trimmed.
|
||||
(default: {flag_password:?})
|
||||
--keys-iterations NUM Specify the number of iterations to use when
|
||||
deriving key from the password (bigger is more
|
||||
secure) (default: {flag_keys_iterations}).
|
||||
--force-signer Enable Trusted Signer WebSocket endpoint used by
|
||||
Signer UIs, even when --unlock is in use.
|
||||
(default: ${flag_force_signer})
|
||||
--no-signer Disable Trusted Signer WebSocket endpoint used by
|
||||
Signer UIs. (default: ${flag_no_signer})
|
||||
--signer-port PORT Specify the port of Trusted Signer server
|
||||
(default: {flag_signer_port}).
|
||||
--signer-interface IP Specify the hostname portion of the Trusted Signer
|
||||
|
||||
UI Options:
|
||||
--force-ui Enable Trusted UI WebSocket endpoint,
|
||||
even when --unlock is in use. (default: ${flag_force_ui})
|
||||
--no-ui Disable Trusted UI WebSocket endpoint.
|
||||
(default: ${flag_no_ui})
|
||||
--ui-port PORT Specify the port of Trusted UI server
|
||||
(default: {flag_ui_port}).
|
||||
--ui-interface IP Specify the hostname portion of the Trusted UI
|
||||
server, IP should be an interface's IP address,
|
||||
or local (default: {flag_signer_interface}).
|
||||
--signer-path PATH Specify directory where Signer UIs tokens should
|
||||
be stored. (default: {flag_signer_path})
|
||||
--signer-no-validation Disable Origin and Host headers validation for
|
||||
Trusted Signer. WARNING: INSECURE. Used only for
|
||||
development. (default: {flag_signer_no_validation})
|
||||
or local (default: {flag_ui_interface}).
|
||||
--ui-path PATH Specify directory where Trusted UIs tokens should
|
||||
be stored. (default: {flag_ui_path})
|
||||
--ui-no-validation Disable Origin and Host headers validation for
|
||||
Trusted UI. WARNING: INSECURE. Used only for
|
||||
development. (default: {flag_ui_no_validation})
|
||||
|
||||
Networking Options:
|
||||
--no-network Disable p2p networking. (default: {flag_no_network})
|
||||
--warp Enable syncing from the snapshot over the network. (default: {flag_warp})
|
||||
--port PORT Override the port on which the node should listen
|
||||
(default: {flag_port}).
|
||||
@@ -107,7 +108,7 @@ API and Console Options:
|
||||
--jsonrpc-apis APIS Specify the APIs available through the JSONRPC
|
||||
interface. APIS is a comma-delimited list of API
|
||||
name. Possible name are web3, eth, net, personal,
|
||||
ethcore, ethcore_set, traces, rpc, personal_safe.
|
||||
parity, parity_set, traces, rpc, parity_accounts.
|
||||
(default: {flag_jsonrpc_apis}).
|
||||
--jsonrpc-hosts HOSTS List of allowed Host header values. This option will
|
||||
validate the Host header sent by the browser, it
|
||||
@@ -284,7 +285,7 @@ Legacy Options:
|
||||
--geth Run in Geth-compatibility mode. Sets the IPC path
|
||||
to be the same as Geth's. Overrides the --ipc-path
|
||||
and --ipcpath options. Alters RPCs to reflect Geth
|
||||
bugs.
|
||||
bugs. Includes the personal_ RPC by default.
|
||||
--testnet Geth-compatible testnet mode. Equivalent to --chain
|
||||
testnet --keys-path $HOME/parity/testnet-keys.
|
||||
Overrides the --keys-path option.
|
||||
|
||||
@@ -5,5 +5,6 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
By Wood/Paronyan/Kotewicz/Drwięga/Volf.
|
||||
By Wood/Paronyan/Kotewicz/Drwięga/Volf
|
||||
Habermeier/Czaban/Greeff/Gotchac/Redmann
|
||||
|
||||
|
||||
Reference in New Issue
Block a user