[Substrate Companion] Upgrade to libp2p 0.51.3 (#7000)

* upgrade js-sys to 0.3.61

* update wasm-bindgen-futures

* update once_cell

* update either

* update futures

* update pyroscope to 0.5.3

* use the new pyroscope API

* add missing imports

* readme is incorrect

* add shutdown

* fix shutdown

* remove mut

* remove mut 2

* redo updates

* update zeroize

* update lockfile for {"substrate"}

* update lockfile for {"substrate", "cumulus"}

* redo updates

* restart CI

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Anton
2023-05-12 18:52:21 +04:00
committed by GitHub
parent 12dd927798
commit 147a823558
3 changed files with 196 additions and 94 deletions
+185 -86
View File
@@ -36,6 +36,12 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "adler32"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
[[package]]
name = "aead"
version = "0.3.2"
@@ -508,6 +514,12 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "base64"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
[[package]]
name = "base64ct"
version = "1.5.2"
@@ -990,9 +1002,14 @@ version = "3.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
dependencies = [
"atty",
"bitflags",
"clap_derive 3.2.18",
"clap_lex 0.2.4",
"indexmap",
"once_cell",
"strsim",
"termcolor",
"textwrap",
]
@@ -1003,7 +1020,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a1f23fa97e1d1641371b51f35535cb26959b8e27ab50d167a8b996b5bada819"
dependencies = [
"clap_builder",
"clap_derive",
"clap_derive 4.2.0",
"once_cell",
]
@@ -1020,6 +1037,19 @@ dependencies = [
"strsim",
]
[[package]]
name = "clap_derive"
version = "3.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "clap_derive"
version = "4.2.0"
@@ -1668,11 +1698,11 @@ dependencies = [
[[package]]
name = "debugid"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f91cf5a8c2f2097e2a32627123508635d47ce10563d999ec1a95addf08b502ba"
checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d"
dependencies = [
"uuid 0.8.2",
"uuid",
]
[[package]]
@@ -2012,9 +2042,9 @@ dependencies = [
[[package]]
name = "either"
version = "1.6.1"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
[[package]]
name = "elliptic-curve"
@@ -3686,13 +3716,19 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.55"
version = "0.3.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84"
checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "json"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd"
[[package]]
name = "jsonrpsee"
version = "0.16.2"
@@ -4034,6 +4070,26 @@ version = "0.2.142"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317"
[[package]]
name = "libflate"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97822bf791bd4d5b403713886a5fbe8bf49520fe78e323b0dc480ca1a03e50b0"
dependencies = [
"adler32",
"crc32fast",
"libflate_lz77",
]
[[package]]
name = "libflate_lz77"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a52d3a8bfc85f250440e4424db7d857e241a3aebbbe301f3eb606ab15c39acbf"
dependencies = [
"rle-decode-fast",
]
[[package]]
name = "libgit2-sys"
version = "0.14.2+1.5.1"
@@ -4123,7 +4179,7 @@ dependencies = [
"once_cell",
"parking_lot 0.12.1",
"pin-project",
"prost",
"prost 0.11.0",
"prost-build",
"rand 0.8.5",
"rw-stream-sink",
@@ -4163,7 +4219,7 @@ dependencies = [
"libp2p-swarm",
"log",
"lru 0.8.1",
"prost",
"prost 0.11.0",
"prost-build",
"prost-codec",
"smallvec",
@@ -4188,7 +4244,7 @@ dependencies = [
"libp2p-core",
"libp2p-swarm",
"log",
"prost",
"prost 0.11.0",
"prost-build",
"rand 0.8.5",
"sha2 0.10.2",
@@ -4263,7 +4319,7 @@ dependencies = [
"libp2p-core",
"log",
"once_cell",
"prost",
"prost 0.11.0",
"prost-build",
"rand 0.8.5",
"sha2 0.10.2",
@@ -4427,7 +4483,7 @@ dependencies = [
"libp2p-noise",
"log",
"multihash",
"prost",
"prost 0.11.0",
"prost-build",
"prost-codec",
"rand 0.8.5",
@@ -4496,7 +4552,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37"
dependencies = [
"arrayref",
"base64",
"base64 0.13.0",
"digest 0.9.0",
"hmac-drbg",
"libsecp256k1-core",
@@ -5029,6 +5085,7 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146"
dependencies = [
"clap 3.2.23",
"rand 0.8.5",
]
@@ -5122,19 +5179,6 @@ dependencies = [
"tokio",
]
[[package]]
name = "nix"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"
dependencies = [
"bitflags",
"cc",
"cfg-if",
"libc",
"memoffset 0.6.4",
]
[[package]]
name = "nix"
version = "0.24.1"
@@ -5302,9 +5346,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.17.0"
version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
[[package]]
name = "oorandom"
@@ -6614,7 +6658,7 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4"
dependencies = [
"base64",
"base64 0.13.0",
]
[[package]]
@@ -6901,6 +6945,7 @@ dependencies = [
"polkadot-performance-test",
"polkadot-service",
"pyroscope",
"pyroscope_pprofrs",
"sc-cli",
"sc-executor",
"sc-service",
@@ -8394,18 +8439,18 @@ checksum = "26f6a7b87c2e435a3241addceeeff740ff8b7e76b74c13bf9acb17fa454ea00b"
[[package]]
name = "pprof"
version = "0.6.2"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55f35f865aa964be21fcde114cbd1cfbd9bf8a471460ed965b0f84f96c711401"
checksum = "d6472bfed9475542ac46c518734a8d06d71b0f6cb2c17f904aa301711a57786f"
dependencies = [
"backtrace",
"cfg-if",
"findshlibs",
"lazy_static",
"libc",
"log",
"nix 0.23.1",
"parking_lot 0.11.2",
"nix 0.24.1",
"once_cell",
"parking_lot 0.12.1",
"smallvec",
"symbolic-demangle",
"tempfile",
@@ -8601,6 +8646,16 @@ dependencies = [
"regex",
]
[[package]]
name = "prost"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e"
dependencies = [
"bytes",
"prost-derive 0.10.1",
]
[[package]]
name = "prost"
version = "0.11.0"
@@ -8608,7 +8663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
dependencies = [
"bytes",
"prost-derive",
"prost-derive 0.11.0",
]
[[package]]
@@ -8624,7 +8679,7 @@ dependencies = [
"log",
"multimap",
"petgraph",
"prost",
"prost 0.11.0",
"prost-types",
"regex",
"tempfile",
@@ -8639,11 +8694,24 @@ checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0"
dependencies = [
"asynchronous-codec",
"bytes",
"prost",
"prost 0.11.0",
"thiserror",
"unsigned-varint",
]
[[package]]
name = "prost-derive"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc"
dependencies = [
"anyhow",
"itertools",
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "prost-derive"
version = "0.11.0"
@@ -8664,7 +8732,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e"
dependencies = [
"bytes",
"prost",
"prost 0.11.0",
]
[[package]]
@@ -8678,14 +8746,31 @@ dependencies = [
[[package]]
name = "pyroscope"
version = "0.3.1"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e63f9bc346cdc6ad86ca90062248a1a7ce08fa44ad438637148359d1140733c"
checksum = "6636d352280fb587c8716f10e1d61fe88cb002660e0a8b0d3e47de17f3b5aaed"
dependencies = [
"json",
"libc",
"libflate",
"log",
"names",
"prost 0.10.4",
"reqwest",
"thiserror",
"url",
"winapi",
]
[[package]]
name = "pyroscope_pprofrs"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14e699bf3e7da41b3a7573d5944d77b1bd96a187aa72f5fa96afb4ed5609cc45"
dependencies = [
"log",
"pprof",
"reqwest",
"pyroscope",
"thiserror",
]
@@ -9017,7 +9102,7 @@ version = "0.11.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92"
dependencies = [
"base64",
"base64 0.13.0",
"bytes",
"encoding_rs",
"futures-core",
@@ -9026,6 +9111,7 @@ dependencies = [
"http",
"http-body",
"hyper",
"hyper-rustls",
"hyper-tls",
"ipnet",
"js-sys",
@@ -9035,16 +9121,20 @@ dependencies = [
"native-tls",
"percent-encoding",
"pin-project-lite 0.2.9",
"rustls 0.20.7",
"rustls-pemfile 1.0.2",
"serde",
"serde_json",
"serde_urlencoded",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tower-service",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"webpki-roots",
"winreg 0.10.1",
]
@@ -9094,6 +9184,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "rle-decode-fast"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422"
[[package]]
name = "rocksdb"
version = "0.21.0"
@@ -9344,7 +9440,7 @@ version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
dependencies = [
"base64",
"base64 0.13.0",
"log",
"ring",
"sct 0.6.1",
@@ -9370,7 +9466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943"
dependencies = [
"openssl-probe",
"rustls-pemfile",
"rustls-pemfile 0.2.1",
"schannel",
"security-framework",
]
@@ -9381,7 +9477,16 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9"
dependencies = [
"base64",
"base64 0.13.0",
]
[[package]]
name = "rustls-pemfile"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
dependencies = [
"base64 0.21.0",
]
[[package]]
@@ -9448,7 +9553,7 @@ dependencies = [
"libp2p",
"log",
"parity-scale-codec",
"prost",
"prost 0.11.0",
"prost-build",
"rand 0.8.5",
"sc-client-api",
@@ -10010,7 +10115,7 @@ dependencies = [
"futures",
"libp2p",
"log",
"prost",
"prost 0.11.0",
"prost-build",
"sc-client-api",
"sc-network",
@@ -10078,7 +10183,7 @@ dependencies = [
"libp2p",
"log",
"parity-scale-codec",
"prost",
"prost 0.11.0",
"prost-build",
"sc-client-api",
"sc-network",
@@ -10105,7 +10210,7 @@ dependencies = [
"lru 0.8.1",
"mockall",
"parity-scale-codec",
"prost",
"prost 0.11.0",
"prost-build",
"sc-client-api",
"sc-consensus",
@@ -11058,7 +11163,7 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2"
dependencies = [
"base64",
"base64 0.13.0",
"bytes",
"flate2",
"futures",
@@ -11982,7 +12087,7 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25"
dependencies = [
"base64",
"base64 0.13.0",
"crc",
"lazy_static",
"md-5",
@@ -12177,21 +12282,21 @@ dependencies = [
[[package]]
name = "symbolic-common"
version = "8.6.0"
version = "9.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e92a52f07eed9afba3d6f883652cde7cd75fcf327dd44e84f210958379158737"
checksum = "800963ba330b09a2ae4a4f7c6392b81fbc2784099a98c1eac68c3437aa9382b2"
dependencies = [
"debugid",
"memmap2",
"stable_deref_trait",
"uuid 0.8.2",
"uuid",
]
[[package]]
name = "symbolic-demangle"
version = "8.6.0"
version = "9.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9abc81544d9964975269165bfe5ad198d8b9e2e809c46527323f95588a57693"
checksum = "2b940a1fdbc72bb3369e38714efe6cd332dbbe46d093cf03d668b9ac390d1ad0"
dependencies = [
"cpp_demangle",
"rustc-demangle",
@@ -13033,7 +13138,7 @@ version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d96a2dea40e7570482f28eb57afbe42d97551905da6a9400acc5c328d24004f5"
dependencies = [
"base64",
"base64 0.13.0",
"byteorder",
"bytes",
"http",
@@ -13053,7 +13158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8"
dependencies = [
"async-trait",
"base64",
"base64 0.13.0",
"futures",
"log",
"md-5",
@@ -13185,12 +13290,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
[[package]]
name = "uuid"
version = "1.2.2"
@@ -13303,9 +13402,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.78"
version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce"
checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4"
dependencies = [
"cfg-if",
"serde",
@@ -13315,24 +13414,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.78"
version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b"
checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822"
dependencies = [
"bumpalo",
"lazy_static",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.15",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.28"
version = "0.4.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39"
checksum = "083abe15c5d88556b77bdf7aef403625be9e327ad37c62c4e4129af740168163"
dependencies = [
"cfg-if",
"js-sys",
@@ -13342,9 +13441,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.78"
version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9"
checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -13352,22 +13451,22 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.78"
version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab"
checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.15",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.78"
version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc"
checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb"
[[package]]
name = "wasm-instrument"
@@ -13521,7 +13620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c"
dependencies = [
"anyhow",
"base64",
"base64 0.13.0",
"bincode",
"directories-next",
"file-per-thread-logger",
@@ -13810,7 +13909,7 @@ dependencies = [
"tokio",
"turn",
"url",
"uuid 1.2.2",
"uuid",
"waitgroup",
"webrtc-mdns",
"webrtc-util",
@@ -14358,7 +14457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c"
dependencies = [
"asn1-rs 0.3.1",
"base64",
"base64 0.13.0",
"data-encoding",
"der-parser 7.0.0",
"lazy_static",
@@ -14377,7 +14476,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8"
dependencies = [
"asn1-rs 0.5.1",
"base64",
"base64 0.13.0",
"data-encoding",
"der-parser 8.1.0",
"lazy_static",
@@ -14578,9 +14677,9 @@ dependencies = [
[[package]]
name = "zeroize"
version = "1.5.7"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f"
checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
dependencies = [
"zeroize_derive",
]
+3 -2
View File
@@ -18,7 +18,8 @@ clap = { version = "4.0.9", features = ["derive"], optional = true }
log = "0.4.17"
thiserror = "1.0.31"
futures = "0.3.21"
pyro = { package = "pyroscope", version = "0.3.1", optional = true }
pyro = { package = "pyroscope", version = "0.5.3", optional = true }
pyroscope_pprofrs = { version = "0.2", optional = true }
service = { package = "polkadot-service", path = "../node/service", default-features = false, optional = true }
polkadot-client = { path = "../node/client", optional = true }
@@ -63,7 +64,7 @@ runtime-benchmarks = [
full-node = ["service/full-node"]
try-runtime = ["service/try-runtime", "try-runtime-cli/try-runtime"]
fast-runtime = ["service/fast-runtime"]
pyroscope = ["pyro"]
pyroscope = ["pyro", "pyroscope_pprofrs"]
hostperfcheck = ["polkadot-performance-test"]
# Configure the native runtimes to use. Polkadot is enabled by default.
+8 -6
View File
@@ -30,6 +30,8 @@ use std::net::ToSocketAddrs;
pub use crate::{error::Error, service::BlockId};
#[cfg(feature = "hostperfcheck")]
pub use polkadot_performance_test::PerfCheckError;
#[cfg(feature = "pyroscope")]
use pyroscope_pprofrs::{pprof_backend, PprofConfig};
impl From<String> for Error {
fn from(s: String) -> Self {
@@ -377,14 +379,13 @@ pub fn run() -> Result<()> {
.next()
.ok_or_else(|| Error::AddressResolutionMissing)?;
// The pyroscope agent requires a `http://` prefix, so we just do that.
let mut agent = pyro::PyroscopeAgent::builder(
let agent = pyro::PyroscopeAgent::builder(
"http://".to_owned() + address.to_string().as_str(),
"polkadot".to_owned(),
)
.sample_rate(113)
.backend(pprof_backend(PprofConfig::new().sample_rate(113)))
.build()?;
agent.start();
Some(agent)
Some(agent.start()?)
} else {
None
};
@@ -727,8 +728,9 @@ pub fn run() -> Result<()> {
}?;
#[cfg(feature = "pyroscope")]
if let Some(mut pyroscope_agent) = pyroscope_agent_maybe.take() {
pyroscope_agent.stop();
if let Some(pyroscope_agent) = pyroscope_agent_maybe.take() {
let agent = pyroscope_agent.stop()?;
agent.shutdown();
}
Ok(())
}