Upgrade jsonrpc crates to v17.0.0 (#15018)

* Upgrade to jsonrpc 17.0.0

* Fix test

* tree

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
Tyera Eulberg
2021-02-02 19:53:08 -07:00
committed by GitHub
parent a1b9e00c14
commit 98aa1fa4ea
10 changed files with 285 additions and 408 deletions

227
Cargo.lock generated
View File

@ -890,6 +890,17 @@ dependencies = [
"syn 1.0.48", "syn 1.0.48",
] ]
[[package]]
name = "derive_more"
version = "0.99.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
dependencies = [
"proc-macro2 1.0.24",
"quote 1.0.6",
"syn 1.0.48",
]
[[package]] [[package]]
name = "dialoguer" name = "dialoguer"
version = "0.6.2" version = "0.6.2"
@ -1251,16 +1262,6 @@ version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748"
[[package]]
name = "futures-cpupool"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
dependencies = [
"futures 0.1.29",
"num_cpus",
]
[[package]] [[package]]
name = "futures-executor" name = "futures-executor"
version = "0.3.8" version = "0.3.8"
@ -1270,6 +1271,7 @@ dependencies = [
"futures-core", "futures-core",
"futures-task", "futures-task",
"futures-util", "futures-util",
"num_cpus",
] ]
[[package]] [[package]]
@ -1311,6 +1313,7 @@ version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2"
dependencies = [ dependencies = [
"futures 0.1.29",
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-io", "futures-io",
@ -1442,24 +1445,6 @@ dependencies = [
"scroll", "scroll",
] ]
[[package]]
name = "h2"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462"
dependencies = [
"byteorder",
"bytes 0.4.12",
"fnv",
"futures 0.1.29",
"http 0.1.21",
"indexmap",
"log 0.4.11",
"slab",
"string",
"tokio-io",
]
[[package]] [[package]]
name = "h2" name = "h2"
version = "0.2.5" version = "0.2.5"
@ -1471,7 +1456,7 @@ dependencies = [
"futures-core", "futures-core",
"futures-sink", "futures-sink",
"futures-util", "futures-util",
"http 0.2.1", "http",
"indexmap", "indexmap",
"log 0.4.11", "log 0.4.11",
"slab", "slab",
@ -1575,17 +1560,6 @@ dependencies = [
"hmac 0.7.1", "hmac 0.7.1",
] ]
[[package]]
name = "http"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0"
dependencies = [
"bytes 0.4.12",
"fnv",
"itoa",
]
[[package]] [[package]]
name = "http" name = "http"
version = "0.2.1" version = "0.2.1"
@ -1597,18 +1571,6 @@ dependencies = [
"itoa", "itoa",
] ]
[[package]]
name = "http-body"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"http 0.1.21",
"tokio-buf",
]
[[package]] [[package]]
name = "http-body" name = "http-body"
version = "0.3.1" version = "0.3.1"
@ -1616,7 +1578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [ dependencies = [
"bytes 0.5.4", "bytes 0.5.4",
"http 0.2.1", "http",
] ]
[[package]] [[package]]
@ -1659,36 +1621,6 @@ dependencies = [
"url 1.7.2", "url 1.7.2",
] ]
[[package]]
name = "hyper"
version = "0.12.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"futures-cpupool",
"h2 0.1.26",
"http 0.1.21",
"http-body 0.1.0",
"httparse",
"iovec",
"itoa",
"log 0.4.11",
"net2",
"rustc_version",
"time 0.1.43",
"tokio 0.1.22",
"tokio-buf",
"tokio-executor",
"tokio-io",
"tokio-reactor",
"tokio-tcp",
"tokio-threadpool",
"tokio-timer",
"want 0.2.0",
]
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "0.13.5" version = "0.13.5"
@ -1699,9 +1631,9 @@ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-util", "futures-util",
"h2 0.2.5", "h2",
"http 0.2.1", "http",
"http-body 0.3.1", "http-body",
"httparse", "httparse",
"itoa", "itoa",
"log 0.4.11", "log 0.4.11",
@ -1710,7 +1642,7 @@ dependencies = [
"time 0.1.43", "time 0.1.43",
"tokio 0.2.22", "tokio 0.2.22",
"tower-service", "tower-service",
"want 0.3.0", "want",
] ]
[[package]] [[package]]
@ -1905,29 +1837,29 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpc-client-transports" name = "jsonrpc-client-transports"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "489b9c612e60c766f751ab40fcb43cbb55a1e10bb44a9b4307ed510ca598cbd7" checksum = "15b6c6ad01c7354d60de493148c30ac8a82b759e22ae678c8705e9b8e0c566a4"
dependencies = [ dependencies = [
"failure", "derive_more",
"futures 0.1.29", "futures 0.3.8",
"jsonrpc-core", "jsonrpc-core",
"jsonrpc-pubsub", "jsonrpc-pubsub",
"log 0.4.11", "log 0.4.11",
"serde", "serde",
"serde_json", "serde_json",
"tokio 0.1.22", "tokio 0.2.22",
"url 1.7.2", "url 1.7.2",
"websocket", "websocket",
] ]
[[package]] [[package]]
name = "jsonrpc-core" name = "jsonrpc-core"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" checksum = "07569945133257ff557eb37b015497104cea61a2c9edaf126c1cbd6e8332397f"
dependencies = [ dependencies = [
"futures 0.1.29", "futures 0.3.8",
"log 0.4.11", "log 0.4.11",
"serde", "serde",
"serde_derive", "serde_derive",
@ -1936,18 +1868,19 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpc-core-client" name = "jsonrpc-core-client"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f764902d7b891344a0acb65625f32f6f7c6db006952143bd650209fbe7d94db" checksum = "7ac9d56dc729912796637c30f475bbf834594607b27740dfea6e5fa7ba40d1f1"
dependencies = [ dependencies = [
"futures 0.3.8",
"jsonrpc-client-transports", "jsonrpc-client-transports",
] ]
[[package]] [[package]]
name = "jsonrpc-derive" name = "jsonrpc-derive"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3" checksum = "b68ba7e76e5c7796cfa4d2a30e83986550c34404c6d40551c902ca6f7bd4a137"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -1957,59 +1890,64 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpc-http-server" name = "jsonrpc-http-server"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7" checksum = "eff2303c4f0562afcbd2dae75e3e21815095f8994749a80fbcd365877e44ed64"
dependencies = [ dependencies = [
"hyper 0.12.35", "futures 0.3.8",
"hyper 0.13.5",
"jsonrpc-core", "jsonrpc-core",
"jsonrpc-server-utils", "jsonrpc-server-utils",
"log 0.4.11", "log 0.4.11",
"net2", "net2",
"parking_lot 0.10.2", "parking_lot 0.11.0",
"unicase 2.6.0", "unicase 2.6.0",
] ]
[[package]] [[package]]
name = "jsonrpc-pubsub" name = "jsonrpc-pubsub"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77" checksum = "0c48dbebce7a9c88ab272a4db7d6478aa4c6d9596e6c086366e89efc4e9ed89e"
dependencies = [ dependencies = [
"futures 0.3.8",
"jsonrpc-core", "jsonrpc-core",
"lazy_static",
"log 0.4.11", "log 0.4.11",
"parking_lot 0.10.2", "parking_lot 0.11.0",
"rand 0.7.3", "rand 0.7.3",
"serde", "serde",
] ]
[[package]] [[package]]
name = "jsonrpc-server-utils" name = "jsonrpc-server-utils"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72f1f3990650c033bd8f6bd46deac76d990f9bbfb5f8dc8c4767bf0a00392176" checksum = "f4207cce738bf713a82525065b750a008f28351324f438f56b33d698ada95bb4"
dependencies = [ dependencies = [
"bytes 0.4.12", "bytes 0.5.4",
"futures 0.3.8",
"globset", "globset",
"jsonrpc-core", "jsonrpc-core",
"lazy_static", "lazy_static",
"log 0.4.11", "log 0.4.11",
"tokio 0.1.22", "tokio 0.2.22",
"tokio-codec", "tokio-util 0.3.1",
"unicase 2.6.0", "unicase 2.6.0",
] ]
[[package]] [[package]]
name = "jsonrpc-ws-server" name = "jsonrpc-ws-server"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22" checksum = "abe06e1385e4a912711703123ba44f735627d666f87e5fec764ad1338ec617dc"
dependencies = [ dependencies = [
"futures 0.3.8",
"jsonrpc-core", "jsonrpc-core",
"jsonrpc-server-utils", "jsonrpc-server-utils",
"log 0.4.11", "log 0.4.11",
"parity-ws", "parity-ws",
"parking_lot 0.10.2", "parking_lot 0.11.0",
"slab", "slab",
] ]
@ -3230,8 +3168,8 @@ dependencies = [
"encoding_rs", "encoding_rs",
"futures-core", "futures-core",
"futures-util", "futures-util",
"http 0.2.1", "http",
"http-body 0.3.1", "http-body",
"hyper 0.13.5", "hyper 0.13.5",
"hyper-rustls", "hyper-rustls",
"hyper-tls", "hyper-tls",
@ -4076,7 +4014,6 @@ dependencies = [
"bs58", "bs58",
"bv", "bv",
"byteorder", "byteorder",
"bytes 0.4.12",
"chrono", "chrono",
"core_affinity", "core_affinity",
"crossbeam-channel 0.4.4", "crossbeam-channel 0.4.4",
@ -4140,11 +4077,8 @@ dependencies = [
"systemstat", "systemstat",
"tempfile", "tempfile",
"thiserror", "thiserror",
"tokio 0.1.22",
"tokio 0.2.22", "tokio 0.2.22",
"tokio-codec", "tokio-util 0.2.0",
"tokio-fs",
"tokio-io",
"trees", "trees",
] ]
@ -5430,15 +5364,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
[[package]]
name = "string"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d"
dependencies = [
"bytes 0.4.12",
]
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.8.0" version = "0.8.0"
@ -5789,17 +5714,6 @@ dependencies = [
"winapi 0.3.8", "winapi 0.3.8",
] ]
[[package]]
name = "tokio-buf"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46"
dependencies = [
"bytes 0.4.12",
"either",
"futures 0.1.29",
]
[[package]] [[package]]
name = "tokio-codec" name = "tokio-codec"
version = "0.1.2" version = "0.1.2"
@ -6027,6 +5941,20 @@ dependencies = [
"tokio-reactor", "tokio-reactor",
] ]
[[package]]
name = "tokio-util"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"
dependencies = [
"bytes 0.5.4",
"futures-core",
"futures-sink",
"log 0.4.11",
"pin-project-lite 0.1.5",
"tokio 0.2.22",
]
[[package]] [[package]]
name = "tokio-util" name = "tokio-util"
version = "0.3.1" version = "0.3.1"
@ -6076,8 +6004,8 @@ dependencies = [
"bytes 0.5.4", "bytes 0.5.4",
"futures-core", "futures-core",
"futures-util", "futures-util",
"http 0.2.1", "http",
"http-body 0.3.1", "http-body",
"hyper 0.13.5", "hyper 0.13.5",
"percent-encoding 2.1.0", "percent-encoding 2.1.0",
"pin-project 0.4.23", "pin-project 0.4.23",
@ -6351,7 +6279,7 @@ dependencies = [
"base64 0.11.0", "base64 0.11.0",
"byteorder", "byteorder",
"bytes 0.5.4", "bytes 0.5.4",
"http 0.2.1", "http",
"httparse", "httparse",
"input_buffer", "input_buffer",
"log 0.4.11", "log 0.4.11",
@ -6552,17 +6480,6 @@ dependencies = [
"winapi-util", "winapi-util",
] ]
[[package]]
name = "want"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230"
dependencies = [
"futures 0.1.29",
"log 0.4.11",
"try-lock",
]
[[package]] [[package]]
name = "want" name = "want"
version = "0.3.0" version = "0.3.0"

View File

@ -14,7 +14,7 @@ bincode = "1.3.1"
bs58 = "0.3.1" bs58 = "0.3.1"
clap = "2.33.0" clap = "2.33.0"
indicatif = "0.15.0" indicatif = "0.15.0"
jsonrpc-core = "15.0.0" jsonrpc-core = "17.0.0"
log = "0.4.11" log = "0.4.11"
net2 = "0.2.37" net2 = "0.2.37"
rayon = "1.5.0" rayon = "1.5.0"
@ -36,8 +36,7 @@ url = "2.1.1"
[dev-dependencies] [dev-dependencies]
assert_matches = "1.3.0" assert_matches = "1.3.0"
jsonrpc-core = "15.0.0" jsonrpc-http-server = "17.0.0"
jsonrpc-http-server = "15.0.0"
solana-logger = { path = "../logger", version = "1.6.0" } solana-logger = { path = "../logger", version = "1.6.0" }
[package.metadata.docs.rs] [package.metadata.docs.rs]

View File

@ -1569,7 +1569,7 @@ mod tests {
use super::*; use super::*;
use crate::{client_error::ClientErrorKind, mock_sender::PUBKEY}; use crate::{client_error::ClientErrorKind, mock_sender::PUBKEY};
use assert_matches::assert_matches; use assert_matches::assert_matches;
use jsonrpc_core::{Error, IoHandler, Params}; use jsonrpc_core::{futures::prelude::*, Error, IoHandler, Params};
use jsonrpc_http_server::{AccessControlAllowOrigin, DomainsValidation, ServerBuilder}; use jsonrpc_http_server::{AccessControlAllowOrigin, DomainsValidation, ServerBuilder};
use serde_json::Number; use serde_json::Number;
use solana_sdk::{ use solana_sdk::{
@ -1586,14 +1586,14 @@ mod tests {
let mut io = IoHandler::default(); let mut io = IoHandler::default();
// Successful request // Successful request
io.add_method("getBalance", |_params: Params| { io.add_method("getBalance", |_params: Params| {
Ok(Value::Number(Number::from(50))) future::ok(Value::Number(Number::from(50)))
}); });
// Failed request // Failed request
io.add_method("getRecentBlockhash", |params: Params| { io.add_method("getRecentBlockhash", |params: Params| {
if params != Params::None { if params != Params::None {
Err(Error::invalid_request()) future::err(Error::invalid_request())
} else { } else {
Ok(Value::String( future::ok(Value::String(
"deadbeefXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNHhx".to_string(), "deadbeefXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNHhx".to_string(),
)) ))
} }

View File

@ -28,12 +28,12 @@ fs_extra = "1.1.0"
flate2 = "1.0" flate2 = "1.0"
indexmap = { version = "1.5", features = ["rayon"] } indexmap = { version = "1.5", features = ["rayon"] }
itertools = "0.9.0" itertools = "0.9.0"
jsonrpc-core = "15.0.0" jsonrpc-core = "17.0.0"
jsonrpc-core-client = { version = "15.0.0", features = ["ws"] } jsonrpc-core-client = { version = "17.0.0", features = ["ws"] }
jsonrpc-derive = "15.0.0" jsonrpc-derive = "17.0.0"
jsonrpc-http-server = "15.0.0" jsonrpc-http-server = "17.0.0"
jsonrpc-pubsub = "15.0.0" jsonrpc-pubsub = "17.0.0"
jsonrpc-ws-server = "15.0.0" jsonrpc-ws-server = "17.0.0"
log = "0.4.11" log = "0.4.11"
lru = "0.6.1" lru = "0.6.1"
miow = "0.2.2" miow = "0.2.2"
@ -77,11 +77,7 @@ spl-token-v2-0 = { package = "spl-token", version = "=3.0.1", features = ["no-en
tempfile = "3.1.0" tempfile = "3.1.0"
thiserror = "1.0" thiserror = "1.0"
tokio = { version = "0.2", features = ["full"] } tokio = { version = "0.2", features = ["full"] }
tokio_01 = { version = "0.1", package = "tokio" } tokio-util = { version = "0.2", features = ["codec"] }
tokio_01_bytes = { version = "0.4.7", package = "bytes" }
tokio_fs_01 = { version = "0.1", package = "tokio-fs" }
tokio_io_01 = { version = "0.1", package = "tokio-io" }
tokio_codec_01 = { version = "0.1", package = "tokio-codec" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.6.0" } solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "1.6.0" }
trees = "0.2.1" trees = "0.2.1"

View File

@ -2964,9 +2964,7 @@ pub mod tests {
rpc_subscriptions::RpcSubscriptions, rpc_subscriptions::RpcSubscriptions,
}; };
use bincode::deserialize; use bincode::deserialize;
use jsonrpc_core::{ use jsonrpc_core::{futures, ErrorCode, MetaIoHandler, Output, Response, Value};
futures::future::Future, ErrorCode, MetaIoHandler, Output, Response, Value,
};
use jsonrpc_core_client::transports::local; use jsonrpc_core_client::transports::local;
use solana_client::rpc_filter::{Memcmp, MemcmpEncodedBytes}; use solana_client::rpc_filter::{Memcmp, MemcmpEncodedBytes};
use solana_ledger::{ use solana_ledger::{
@ -3231,15 +3229,23 @@ pub mod tests {
let mut io = MetaIoHandler::default(); let mut io = MetaIoHandler::default();
io.extend_with(RpcSolImpl.to_delegate()); io.extend_with(RpcSolImpl.to_delegate());
let fut = { async fn use_client(client: gen_client::Client, mint_pubkey: Pubkey) -> u64 {
let (client, server) =
local::connect_with_metadata::<gen_client::Client, _, _>(&io, meta);
client client
.get_balance(mint_pubkey.to_string(), None) .get_balance(mint_pubkey.to_string(), None)
.join(server) .await
.unwrap()
.value
}
let fut = async {
let (client, server) =
local::connect_with_metadata::<gen_client::Client, _, _>(&io, meta);
let client = use_client(client, mint_pubkey);
futures::join!(client, server)
}; };
let (response, _) = fut.wait().unwrap(); let (response, _) = futures::executor::block_on(fut);
assert_eq!(response.value, 20); assert_eq!(response, 20);
} }
#[test] #[test]

View File

@ -488,7 +488,7 @@ mod tests {
rpc_subscriptions::tests::robust_poll_or_panic, rpc_subscriptions::tests::robust_poll_or_panic,
}; };
use crossbeam_channel::unbounded; use crossbeam_channel::unbounded;
use jsonrpc_core::{futures::sync::mpsc, Response}; use jsonrpc_core::{futures::channel::mpsc, Response};
use jsonrpc_pubsub::{PubSubHandler, Session}; use jsonrpc_pubsub::{PubSubHandler, Session};
use serial_test::serial; use serial_test::serial;
use solana_account_decoder::{parse_account_data::parse_account_data, UiAccountEncoding}; use solana_account_decoder::{parse_account_data::parse_account_data, UiAccountEncoding};
@ -543,7 +543,7 @@ mod tests {
} }
fn create_session() -> Arc<Session> { fn create_session() -> Arc<Session> {
Arc::new(Session::new(mpsc::channel(1).0)) Arc::new(Session::new(mpsc::unbounded().0))
} }
#[test] #[test]

View File

@ -10,7 +10,7 @@ use crate::{
send_transaction_service::{LeaderInfo, SendTransactionService}, send_transaction_service::{LeaderInfo, SendTransactionService},
validator::ValidatorExit, validator::ValidatorExit,
}; };
use jsonrpc_core::MetaIoHandler; use jsonrpc_core::{futures::prelude::*, MetaIoHandler};
use jsonrpc_http_server::{ use jsonrpc_http_server::{
hyper, AccessControlAllowOrigin, CloseHandle, DomainsValidation, RequestMiddleware, hyper, AccessControlAllowOrigin, CloseHandle, DomainsValidation, RequestMiddleware,
RequestMiddlewareAction, ServerBuilder, RequestMiddlewareAction, ServerBuilder,
@ -32,7 +32,8 @@ use std::{
sync::{mpsc::channel, Arc, Mutex, RwLock}, sync::{mpsc::channel, Arc, Mutex, RwLock},
thread::{self, Builder, JoinHandle}, thread::{self, Builder, JoinHandle},
}; };
use tokio::runtime; use tokio::{self, runtime};
use tokio_util::codec::{BytesCodec, FramedRead};
pub struct JsonRpcService { pub struct JsonRpcService {
thread_hdl: JoinHandle<()>, thread_hdl: JoinHandle<()>,
@ -108,9 +109,6 @@ impl RpcRequestMiddleware {
} }
fn process_file_get(&self, path: &str) -> RequestMiddlewareAction { fn process_file_get(&self, path: &str) -> RequestMiddlewareAction {
// Stuck on tokio 0.1 until the jsonrpc-http-server crate upgrades to tokio 0.2
use tokio_01::prelude::*;
let stem = path.split_at(1).1; // Drop leading '/' from path let stem = path.split_at(1).1; // Drop leading '/' from path
let filename = { let filename = {
match path { match path {
@ -134,25 +132,23 @@ impl RpcRequestMiddleware {
.unwrap_or(0) .unwrap_or(0)
.to_string(); .to_string();
info!("get {} -> {:?} ({} bytes)", path, filename, file_length); info!("get {} -> {:?} ({} bytes)", path, filename, file_length);
RequestMiddlewareAction::Respond { RequestMiddlewareAction::Respond {
should_validate_hosts: true, should_validate_hosts: true,
response: Box::new( response: Box::pin(async {
tokio_fs_01::file::File::open(filename) match tokio::fs::File::open(filename).await {
.and_then(|file| { Err(_) => Ok(Self::internal_server_error()),
use tokio_codec_01::{BytesCodec, FramedRead}; Ok(file) => {
let stream =
let stream = FramedRead::new(file, BytesCodec::new()) FramedRead::new(file, BytesCodec::new()).map_ok(|b| b.freeze());
.map(tokio_01_bytes::BytesMut::freeze);
let body = hyper::Body::wrap_stream(stream); let body = hyper::Body::wrap_stream(stream);
Ok(hyper::Response::builder() Ok(hyper::Response::builder()
.header(hyper::header::CONTENT_LENGTH, file_length) .header(hyper::header::CONTENT_LENGTH, file_length)
.body(body) .body(body)
.unwrap()) .unwrap())
}) }
.or_else(|_| Ok(RpcRequestMiddleware::not_found())), }
), }),
} }
} }
@ -173,57 +169,41 @@ impl RequestMiddleware for RpcRequestMiddleware {
if let Some(ref snapshot_config) = self.snapshot_config { if let Some(ref snapshot_config) = self.snapshot_config {
if request.uri().path() == "/snapshot.tar.bz2" { if request.uri().path() == "/snapshot.tar.bz2" {
// Convenience redirect to the latest snapshot // Convenience redirect to the latest snapshot
return RequestMiddlewareAction::Respond { return if let Some((snapshot_archive, _)) =
should_validate_hosts: true, snapshot_utils::get_highest_snapshot_archive_path(
response: Box::new(jsonrpc_core::futures::future::ok( &snapshot_config.snapshot_package_output_path,
if let Some((snapshot_archive, _)) = ) {
snapshot_utils::get_highest_snapshot_archive_path( RpcRequestMiddleware::redirect(&format!(
&snapshot_config.snapshot_package_output_path, "/{}",
) snapshot_archive
{ .file_name()
RpcRequestMiddleware::redirect(&format!( .unwrap_or_else(|| std::ffi::OsStr::new(""))
"/{}", .to_str()
snapshot_archive .unwrap_or(&"")
.file_name() ))
.unwrap_or_else(|| std::ffi::OsStr::new("")) } else {
.to_str() RpcRequestMiddleware::not_found()
.unwrap_or(&"") }
)) .into();
} else {
RpcRequestMiddleware::not_found()
},
)),
};
} }
} }
if let Some(result) = process_rest(&self.bank_forks, request.uri().path()) { if let Some(result) = process_rest(&self.bank_forks, request.uri().path()) {
RequestMiddlewareAction::Respond { hyper::Response::builder()
should_validate_hosts: true, .status(hyper::StatusCode::OK)
response: Box::new(jsonrpc_core::futures::future::ok( .body(hyper::Body::from(result))
hyper::Response::builder() .unwrap()
.status(hyper::StatusCode::OK) .into()
.body(hyper::Body::from(result))
.unwrap(),
)),
}
} else if self.is_file_get_path(request.uri().path()) { } else if self.is_file_get_path(request.uri().path()) {
self.process_file_get(request.uri().path()) self.process_file_get(request.uri().path())
} else if request.uri().path() == "/health" { } else if request.uri().path() == "/health" {
RequestMiddlewareAction::Respond { hyper::Response::builder()
should_validate_hosts: true, .status(hyper::StatusCode::OK)
response: Box::new(jsonrpc_core::futures::future::ok( .body(hyper::Body::from(self.health_check()))
hyper::Response::builder() .unwrap()
.status(hyper::StatusCode::OK) .into()
.body(hyper::Body::from(self.health_check()))
.unwrap(),
)),
}
} else { } else {
RequestMiddlewareAction::Proceed { request.into()
should_continue_on_invalid_cors: false,
request,
}
} }
} }
} }
@ -366,9 +346,11 @@ impl JsonRpcService {
// so that we avoid the single-threaded event loops from being created automatically by // so that we avoid the single-threaded event loops from being created automatically by
// jsonrpc for threads when .threads(N > 1) is given. // jsonrpc for threads when .threads(N > 1) is given.
let event_loop = { let event_loop = {
tokio_01::runtime::Builder::new() runtime::Builder::new()
.core_threads(rpc_threads) .core_threads(rpc_threads)
.name_prefix("sol-rpc-el") .threaded_scheduler()
.enable_all()
.thread_name("sol-rpc-el")
.build() .build()
.unwrap() .unwrap()
}; };
@ -391,7 +373,7 @@ impl JsonRpcService {
io, io,
move |_req: &hyper::Request<hyper::Body>| request_processor.clone(), move |_req: &hyper::Request<hyper::Body>| request_processor.clone(),
) )
.event_loop_executor(event_loop.executor()) .event_loop_executor(event_loop.handle().clone())
.threads(1) .threads(1)
.cors(DomainsValidation::AllowOnly(vec![ .cors(DomainsValidation::AllowOnly(vec![
AccessControlAllowOrigin::Any, AccessControlAllowOrigin::Any,

View File

@ -5,7 +5,6 @@ use crate::{
rpc::{get_parsed_token_account, get_parsed_token_accounts}, rpc::{get_parsed_token_account, get_parsed_token_accounts},
}; };
use core::hash::Hash; use core::hash::Hash;
use jsonrpc_core::futures::Future;
use jsonrpc_pubsub::{ use jsonrpc_pubsub::{
typed::{Sink, Subscriber}, typed::{Sink, Subscriber},
SubscriptionId, SubscriptionId,
@ -49,9 +48,6 @@ use std::{
time::Duration, time::Duration,
}; };
// Stuck on tokio 0.1 until the jsonrpc-pubsub crate upgrades to tokio 0.2
use tokio_01::runtime::{Builder as RuntimeBuilder, Runtime, TaskExecutor};
const RECEIVE_DELAY_MILLIS: u64 = 100; const RECEIVE_DELAY_MILLIS: u64 = 100;
trait BankGetTransactionLogsAdapter { trait BankGetTransactionLogsAdapter {
@ -262,15 +258,14 @@ where
notified_set notified_set
} }
struct RpcNotifier(TaskExecutor); struct RpcNotifier;
impl RpcNotifier { impl RpcNotifier {
fn notify<T>(&self, value: T, sink: &Sink<T>) fn notify<T>(&self, value: T, sink: &Sink<T>)
where where
T: serde::Serialize, T: serde::Serialize,
{ {
self.0 let _ = sink.notify(Ok(value));
.spawn(sink.notify(Ok(value)).map(|_| ()).map_err(|_| ()));
} }
} }
@ -418,7 +413,6 @@ pub struct RpcSubscriptions {
subscriptions: Subscriptions, subscriptions: Subscriptions,
notification_sender: Arc<Mutex<Sender<NotificationEntry>>>, notification_sender: Arc<Mutex<Sender<NotificationEntry>>>,
t_cleanup: Option<JoinHandle<()>>, t_cleanup: Option<JoinHandle<()>>,
notifier_runtime: Option<Runtime>,
bank_forks: Arc<RwLock<BankForks>>, bank_forks: Arc<RwLock<BankForks>>,
block_commitment_cache: Arc<RwLock<BlockCommitmentCache>>, block_commitment_cache: Arc<RwLock<BlockCommitmentCache>>,
optimistically_confirmed_bank: Arc<RwLock<OptimisticallyConfirmedBank>>, optimistically_confirmed_bank: Arc<RwLock<OptimisticallyConfirmedBank>>,
@ -493,13 +487,7 @@ impl RpcSubscriptions {
}; };
let _subscriptions = subscriptions.clone(); let _subscriptions = subscriptions.clone();
let notifier_runtime = RuntimeBuilder::new() let notifier = RpcNotifier {};
.core_threads(1)
.name_prefix("solana-rpc-notifier-")
.build()
.unwrap();
let notifier = RpcNotifier(notifier_runtime.executor());
let t_cleanup = Builder::new() let t_cleanup = Builder::new()
.name("solana-rpc-notifications".to_string()) .name("solana-rpc-notifications".to_string())
.spawn(move || { .spawn(move || {
@ -516,7 +504,6 @@ impl RpcSubscriptions {
Self { Self {
subscriptions, subscriptions,
notification_sender, notification_sender,
notifier_runtime: Some(notifier_runtime),
t_cleanup: Some(t_cleanup), t_cleanup: Some(t_cleanup),
bank_forks, bank_forks,
block_commitment_cache, block_commitment_cache,
@ -1269,12 +1256,6 @@ impl RpcSubscriptions {
} }
fn shutdown(&mut self) -> std::thread::Result<()> { fn shutdown(&mut self) -> std::thread::Result<()> {
if let Some(runtime) = self.notifier_runtime.take() {
info!("RPC Notifier runtime - shutting down");
let _ = runtime.shutdown_now().wait();
info!("RPC Notifier runtime - shut down");
}
if self.t_cleanup.is_some() { if self.t_cleanup.is_some() {
info!("RPC Notification thread - shutting down"); info!("RPC Notification thread - shutting down");
self.exit.store(true, Ordering::Relaxed); self.exit.store(true, Ordering::Relaxed);
@ -1294,7 +1275,7 @@ pub(crate) mod tests {
use crate::optimistically_confirmed_bank_tracker::{ use crate::optimistically_confirmed_bank_tracker::{
BankNotification, OptimisticallyConfirmedBank, OptimisticallyConfirmedBankTracker, BankNotification, OptimisticallyConfirmedBank, OptimisticallyConfirmedBankTracker,
}; };
use jsonrpc_core::futures::{self, stream::Stream}; use jsonrpc_core::futures::StreamExt;
use jsonrpc_pubsub::typed::Subscriber; use jsonrpc_pubsub::typed::Subscriber;
use serial_test::serial; use serial_test::serial;
use solana_runtime::{ use solana_runtime::{
@ -1307,31 +1288,37 @@ pub(crate) mod tests {
system_instruction, system_program, system_transaction, system_instruction, system_program, system_transaction,
transaction::Transaction, transaction::Transaction,
}; };
use std::{fmt::Debug, sync::mpsc::channel, time::Instant}; use std::{fmt::Debug, sync::mpsc::channel};
use tokio_01::{prelude::FutureExt, runtime::Runtime, timer::Delay}; use tokio::{
runtime::Runtime,
time::{delay_for, timeout},
};
pub(crate) fn robust_poll_or_panic<T: Debug + Send + 'static>( pub(crate) fn robust_poll_or_panic<T: Debug + Send + 'static>(
receiver: futures::sync::mpsc::Receiver<T>, receiver: jsonrpc_core::futures::channel::mpsc::UnboundedReceiver<T>,
) -> (T, futures::sync::mpsc::Receiver<T>) { ) -> (
T,
jsonrpc_core::futures::channel::mpsc::UnboundedReceiver<T>,
) {
let (inner_sender, inner_receiver) = channel(); let (inner_sender, inner_receiver) = channel();
let mut rt = Runtime::new().unwrap(); let rt = Runtime::new().unwrap();
rt.spawn(futures::lazy(|| { rt.spawn(async move {
let recv_timeout = receiver let result = timeout(
.into_future() Duration::from_millis(RECEIVE_DELAY_MILLIS),
.timeout(Duration::from_millis(RECEIVE_DELAY_MILLIS)) receiver.into_future(),
.map(move |result| match result { )
(Some(value), receiver) => { .await
inner_sender.send((value, receiver)).expect("send error") .unwrap_or_else(|err| panic!("stream error {:?}", err));
}
(None, _) => panic!("unexpected end of stream"),
})
.map_err(|err| panic!("stream error {:?}", err));
const INITIAL_DELAY_MS: u64 = RECEIVE_DELAY_MILLIS * 2; match result {
Delay::new(Instant::now() + Duration::from_millis(INITIAL_DELAY_MS)) (Some(value), receiver) => {
.and_then(|_| recv_timeout) inner_sender.send((value, receiver)).expect("send error")
.map_err(|err| panic!("timer error {:?}", err)) }
})); (None, _) => panic!("unexpected end of stream"),
}
delay_for(Duration::from_millis(RECEIVE_DELAY_MILLIS * 2)).await;
});
inner_receiver.recv().expect("recv error") inner_receiver.recv().expect("recv error")
} }

View File

@ -1,8 +1,5 @@
use bincode::serialize; use bincode::serialize;
use jsonrpc_core::futures::{ use jsonrpc_core::futures::StreamExt;
future::{self, Future},
stream::Stream,
};
use jsonrpc_core_client::transports::ws; use jsonrpc_core_client::transports::ws;
use log::*; use log::*;
use reqwest::{self, header::CONTENT_TYPE}; use reqwest::{self, header::CONTENT_TYPE};
@ -27,7 +24,7 @@ use std::{
thread::sleep, thread::sleep,
time::{Duration, Instant}, time::{Duration, Instant},
}; };
use tokio_01::runtime::Runtime; use tokio::runtime::Runtime;
macro_rules! json_req { macro_rules! json_req {
($method: expr, $params: expr) => {{ ($method: expr, $params: expr) => {{
@ -184,62 +181,48 @@ fn test_rpc_subscriptions() {
let (status_sender, status_receiver) = channel::<(String, Response<RpcSignatureResult>)>(); let (status_sender, status_receiver) = channel::<(String, Response<RpcSignatureResult>)>();
// Create the pub sub runtime // Create the pub sub runtime
let mut rt = Runtime::new().unwrap(); let rt = Runtime::new().unwrap();
let rpc_pubsub_url = test_validator.rpc_pubsub_url();
let signature_set_clone = signature_set.clone();
rt.spawn(async move {
let connect = ws::try_connect::<PubsubClient>(&rpc_pubsub_url).unwrap();
let client = connect.await.unwrap();
// Subscribe to all signatures // Subscribe to signature notifications
rt.spawn({ for sig in signature_set_clone {
let connect = ws::try_connect::<PubsubClient>(&test_validator.rpc_pubsub_url()).unwrap(); let status_sender = status_sender.clone();
let signature_set = signature_set.clone(); let mut sig_sub = client
connect .signature_subscribe(sig.clone(), None)
.and_then(move |client| { .unwrap_or_else(|err| panic!("sig sub err: {:#?}", err));
for sig in signature_set {
let status_sender = status_sender.clone(); tokio::spawn(async move {
tokio_01::spawn( let response = sig_sub.next().await.unwrap();
client status_sender
.signature_subscribe(sig.clone(), None) .send((sig.clone(), response.unwrap()))
.and_then(move |sig_stream| { .unwrap();
sig_stream.for_each(move |result| { });
status_sender.send((sig.clone(), result)).unwrap(); }
future::ok(())
}) // Subscribe to account notifications
}) for pubkey in account_set {
.map_err(|err| { let account_sender = account_sender.clone();
eprintln!("sig sub err: {:#?}", err); let mut client_sub = client
}), .account_subscribe(pubkey, None)
); .unwrap_or_else(|err| panic!("acct sub err: {:#?}", err));
} tokio::spawn(async move {
tokio_01::spawn( let response = client_sub.next().await.unwrap();
client account_sender.send(response.unwrap()).unwrap();
.slot_subscribe() });
.and_then(move |slot_stream| { }
slot_stream.for_each(move |_| {
ready_sender.send(()).unwrap(); // Signal ready after the next slot notification
future::ok(()) let mut slot_sub = client
}) .slot_subscribe()
}) .unwrap_or_else(|err| panic!("sig sub err: {:#?}", err));
.map_err(|err| { tokio::spawn(async move {
eprintln!("slot sub err: {:#?}", err); let _response = slot_sub.next().await.unwrap();
}), ready_sender.send(()).unwrap();
); });
for pubkey in account_set {
let account_sender = account_sender.clone();
tokio_01::spawn(
client
.account_subscribe(pubkey, None)
.and_then(move |account_stream| {
account_stream.for_each(move |result| {
account_sender.send(result).unwrap();
future::ok(())
})
})
.map_err(|err| {
eprintln!("acct sub err: {:#?}", err);
}),
);
}
future::ok(())
})
.map_err(|_| ())
}); });
// Wait for signature subscriptions // Wait for signature subscriptions
@ -311,6 +294,4 @@ fn test_rpc_subscriptions() {
} }
} }
} }
rt.shutdown_now().wait().unwrap();
} }

121
programs/bpf/Cargo.lock generated
View File

@ -830,31 +830,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef"
[[package]] [[package]]
name = "futures-channel" name = "futures"
version = "0.3.7" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0448174b01148032eed37ac4aed28963aaaa8cfa93569a08e5b479bbc6c2c151" checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-channel"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-sink",
] ]
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.7" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18eaa56102984bed2c88ea39026cff3ce3b4c7f508ca970cedf2450ea10d4e46" checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65"
[[package]]
name = "futures-executor"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]] [[package]]
name = "futures-io" name = "futures-io"
version = "0.3.7" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e1798854a4727ff944a7b12aa999f58ce7aa81db80d2dfaaf2ba06f065ddd2b" checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500"
[[package]] [[package]]
name = "futures-macro" name = "futures-macro"
version = "0.3.7" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e36fccf3fc58563b4a14d265027c627c3b665d7fed489427e88e7cc929559efe" checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd"
dependencies = [ dependencies = [
"proc-macro-hack", "proc-macro-hack",
"proc-macro2 1.0.24", "proc-macro2 1.0.24",
@ -864,31 +891,33 @@ dependencies = [
[[package]] [[package]]
name = "futures-sink" name = "futures-sink"
version = "0.3.8" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6"
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.7" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d502af37186c4fef99453df03e374683f8a1eec9dcc1e66b3b82dc8278ce3c" checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86"
dependencies = [ dependencies = [
"once_cell", "once_cell",
] ]
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.7" version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abcb44342f62e6f3e8ac427b8aa815f724fd705dfad060b18ac7866c15bb8e34" checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b"
dependencies = [ dependencies = [
"futures-channel",
"futures-core", "futures-core",
"futures-io", "futures-io",
"futures-macro", "futures-macro",
"futures-sink",
"futures-task", "futures-task",
"memchr", "memchr",
"pin-project 1.0.1", "pin-project-lite 0.2.4",
"pin-utils", "pin-utils",
"proc-macro-hack", "proc-macro-hack",
"proc-macro-nested", "proc-macro-nested",
@ -1110,7 +1139,7 @@ dependencies = [
"httparse", "httparse",
"httpdate", "httpdate",
"itoa", "itoa",
"pin-project 0.4.26", "pin-project",
"socket2", "socket2",
"tokio 0.2.21", "tokio 0.2.21",
"tower-service", "tower-service",
@ -1275,11 +1304,11 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpc-core" name = "jsonrpc-core"
version = "15.1.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" checksum = "07569945133257ff557eb37b015497104cea61a2c9edaf126c1cbd6e8332397f"
dependencies = [ dependencies = [
"futures", "futures 0.3.12",
"log", "log",
"serde", "serde",
"serde_derive", "serde_derive",
@ -1849,16 +1878,7 @@ version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13fbdfd6bdee3dc9be46452f86af4a4072975899cf8592466668620bebfbcc17" checksum = "13fbdfd6bdee3dc9be46452f86af4a4072975899cf8592466668620bebfbcc17"
dependencies = [ dependencies = [
"pin-project-internal 0.4.26", "pin-project-internal",
]
[[package]]
name = "pin-project"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841"
dependencies = [
"pin-project-internal 1.0.1",
] ]
[[package]] [[package]]
@ -1872,17 +1892,6 @@ dependencies = [
"syn 1.0.48", "syn 1.0.48",
] ]
[[package]]
name = "pin-project-internal"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86"
dependencies = [
"proc-macro2 1.0.24",
"quote 1.0.6",
"syn 1.0.48",
]
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.1.5" version = "0.1.5"
@ -1930,9 +1939,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro-hack" name = "proc-macro-hack"
version = "0.5.16" version = "0.5.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
[[package]] [[package]]
name = "proc-macro-nested" name = "proc-macro-nested"
@ -3573,7 +3582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"
dependencies = [ dependencies = [
"bytes 0.4.12", "bytes 0.4.12",
"futures", "futures 0.1.29",
"mio 0.6.22", "mio 0.6.22",
"num_cpus", "num_cpus",
"tokio-codec", "tokio-codec",
@ -3637,7 +3646,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b"
dependencies = [ dependencies = [
"bytes 0.4.12", "bytes 0.4.12",
"futures", "futures 0.1.29",
"tokio-io", "tokio-io",
] ]
@ -3647,7 +3656,7 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e"
dependencies = [ dependencies = [
"futures", "futures 0.1.29",
"tokio-executor", "tokio-executor",
] ]
@ -3658,7 +3667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671"
dependencies = [ dependencies = [
"crossbeam-utils 0.7.2", "crossbeam-utils 0.7.2",
"futures", "futures 0.1.29",
] ]
[[package]] [[package]]
@ -3667,7 +3676,7 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4"
dependencies = [ dependencies = [
"futures", "futures 0.1.29",
"tokio-io", "tokio-io",
"tokio-threadpool", "tokio-threadpool",
] ]
@ -3679,7 +3688,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"
dependencies = [ dependencies = [
"bytes 0.4.12", "bytes 0.4.12",
"futures", "futures 0.1.29",
"log", "log",
] ]
@ -3701,7 +3710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351"
dependencies = [ dependencies = [
"crossbeam-utils 0.7.2", "crossbeam-utils 0.7.2",
"futures", "futures 0.1.29",
"lazy_static", "lazy_static",
"log", "log",
"mio 0.6.22", "mio 0.6.22",
@ -3732,7 +3741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee"
dependencies = [ dependencies = [
"fnv", "fnv",
"futures", "futures 0.1.29",
] ]
[[package]] [[package]]
@ -3742,7 +3751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72"
dependencies = [ dependencies = [
"bytes 0.4.12", "bytes 0.4.12",
"futures", "futures 0.1.29",
"iovec", "iovec",
"mio 0.6.22", "mio 0.6.22",
"tokio-io", "tokio-io",
@ -3758,7 +3767,7 @@ dependencies = [
"crossbeam-deque 0.7.3", "crossbeam-deque 0.7.3",
"crossbeam-queue", "crossbeam-queue",
"crossbeam-utils 0.7.2", "crossbeam-utils 0.7.2",
"futures", "futures 0.1.29",
"lazy_static", "lazy_static",
"log", "log",
"num_cpus", "num_cpus",
@ -3773,7 +3782,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296"
dependencies = [ dependencies = [
"crossbeam-utils 0.7.2", "crossbeam-utils 0.7.2",
"futures", "futures 0.1.29",
"slab", "slab",
"tokio-executor", "tokio-executor",
] ]
@ -3785,7 +3794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"
dependencies = [ dependencies = [
"bytes 0.4.12", "bytes 0.4.12",
"futures", "futures 0.1.29",
"log", "log",
"mio 0.6.22", "mio 0.6.22",
"tokio-codec", "tokio-codec",
@ -3800,7 +3809,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798" checksum = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798"
dependencies = [ dependencies = [
"bytes 0.4.12", "bytes 0.4.12",
"futures", "futures 0.1.29",
"iovec", "iovec",
"libc", "libc",
"log", "log",