Remove IPFS integration (#11532)

This commit is contained in:
Artem Vorotnikov
2020-08-17 13:47:53 +03:00
parent defd24c40e
commit 32ea4d69a3
28 changed files with 15 additions and 999 deletions

View File

@@ -269,7 +269,7 @@ usage! {
["Convenience Options"]
FLAG flag_unsafe_expose: (bool) = false, or |c: &Config| c.misc.as_ref()?.unsafe_expose,
"--unsafe-expose",
"All servers will listen on external interfaces and will be remotely accessible. It's equivalent with setting the following: --[ws,jsonrpc,ipfs-api,secretstore,stratum,secretstore-http]-interface=all --*-hosts=all This option is UNSAFE and should be used with great care!",
"All servers will listen on external interfaces and will be remotely accessible. It's equivalent with setting the following: --[ws,jsonrpc,secretstore,stratum,secretstore-http]-interface=all --*-hosts=all This option is UNSAFE and should be used with great care!",
ARG arg_config: (String) = "$BASE/config.toml", or |_| None,
"-c, --config=[CONFIG]",
@@ -277,7 +277,7 @@ usage! {
ARG arg_ports_shift: (u16) = 0u16, or |c: &Config| c.misc.as_ref()?.ports_shift,
"--ports-shift=[SHIFT]",
"Add SHIFT to all port numbers Parity is listening on. Includes network port and all servers (HTTP JSON-RPC, WebSockets JSON-RPC, IPFS, SecretStore).",
"Add SHIFT to all port numbers Parity is listening on. Includes network port and all servers (HTTP JSON-RPC, WebSockets JSON-RPC, SecretStore).",
["Account Options"]
FLAG flag_fast_unlock: (bool) = false, or |c: &Config| c.account.as_ref()?.fast_unlock.clone(),
@@ -508,27 +508,6 @@ usage! {
"--ipc-apis=[APIS]",
"Specify custom API set available via JSON-RPC over IPC using a comma-delimited list of API names. Possible names are: all, safe, web3, net, eth, pubsub, personal, signer, parity, parity_pubsub, parity_accounts, parity_set, traces, secretstore. You can also disable a specific API by putting '-' in the front, example: all,-personal. 'safe' enables the following APIs: web3, net, eth, pubsub, parity, parity_pubsub, traces",
["API and Console Options IPFS"]
FLAG flag_ipfs_api: (bool) = false, or |c: &Config| c.ipfs.as_ref()?.enable.clone(),
"--ipfs-api",
"Enable IPFS-compatible HTTP API.",
ARG arg_ipfs_api_port: (u16) = 5001u16, or |c: &Config| c.ipfs.as_ref()?.port.clone(),
"--ipfs-api-port=[PORT]",
"Configure on which port the IPFS HTTP API should listen.",
ARG arg_ipfs_api_interface: (String) = "local", or |c: &Config| c.ipfs.as_ref()?.interface.clone(),
"--ipfs-api-interface=[IP]",
"Specify the hostname portion of the IPFS API server, IP should be an interface's IP address or local.",
ARG arg_ipfs_api_hosts: (String) = "none", or |c: &Config| c.ipfs.as_ref()?.hosts.as_ref().map(|vec| vec.join(",")),
"--ipfs-api-hosts=[HOSTS]",
"List of allowed Host header values. This option will validate the Host header sent by the browser, it is additional security against some attack vectors. Special options: \"all\", \"none\".",
ARG arg_ipfs_api_cors: (String) = "none", or |c: &Config| c.ipfs.as_ref()?.cors.as_ref().map(|vec| vec.join(",")),
"--ipfs-api-cors=[URL]",
"Specify CORS header for IPFS API responses. Special options: \"all\", \"none\".",
["Secret Store Options"]
FLAG flag_no_secretstore: (bool) = false, or |c: &Config| c.secretstore.as_ref()?.disable.clone(),
"--no-secretstore",
@@ -854,7 +833,6 @@ struct Config {
ipc: Option<Ipc>,
secretstore: Option<SecretStore>,
private_tx: Option<PrivateTransactions>,
ipfs: Option<Ipfs>,
mining: Option<Mining>,
footprint: Option<Footprint>,
snapshots: Option<Snapshots>,
@@ -986,16 +964,6 @@ struct SecretStore {
path: Option<String>,
}
#[derive(Default, Debug, PartialEq, Deserialize)]
#[serde(deny_unknown_fields)]
struct Ipfs {
enable: Option<bool>,
port: Option<u16>,
interface: Option<String>,
cors: Option<Vec<String>>,
hosts: Option<Vec<String>>,
}
#[derive(Default, Debug, PartialEq, Deserialize)]
#[serde(deny_unknown_fields)]
struct Mining {
@@ -1081,8 +1049,8 @@ struct Misc {
#[cfg(test)]
mod tests {
use super::{
Account, Args, ArgsError, Config, Footprint, Ipc, Ipfs, Mining, Misc, Network, Operating,
Rpc, SecretStore, Snapshots, Ws,
Account, Args, ArgsError, Config, Footprint, Ipc, Mining, Misc, Network, Operating, Rpc,
SecretStore, Snapshots, Ws,
};
use clap::ErrorKind as ClapErrorKind;
use toml;
@@ -1410,13 +1378,6 @@ mod tests {
arg_secretstore_http_port: 8082u16,
arg_secretstore_path: "$HOME/.parity/secretstore".into(),
// IPFS
flag_ipfs_api: false,
arg_ipfs_api_port: 5001u16,
arg_ipfs_api_interface: "local".into(),
arg_ipfs_api_cors: "null".into(),
arg_ipfs_api_hosts: "none".into(),
// -- Sealing/Mining Options
arg_author: Some("0xdeadbeefcafe0000000000000000000000000001".into()),
arg_engine_signer: Some("0xdeadbeefcafe0000000000000000000000000001".into()),
@@ -1616,13 +1577,6 @@ mod tests {
path: None,
}),
private_tx: None,
ipfs: Some(Ipfs {
enable: Some(false),
port: Some(5001),
interface: None,
cors: None,
hosts: None,
}),
mining: Some(Mining {
author: Some("0xdeadbeefcafe0000000000000000000000000001".into()),
engine_signer: Some("0xdeadbeefcafe0000000000000000000000000001".into()),

View File

@@ -9,7 +9,3 @@ min_gas_price = 0
interface = "all"
apis = ["all"]
hosts = ["all"]
[ipfs]
enable = false # this is the default
hosts = ["all"]

View File

@@ -2,7 +2,3 @@
interface = "all"
apis = ["all"]
hosts = ["all"]
[ipfs]
enable = false # this is the default
hosts = ["all"]

View File

@@ -82,13 +82,6 @@ interface = "local"
port = 8083
path = "$HOME/.parity/secretstore"
[ipfs]
enable = false
port = 5001
interface = "local"
cors = ["null"]
hosts = ["none"]
[mining]
author = "0xdeadbeefcafe0000000000000000000000000001"
engine_signer = "0xdeadbeefcafe0000000000000000000000000001"

View File

@@ -36,10 +36,6 @@ apis = ["rpc", "eth"]
http_port = 8082
port = 8083
[ipfs]
enable = false
port = 5001
[mining]
author = "0xdeadbeefcafe0000000000000000000000000001"
engine_signer = "0xdeadbeefcafe0000000000000000000000000001"