From 4bb517ec94e3e98b742f454805dd2a59d1b6754c Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Fri, 5 Jul 2019 10:24:24 +0200 Subject: [PATCH] update jsonrpc to 12.0 (#10841) * update jsonrpc to 12.0 * use reexported ws error --- Cargo.lock | 245 ++++++++++++++----------- Cargo.toml | 2 +- cli-signer/rpc-client/Cargo.toml | 4 +- ipfs/Cargo.toml | 4 +- miner/stratum/Cargo.toml | 4 +- parity/configuration.rs | 1 - parity/rpc.rs | 6 +- rpc/Cargo.toml | 12 +- rpc/src/v1/traits/debug.rs | 2 +- rpc/src/v1/traits/eth.rs | 4 +- rpc/src/v1/traits/eth_pubsub.rs | 2 +- rpc/src/v1/traits/eth_signing.rs | 2 +- rpc/src/v1/traits/net.rs | 2 +- rpc/src/v1/traits/parity.rs | 2 +- rpc/src/v1/traits/parity_accounts.rs | 4 +- rpc/src/v1/traits/parity_set.rs | 4 +- rpc/src/v1/traits/parity_signing.rs | 2 +- rpc/src/v1/traits/personal.rs | 2 +- rpc/src/v1/traits/private.rs | 2 +- rpc/src/v1/traits/pubsub.rs | 2 +- rpc/src/v1/traits/rpc.rs | 2 +- rpc/src/v1/traits/secretstore.rs | 2 +- rpc/src/v1/traits/signer.rs | 2 +- rpc/src/v1/traits/traces.rs | 2 +- rpc/src/v1/traits/transactions_pool.rs | 2 +- rpc/src/v1/traits/web3.rs | 2 +- secret-store/Cargo.toml | 2 +- whisper/Cargo.toml | 6 +- whisper/cli/Cargo.toml | 6 +- whisper/src/lib.rs | 1 - whisper/src/rpc/mod.rs | 4 +- 31 files changed, 188 insertions(+), 151 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b58980f6b..17813ce1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1248,7 +1248,7 @@ dependencies = [ "ethkey 0.3.0", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1295,8 +1295,8 @@ version = "1.12.0" dependencies = [ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-tcp-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-tcp-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2011,19 +2011,7 @@ dependencies = [ [[package]] name = "jsonrpc-core" -version = "10.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "jsonrpc-core" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2035,9 +2023,10 @@ dependencies = [ [[package]] name = "jsonrpc-derive" -version = "10.0.2" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2045,65 +2034,50 @@ dependencies = [ [[package]] name = "jsonrpc-http-server" -version = "10.0.1" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ipc-server" -version = "10.0.1" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-tokio-ipc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-pubsub" -version = "10.0.1" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-server-utils" -version = "10.0.1" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "jsonrpc-server-utils" -version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2114,28 +2088,27 @@ dependencies = [ [[package]] name = "jsonrpc-tcp-server" -version = "10.0.1" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ws-server" -version = "10.0.1" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2265,6 +2238,14 @@ dependencies = [ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lock_api" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "log" version = "0.3.9" @@ -2733,7 +2714,7 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "ipnetwork 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)", "journaldb 0.2.0", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2804,8 +2785,8 @@ dependencies = [ "cid 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.12.0", "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "multihash 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2881,12 +2862,12 @@ dependencies = [ "fetch 0.1.0", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ipc-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ipc-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", @@ -2922,8 +2903,8 @@ version = "1.4.0" dependencies = [ "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3048,9 +3029,9 @@ dependencies = [ "ethereum-types 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "ordered-float 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3078,23 +3059,6 @@ dependencies = [ "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parity-ws" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parking_lot" version = "0.6.4" @@ -3113,6 +3077,16 @@ dependencies = [ "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot_core" version = "0.3.1" @@ -3140,6 +3114,21 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "patricia-trie-ethereum" version = "0.1.0" @@ -3339,6 +3328,14 @@ dependencies = [ "uint 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-crate" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro2" version = "0.4.20" @@ -3770,6 +3767,11 @@ name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scopeguard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "scrypt" version = "0.2.0" @@ -3834,13 +3836,19 @@ dependencies = [ ] [[package]] -name = "sha1" -version = "0.5.0" +name = "sha-1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "sha1" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -4376,6 +4384,14 @@ dependencies = [ "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "toml" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "toolshed" version = "0.4.0" @@ -4694,9 +4710,9 @@ dependencies = [ "ethcore-network 1.12.0", "ethcore-network-devp2p 1.12.0", "ethkey 0.3.0", - "jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "panic_hook 0.1.0", "parity-whisper 0.1.0", @@ -4751,6 +4767,23 @@ dependencies = [ "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ws" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -4946,16 +4979,14 @@ dependencies = [ "checksum jemallocator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9f0cd42ac65f758063fea55126b0148b1ce0a6354ff78e07a4d6806bc65c4ab3" "checksum jni 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "294eca097d1dc0bf59de5ab9f7eafa5f77129e9f6464c957ed3ddeb705fb4292" "checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -"checksum jsonrpc-core 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5152c3fda235dfd68341b3edf4121bc4428642c93acbd6de88c26bf95fc5d7" -"checksum jsonrpc-core 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97b83fdc5e0218128d0d270f2f2e7a5ea716f3240c8518a58bc89e6716ba8581" -"checksum jsonrpc-derive 10.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c14be84e86c75935be83a34c6765bf31f97ed6c9163bb0b83007190e9703940a" -"checksum jsonrpc-http-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99e1ce36c7cc9dcab398024d76849ab2cb917ee812653bce6f74fc9eb7c82d16" -"checksum jsonrpc-ipc-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fac6b8682243740a32bfb288880c71cc06eca29616cdf551e4136a190b11b96d" -"checksum jsonrpc-pubsub 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56608ed54b1b2a69f4357cb8bdfbcbd99fe1179383c03a09bb428931bd35f592" -"checksum jsonrpc-server-utils 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5521613b31ea22d36d9f95ad642058dccec846a94ed8690957652d479f620707" -"checksum jsonrpc-server-utils 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3372b3248a53abcca8f61924f188052bb0c4cd80b482b2b4eaf9f8667efb9f4" -"checksum jsonrpc-tcp-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c873dac37a601fb88d40ba49eeac3f1aa60953c06b2e99ddbf0569b6f8028478" -"checksum jsonrpc-ws-server 10.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20b8333a5a6e6ccbcf5c90f90919de557cba4929efa164e9bd0e8e497eb20e46" +"checksum jsonrpc-core 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "288dca7f9713710a29e485076b9340156cb701edb46a881f5d0c31aa4f5b9143" +"checksum jsonrpc-derive 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b65eafb36286a4251c9a1d4cdf4e9a7cf8fa4f7bf991383e42f0cf26908767" +"checksum jsonrpc-http-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea8b3996f19dc6dd90d928c81d30b3ce9535840487734290da9fae3b3185db5d" +"checksum jsonrpc-ipc-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4bb900fe0d41002499c338b6893132006d1d914b6ea724559af66b6de6df79b5" +"checksum jsonrpc-pubsub 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fcdd238ecccde73faea93760b068f3fe3ca84caeb6b5414c2aabd4f008dad418" +"checksum jsonrpc-server-utils 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "036a53ffa47533dcccf1e1bb16abb0f45ef9a2dc9a63654d2d2cd199b80ad33e" +"checksum jsonrpc-tcp-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ede8a327b567123038ca3dac22311923dc03602487de19c70b45d82760d31205" +"checksum jsonrpc-ws-server 12.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "977ea40f077c027553e4112d750114b9e5cc7bcf5642512838abc2a9b322bd23" "checksum keccak-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "69e8ee697b9aa6dcc34d7657565fa5052763a1627a5b59e4c3c0ae3ed0d70a65" "checksum keccak-hasher 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6c936c737d79690593c34275faf583151a0e8c0abf34eaecad10399eed0beb7d" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" @@ -4969,6 +5000,7 @@ dependencies = [ "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" "checksum local-encoding 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1ceb20f39ff7ae42f3ff9795f3986b1daad821caaa1e1732a0944103a5a1a66" "checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" +"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" @@ -5021,11 +5053,12 @@ dependencies = [ "checksum parity-util-mem 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "89e80f22052161e0cb55cb5a8a75890420c525031f95c9d262dbb0434aa85dc1" "checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc" "checksum parity-wordlist 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "573d08f0d3bc8a6ffcdac1de2725b5daeed8db26345a9c12d91648e2d6457f3e" -"checksum parity-ws 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2fec5048fba72a2e01baeb0d08089db79aead4b57e2443df172fb1840075a233" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" +"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc" @@ -5043,6 +5076,7 @@ dependencies = [ "checksum primal-estimate 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56ea4531dde757b56906493c8604641da14607bf9cdaa80fb9c9cabd2429f8d5" "checksum primal-sieve 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "da2d6ed369bb4b0273aeeb43f07c105c0117717cbae827b20719438eb2eb798c" "checksum primitive-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2288eb2a39386c4bc817974cc413afe173010dc80e470fcb1e9a35580869f024" +"checksum proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" "checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" "checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07" "checksum pwasm-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e9135bed7b452e20dbb395a2d519abaf0c46d60e7ecc02daeeab447d29bada1" @@ -5089,6 +5123,7 @@ dependencies = [ "checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum scrypt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "656c79d0e90d0ab28ac86bf3c3d10bfbbac91450d3f190113b4e76d9fec3cfdd" "checksum sct 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f5adf8fbd58e1b1b52699dc8bed2630faecb6d8c7bee77d009d6bbe4af569b9" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" @@ -5096,8 +5131,8 @@ dependencies = [ "checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" "checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" +"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" "checksum sha1 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "171698ce4ec7cbb93babeb3190021b4d72e96ccb98e33d277ae4ea959d6f2d9e" -"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" @@ -5154,6 +5189,7 @@ dependencies = [ "checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" "checksum tokio-uds 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22e3aa6d1fcc19e635418dc0a30ab5bd65d347973d6f43f1a37bf8d9d1335fc9" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" +"checksum toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8c96d7873fa7ef8bdeb3a9cda3ac48389b4154f32b9803b4bc26220b677b039" "checksum toolshed 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "450441e131c7663af72e63a33c02a6a1fbaaa8601dc652ed6757813bb55aeec7" "checksum trace-time 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe82f2f0bf1991e163e757baf044282823155dd326e70f44ce2186c3c320cc9" "checksum transaction-pool 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d8bd3123931aa6e49dd03bc8a2400490e14701d779458d1f1fff1f04c6f666" @@ -5195,6 +5231,7 @@ dependencies = [ "checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" +"checksum ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ec91ea61b83ce033c43c06c52ddc7532f465c0153281610d44c58b74083aee1a" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61" "checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" diff --git a/Cargo.toml b/Cargo.toml index 369fa5bd6..217dd049a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ serde_derive = "1.0" futures = "0.1" fdlimit = "0.1" ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" } -jsonrpc-core = "10.0.1" +jsonrpc-core = "12.0.0" parity-bytes = "0.1" common-types = { path = "ethcore/types" } ethcore = { path = "ethcore", features = ["parity"] } diff --git a/cli-signer/rpc-client/Cargo.toml b/cli-signer/rpc-client/Cargo.toml index 0d8b0e2d8..aac398ca5 100644 --- a/cli-signer/rpc-client/Cargo.toml +++ b/cli-signer/rpc-client/Cargo.toml @@ -15,7 +15,7 @@ serde_json = "1.0" url = "1.2.0" matches = "0.1" parking_lot = "0.7" -jsonrpc-core = "10.0.1" -jsonrpc-ws-server = "10.0.1" +jsonrpc-core = "12.0.0" +jsonrpc-ws-server = "12.0.0" parity-rpc = { path = "../../rpc" } keccak-hash = "0.2.0" diff --git a/ipfs/Cargo.toml b/ipfs/Cargo.toml index 13e72c67a..a34195ce3 100644 --- a/ipfs/Cargo.toml +++ b/ipfs/Cargo.toml @@ -9,8 +9,8 @@ authors = ["Parity Technologies "] ethcore = { path = "../ethcore" } parity-bytes = "0.1" ethereum-types = "0.6.0" -jsonrpc-core = "10.0.1" -jsonrpc-http-server = "10.0.1" +jsonrpc-core = "12.0.0" +jsonrpc-http-server = "12.0.0" rlp = "0.4.0" cid = "0.3" multihash = "0.8" diff --git a/miner/stratum/Cargo.toml b/miner/stratum/Cargo.toml index 8ae35ca8c..1b081e044 100644 --- a/miner/stratum/Cargo.toml +++ b/miner/stratum/Cargo.toml @@ -8,8 +8,8 @@ authors = ["Parity Technologies "] [dependencies] ethereum-types = "0.6.0" keccak-hash = "0.2.0" -jsonrpc-core = "10.0.1" -jsonrpc-tcp-server = "10.0.1" +jsonrpc-core = "12.0.0" +jsonrpc-tcp-server = "12.0.0" log = "0.4" parking_lot = "0.7" diff --git a/parity/configuration.rs b/parity/configuration.rs index e864eabad..3aa054147 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -34,7 +34,6 @@ use ethcore::miner::{stratum, MinerOptions}; use ethcore::snapshot::SnapshotConfiguration; use ethcore::verification::queue::VerifierSettings; use miner::pool; -use num_cpus; use rpc::{IpcConfiguration, HttpConfiguration, WsConfiguration}; use parity_rpc::NetworkSettings; diff --git a/parity/rpc.rs b/parity/rpc.rs index b07ca3f3e..8129b6f61 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -29,7 +29,7 @@ use parity_rpc::{self as rpc, Metadata, DomainsValidation}; use rpc_apis::{self, ApiSet}; pub use parity_rpc::{IpcServer, HttpServer, RequestMiddleware}; -pub use parity_rpc::ws::Server as WsServer; +pub use parity_rpc::ws::{Server as WsServer, ws}; pub const DAPPS_DOMAIN: &'static str = "web3.site"; @@ -187,7 +187,9 @@ pub fn new_ws( match start_result { Ok(server) => Ok(Some(server)), - Err(rpc::ws::Error(rpc::ws::ErrorKind::Io(ref err), _)) if err.kind() == io::ErrorKind::AddrInUse => Err( + Err(rpc::ws::Error::WsError(ws::Error { + kind: ws::ErrorKind::Io(ref err), .. + })) if err.kind() == io::ErrorKind::AddrInUse => Err( format!("WebSockets address {} is already in use, make sure that another instance of an Ethereum client is not running or change the address using the --ws-port and --ws-interface options.", url) ), Err(e) => Err(format!("WebSockets error: {:?}", e)), diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 7ba7b4fca..3b95a0a4c 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -28,12 +28,12 @@ tokio-timer = "0.1" transient-hashmap = "0.4" itertools = "0.5" -jsonrpc-core = "10.0.1" -jsonrpc-derive = "10.0.2" -jsonrpc-http-server = "10.0.1" -jsonrpc-ws-server = "10.0.1" -jsonrpc-ipc-server = "10.0.1" -jsonrpc-pubsub = "10.0.1" +jsonrpc-core = "12.0.0" +jsonrpc-derive = "12.0.0" +jsonrpc-http-server = "12.0.0" +jsonrpc-ws-server = "12.0.0" +jsonrpc-ipc-server = "12.0.0" +jsonrpc-pubsub = "12.0.0" common-types = { path = "../ethcore/types" } ethash = { path = "../ethash" } diff --git a/rpc/src/v1/traits/debug.rs b/rpc/src/v1/traits/debug.rs index 5d332d434..373717ea6 100644 --- a/rpc/src/v1/traits/debug.rs +++ b/rpc/src/v1/traits/debug.rs @@ -22,7 +22,7 @@ use jsonrpc_derive::rpc; use v1::types::RichBlock; /// Debug RPC interface. -#[rpc] +#[rpc(server)] pub trait Debug { /// Returns recently seen bad blocks. #[rpc(name = "debug_getBadBlocks")] diff --git a/rpc/src/v1/traits/eth.rs b/rpc/src/v1/traits/eth.rs index 69a37ae52..a3bedc091 100644 --- a/rpc/src/v1/traits/eth.rs +++ b/rpc/src/v1/traits/eth.rs @@ -23,7 +23,7 @@ use v1::types::{RichBlock, BlockNumber, Bytes, CallRequest, Filter, FilterChange use v1::types::{Log, Receipt, SyncStatus, Transaction, Work}; /// Eth rpc interface. -#[rpc] +#[rpc(server)] pub trait Eth { /// RPC Metadata type Metadata; @@ -189,7 +189,7 @@ pub trait Eth { /// Eth filters rpc api (polling). // TODO: do filters api properly -#[rpc] +#[rpc(server)] pub trait EthFilter { /// Returns id of new filter. #[rpc(name = "eth_newFilter")] diff --git a/rpc/src/v1/traits/eth_pubsub.rs b/rpc/src/v1/traits/eth_pubsub.rs index 062878139..1f4c3e6e6 100644 --- a/rpc/src/v1/traits/eth_pubsub.rs +++ b/rpc/src/v1/traits/eth_pubsub.rs @@ -23,7 +23,7 @@ use jsonrpc_pubsub::{typed, SubscriptionId}; use v1::types::pubsub; /// Eth PUB-SUB rpc interface. -#[rpc] +#[rpc(server)] pub trait EthPubSub { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/eth_signing.rs b/rpc/src/v1/traits/eth_signing.rs index 72e13ddab..7c1fbc8da 100644 --- a/rpc/src/v1/traits/eth_signing.rs +++ b/rpc/src/v1/traits/eth_signing.rs @@ -23,7 +23,7 @@ use ethereum_types::{H160, H256, H520}; use v1::types::{Bytes, TransactionRequest, RichRawTransaction}; /// Signing methods implementation relying on unlocked accounts. -#[rpc] +#[rpc(server)] pub trait EthSigning { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/net.rs b/rpc/src/v1/traits/net.rs index a16729294..68cd23566 100644 --- a/rpc/src/v1/traits/net.rs +++ b/rpc/src/v1/traits/net.rs @@ -19,7 +19,7 @@ use jsonrpc_core::Result; use jsonrpc_derive::rpc; /// Net rpc interface. -#[rpc] +#[rpc(server)] pub trait Net { /// Returns protocol version. #[rpc(name = "net_version")] diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index 050c9bd07..c57b758c9 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -32,7 +32,7 @@ use v1::types::{ }; /// Parity-specific rpc interface. -#[rpc] +#[rpc(server)] pub trait Parity { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/parity_accounts.rs b/rpc/src/v1/traits/parity_accounts.rs index 0b8c1eb6d..ecfc8cbb0 100644 --- a/rpc/src/v1/traits/parity_accounts.rs +++ b/rpc/src/v1/traits/parity_accounts.rs @@ -26,7 +26,7 @@ use v1::types::{DeriveHash, DeriveHierarchical, ExtAccountInfo}; use v1::types::AccountInfo; /// Parity-specific read-only accounts rpc interface. -#[rpc] +#[rpc(server)] pub trait ParityAccountsInfo { /// Returns accounts information. #[rpc(name = "parity_accountsInfo")] @@ -38,7 +38,7 @@ pub trait ParityAccountsInfo { } /// Personal Parity rpc interface. -#[rpc] +#[rpc(server)] pub trait ParityAccounts { /// Returns accounts information. #[rpc(name = "parity_allAccountsInfo")] diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index c7c233879..0c328b6b3 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -23,7 +23,7 @@ use jsonrpc_derive::rpc; use v1::types::{Bytes, ReleaseInfo, Transaction}; /// Parity-specific rpc interface for operations altering the account-related settings. -#[rpc] +#[rpc(server)] pub trait ParitySetAccounts { /// Sets account for signing consensus messages. #[rpc(name = "parity_setEngineSigner")] @@ -31,7 +31,7 @@ pub trait ParitySetAccounts { } /// Parity-specific rpc interface for operations altering the settings. -#[rpc] +#[rpc(server)] pub trait ParitySet { /// Sets new minimal gas price for mined blocks. #[rpc(name = "parity_setMinGasPrice")] diff --git a/rpc/src/v1/traits/parity_signing.rs b/rpc/src/v1/traits/parity_signing.rs index acd9e8cd6..23099ff82 100644 --- a/rpc/src/v1/traits/parity_signing.rs +++ b/rpc/src/v1/traits/parity_signing.rs @@ -22,7 +22,7 @@ use ethereum_types::{H160, U256}; use v1::types::{Bytes, ConfirmationResponse, TransactionRequest, Either}; /// Signing methods implementation. -#[rpc] +#[rpc(server)] pub trait ParitySigning { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/personal.rs b/rpc/src/v1/traits/personal.rs index e3632731f..5a615208a 100644 --- a/rpc/src/v1/traits/personal.rs +++ b/rpc/src/v1/traits/personal.rs @@ -23,7 +23,7 @@ use jsonrpc_derive::rpc; use v1::types::{Bytes, TransactionRequest, RichRawTransaction as RpcRichRawTransaction, EIP191Version}; /// Personal rpc interface. Safe (read-only) functions. -#[rpc] +#[rpc(server)] pub trait Personal { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/private.rs b/rpc/src/v1/traits/private.rs index 887e71267..1cb100d09 100644 --- a/rpc/src/v1/traits/private.rs +++ b/rpc/src/v1/traits/private.rs @@ -24,7 +24,7 @@ use v1::types::{Bytes, PrivateTransactionReceipt, BlockNumber, PrivateTransactionReceiptAndTransaction, CallRequest, PrivateTransactionLog}; /// Private transaction management RPC interface. -#[rpc] +#[rpc(server)] pub trait Private { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/pubsub.rs b/rpc/src/v1/traits/pubsub.rs index c91b33561..6d75cecda 100644 --- a/rpc/src/v1/traits/pubsub.rs +++ b/rpc/src/v1/traits/pubsub.rs @@ -21,7 +21,7 @@ use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId}; use jsonrpc_derive::rpc; /// Parity-specific PUB-SUB rpc interface. -#[rpc] +#[rpc(server)] pub trait PubSub { /// Pub/Sub Metadata type Metadata; diff --git a/rpc/src/v1/traits/rpc.rs b/rpc/src/v1/traits/rpc.rs index 9600630fe..b1faa3b11 100644 --- a/rpc/src/v1/traits/rpc.rs +++ b/rpc/src/v1/traits/rpc.rs @@ -22,7 +22,7 @@ use jsonrpc_core::Result; use jsonrpc_derive::rpc; /// RPC Interface. -#[rpc] +#[rpc(server)] pub trait Rpc { /// Returns supported modules for Geth 1.3.6 /// @ignore diff --git a/rpc/src/v1/traits/secretstore.rs b/rpc/src/v1/traits/secretstore.rs index 6883753b4..e5ff3c502 100644 --- a/rpc/src/v1/traits/secretstore.rs +++ b/rpc/src/v1/traits/secretstore.rs @@ -25,7 +25,7 @@ use ethkey::Password; use v1::types::{Bytes, EncryptedDocumentKey}; /// Parity-specific rpc interface. -#[rpc] +#[rpc(server)] pub trait SecretStore { /// Generate document key to store in secret store. /// Arguments: `account`, `password`, `server_key_public`. diff --git a/rpc/src/v1/traits/signer.rs b/rpc/src/v1/traits/signer.rs index b5653eba6..5a9137790 100644 --- a/rpc/src/v1/traits/signer.rs +++ b/rpc/src/v1/traits/signer.rs @@ -24,7 +24,7 @@ use jsonrpc_derive::rpc; use v1::types::{Bytes, TransactionModification, ConfirmationRequest, ConfirmationResponse, ConfirmationResponseWithToken}; /// Signer extension for confirmations rpc interface. -#[rpc] +#[rpc(server)] pub trait Signer { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/traces.rs b/rpc/src/v1/traits/traces.rs index 5308ed4c6..00a38d71f 100644 --- a/rpc/src/v1/traits/traces.rs +++ b/rpc/src/v1/traits/traces.rs @@ -23,7 +23,7 @@ use v1::types::{TraceFilter, LocalizedTrace, BlockNumber, Index, CallRequest, By TraceResultsWithTransactionHash, TraceOptions}; /// Traces specific rpc interface. -#[rpc] +#[rpc(server)] pub trait Traces { /// RPC Metadata type Metadata; diff --git a/rpc/src/v1/traits/transactions_pool.rs b/rpc/src/v1/traits/transactions_pool.rs index 168148d6e..5184bf5ad 100644 --- a/rpc/src/v1/traits/transactions_pool.rs +++ b/rpc/src/v1/traits/transactions_pool.rs @@ -8,7 +8,7 @@ use miner::pool::TxStatus; use ethereum_types::H256; /// Transactions Pool PUB-SUB rpc interface. -#[rpc] +#[rpc(server)] pub trait TransactionsPool { /// Pub/Sub Metadata type Metadata; diff --git a/rpc/src/v1/traits/web3.rs b/rpc/src/v1/traits/web3.rs index dd464ee1c..d039d3623 100644 --- a/rpc/src/v1/traits/web3.rs +++ b/rpc/src/v1/traits/web3.rs @@ -22,7 +22,7 @@ use jsonrpc_derive::rpc; use v1::types::Bytes; /// Web3 rpc interface. -#[rpc] +#[rpc(server)] pub trait Web3 { /// Returns current client version. #[rpc(name = "web3_clientVersion")] diff --git a/secret-store/Cargo.toml b/secret-store/Cargo.toml index 8f730ec27..23ca865bf 100644 --- a/secret-store/Cargo.toml +++ b/secret-store/Cargo.toml @@ -36,7 +36,7 @@ tokio = "~0.1.11" tokio-io = "0.1" tokio-service = "0.1" url = "1.0" -jsonrpc-server-utils = "11.0" +jsonrpc-server-utils = "12.0.0" [dev-dependencies] env_logger = "0.5" diff --git a/whisper/Cargo.toml b/whisper/Cargo.toml index e373b740f..c3cf56385 100644 --- a/whisper/Cargo.toml +++ b/whisper/Cargo.toml @@ -27,7 +27,7 @@ smallvec = "0.6" tiny-keccak = "1.4" time-utils = { path = "../util/time-utils" } -jsonrpc-core = "10.0.1" -jsonrpc-derive = "10.0.2" -jsonrpc-pubsub = "10.0.1" +jsonrpc-core = "12.0.0" +jsonrpc-derive = "12.0.0" +jsonrpc-pubsub = "12.0.0" zeroize = "0.9.1" diff --git a/whisper/cli/Cargo.toml b/whisper/cli/Cargo.toml index 5ed38e47d..8e0e2a905 100644 --- a/whisper/cli/Cargo.toml +++ b/whisper/cli/Cargo.toml @@ -10,9 +10,9 @@ docopt = "1.0" env_logger = "0.5" ethcore-network = { path = "../../util/network" } ethcore-network-devp2p = { path = "../../util/network-devp2p" } -jsonrpc-core = "10.0.1" -jsonrpc-http-server = "10.0.1" -jsonrpc-pubsub = "10.0.1" +jsonrpc-core = "12.0.0" +jsonrpc-http-server = "12.0.0" +jsonrpc-pubsub = "12.0.0" log = "0.4" panic_hook = { path = "../../util/panic-hook" } parity-whisper = { path = "../" } diff --git a/whisper/src/lib.rs b/whisper/src/lib.rs index 550124d13..a9dc5889c 100644 --- a/whisper/src/lib.rs +++ b/whisper/src/lib.rs @@ -47,7 +47,6 @@ extern crate bitflags; #[macro_use] extern crate log; -#[macro_use] extern crate serde_derive; #[cfg(not(time_checked_add))] diff --git a/whisper/src/rpc/mod.rs b/whisper/src/rpc/mod.rs index 0612fb5ac..56cc41b66 100644 --- a/whisper/src/rpc/mod.rs +++ b/whisper/src/rpc/mod.rs @@ -69,7 +69,7 @@ fn abridge_topic(topic: &[u8]) -> EnvelopeTopic { } /// Whisper RPC interface. -#[rpc] +#[rpc(server)] pub trait Whisper { /// Info about the node. #[rpc(name = "shh_info")] @@ -128,7 +128,7 @@ pub trait Whisper { } /// Whisper RPC pubsub. -#[rpc] +#[rpc(server)] pub trait WhisperPubSub { // RPC Metadata type Metadata;