From 571522e738a297baf79b039a55b547f97b719cca Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Fri, 7 Dec 2018 16:15:16 -0700 Subject: [PATCH] Update jsonrpc version --- Cargo.lock | 132 ++++++++++++++++++++++++++++++++++------------ Cargo.toml | 10 ++-- src/rpc_pubsub.rs | 4 +- 3 files changed, 104 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 530534df83..cb9fd4b365 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -984,6 +984,17 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mio-extras" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazycell 1.2.1 (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)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mio-uds" version = "0.6.7" @@ -1292,16 +1303,6 @@ dependencies = [ "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand" version = "0.4.3" @@ -1664,7 +1665,7 @@ dependencies = [ [[package]] name = "sha1" -version = "0.2.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1694,11 +1695,6 @@ name = "siphasher" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "slab" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "slab" version = "0.4.1" @@ -1765,11 +1761,11 @@ dependencies = [ "solana-budget-program 0.11.0", "solana-drone 0.11.0", "solana-erc20 0.11.0", - "solana-jsonrpc-core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-jsonrpc-http-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-jsonrpc-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-jsonrpc-pubsub 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-jsonrpc-ws-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-http-server 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-pubsub 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-ws-server 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "solana-lualoader 0.11.0", "solana-metrics 0.11.0", "solana-native-loader 0.11.0", @@ -1862,6 +1858,18 @@ dependencies = [ "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "solana-jsonrpc-core" +version = "0.4.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)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "solana-jsonrpc-http-server" version = "0.3.0" @@ -1875,6 +1883,19 @@ dependencies = [ "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "solana-jsonrpc-http-server" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hyper 0.12.16 (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)", + "solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-server-utils 0.4.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 = "solana-jsonrpc-macros" version = "0.3.0" @@ -1885,6 +1906,16 @@ dependencies = [ "solana-jsonrpc-pubsub 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "solana-jsonrpc-macros" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-pubsub 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "solana-jsonrpc-pubsub" version = "0.3.0" @@ -1895,6 +1926,16 @@ dependencies = [ "solana-jsonrpc-core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "solana-jsonrpc-pubsub" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "solana-jsonrpc-server-utils" version = "0.3.0" @@ -1911,18 +1952,34 @@ dependencies = [ "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "solana-jsonrpc-server-utils" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.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.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (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 = "solana-jsonrpc-ws-server" -version = "0.3.0" +version = "0.4.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)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-jsonrpc-core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-jsonrpc-server-utils 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-ws 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-jsonrpc-server-utils 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-ws 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2038,17 +2095,18 @@ dependencies = [ [[package]] name = "solana-ws" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (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)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (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.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2654,6 +2712,7 @@ dependencies = [ "checksum mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0a907b83e7b9e987032439a387e187119cddafc92d5c2aaeb1d92580a793f630" "checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" +"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" @@ -2691,7 +2750,6 @@ dependencies = [ "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" -"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" "checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" @@ -2731,21 +2789,25 @@ dependencies = [ "checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" "checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" "checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" -"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" +"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 siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" -"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" "checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" "checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7" "checksum solana-jsonrpc-core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "247e9ed914dc7ce8c58bc7c9bb48a771d8a116f0609051a3dc1a600224ab4aa5" +"checksum solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3aef27e39614157ee2cc67296cba379b6209de8c82a3598f870f55577559979b" "checksum solana-jsonrpc-http-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee59f62767d9711e86951a8a1a98771d6d710f620892aa26d425e0f39fbe2a5b" +"checksum solana-jsonrpc-http-server 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e46cbb534bfac8c38e3e6e41133310819652b185367c8c530a63513aae8dbc6a" "checksum solana-jsonrpc-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "98ae0adfbe6fa32b77221a41a8ee069291b89d9589563d925e79db144cd8a511" +"checksum solana-jsonrpc-macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df31df489ec11f5fab95423dc58b581fdc8363ebee781c89aa50722437f7c9bb" "checksum solana-jsonrpc-pubsub 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70944e2d62a6af2b10ec7a99f2756f8002764fe9112d8292f1094b444e8a6e6a" +"checksum solana-jsonrpc-pubsub 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a06b40e7885b7f8c21685e9dafe8c4da3276db20344eb4a50623f16e99853933" "checksum solana-jsonrpc-server-utils 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "025a89986a6b9e633e0a837e667479a88fa085f413d2ce36ac970339defc9583" -"checksum solana-jsonrpc-ws-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41fdefe57b3fb806e3deae56b868ebc39c7ff02c481902423eb7d9c408cd8b1d" -"checksum solana-ws 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "61047ad3fe341c29f3c5129a179f5692dff3bfdefcd9ecf912e46b2cfc6b25bb" +"checksum solana-jsonrpc-server-utils 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6acfebc12e709d8525f039e7135b922fb7efaf49cd536ad97bbedd0391dcf989" +"checksum solana-jsonrpc-ws-server 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a21f3c0cd97c2673854b1e4558cea4dba59fce27ec9f0e130f847da9e10355c" +"checksum solana-ws 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de774a72a468e65a10791246f0335869a19bed7d85ba3c05381c4bb6247acb7f" "checksum solana_rbpf 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "54bbd72559d4234ba8de64fed347f63cf6f4916630f38feb4f78affb044e27e6" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum string 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98998cced76115b1da46f63388b909d118a37ae0be0f82ad35773d4a4bc9d18d" diff --git a/Cargo.toml b/Cargo.toml index 8a3ac6f74f..c52d0c6e12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,11 +101,11 @@ solana-bpfloader = { path = "programs/native/bpf_loader", version = "0.11.0" } solana-budget-program = { path = "programs/native/budget", version = "0.11.0" } solana-drone = { path = "drone", version = "0.11.0" } solana-erc20 = { path = "programs/native/erc20", version = "0.11.0" } -solana-jsonrpc-core = "0.3.0" -solana-jsonrpc-http-server = "0.3.0" -solana-jsonrpc-macros = "0.3.0" -solana-jsonrpc-pubsub = "0.3.0" -solana-jsonrpc-ws-server = "0.3.0" +solana-jsonrpc-core = "0.4.0" +solana-jsonrpc-http-server = "0.4.0" +solana-jsonrpc-macros = "0.4.0" +solana-jsonrpc-pubsub = "0.4.0" +solana-jsonrpc-ws-server = "0.4.0" solana-lualoader = { path = "programs/native/lua_loader", version = "0.11.0" } solana-metrics = { path = "metrics", version = "0.11.0" } solana-native-loader = { path = "programs/native/native_loader", version = "0.11.0" } diff --git a/src/rpc_pubsub.rs b/src/rpc_pubsub.rs index 474ff7a5b6..a82c771d66 100644 --- a/src/rpc_pubsub.rs +++ b/src/rpc_pubsub.rs @@ -52,9 +52,9 @@ impl PubSubService { let server = ServerBuilder::with_meta_extractor(io, |context: &RequestContext| { info!("New pubsub connection"); let session = Arc::new(Session::new(context.sender().clone())); - session.on_drop(Box::new(|| { + session.on_drop(|| { info!("Pubsub connection dropped"); - })); + }); session }) .start(&pubsub_addr);