Bump jsonrpc crates and remove old tokio (#19454)

This commit is contained in:
Tyera Eulberg
2021-08-26 17:53:44 -06:00
committed by GitHub
parent 715c5e64c4
commit 39a5431790
11 changed files with 294 additions and 892 deletions

453
Cargo.lock generated
View File

@ -190,7 +190,7 @@ dependencies = [
"instant",
"pin-project 1.0.1",
"rand 0.8.3",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -811,17 +811,6 @@ dependencies = [
"crossbeam-utils 0.8.5",
]
[[package]]
name = "crossbeam-deque"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed"
dependencies = [
"crossbeam-epoch 0.8.2",
"crossbeam-utils 0.7.2",
"maybe-uninit",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.1"
@ -829,25 +818,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-epoch 0.9.5",
"crossbeam-epoch",
"crossbeam-utils 0.8.5",
]
[[package]]
name = "crossbeam-epoch"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
dependencies = [
"autocfg 1.0.0",
"cfg-if 0.1.10",
"crossbeam-utils 0.7.2",
"lazy_static",
"maybe-uninit",
"memoffset 0.5.4",
"scopeguard",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.5"
@ -857,21 +831,10 @@ dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils 0.8.5",
"lazy_static",
"memoffset 0.6.1",
"memoffset",
"scopeguard",
]
[[package]]
name = "crossbeam-queue"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"
dependencies = [
"cfg-if 0.1.10",
"crossbeam-utils 0.7.2",
"maybe-uninit",
]
[[package]]
name = "crossbeam-utils"
version = "0.7.2"
@ -1610,7 +1573,7 @@ dependencies = [
"simpl",
"smpl_jwt",
"time 0.2.25",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -1624,25 +1587,6 @@ dependencies = [
"scroll",
]
[[package]]
name = "h2"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff"
dependencies = [
"bytes 0.5.4",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
"indexmap",
"log 0.4.11",
"slab",
"tokio 0.2.22",
"tokio-util 0.3.1",
]
[[package]]
name = "h2"
version = "0.3.3"
@ -1657,8 +1601,8 @@ dependencies = [
"http",
"indexmap",
"slab",
"tokio 1.8.1",
"tokio-util 0.6.3",
"tokio",
"tokio-util",
"tracing",
]
@ -1795,16 +1739,6 @@ dependencies = [
"itoa",
]
[[package]]
name = "http-body"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [
"bytes 0.5.4",
"http",
]
[[package]]
name = "http-body"
version = "0.4.2"
@ -1813,7 +1747,7 @@ checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9"
dependencies = [
"bytes 1.0.1",
"http",
"pin-project-lite 0.2.7",
"pin-project-lite",
]
[[package]]
@ -1822,12 +1756,6 @@ version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68"
[[package]]
name = "httpdate"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
[[package]]
name = "httpdate"
version = "1.0.1"
@ -1859,30 +1787,6 @@ dependencies = [
"url 1.7.2",
]
[[package]]
name = "hyper"
version = "0.13.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb"
dependencies = [
"bytes 0.5.4",
"futures-channel",
"futures-core",
"futures-util",
"h2 0.2.5",
"http",
"http-body 0.3.1",
"httparse",
"httpdate 0.3.2",
"itoa",
"pin-project 1.0.1",
"socket2 0.3.17",
"tokio 0.2.22",
"tower-service",
"tracing",
"want",
]
[[package]]
name = "hyper"
version = "0.14.11"
@ -1893,15 +1797,15 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"h2 0.3.3",
"h2",
"http",
"http-body 0.4.2",
"http-body",
"httparse",
"httpdate 1.0.1",
"httpdate",
"itoa",
"pin-project-lite 0.2.7",
"pin-project-lite",
"socket2 0.4.1",
"tokio 1.8.1",
"tokio",
"tower-service",
"tracing",
"want",
@ -1917,7 +1821,7 @@ dependencies = [
"hyper 0.14.11",
"log 0.4.11",
"rustls",
"tokio 1.8.1",
"tokio",
"tokio-rustls",
"webpki",
]
@ -1929,8 +1833,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
dependencies = [
"hyper 0.14.11",
"pin-project-lite 0.2.7",
"tokio 1.8.1",
"pin-project-lite",
"tokio",
"tokio-io-timeout",
]
@ -1943,7 +1847,7 @@ dependencies = [
"bytes 1.0.1",
"hyper 0.14.11",
"native-tls",
"tokio 1.8.1",
"tokio",
"tokio-native-tls",
]
@ -2110,9 +2014,9 @@ dependencies = [
[[package]]
name = "jsonrpc-client-transports"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2f81014e2706fde057e9dcb1036cf6bbf9418d972c597be5c7158c984656722"
checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a"
dependencies = [
"derive_more",
"futures 0.3.8",
@ -2123,16 +2027,16 @@ dependencies = [
"parity-tokio-ipc",
"serde",
"serde_json",
"tokio 0.2.22",
"tokio",
"url 1.7.2",
"websocket",
]
[[package]]
name = "jsonrpc-core"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4467ab6dfa369b69e52bd0692e480c4d117410538526a57a304a0f2250fd95e"
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
dependencies = [
"futures 0.3.8",
"futures-executor",
@ -2145,9 +2049,9 @@ dependencies = [
[[package]]
name = "jsonrpc-core-client"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c366c092d6bccc6e7ab44dd635a0f22ab2f201215339915fb7ff9508404f431"
checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0"
dependencies = [
"futures 0.3.8",
"jsonrpc-client-transports",
@ -2155,9 +2059,9 @@ dependencies = [
[[package]]
name = "jsonrpc-derive"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34f6326966ebac440db89eba788f5a0e5ac2614b4b4bfbdc049a971e71040f32"
checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2"
dependencies = [
"proc-macro-crate",
"proc-macro2 1.0.24",
@ -2167,12 +2071,12 @@ dependencies = [
[[package]]
name = "jsonrpc-http-server"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "522a047cac0958097ee71d047dd71cb84979fd2fa21c7a68fbe12736bef870a2"
checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff"
dependencies = [
"futures 0.3.8",
"hyper 0.13.10",
"hyper 0.14.11",
"jsonrpc-core",
"jsonrpc-server-utils",
"log 0.4.11",
@ -2183,9 +2087,9 @@ dependencies = [
[[package]]
name = "jsonrpc-ipc-server"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b1d782052ef17051d12681bcc2fa2e9e1aabf3f634588125493d63ddcca6fe1"
checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845"
dependencies = [
"futures 0.3.8",
"jsonrpc-core",
@ -2198,9 +2102,9 @@ dependencies = [
[[package]]
name = "jsonrpc-pubsub"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14739e5523a40739882cc34a44ab2dd9356bce5ce102513f5984a9efbe342f3d"
checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011"
dependencies = [
"futures 0.3.8",
"jsonrpc-core",
@ -2213,26 +2117,27 @@ dependencies = [
[[package]]
name = "jsonrpc-server-utils"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bce68fa279a2822b3619369cd024f8a4f8e5ce485468834f8679a3c7919aae2d"
checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4"
dependencies = [
"bytes 0.5.4",
"bytes 1.0.1",
"futures 0.3.8",
"globset",
"jsonrpc-core",
"lazy_static",
"log 0.4.11",
"tokio 0.2.22",
"tokio-util 0.3.1",
"tokio",
"tokio-stream",
"tokio-util",
"unicase 2.6.0",
]
[[package]]
name = "jsonrpc-ws-server"
version = "17.1.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d267a8649ec37e4452dd7b3f48827c9cdf36de3a3539cf73242c222ba2eb50"
checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946"
dependencies = [
"futures 0.3.8",
"jsonrpc-core",
@ -2452,15 +2357,6 @@ dependencies = [
"libc",
]
[[package]]
name = "memoffset"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
dependencies = [
"autocfg 1.0.0",
]
[[package]]
name = "memoffset"
version = "0.6.1"
@ -2538,29 +2434,6 @@ dependencies = [
"slab",
]
[[package]]
name = "mio-named-pipes"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656"
dependencies = [
"log 0.4.11",
"mio 0.6.22",
"miow 0.3.6",
"winapi 0.3.9",
]
[[package]]
name = "mio-uds"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0"
dependencies = [
"iovec",
"libc",
"mio 0.6.22",
]
[[package]]
name = "miow"
version = "0.2.2"
@ -2836,25 +2709,23 @@ dependencies = [
[[package]]
name = "parity-tokio-ipc"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd7f6c69d7687501b2205fe51ade1d7b8797bb3aa141fe5bf13dd78c0483bc89"
checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6"
dependencies = [
"futures 0.3.8",
"libc",
"log 0.4.11",
"mio-named-pipes",
"miow 0.3.6",
"rand 0.7.3",
"tokio 0.2.22",
"tokio",
"winapi 0.3.9",
]
[[package]]
name = "parity-ws"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e02a625dd75084c2a7024f07c575b61b782f729d18702dabb3cdbf31911dc61"
checksum = "d0ab8a461779bd022964cae2b4989fa9c99deb270bec162da2125ec03c09fcaa"
dependencies = [
"byteorder",
"bytes 0.4.12",
@ -3084,12 +2955,6 @@ dependencies = [
"syn 1.0.60",
]
[[package]]
name = "pin-project-lite"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f"
[[package]]
name = "pin-project-lite"
version = "0.2.7"
@ -3520,7 +3385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
dependencies = [
"autocfg 1.0.0",
"crossbeam-deque 0.8.1",
"crossbeam-deque",
"either",
"rayon-core",
]
@ -3532,7 +3397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
dependencies = [
"crossbeam-channel 0.5.0",
"crossbeam-deque 0.8.1",
"crossbeam-deque",
"crossbeam-utils 0.8.5",
"lazy_static",
"num_cpus",
@ -3623,7 +3488,7 @@ dependencies = [
"futures-core",
"futures-util",
"http",
"http-body 0.4.2",
"http-body",
"hyper 0.14.11",
"hyper-rustls",
"hyper-tls",
@ -3634,12 +3499,12 @@ dependencies = [
"mime 0.3.16",
"native-tls",
"percent-encoding 2.1.0",
"pin-project-lite 0.2.7",
"pin-project-lite",
"rustls",
"serde",
"serde_json",
"serde_urlencoded",
"tokio 1.8.1",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"url 2.2.0",
@ -4213,7 +4078,7 @@ dependencies = [
"solana-runtime",
"solana-sdk",
"tarpc",
"tokio 1.8.1",
"tokio",
"tokio-serde",
]
@ -4225,7 +4090,7 @@ dependencies = [
"serde",
"solana-sdk",
"tarpc",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -4241,7 +4106,7 @@ dependencies = [
"solana-runtime",
"solana-sdk",
"tarpc",
"tokio 1.8.1",
"tokio",
"tokio-serde",
"tokio-stream",
]
@ -4497,7 +4362,7 @@ dependencies = [
"solana-version",
"solana-vote-program",
"thiserror",
"tokio 1.8.1",
"tokio",
"tungstenite",
"url 2.2.0",
]
@ -4593,9 +4458,8 @@ dependencies = [
"systemstat",
"tempfile",
"thiserror",
"tokio 0.2.22",
"tokio 1.8.1",
"tokio-util 0.3.1",
"tokio",
"tokio-util",
"trees",
]
@ -4617,7 +4481,6 @@ dependencies = [
"serde",
"syn 0.15.44",
"syn 1.0.60",
"tokio 0.1.22",
"winapi 0.3.9",
]
@ -4698,7 +4561,7 @@ dependencies = [
"solana-version",
"spl-memo",
"thiserror",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -4901,7 +4764,7 @@ dependencies = [
"solana-vote-program",
"tempfile",
"thiserror",
"tokio 1.8.1",
"tokio",
"tokio-stream",
"trees",
]
@ -4938,7 +4801,7 @@ dependencies = [
"solana-version",
"solana-vote-program",
"tempfile",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -5079,7 +4942,7 @@ dependencies = [
"solana-clap-utils",
"solana-logger 1.6.23",
"solana-version",
"tokio 1.8.1",
"tokio",
"url 2.2.0",
]
@ -5243,7 +5106,7 @@ dependencies = [
"solana-stake-program",
"solana-vote-program",
"thiserror",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -5999,9 +5862,9 @@ dependencies = [
"serde",
"static_assertions",
"tarpc-plugins",
"tokio 1.8.1",
"tokio",
"tokio-serde",
"tokio-util 0.6.3",
"tokio-util",
]
[[package]]
@ -6198,54 +6061,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"mio 0.6.22",
"num_cpus",
"tokio-codec",
"tokio-current-thread",
"tokio-executor",
"tokio-fs",
"tokio-io",
"tokio-reactor",
"tokio-sync",
"tokio-tcp",
"tokio-threadpool",
"tokio-timer",
"tokio-udp",
"tokio-uds",
]
[[package]]
name = "tokio"
version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd"
dependencies = [
"bytes 0.5.4",
"fnv",
"futures-core",
"iovec",
"lazy_static",
"libc",
"memchr 2.4.0",
"mio 0.6.22",
"mio-named-pipes",
"mio-uds",
"num_cpus",
"pin-project-lite 0.1.5",
"signal-hook-registry",
"slab",
"tokio-macros 0.2.6",
"winapi 0.3.9",
]
[[package]]
name = "tokio"
version = "1.8.1"
@ -6260,9 +6075,9 @@ dependencies = [
"num_cpus",
"once_cell",
"parking_lot 0.11.0",
"pin-project-lite 0.2.7",
"pin-project-lite",
"signal-hook-registry",
"tokio-macros 1.3.0",
"tokio-macros",
"winapi 0.3.9",
]
@ -6277,16 +6092,6 @@ dependencies = [
"tokio-io",
]
[[package]]
name = "tokio-current-thread"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e"
dependencies = [
"futures 0.1.29",
"tokio-executor",
]
[[package]]
name = "tokio-executor"
version = "0.1.10"
@ -6297,17 +6102,6 @@ dependencies = [
"futures 0.1.29",
]
[[package]]
name = "tokio-fs"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4"
dependencies = [
"futures 0.1.29",
"tokio-io",
"tokio-threadpool",
]
[[package]]
name = "tokio-io"
version = "0.1.13"
@ -6325,19 +6119,8 @@ version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90c49f106be240de154571dd31fbe48acb10ba6c6dd6f6517ad603abffa42de9"
dependencies = [
"pin-project-lite 0.2.7",
"tokio 1.8.1",
]
[[package]]
name = "tokio-macros"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a"
dependencies = [
"proc-macro2 1.0.24",
"quote 1.0.9",
"syn 1.0.60",
"pin-project-lite",
"tokio",
]
[[package]]
@ -6358,7 +6141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [
"native-tls",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -6387,7 +6170,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls",
"tokio 1.8.1",
"tokio",
"webpki",
]
@ -6414,8 +6197,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76066865172052eb8796c686f0b441a93df8b08d40a950b062ffb9a426f00edd"
dependencies = [
"futures-core",
"pin-project-lite 0.2.7",
"tokio 1.8.1",
"pin-project-lite",
"tokio",
]
[[package]]
@ -6442,35 +6225,6 @@ dependencies = [
"tokio-reactor",
]
[[package]]
name = "tokio-threadpool"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89"
dependencies = [
"crossbeam-deque 0.7.4",
"crossbeam-queue",
"crossbeam-utils 0.7.2",
"futures 0.1.29",
"lazy_static",
"log 0.4.11",
"num_cpus",
"slab",
"tokio-executor",
]
[[package]]
name = "tokio-timer"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296"
dependencies = [
"crossbeam-utils 0.7.2",
"futures 0.1.29",
"slab",
"tokio-executor",
]
[[package]]
name = "tokio-tls"
version = "0.2.1"
@ -6482,53 +6236,6 @@ dependencies = [
"tokio-io",
]
[[package]]
name = "tokio-udp"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"log 0.4.11",
"mio 0.6.22",
"tokio-codec",
"tokio-io",
"tokio-reactor",
]
[[package]]
name = "tokio-uds"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"iovec",
"libc",
"log 0.4.11",
"mio 0.6.22",
"mio-uds",
"tokio-codec",
"tokio-io",
"tokio-reactor",
]
[[package]]
name = "tokio-util"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"
dependencies = [
"bytes 0.5.4",
"futures-core",
"futures-sink",
"log 0.4.11",
"pin-project-lite 0.1.5",
"tokio 0.2.22",
]
[[package]]
name = "tokio-util"
version = "0.6.3"
@ -6539,8 +6246,8 @@ dependencies = [
"futures-core",
"futures-sink",
"log 0.4.11",
"pin-project-lite 0.2.7",
"tokio 1.8.1",
"pin-project-lite",
"tokio",
]
[[package]]
@ -6564,19 +6271,19 @@ dependencies = [
"bytes 1.0.1",
"futures-core",
"futures-util",
"h2 0.3.3",
"h2",
"http",
"http-body 0.4.2",
"http-body",
"hyper 0.14.11",
"hyper-timeout",
"percent-encoding 2.1.0",
"pin-project 1.0.1",
"prost",
"prost-derive",
"tokio 1.8.1",
"tokio",
"tokio-rustls",
"tokio-stream",
"tokio-util 0.6.3",
"tokio-util",
"tower",
"tower-layer",
"tower-service",
@ -6608,9 +6315,9 @@ dependencies = [
"pin-project 1.0.1",
"rand 0.8.3",
"slab",
"tokio 1.8.1",
"tokio",
"tokio-stream",
"tokio-util 0.6.3",
"tokio-util",
"tower-layer",
"tower-service",
"tracing",
@ -6636,7 +6343,7 @@ checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
dependencies = [
"cfg-if 1.0.0",
"log 0.4.11",
"pin-project-lite 0.2.7",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
]

View File

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

View File

@ -29,12 +29,12 @@ fs_extra = "1.2.0"
flate2 = "1.0"
indexmap = { version = "1.5", features = ["rayon"] }
itertools = "0.9.0"
jsonrpc-core = "17.1.0"
jsonrpc-core-client = { version = "17.1.0", features = ["ipc", "ws"] }
jsonrpc-derive = "17.1.0"
jsonrpc-http-server = "17.1.0"
jsonrpc-pubsub = "17.1.0"
jsonrpc-ws-server = "17.1.0"
jsonrpc-core = "18.0.0"
jsonrpc-core-client = { version = "18.0.0", features = ["ipc", "ws"] }
jsonrpc-derive = "18.0.0"
jsonrpc-http-server = "18.0.0"
jsonrpc-pubsub = "18.0.0"
jsonrpc-ws-server = "18.0.0"
libc = "0.2.81"
log = "0.4.11"
lru = "0.6.1"
@ -80,8 +80,7 @@ spl-token-v2-0 = { package = "spl-token", version = "=3.1.1", features = ["no-en
tempfile = "3.1.0"
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }
tokio_02 = { version = "0.2", package = "tokio", features = ["full"] }
tokio-util = { version = "0.3", features = ["codec"] } # This crate needs to stay in sync with tokio_02, until that dependency can be removed
tokio-util = { version = "0.6", features = ["codec"] }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.6.23" }
trees = "0.2.1"

View File

@ -11,7 +11,7 @@ use crate::{
validator::ValidatorExit,
};
use bincode::{config::Options, serialize};
use jsonrpc_core::{types::error, Error, Metadata, Result};
use jsonrpc_core::{futures::future, types::error, BoxFuture, Error, Metadata, Result};
use jsonrpc_derive::rpc;
use serde::{Deserialize, Serialize};
use solana_account_decoder::{
@ -91,7 +91,6 @@ use std::{
},
time::Duration,
};
use tokio::runtime::Runtime;
pub const MAX_REQUEST_PAYLOAD_SIZE: usize = 50 * (1 << 10); // 50kB
pub const PERFORMANCE_SAMPLES_LIMIT: usize = 720;
@ -154,7 +153,6 @@ pub struct JsonRpcRequestProcessor {
cluster_info: Arc<ClusterInfo>,
genesis_hash: Hash,
transaction_sender: Arc<Mutex<Sender<TransactionInfo>>>,
runtime: Arc<Runtime>,
bigtable_ledger_storage: Option<solana_storage_bigtable::LedgerStorage>,
optimistically_confirmed_bank: Arc<RwLock<OptimisticallyConfirmedBank>>,
largest_accounts_cache: Arc<RwLock<LargestAccountsCache>>,
@ -240,7 +238,6 @@ impl JsonRpcRequestProcessor {
health: Arc<RpcHealth>,
cluster_info: Arc<ClusterInfo>,
genesis_hash: Hash,
runtime: Arc<Runtime>,
bigtable_ledger_storage: Option<solana_storage_bigtable::LedgerStorage>,
optimistically_confirmed_bank: Arc<RwLock<OptimisticallyConfirmedBank>>,
largest_accounts_cache: Arc<RwLock<LargestAccountsCache>>,
@ -261,7 +258,6 @@ impl JsonRpcRequestProcessor {
cluster_info,
genesis_hash,
transaction_sender: Arc::new(Mutex::new(sender)),
runtime,
bigtable_ledger_storage,
optimistically_confirmed_bank,
largest_accounts_cache,
@ -302,7 +298,6 @@ impl JsonRpcRequestProcessor {
cluster_info,
genesis_hash,
transaction_sender: Arc::new(Mutex::new(sender)),
runtime: Arc::new(Runtime::new().expect("Runtime")),
bigtable_ledger_storage: None,
optimistically_confirmed_bank: Arc::new(RwLock::new(OptimisticallyConfirmedBank {
bank: bank.clone(),
@ -402,14 +397,14 @@ impl JsonRpcRequestProcessor {
})
}
pub fn get_inflation_reward(
pub async fn get_inflation_reward(
&self,
addresses: Vec<Pubkey>,
config: Option<RpcEpochConfig>,
) -> Result<Vec<Option<RpcInflationReward>>> {
let config = config.unwrap_or_default();
let epoch_schedule = self.get_epoch_schedule();
let first_available_block = self.get_first_available_block();
let first_available_block = self.get_first_available_block().await;
let epoch = config.epoch.unwrap_or_else(|| {
epoch_schedule
.get_epoch(self.get_slot(config.commitment))
@ -434,7 +429,8 @@ impl JsonRpcRequestProcessor {
}
let first_confirmed_block_in_epoch = *self
.get_confirmed_blocks_with_limit(first_slot_in_epoch, 1, config.commitment)?
.get_confirmed_blocks_with_limit(first_slot_in_epoch, 1, config.commitment)
.await?
.get(0)
.ok_or(RpcCustomError::BlockNotAvailable {
slot: first_slot_in_epoch,
@ -444,7 +440,9 @@ impl JsonRpcRequestProcessor {
.get_confirmed_block(
first_confirmed_block_in_epoch,
Some(RpcConfirmedBlockConfig::rewards_with_commitment(config.commitment).into()),
) {
)
.await
{
first_confirmed_block
} else {
return Err(RpcCustomError::BlockNotAvailable {
@ -914,7 +912,7 @@ impl JsonRpcRequestProcessor {
Ok(())
}
pub fn get_confirmed_block(
pub async fn get_confirmed_block(
&self,
slot: Slot,
config: Option<RpcEncodingConfigWrapper<RpcConfirmedBlockConfig>>,
@ -941,9 +939,8 @@ impl JsonRpcRequestProcessor {
self.check_blockstore_root(&result, slot)?;
if result.is_err() {
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
let bigtable_result = self
.runtime
.block_on(bigtable_ledger_storage.get_confirmed_block(slot));
let bigtable_result =
bigtable_ledger_storage.get_confirmed_block(slot).await;
self.check_bigtable_result(&bigtable_result)?;
return Ok(bigtable_result.ok().map(|confirmed_block| {
confirmed_block.configure(encoding, transaction_details, show_rewards)
@ -989,7 +986,7 @@ impl JsonRpcRequestProcessor {
Err(RpcCustomError::BlockNotAvailable { slot }.into())
}
pub fn get_confirmed_blocks(
pub async fn get_confirmed_blocks(
&self,
start_slot: Slot,
end_slot: Option<Slot>,
@ -1028,12 +1025,9 @@ impl JsonRpcRequestProcessor {
// [start_slot..end_slot] can be fetched from BigTable. This range should not ever run
// into unfinalized confirmed blocks due to MAX_GET_CONFIRMED_BLOCKS_RANGE
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
return self
.runtime
.block_on(
bigtable_ledger_storage
.get_confirmed_blocks(start_slot, (end_slot - start_slot) as usize + 1), // increment limit by 1 to ensure returned range is inclusive of both start_slot and end_slot
)
return bigtable_ledger_storage
.get_confirmed_blocks(start_slot, (end_slot - start_slot) as usize + 1) // increment limit by 1 to ensure returned range is inclusive of both start_slot and end_slot
.await
.map(|mut bigtable_blocks| {
bigtable_blocks.retain(|&slot| slot <= end_slot);
bigtable_blocks
@ -1073,7 +1067,7 @@ impl JsonRpcRequestProcessor {
Ok(blocks)
}
pub fn get_confirmed_blocks_with_limit(
pub async fn get_confirmed_blocks_with_limit(
&self,
start_slot: Slot,
limit: usize,
@ -1096,9 +1090,9 @@ impl JsonRpcRequestProcessor {
// range can be fetched from BigTable. This range should not ever run into unfinalized
// confirmed blocks due to MAX_GET_CONFIRMED_BLOCKS_RANGE
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
return Ok(self
.runtime
.block_on(bigtable_ledger_storage.get_confirmed_blocks(start_slot, limit))
return Ok(bigtable_ledger_storage
.get_confirmed_blocks(start_slot, limit)
.await
.unwrap_or_default());
}
}
@ -1137,7 +1131,7 @@ impl JsonRpcRequestProcessor {
Ok(blocks)
}
pub fn get_block_time(&self, slot: Slot) -> Result<Option<UnixTimestamp>> {
pub async fn get_block_time(&self, slot: Slot) -> Result<Option<UnixTimestamp>> {
if slot
<= self
.block_commitment_cache
@ -1149,9 +1143,7 @@ impl JsonRpcRequestProcessor {
self.check_blockstore_root(&result, slot)?;
if result.is_err() || matches!(result, Ok(None)) {
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
let bigtable_result = self
.runtime
.block_on(bigtable_ledger_storage.get_confirmed_block(slot));
let bigtable_result = bigtable_ledger_storage.get_confirmed_block(slot).await;
self.check_bigtable_result(&bigtable_result)?;
return Ok(bigtable_result
.ok()
@ -1196,7 +1188,7 @@ impl JsonRpcRequestProcessor {
Some(status)
}
pub fn get_signature_statuses(
pub async fn get_signature_statuses(
&self,
signatures: Vec<Signature>,
config: Option<RpcSignatureStatusConfig>,
@ -1216,7 +1208,8 @@ impl JsonRpcRequestProcessor {
let status = if let Some(status) = self.get_transaction_status(signature, &bank) {
Some(status)
} else if self.config.enable_rpc_transaction_history && search_transaction_history {
self.blockstore
if let Some(status) = self
.blockstore
.get_rooted_transaction_status(signature)
.map_err(|_| Error::internal_error())?
.filter(|(slot, _status_meta)| {
@ -1236,16 +1229,17 @@ impl JsonRpcRequestProcessor {
confirmation_status: Some(TransactionConfirmationStatus::Finalized),
}
})
.or_else(|| {
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
self.runtime
.block_on(bigtable_ledger_storage.get_signature_status(&signature))
.map(Some)
.unwrap_or(None)
} else {
None
}
})
{
Some(status)
} else if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
bigtable_ledger_storage
.get_signature_status(&signature)
.await
.map(Some)
.unwrap_or(None)
} else {
None
}
} else {
None
};
@ -1291,7 +1285,7 @@ impl JsonRpcRequestProcessor {
})
}
pub fn get_confirmed_transaction(
pub async fn get_confirmed_transaction(
&self,
signature: Signature,
config: Option<RpcEncodingConfigWrapper<RpcConfirmedTransactionConfig>>,
@ -1339,9 +1333,9 @@ impl JsonRpcRequestProcessor {
}
None => {
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
return Ok(self
.runtime
.block_on(bigtable_ledger_storage.get_confirmed_transaction(&signature))
return Ok(bigtable_ledger_storage
.get_confirmed_transaction(&signature)
.await
.unwrap_or(None)
.map(|confirmed| confirmed.encode(encoding)));
}
@ -1377,7 +1371,7 @@ impl JsonRpcRequestProcessor {
}
}
pub fn get_confirmed_signatures_for_address2(
pub async fn get_confirmed_signatures_for_address2(
&self,
address: Pubkey,
mut before: Option<Signature>,
@ -1413,14 +1407,14 @@ impl JsonRpcRequestProcessor {
before = results.last().map(|x| x.signature);
}
let bigtable_results = self.runtime.block_on(
bigtable_ledger_storage.get_confirmed_signatures_for_address(
let bigtable_results = bigtable_ledger_storage
.get_confirmed_signatures_for_address(
&address,
before.as_ref(),
until.as_ref(),
limit,
),
);
)
.await;
match bigtable_results {
Ok(bigtable_results) => {
results.extend(bigtable_results.into_iter().map(|x| x.0));
@ -1455,16 +1449,16 @@ impl JsonRpcRequestProcessor {
}
}
pub fn get_first_available_block(&self) -> Slot {
pub async fn get_first_available_block(&self) -> Slot {
let slot = self
.blockstore
.get_first_available_block()
.unwrap_or_default();
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
let bigtable_slot = self
.runtime
.block_on(bigtable_ledger_storage.get_first_available_block())
let bigtable_slot = bigtable_ledger_storage
.get_first_available_block()
.await
.unwrap_or(None)
.unwrap_or(slot);
@ -1935,6 +1929,28 @@ fn verify_token_account_filter(
}
}
fn verify_and_parse_signatures_for_address_params(
address: String,
before: Option<String>,
until: Option<String>,
limit: Option<usize>,
) -> Result<(Pubkey, Option<Signature>, Option<Signature>, usize)> {
let address = verify_pubkey(&address)?;
let before = before
.map(|ref before| verify_signature(before))
.transpose()?;
let until = until.map(|ref until| verify_signature(until)).transpose()?;
let limit = limit.unwrap_or(MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS2_LIMIT);
if limit == 0 || limit > MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS2_LIMIT {
return Err(Error::invalid_params(format!(
"Invalid limit; max {}",
MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS2_LIMIT
)));
}
Ok((address, before, until, limit))
}
fn check_is_at_least_confirmed(commitment: CommitmentConfig) -> Result<()> {
if !commitment.is_at_least_confirmed() {
return Err(Error::invalid_params(
@ -2475,7 +2491,7 @@ pub mod rpc_full {
meta: Self::Metadata,
address_strs: Vec<String>,
config: Option<RpcEpochConfig>,
) -> Result<Vec<Option<RpcInflationReward>>>;
) -> BoxFuture<Result<Vec<Option<RpcInflationReward>>>>;
#[rpc(meta, name = "getInflationGovernor")]
fn get_inflation_governor(
@ -2544,7 +2560,7 @@ pub mod rpc_full {
meta: Self::Metadata,
signature_strs: Vec<String>,
config: Option<RpcSignatureStatusConfig>,
) -> Result<RpcResponse<Vec<Option<TransactionStatus>>>>;
) -> BoxFuture<Result<RpcResponse<Vec<Option<TransactionStatus>>>>>;
#[rpc(meta, name = "getMaxRetransmitSlot")]
fn get_max_retransmit_slot(&self, meta: Self::Metadata) -> Result<Slot>;
@ -2623,11 +2639,14 @@ pub mod rpc_full {
meta: Self::Metadata,
slot: Slot,
config: Option<RpcEncodingConfigWrapper<RpcConfirmedBlockConfig>>,
) -> Result<Option<UiConfirmedBlock>>;
) -> BoxFuture<Result<Option<UiConfirmedBlock>>>;
#[rpc(meta, name = "getBlockTime")]
fn get_block_time(&self, meta: Self::Metadata, slot: Slot)
-> Result<Option<UnixTimestamp>>;
fn get_block_time(
&self,
meta: Self::Metadata,
slot: Slot,
) -> BoxFuture<Result<Option<UnixTimestamp>>>;
#[rpc(meta, name = "getConfirmedBlocks")]
fn get_confirmed_blocks(
@ -2636,7 +2655,7 @@ pub mod rpc_full {
start_slot: Slot,
config: Option<RpcConfirmedBlocksConfigWrapper>,
commitment: Option<CommitmentConfig>,
) -> Result<Vec<Slot>>;
) -> BoxFuture<Result<Vec<Slot>>>;
#[rpc(meta, name = "getConfirmedBlocksWithLimit")]
fn get_confirmed_blocks_with_limit(
@ -2645,7 +2664,7 @@ pub mod rpc_full {
start_slot: Slot,
limit: usize,
commitment: Option<CommitmentConfig>,
) -> Result<Vec<Slot>>;
) -> BoxFuture<Result<Vec<Slot>>>;
#[rpc(meta, name = "getConfirmedTransaction")]
fn get_confirmed_transaction(
@ -2653,7 +2672,7 @@ pub mod rpc_full {
meta: Self::Metadata,
signature_str: String,
config: Option<RpcEncodingConfigWrapper<RpcConfirmedTransactionConfig>>,
) -> Result<Option<EncodedConfirmedTransaction>>;
) -> BoxFuture<Result<Option<EncodedConfirmedTransaction>>>;
// DEPRECATED
#[rpc(meta, name = "getConfirmedSignaturesForAddress")]
@ -2671,10 +2690,10 @@ pub mod rpc_full {
meta: Self::Metadata,
address: String,
config: Option<RpcGetConfirmedSignaturesForAddress2Config>,
) -> Result<Vec<RpcConfirmedTransactionStatusWithSignature>>;
) -> BoxFuture<Result<Vec<RpcConfirmedTransactionStatusWithSignature>>>;
#[rpc(meta, name = "getFirstAvailableBlock")]
fn get_first_available_block(&self, meta: Self::Metadata) -> Result<Slot>;
fn get_first_available_block(&self, meta: Self::Metadata) -> BoxFuture<Result<Slot>>;
#[rpc(meta, name = "getStakeActivation")]
fn get_stake_activation(
@ -3018,22 +3037,27 @@ pub mod rpc_full {
meta: Self::Metadata,
signature_strs: Vec<String>,
config: Option<RpcSignatureStatusConfig>,
) -> Result<RpcResponse<Vec<Option<TransactionStatus>>>> {
) -> BoxFuture<Result<RpcResponse<Vec<Option<TransactionStatus>>>>> {
debug!(
"get_signature_statuses rpc request received: {:?}",
signature_strs.len()
);
if signature_strs.len() > MAX_GET_SIGNATURE_STATUSES_QUERY_ITEMS {
return Err(Error::invalid_params(format!(
return Box::pin(future::err(Error::invalid_params(format!(
"Too many inputs provided; max {}",
MAX_GET_SIGNATURE_STATUSES_QUERY_ITEMS
)));
))));
}
let mut signatures: Vec<Signature> = vec![];
for signature_str in signature_strs {
signatures.push(verify_signature(&signature_str)?);
match verify_signature(&signature_str) {
Ok(signature) => {
signatures.push(signature);
}
Err(err) => return Box::pin(future::err(err)),
}
}
meta.get_signature_statuses(signatures, config)
Box::pin(async move { meta.get_signature_statuses(signatures, config).await })
}
fn get_max_retransmit_slot(&self, meta: Self::Metadata) -> Result<Slot> {
@ -3343,9 +3367,9 @@ pub mod rpc_full {
meta: Self::Metadata,
slot: Slot,
config: Option<RpcEncodingConfigWrapper<RpcConfirmedBlockConfig>>,
) -> Result<Option<UiConfirmedBlock>> {
) -> BoxFuture<Result<Option<UiConfirmedBlock>>> {
debug!("get_confirmed_block rpc request received: {:?}", slot);
meta.get_confirmed_block(slot, config)
Box::pin(async move { meta.get_confirmed_block(slot, config).await })
}
fn get_confirmed_blocks(
@ -3354,14 +3378,17 @@ pub mod rpc_full {
start_slot: Slot,
config: Option<RpcConfirmedBlocksConfigWrapper>,
commitment: Option<CommitmentConfig>,
) -> Result<Vec<Slot>> {
) -> BoxFuture<Result<Vec<Slot>>> {
let (end_slot, maybe_commitment) =
config.map(|config| config.unzip()).unwrap_or_default();
debug!(
"get_confirmed_blocks rpc request received: {}-{:?}",
start_slot, end_slot
);
meta.get_confirmed_blocks(start_slot, end_slot, commitment.or(maybe_commitment))
Box::pin(async move {
meta.get_confirmed_blocks(start_slot, end_slot, commitment.or(maybe_commitment))
.await
})
}
fn get_confirmed_blocks_with_limit(
@ -3370,20 +3397,23 @@ pub mod rpc_full {
start_slot: Slot,
limit: usize,
commitment: Option<CommitmentConfig>,
) -> Result<Vec<Slot>> {
) -> BoxFuture<Result<Vec<Slot>>> {
debug!(
"get_confirmed_blocks_with_limit rpc request received: {}-{}",
start_slot, limit,
);
meta.get_confirmed_blocks_with_limit(start_slot, limit, commitment)
Box::pin(async move {
meta.get_confirmed_blocks_with_limit(start_slot, limit, commitment)
.await
})
}
fn get_block_time(
&self,
meta: Self::Metadata,
slot: Slot,
) -> Result<Option<UnixTimestamp>> {
meta.get_block_time(slot)
) -> BoxFuture<Result<Option<UnixTimestamp>>> {
Box::pin(async move { meta.get_block_time(slot).await })
}
fn get_confirmed_transaction(
@ -3391,13 +3421,19 @@ pub mod rpc_full {
meta: Self::Metadata,
signature_str: String,
config: Option<RpcEncodingConfigWrapper<RpcConfirmedTransactionConfig>>,
) -> Result<Option<EncodedConfirmedTransaction>> {
) -> BoxFuture<Result<Option<EncodedConfirmedTransaction>>> {
debug!(
"get_confirmed_transaction rpc request received: {:?}",
signature_str
);
let signature = verify_signature(&signature_str)?;
meta.get_confirmed_transaction(signature, config)
let signature = verify_signature(&signature_str);
if let Err(err) = signature {
return Box::pin(future::err(err));
}
Box::pin(async move {
meta.get_confirmed_transaction(signature.unwrap(), config)
.await
})
}
fn get_confirmed_signatures_for_address(
@ -3436,41 +3472,29 @@ pub mod rpc_full {
meta: Self::Metadata,
address: String,
config: Option<RpcGetConfirmedSignaturesForAddress2Config>,
) -> Result<Vec<RpcConfirmedTransactionStatusWithSignature>> {
let address = verify_pubkey(&address)?;
) -> BoxFuture<Result<Vec<RpcConfirmedTransactionStatusWithSignature>>> {
let config = config.unwrap_or_default();
let before = config
.before
.map(|ref before| verify_signature(before))
.transpose()?;
let until = config
.until
.map(|ref until| verify_signature(until))
.transpose()?;
let limit = config
.limit
.unwrap_or(MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS2_LIMIT);
if limit == 0 || limit > MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS2_LIMIT {
return Err(Error::invalid_params(format!(
"Invalid limit; max {}",
MAX_GET_CONFIRMED_SIGNATURES_FOR_ADDRESS2_LIMIT
)));
}
meta.get_confirmed_signatures_for_address2(
let commitment = config.commitment;
let verification = verify_and_parse_signatures_for_address_params(
address,
before,
until,
limit,
config.commitment,
)
config.before,
config.until,
config.limit,
);
match verification {
Err(err) => Box::pin(future::err(err)),
Ok((address, before, until, limit)) => Box::pin(async move {
meta.get_confirmed_signatures_for_address2(
address, before, until, limit, commitment,
)
.await
}),
}
}
fn get_first_available_block(&self, meta: Self::Metadata) -> Result<Slot> {
fn get_first_available_block(&self, meta: Self::Metadata) -> BoxFuture<Result<Slot>> {
debug!("get_first_available_block rpc request received");
Ok(meta.get_first_available_block())
Box::pin(async move { Ok(meta.get_first_available_block().await) })
}
fn get_block_production(
@ -3581,7 +3605,7 @@ pub mod rpc_full {
meta: Self::Metadata,
address_strs: Vec<String>,
config: Option<RpcEpochConfig>,
) -> Result<Vec<Option<RpcInflationReward>>> {
) -> BoxFuture<Result<Vec<Option<RpcInflationReward>>>> {
debug!(
"get_inflation_reward rpc request received: {:?}",
address_strs.len()
@ -3589,10 +3613,15 @@ pub mod rpc_full {
let mut addresses: Vec<Pubkey> = vec![];
for address_str in address_strs {
addresses.push(verify_pubkey(&address_str)?);
match verify_pubkey(&address_str) {
Ok(pubkey) => {
addresses.push(pubkey);
}
Err(err) => return Box::pin(future::err(err)),
}
}
meta.get_inflation_reward(addresses, config)
Box::pin(async move { meta.get_inflation_reward(addresses, config).await })
}
fn get_token_account_balance(
@ -3959,7 +3988,6 @@ pub mod tests {
RpcHealth::stub(),
cluster_info.clone(),
Hash::default(),
Arc::new(tokio::runtime::Runtime::new().unwrap()),
None,
OptimisticallyConfirmedBank::locked_from_bank_forks_root(&bank_forks),
Arc::new(RwLock::new(LargestAccountsCache::new(30))),
@ -5627,7 +5655,6 @@ pub mod tests {
health.clone(),
cluster_info,
Hash::default(),
Arc::new(tokio::runtime::Runtime::new().unwrap()),
None,
OptimisticallyConfirmedBank::locked_from_bank_forks_root(&bank_forks),
Arc::new(RwLock::new(LargestAccountsCache::new(30))),
@ -5904,7 +5931,6 @@ pub mod tests {
RpcHealth::stub(),
cluster_info,
Hash::default(),
Arc::new(tokio::runtime::Runtime::new().unwrap()),
None,
OptimisticallyConfirmedBank::locked_from_bank_forks_root(&bank_forks),
Arc::new(RwLock::new(LargestAccountsCache::new(30))),
@ -7330,7 +7356,6 @@ pub mod tests {
RpcHealth::stub(),
cluster_info,
Hash::default(),
Arc::new(tokio::runtime::Runtime::new().unwrap()),
None,
optimistically_confirmed_bank.clone(),
Arc::new(RwLock::new(LargestAccountsCache::new(30))),

View File

@ -34,7 +34,6 @@ use std::{
sync::{mpsc::channel, Arc, Mutex, RwLock},
thread::{self, Builder, JoinHandle},
};
use tokio::runtime;
use tokio_util::codec::{BytesCodec, FramedRead};
const LARGEST_ACCOUNTS_CACHE_DURATION: u64 = 60 * 60 * 2;
@ -112,10 +111,8 @@ impl RpcRequestMiddleware {
}
#[cfg(unix)]
async fn open_no_follow(path: impl AsRef<Path>) -> std::io::Result<tokio_02::fs::File> {
// Stuck on tokio 0.2 until the jsonrpc crates upgrade
use tokio_02::fs::os::unix::OpenOptionsExt;
tokio_02::fs::OpenOptions::new()
async fn open_no_follow(path: impl AsRef<Path>) -> std::io::Result<tokio::fs::File> {
tokio::fs::OpenOptions::new()
.read(true)
.write(false)
.create(false)
@ -125,10 +122,9 @@ impl RpcRequestMiddleware {
}
#[cfg(not(unix))]
async fn open_no_follow(path: impl AsRef<Path>) -> std::io::Result<tokio_02::fs::File> {
async fn open_no_follow(path: impl AsRef<Path>) -> std::io::Result<tokio::fs::File> {
// TODO: Is there any way to achieve the same on Windows?
// Stuck on tokio 0.2 until the jsonrpc crates upgrade
tokio_02::fs::File::open(path).await
tokio::fs::File::open(path).await
}
fn process_file_get(&self, path: &str) -> RequestMiddlewareAction {
@ -294,9 +290,17 @@ impl JsonRpcService {
)));
let tpu_address = cluster_info.my_contact_info().tpu;
// sadly, some parts of our current rpc implemention block the jsonrpc's
// _socket-listening_ event loop for too long, due to (blocking) long IO or intesive CPU,
// causing no further processing of incoming requests and ultimatily innocent clients timing-out.
// So create a (shared) multi-threaded event_loop for jsonrpc and set its .threads() to 1,
// so that we avoid the single-threaded event loops from being created automatically by
// jsonrpc for threads when .threads(N > 1) is given.
let runtime = Arc::new(
runtime::Builder::new_multi_thread()
.thread_name("rpc-runtime")
tokio::runtime::Builder::new_multi_thread()
.worker_threads(rpc_threads)
.thread_name("sol-rpc-el")
.enable_all()
.build()
.expect("Runtime"),
@ -351,7 +355,6 @@ impl JsonRpcService {
health.clone(),
cluster_info.clone(),
genesis_hash,
runtime,
bigtable_ledger_storage,
optimistically_confirmed_bank,
largest_accounts_cache,
@ -376,23 +379,6 @@ impl JsonRpcService {
let ledger_path = ledger_path.to_path_buf();
// sadly, some parts of our current rpc implemention block the jsonrpc's
// _socket-listening_ event loop for too long, due to (blocking) long IO or intesive CPU,
// causing no further processing of incoming requests and ultimatily innocent clients timing-out.
// So create a (shared) multi-threaded event_loop for jsonrpc and set its .threads() to 1,
// so that we avoid the single-threaded event loops from being created automatically by
// jsonrpc for threads when .threads(N > 1) is given.
let event_loop = {
// Stuck on tokio 0.2 until the jsonrpc crates upgrade
tokio_02::runtime::Builder::new()
.core_threads(rpc_threads)
.threaded_scheduler()
.enable_all()
.thread_name("sol-rpc-el")
.build()
.unwrap()
};
let (close_handle_sender, close_handle_receiver) = channel();
let thread_hdl = Builder::new()
.name("solana-jsonrpc".to_string())
@ -414,7 +400,7 @@ impl JsonRpcService {
io,
move |_req: &hyper::Request<hyper::Body>| request_processor.clone(),
)
.event_loop_executor(event_loop.handle().clone())
.event_loop_executor(runtime.handle().clone())
.threads(1)
.cors(DomainsValidation::AllowOnly(vec![
AccessControlAllowOrigin::Any,
@ -481,6 +467,7 @@ mod tests {
use solana_sdk::{genesis_config::ClusterType, signature::Signer};
use std::io::Write;
use std::net::{IpAddr, Ipv4Addr};
use tokio::runtime::Runtime;
#[test]
fn test_rpc_new() {
@ -613,7 +600,7 @@ mod tests {
#[test]
fn test_process_file_get() {
let mut runtime = tokio_02::runtime::Runtime::new().unwrap();
let runtime = Runtime::new().unwrap();
let ledger_path = get_tmp_ledger_path!();
std::fs::create_dir(&ledger_path).unwrap();

View File

@ -27,7 +27,7 @@ use std::{
thread::sleep,
time::{Duration, Instant},
};
use tokio_02::runtime::Runtime;
use tokio::runtime::Runtime;
macro_rules! json_req {
($method: expr, $params: expr) => {{
@ -159,7 +159,7 @@ fn test_rpc_slot_updates() {
let connect = ws::try_connect::<PubsubClient>(&rpc_pubsub_url).unwrap();
let client = connect.await.unwrap();
tokio_02::spawn(async move {
tokio::spawn(async move {
let mut update_sub = client.slots_updates_subscribe().unwrap();
loop {
let response = update_sub.next().await.unwrap();
@ -268,7 +268,7 @@ fn test_rpc_subscriptions() {
)
.unwrap_or_else(|err| panic!("sig sub err: {:#?}", err));
tokio_02::spawn(async move {
tokio::spawn(async move {
let response = sig_sub.next().await.unwrap();
status_sender
.send((sig.clone(), response.unwrap()))
@ -288,7 +288,7 @@ fn test_rpc_subscriptions() {
}),
)
.unwrap_or_else(|err| panic!("acct sub err: {:#?}", err));
tokio_02::spawn(async move {
tokio::spawn(async move {
let response = client_sub.next().await.unwrap();
account_sender.send(response.unwrap()).unwrap();
});
@ -298,7 +298,7 @@ fn test_rpc_subscriptions() {
let mut slot_sub = client
.slot_subscribe()
.unwrap_or_else(|err| panic!("sig sub err: {:#?}", err));
tokio_02::spawn(async move {
tokio::spawn(async move {
let _response = slot_sub.next().await.unwrap();
ready_sender.send(()).unwrap();
});

View File

@ -24,7 +24,6 @@ serde = { version = "1.0.100", features = ["rc"] }
ed25519-dalek = { version = "=1.0.1", features = ["serde"] }
syn_0_15 = { package = "syn", version = "0.15.42", features = ["extra-traits", "fold", "full"] }
syn_1_0 = { package = "syn", version = "1.0.3", features = ["extra-traits", "fold", "full"] }
tokio = { version = "0.1.22",features=["bytes", "codec", "default", "fs", "io", "mio", "num_cpus", "reactor", "rt-full", "sync", "tcp", "timer", "tokio-codec", "tokio-current-thread", "tokio-executor", "tokio-io", "tokio-io", "tokio-reactor", "tokio-tcp", "tokio-tcp", "tokio-threadpool", "tokio-timer", "tokio-udp", "tokio-uds", "udp", "uds"] }
winapi = { version = "0.3.8", features=["basetsd", "consoleapi", "errhandlingapi", "fileapi", "handleapi", "impl-debug", "impl-default", "knownfolders", "libloaderapi", "memoryapi", "minwinbase", "minwindef", "ntdef", "ntsecapi", "ntstatus", "objbase", "processenv", "processthreadsapi", "profileapi", "shlobj", "std", "synchapi", "sysinfoapi", "timezoneapi", "utilapiset", "winbase", "wincon", "windef", "winerror", "winnls", "winnt", "winreg", "winsock2", "winuser", "ws2def", "ws2ipdef", "ws2tcpip", "wtypesbase"] }
[package.metadata.docs.rs]

380
programs/bpf/Cargo.lock generated
View File

@ -551,17 +551,6 @@ dependencies = [
"crossbeam-utils 0.8.5",
]
[[package]]
name = "crossbeam-deque"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed"
dependencies = [
"crossbeam-epoch 0.8.2",
"crossbeam-utils 0.7.2",
"maybe-uninit",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.1"
@ -569,25 +558,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-epoch 0.9.5",
"crossbeam-epoch",
"crossbeam-utils 0.8.5",
]
[[package]]
name = "crossbeam-epoch"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
dependencies = [
"autocfg",
"cfg-if 0.1.10",
"crossbeam-utils 0.7.2",
"lazy_static",
"maybe-uninit",
"memoffset 0.5.4",
"scopeguard",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.5"
@ -597,21 +571,10 @@ dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils 0.8.5",
"lazy_static",
"memoffset 0.6.1",
"memoffset",
"scopeguard",
]
[[package]]
name = "crossbeam-queue"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"
dependencies = [
"cfg-if 0.1.10",
"crossbeam-utils 0.7.2",
"maybe-uninit",
]
[[package]]
name = "crossbeam-utils"
version = "0.7.2"
@ -992,28 +955,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
dependencies = [
"bitflags",
"fuchsia-zircon-sys",
]
[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]]
name = "futures"
version = "0.1.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef"
[[package]]
name = "futures"
version = "0.3.12"
@ -1198,7 +1139,7 @@ dependencies = [
"http",
"indexmap",
"slab",
"tokio 1.8.1",
"tokio",
"tokio-util",
"tracing",
]
@ -1345,7 +1286,7 @@ dependencies = [
"itoa",
"pin-project-lite 0.2.7",
"socket2 0.4.1",
"tokio 1.8.1",
"tokio",
"tower-service",
"tracing",
"want",
@ -1361,7 +1302,7 @@ dependencies = [
"hyper",
"log",
"rustls",
"tokio 1.8.1",
"tokio",
"tokio-rustls",
"webpki",
]
@ -1508,11 +1449,13 @@ dependencies = [
[[package]]
name = "jsonrpc-core"
version = "17.0.0"
version = "18.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07569945133257ff557eb37b015497104cea61a2c9edaf126c1cbd6e8332397f"
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
dependencies = [
"futures 0.3.12",
"futures",
"futures-executor",
"futures-util",
"log",
"serde",
"serde_derive",
@ -1667,15 +1610,6 @@ dependencies = [
"libc",
]
[[package]]
name = "memoffset"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
dependencies = [
"autocfg",
]
[[package]]
name = "memoffset"
version = "0.6.1"
@ -1700,25 +1634,6 @@ dependencies = [
"adler32",
]
[[package]]
name = "mio"
version = "0.6.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"
dependencies = [
"cfg-if 0.1.10",
"fuchsia-zircon",
"fuchsia-zircon-sys",
"iovec",
"kernel32-sys",
"libc",
"log",
"miow 0.2.2",
"net2",
"slab",
"winapi 0.2.8",
]
[[package]]
name = "mio"
version = "0.7.7"
@ -1732,17 +1647,6 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "mio-uds"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0"
dependencies = [
"iovec",
"libc",
"mio 0.6.22",
]
[[package]]
name = "miow"
version = "0.2.2"
@ -1989,17 +1893,6 @@ dependencies = [
"syn 1.0.67",
]
[[package]]
name = "parking_lot"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
dependencies = [
"lock_api 0.3.4",
"parking_lot_core 0.6.2",
"rustc_version",
]
[[package]]
name = "parking_lot"
version = "0.10.2"
@ -2021,21 +1914,6 @@ dependencies = [
"parking_lot_core 0.8.2",
]
[[package]]
name = "parking_lot_core"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
dependencies = [
"cfg-if 0.1.10",
"cloudabi",
"libc",
"redox_syscall 0.1.56",
"rustc_version",
"smallvec 0.6.14",
"winapi 0.3.9",
]
[[package]]
name = "parking_lot_core"
version = "0.7.2"
@ -2046,7 +1924,7 @@ dependencies = [
"cloudabi",
"libc",
"redox_syscall 0.1.56",
"smallvec 1.6.1",
"smallvec",
"winapi 0.3.9",
]
@ -2060,7 +1938,7 @@ dependencies = [
"instant",
"libc",
"redox_syscall 0.1.56",
"smallvec 1.6.1",
"smallvec",
"winapi 0.3.9",
]
@ -2360,7 +2238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
dependencies = [
"autocfg",
"crossbeam-deque 0.8.1",
"crossbeam-deque",
"either",
"rayon-core",
]
@ -2372,7 +2250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
dependencies = [
"crossbeam-channel 0.5.0",
"crossbeam-deque 0.8.1",
"crossbeam-deque",
"crossbeam-utils 0.8.5",
"lazy_static",
"num_cpus",
@ -2456,7 +2334,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
"tokio 1.8.1",
"tokio",
"tokio-rustls",
"url",
"wasm-bindgen",
@ -2770,15 +2648,6 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
[[package]]
name = "smallvec"
version = "0.6.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0"
dependencies = [
"maybe-uninit",
]
[[package]]
name = "smallvec"
version = "1.6.1"
@ -2836,13 +2705,13 @@ dependencies = [
"bincode",
"borsh 0.9.0",
"borsh-derive 0.9.0",
"futures 0.3.12",
"mio 0.7.7",
"futures",
"mio",
"solana-banks-interface",
"solana-program 1.6.23",
"solana-sdk",
"tarpc",
"tokio 1.8.1",
"tokio",
"tokio-serde",
]
@ -2850,7 +2719,7 @@ dependencies = [
name = "solana-banks-interface"
version = "1.6.23"
dependencies = [
"mio 0.7.7",
"mio",
"serde",
"solana-sdk",
"tarpc",
@ -2861,15 +2730,15 @@ name = "solana-banks-server"
version = "1.6.23"
dependencies = [
"bincode",
"futures 0.3.12",
"futures",
"log",
"mio 0.7.7",
"mio",
"solana-banks-interface",
"solana-metrics",
"solana-runtime",
"solana-sdk",
"tarpc",
"tokio 1.8.1",
"tokio",
"tokio-serde",
"tokio-stream",
]
@ -3256,7 +3125,7 @@ dependencies = [
"solana-version",
"solana-vote-program",
"thiserror",
"tokio 1.8.1",
"tokio",
"tungstenite",
"url",
]
@ -3292,7 +3161,6 @@ dependencies = [
"serde",
"syn 0.15.44",
"syn 1.0.67",
"tokio 0.1.22",
"winapi 0.3.9",
]
@ -3314,7 +3182,7 @@ dependencies = [
"solana-version",
"spl-memo",
"thiserror",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -3436,7 +3304,7 @@ dependencies = [
"solana-clap-utils",
"solana-logger 1.6.23",
"solana-version",
"tokio 1.8.1",
"tokio",
"url",
]
@ -3516,7 +3384,7 @@ dependencies = [
"chrono",
"chrono-humanize",
"log",
"mio 0.7.7",
"mio",
"serde",
"serde_derive",
"solana-banks-client",
@ -3527,7 +3395,7 @@ dependencies = [
"solana-sdk",
"solana-vote-program",
"thiserror",
"tokio 1.8.1",
"tokio",
]
[[package]]
@ -3907,7 +3775,7 @@ checksum = "e325774dd5b35d979e9f4db2b0f0d7d85dc2ff2b676a3150af56c09eafc14b07"
dependencies = [
"anyhow",
"fnv",
"futures 0.3.12",
"futures",
"humantime",
"log",
"pin-project",
@ -3915,7 +3783,7 @@ dependencies = [
"serde",
"static_assertions",
"tarpc-plugins",
"tokio 1.8.1",
"tokio",
"tokio-serde",
"tokio-util",
]
@ -4054,30 +3922,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"mio 0.6.22",
"num_cpus",
"tokio-codec",
"tokio-current-thread",
"tokio-executor",
"tokio-fs",
"tokio-io",
"tokio-reactor",
"tokio-sync",
"tokio-tcp",
"tokio-threadpool",
"tokio-timer",
"tokio-udp",
"tokio-uds",
]
[[package]]
name = "tokio"
version = "1.8.1"
@ -4088,7 +3932,7 @@ dependencies = [
"bytes 1.0.1",
"libc",
"memchr",
"mio 0.7.7",
"mio",
"num_cpus",
"once_cell",
"parking_lot 0.11.1",
@ -4098,59 +3942,6 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "tokio-codec"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"tokio-io",
]
[[package]]
name = "tokio-current-thread"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e"
dependencies = [
"futures 0.1.29",
"tokio-executor",
]
[[package]]
name = "tokio-executor"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671"
dependencies = [
"crossbeam-utils 0.7.2",
"futures 0.1.29",
]
[[package]]
name = "tokio-fs"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4"
dependencies = [
"futures 0.1.29",
"tokio-io",
"tokio-threadpool",
]
[[package]]
name = "tokio-io"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"log",
]
[[package]]
name = "tokio-macros"
version = "1.2.0"
@ -4162,25 +3953,6 @@ dependencies = [
"syn 1.0.67",
]
[[package]]
name = "tokio-reactor"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351"
dependencies = [
"crossbeam-utils 0.7.2",
"futures 0.1.29",
"lazy_static",
"log",
"mio 0.6.22",
"num_cpus",
"parking_lot 0.9.0",
"slab",
"tokio-executor",
"tokio-io",
"tokio-sync",
]
[[package]]
name = "tokio-rustls"
version = "0.22.0"
@ -4188,7 +3960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls",
"tokio 1.8.1",
"tokio",
"webpki",
]
@ -4216,93 +3988,7 @@ checksum = "f8864d706fdb3cc0843a49647ac892720dac98a6eeb818b77190592cf4994066"
dependencies = [
"futures-core",
"pin-project-lite 0.2.7",
"tokio 1.8.1",
]
[[package]]
name = "tokio-sync"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee"
dependencies = [
"fnv",
"futures 0.1.29",
]
[[package]]
name = "tokio-tcp"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"iovec",
"mio 0.6.22",
"tokio-io",
"tokio-reactor",
]
[[package]]
name = "tokio-threadpool"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89"
dependencies = [
"crossbeam-deque 0.7.4",
"crossbeam-queue",
"crossbeam-utils 0.7.2",
"futures 0.1.29",
"lazy_static",
"log",
"num_cpus",
"slab",
"tokio-executor",
]
[[package]]
name = "tokio-timer"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296"
dependencies = [
"crossbeam-utils 0.7.2",
"futures 0.1.29",
"slab",
"tokio-executor",
]
[[package]]
name = "tokio-udp"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"log",
"mio 0.6.22",
"tokio-codec",
"tokio-io",
"tokio-reactor",
]
[[package]]
name = "tokio-uds"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798"
dependencies = [
"bytes 0.4.12",
"futures 0.1.29",
"iovec",
"libc",
"log",
"mio 0.6.22",
"mio-uds",
"tokio-codec",
"tokio-io",
"tokio-reactor",
"tokio",
]
[[package]]
@ -4316,7 +4002,7 @@ dependencies = [
"futures-sink",
"log",
"pin-project-lite 0.2.7",
"tokio 1.8.1",
"tokio",
]
[[package]]

View File

@ -19,11 +19,11 @@ console = "0.11.3"
core_affinity = "0.5.10"
fd-lock = "2.0.0"
indicatif = "0.15.0"
jsonrpc-core = "17.1.0"
jsonrpc-core-client = { version = "17.1.0", features = ["ipc", "ws"] }
jsonrpc-derive = "17.1.0"
jsonrpc-ipc-server = "17.1.0"
jsonrpc-server-utils= "17.1.0"
jsonrpc-core = "18.0.0"
jsonrpc-core-client = { version = "18.0.0", features = ["ipc", "ws"] }
jsonrpc-derive = "18.0.0"
jsonrpc-ipc-server = "18.0.0"
jsonrpc-server-utils= "18.0.0"
log = "0.4.11"
num_cpus = "1.13.0"
rand = "0.7.0"

View File

@ -137,10 +137,9 @@ impl AdminRpc for AdminRpcImpl {
pub fn run(ledger_path: &Path, metadata: AdminRpcRequestMetadata) {
let admin_rpc_path = ledger_path.join("admin.rpc");
let event_loop = tokio::runtime::Builder::new()
.threaded_scheduler()
.enable_all()
let event_loop = tokio::runtime::Builder::new_multi_thread()
.thread_name("sol-adminrpc-el")
.enable_all()
.build()
.unwrap();

View File

@ -63,7 +63,7 @@ impl Dashboard {
} = self;
drop(progress_bar);
let mut runtime = admin_rpc_service::runtime();
let runtime = admin_rpc_service::runtime();
while !exit.load(Ordering::Relaxed) {
let progress_bar = new_spinner_progress_bar();
progress_bar.set_message("Connecting...");