From 13b8af51b156aec8debc060fa61224bf5eefabe4 Mon Sep 17 00:00:00 2001 From: Hussein Ait Lahcen Date: Tue, 3 Aug 2021 18:35:47 +0200 Subject: [PATCH 1/2] introduce basic price feed server --- Cargo.lock | 1741 ++++++++++++++++++++++++++--------- Cargo.toml | 1 + price-feed/Cargo.toml | 23 + price-feed/src/asset.rs | 15 + price-feed/src/feed/mod.rs | 29 + price-feed/src/feed/pyth.rs | 165 ++++ price-feed/src/main.rs | 144 +++ price-feed/src/opts.rs | 15 + 8 files changed, 1690 insertions(+), 443 deletions(-) create mode 100644 price-feed/Cargo.toml create mode 100644 price-feed/src/asset.rs create mode 100644 price-feed/src/feed/mod.rs create mode 100644 price-feed/src/feed/pyth.rs create mode 100644 price-feed/src/main.rs create mode 100644 price-feed/src/opts.rs diff --git a/Cargo.lock b/Cargo.lock index ed62c2075e5..3a7a0574717 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,7 +95,7 @@ checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" dependencies = [ "getrandom 0.2.3", "once_cell", - "version_check", + "version_check 0.9.3", ] [[package]] @@ -223,7 +223,7 @@ dependencies = [ "concurrent-queue", "futures-lite", "libc", - "log", + "log 0.4.14", "once_cell", "parking", "polling", @@ -286,7 +286,7 @@ dependencies = [ "futures-lite", "gloo-timers", "kv-log-macro", - "log", + "log 0.4.14", "memchr", "num_cpus", "once_cell", @@ -359,7 +359,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281" dependencies = [ - "autocfg", + "autocfg 1.0.1", ] [[package]] @@ -379,6 +379,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "autocfg" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" + [[package]] name = "autocfg" version = "1.0.1" @@ -412,6 +418,25 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +[[package]] +name = "base64" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" +dependencies = [ + "byteorder", + "safemem", +] + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +dependencies = [ + "byteorder", +] + [[package]] name = "base64" version = "0.12.3" @@ -603,6 +628,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "buf_redux" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" +dependencies = [ + "memchr", + "safemem", +] + [[package]] name = "build-helper" version = "0.1.1" @@ -803,12 +838,44 @@ dependencies = [ "ansi_term 0.11.0", "atty", "bitflags", - "strsim", - "textwrap", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.0.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142" +dependencies = [ + "atty", + "bitflags", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim 0.10.0", + "termcolor", + "textwrap 0.12.1", "unicode-width", "vec_map", ] +[[package]] +name = "clap_derive" +version = "3.0.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "cloudabi" version = "0.0.3" @@ -845,7 +912,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.7.0", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +dependencies = [ + "core-foundation-sys 0.8.2", "libc", ] @@ -855,6 +932,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +[[package]] +name = "core-foundation-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" + [[package]] name = "cpp_demangle" version = "0.3.3" @@ -899,7 +982,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "gimli", - "log", + "log 0.4.14", "regalloc", "serde", "smallvec 1.6.1", @@ -941,7 +1024,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c31b783b351f966fce33e3c03498cb116d16d97a8f9978164a60920bd0d3a99c" dependencies = [ "cranelift-codegen", - "log", + "log 0.4.14", "smallvec 1.6.1", "target-lexicon", ] @@ -966,7 +1049,7 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "itertools 0.10.1", - "log", + "log 0.4.14", "serde", "smallvec 1.6.1", "thiserror", @@ -1020,7 +1103,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg", + "autocfg 1.0.1", "cfg-if 0.1.10", "crossbeam-utils 0.7.2", "lazy_static", @@ -1059,7 +1142,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg", + "autocfg 1.0.1", "cfg-if 0.1.10", "lazy_static", ] @@ -1156,6 +1239,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "custom_derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" + [[package]] name = "data-encoding" version = "2.3.2" @@ -1338,6 +1427,12 @@ dependencies = [ "syn", ] +[[package]] +name = "enum_derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406ac2a8c9eedf8af9ee1489bee9e50029278a6456c740f7454cf8a158abc816" + [[package]] name = "env_logger" version = "0.7.1" @@ -1345,8 +1440,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ "atty", - "humantime", - "log", + "humantime 1.3.0", + "log 0.4.14", + "regex", + "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +dependencies = [ + "atty", + "humantime 2.1.0", + "log 0.4.14", "regex", "termcolor", ] @@ -1460,8 +1568,8 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fdbe0d94371f9ce939b555dd342d0686cc4c0cadbcd4b61d70af5ff97eb4126" dependencies = [ - "env_logger", - "log", + "env_logger 0.7.1", + "log 0.4.14", ] [[package]] @@ -1473,7 +1581,7 @@ dependencies = [ "either", "futures 0.3.15", "futures-timer 3.0.2", - "log", + "log 0.4.14", "num-traits", "parity-scale-codec", "parking_lot 0.11.1", @@ -1516,6 +1624,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "fork-tree" version = "3.0.0" @@ -1542,7 +1665,7 @@ dependencies = [ "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "frame-system 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "linregress", - "log", + "log 0.4.14", "parity-scale-codec", "paste 1.0.5", "sp-api", @@ -1591,6 +1714,17 @@ dependencies = [ "sp-tracing 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] +[[package]] +name = "frame-metadata" +version = "13.0.0" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", +] + [[package]] name = "frame-metadata" version = "13.0.0" @@ -1604,14 +1738,30 @@ dependencies = [ ] [[package]] -name = "frame-metadata" -version = "13.0.0" +name = "frame-support" +version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ + "bitflags", + "frame-metadata 13.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "frame-support-procedural 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "impl-trait-for-tuples", + "log 0.4.14", + "max-encoded-len", + "once_cell", "parity-scale-codec", + "paste 1.0.5", "serde", + "smallvec 1.6.1", + "sp-arithmetic 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-inherents 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-staking 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-state-machine 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-tracing 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] [[package]] @@ -1624,7 +1774,7 @@ dependencies = [ "frame-metadata 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "frame-support-procedural 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "impl-trait-for-tuples", - "log", + "log 0.4.14", "once_cell", "parity-scale-codec", "paste 1.0.5", @@ -1642,30 +1792,15 @@ dependencies = [ ] [[package]] -name = "frame-support" +name = "frame-support-procedural" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "bitflags", - "frame-metadata 13.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "frame-support-procedural 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "impl-trait-for-tuples", - "log", - "max-encoded-len", - "once_cell", - "parity-scale-codec", - "paste 1.0.5", - "serde", - "smallvec 1.6.1", - "sp-arithmetic 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-inherents 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-staking 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-state-machine 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-tracing 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "Inflector", + "frame-support-procedural-tools 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1682,12 +1817,12 @@ dependencies = [ ] [[package]] -name = "frame-support-procedural" +name = "frame-support-procedural-tools" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "Inflector", - "frame-support-procedural-tools 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -1707,12 +1842,10 @@ dependencies = [ ] [[package]] -name = "frame-support-procedural-tools" +name = "frame-support-procedural-tools-derive" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -1730,13 +1863,20 @@ dependencies = [ ] [[package]] -name = "frame-support-procedural-tools-derive" +name = "frame-system" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "proc-macro2", - "quote", - "syn", + "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "impl-trait-for-tuples", + "log 0.4.14", + "parity-scale-codec", + "serde", + "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-version 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] [[package]] @@ -1756,23 +1896,6 @@ dependencies = [ "sp-version 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "frame-system" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" -dependencies = [ - "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "serde", - "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-version 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", -] - [[package]] name = "frame-system-benchmarking" version = "3.0.0" @@ -1932,7 +2055,7 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" dependencies = [ - "autocfg", + "autocfg 1.0.1", "proc-macro-hack", "proc-macro2", "quote", @@ -1980,7 +2103,7 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" dependencies = [ - "autocfg", + "autocfg 1.0.1", "futures 0.1.31", "futures-channel", "futures-core", @@ -2018,7 +2141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ "typenum", - "version_check", + "version_check 0.9.3", ] [[package]] @@ -2079,7 +2202,7 @@ dependencies = [ "aho-corasick", "bstr", "fnv", - "log", + "log 0.4.14", "regex", ] @@ -2108,7 +2231,7 @@ dependencies = [ "futures 0.1.31", "http 0.1.21", "indexmap", - "log", + "log 0.4.14", "slab", "string", "tokio-io", @@ -2129,18 +2252,37 @@ dependencies = [ "indexmap", "slab", "tokio 0.2.25", - "tokio-util", + "tokio-util 0.3.1", "tracing", "tracing-futures", ] +[[package]] +name = "h2" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726" +dependencies = [ + "bytes 1.0.1", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.4", + "indexmap", + "slab", + "tokio 1.9.0", + "tokio-util 0.6.7", + "tracing", +] + [[package]] name = "handlebars" version = "3.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" dependencies = [ - "log", + "log 0.4.14", "pest", "pest_derive", "quick-error 2.0.1", @@ -2181,6 +2323,31 @@ dependencies = [ "ahash 0.7.4", ] +[[package]] +name = "headers" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0b7591fb62902706ae8e7aaff416b1b0fa2c0fd0878b46dc13baa3712d8a855" +dependencies = [ + "base64 0.13.0", + "bitflags", + "bytes 1.0.1", + "headers-core", + "http 0.2.4", + "mime 0.3.16", + "sha-1 0.9.6", + "time", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http 0.2.4", +] + [[package]] name = "heck" version = "0.3.3" @@ -2303,6 +2470,17 @@ dependencies = [ "http 0.2.4", ] +[[package]] +name = "http-body" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" +dependencies = [ + "bytes 1.0.1", + "http 0.2.4", + "pin-project-lite 0.2.7", +] + [[package]] name = "httparse" version = "1.4.1" @@ -2315,6 +2493,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "httpdate" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" + [[package]] name = "humantime" version = "1.3.0" @@ -2324,6 +2508,31 @@ dependencies = [ "quick-error 1.2.3", ] +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.10.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" +dependencies = [ + "base64 0.9.3", + "httparse", + "language-tags", + "log 0.3.9", + "mime 0.2.6", + "num_cpus", + "time", + "traitobject", + "typeable", + "unicase 1.4.2", + "url 1.7.2", +] + [[package]] name = "hyper" version = "0.12.36" @@ -2339,7 +2548,7 @@ dependencies = [ "httparse", "iovec", "itoa", - "log", + "log 0.4.14", "net2", "rustc_version 0.2.3", "time", @@ -2368,7 +2577,7 @@ dependencies = [ "http 0.2.4", "http-body 0.3.1", "httparse", - "httpdate", + "httpdate 0.3.2", "itoa", "pin-project 1.0.7", "socket2 0.3.19", @@ -2379,8 +2588,32 @@ dependencies = [ ] [[package]] -name = "hyper-rustls" -version = "0.21.0" +name = "hyper" +version = "0.14.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b61cf2d1aebcf6e6352c97b81dc2244ca29194be1b276f5d8ad5c6330fffb11" +dependencies = [ + "bytes 1.0.1", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.3", + "http 0.2.4", + "http-body 0.4.2", + "httparse", + "httpdate 1.0.1", + "itoa", + "pin-project-lite 0.2.7", + "socket2 0.4.0", + "tokio 1.9.0", + "tower-service", + "tracing", + "want 0.3.0", +] + +[[package]] +name = "hyper-rustls" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" dependencies = [ @@ -2388,7 +2621,7 @@ dependencies = [ "ct-logs", "futures-util", "hyper 0.13.10", - "log", + "log 0.4.14", "rustls 0.18.1", "rustls-native-certs", "tokio 0.2.25", @@ -2396,6 +2629,19 @@ dependencies = [ "webpki", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes 1.0.1", + "hyper 0.14.11", + "native-tls", + "tokio 1.9.0", + "tokio-native-tls", +] + [[package]] name = "idna" version = "0.1.5" @@ -2451,7 +2697,7 @@ dependencies = [ "if-addrs", "ipnet", "libc", - "log", + "log 0.4.14", "winapi 0.3.9", ] @@ -2490,11 +2736,20 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ - "autocfg", + "autocfg 1.0.1", "hashbrown 0.11.2", "serde", ] +[[package]] +name = "input_buffer" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" +dependencies = [ + "bytes 1.0.1", +] + [[package]] name = "instant" version = "0.1.10" @@ -2606,12 +2861,32 @@ checksum = "489b9c612e60c766f751ab40fcb43cbb55a1e10bb44a9b4307ed510ca598cbd7" dependencies = [ "failure", "futures 0.1.31", - "jsonrpc-core", - "jsonrpc-pubsub", - "log", + "jsonrpc-core 15.1.0", + "jsonrpc-pubsub 15.1.0", + "log 0.4.14", + "serde", + "serde_json", + "url 1.7.2", +] + +[[package]] +name = "jsonrpc-client-transports" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" +dependencies = [ + "derive_more", + "futures 0.3.15", + "hyper 0.14.11", + "hyper-tls", + "jsonrpc-core 18.0.0", + "jsonrpc-pubsub 18.0.0", + "log 0.4.14", "serde", "serde_json", + "tokio 1.9.0", "url 1.7.2", + "websocket", ] [[package]] @@ -2621,7 +2896,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" dependencies = [ "futures 0.1.31", - "log", + "log 0.4.14", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures 0.3.15", + "futures-executor", + "futures-util", + "log 0.4.14", "serde", "serde_derive", "serde_json", @@ -2633,7 +2923,17 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f764902d7b891344a0acb65625f32f6f7c6db006952143bd650209fbe7d94db" dependencies = [ - "jsonrpc-client-transports", + "jsonrpc-client-transports 15.1.0", +] + +[[package]] +name = "jsonrpc-core-client" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" +dependencies = [ + "futures 0.3.15", + "jsonrpc-client-transports 18.0.0", ] [[package]] @@ -2655,12 +2955,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7" dependencies = [ "hyper 0.12.36", - "jsonrpc-core", + "jsonrpc-core 15.1.0", "jsonrpc-server-utils", - "log", + "log 0.4.14", "net2", "parking_lot 0.10.2", - "unicase", + "unicase 2.6.0", ] [[package]] @@ -2669,9 +2969,9 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf50e53e4eea8f421a7316c5f63e395f7bc7c4e786a6dc54d76fab6ff7aa7ce7" dependencies = [ - "jsonrpc-core", + "jsonrpc-core 15.1.0", "jsonrpc-server-utils", - "log", + "log 0.4.14", "parity-tokio-ipc", "parking_lot 0.10.2", "tokio-service", @@ -2683,13 +2983,28 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77" dependencies = [ - "jsonrpc-core", - "log", + "jsonrpc-core 15.1.0", + "log 0.4.14", "parking_lot 0.10.2", "rand 0.7.3", "serde", ] +[[package]] +name = "jsonrpc-pubsub" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" +dependencies = [ + "futures 0.3.15", + "jsonrpc-core 18.0.0", + "lazy_static", + "log 0.4.14", + "parking_lot 0.11.1", + "rand 0.7.3", + "serde", +] + [[package]] name = "jsonrpc-server-utils" version = "15.1.0" @@ -2698,12 +3013,12 @@ checksum = "72f1f3990650c033bd8f6bd46deac76d990f9bbfb5f8dc8c4767bf0a00392176" dependencies = [ "bytes 0.4.12", "globset", - "jsonrpc-core", + "jsonrpc-core 15.1.0", "lazy_static", - "log", + "log 0.4.14", "tokio 0.1.22", "tokio-codec", - "unicase", + "unicase 2.6.0", ] [[package]] @@ -2712,9 +3027,9 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22" dependencies = [ - "jsonrpc-core", + "jsonrpc-core 15.1.0", "jsonrpc-server-utils", - "log", + "log 0.4.14", "parity-ws", "parking_lot 0.10.2", "slab", @@ -2742,7 +3057,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" dependencies = [ - "log", + "log 0.4.14", ] [[package]] @@ -2774,7 +3089,7 @@ checksum = "94b27cdb788bf1c8ade782289f9dbee626940be2961fd75c7cde993fa2f1ded1" dependencies = [ "fs-swap", "kvdb", - "log", + "log 0.4.14", "num_cpus", "owning_ref", "parity-util-mem", @@ -2784,6 +3099,12 @@ dependencies = [ "smallvec 1.6.1", ] +[[package]] +name = "language-tags" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" + [[package]] name = "lazy_static" version = "1.4.0" @@ -2888,7 +3209,7 @@ dependencies = [ "futures-timer 3.0.2", "lazy_static", "libsecp256k1", - "log", + "log 0.4.14", "multihash", "multistream-select", "parity-multiaddr", @@ -2927,7 +3248,7 @@ dependencies = [ "async-std-resolver", "futures 0.3.15", "libp2p-core", - "log", + "log 0.4.14", "smallvec 1.6.1", "trust-dns-resolver", ] @@ -2943,7 +3264,7 @@ dependencies = [ "futures 0.3.15", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "prost", "prost-build", "rand 0.7.3", @@ -2965,7 +3286,7 @@ dependencies = [ "hex_fmt", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "prost", "prost-build", "rand 0.7.3", @@ -2985,7 +3306,7 @@ dependencies = [ "futures 0.3.15", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "prost", "prost-build", "smallvec 1.6.1", @@ -3006,7 +3327,7 @@ dependencies = [ "futures 0.3.15", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "prost", "prost-build", "rand 0.7.3", @@ -3032,7 +3353,7 @@ dependencies = [ "lazy_static", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "rand 0.8.4", "smallvec 1.6.1", "socket2 0.4.0", @@ -3049,7 +3370,7 @@ dependencies = [ "bytes 1.0.1", "futures 0.3.15", "libp2p-core", - "log", + "log 0.4.14", "nohash-hasher", "parking_lot 0.11.1", "rand 0.7.3", @@ -3068,7 +3389,7 @@ dependencies = [ "futures 0.3.15", "lazy_static", "libp2p-core", - "log", + "log 0.4.14", "prost", "prost-build", "rand 0.7.3", @@ -3088,7 +3409,7 @@ dependencies = [ "futures 0.3.15", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "rand 0.7.3", "void", "wasm-timer", @@ -3104,7 +3425,7 @@ dependencies = [ "bytes 1.0.1", "futures 0.3.15", "libp2p-core", - "log", + "log 0.4.14", "prost", "prost-build", "unsigned-varint 0.7.0", @@ -3118,7 +3439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599" dependencies = [ "futures 0.3.15", - "log", + "log 0.4.14", "pin-project 1.0.7", "rand 0.7.3", "salsa20", @@ -3137,7 +3458,7 @@ dependencies = [ "futures-timer 3.0.2", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "pin-project 1.0.7", "prost", "prost-build", @@ -3159,7 +3480,7 @@ dependencies = [ "futures 0.3.15", "libp2p-core", "libp2p-swarm", - "log", + "log 0.4.14", "lru", "minicbor", "rand 0.7.3", @@ -3177,7 +3498,7 @@ dependencies = [ "either", "futures 0.3.15", "libp2p-core", - "log", + "log 0.4.14", "rand 0.7.3", "smallvec 1.6.1", "void", @@ -3207,7 +3528,7 @@ dependencies = [ "ipnet", "libc", "libp2p-core", - "log", + "log 0.4.14", "socket2 0.4.0", ] @@ -3220,7 +3541,7 @@ dependencies = [ "async-std", "futures 0.3.15", "libp2p-core", - "log", + "log 0.4.14", ] [[package]] @@ -3247,7 +3568,7 @@ dependencies = [ "futures 0.3.15", "futures-rustls", "libp2p-core", - "log", + "log 0.4.14", "quicksink", "rw-stream-sink", "soketto", @@ -3368,6 +3689,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "log" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +dependencies = [ + "log 0.4.14", +] + [[package]] name = "log" version = "0.4.14" @@ -3490,7 +3820,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg", + "autocfg 1.0.1", ] [[package]] @@ -3499,7 +3829,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" dependencies = [ - "autocfg", + "autocfg 1.0.1", ] [[package]] @@ -3531,6 +3861,31 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mime" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +dependencies = [ + "log 0.3.9", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mime_guess" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +dependencies = [ + "mime 0.3.16", + "unicase 2.6.0", +] + [[package]] name = "minicbor" version = "0.8.1" @@ -3558,7 +3913,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", - "autocfg", + "autocfg 1.0.1", ] [[package]] @@ -3573,13 +3928,26 @@ dependencies = [ "iovec", "kernel32-sys", "libc", - "log", + "log 0.4.14", "miow 0.2.2", "net2", "slab", "winapi 0.2.8", ] +[[package]] +name = "mio" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +dependencies = [ + "libc", + "log 0.4.14", + "miow 0.3.7", + "ntapi", + "winapi 0.3.9", +] + [[package]] name = "mio-extras" version = "2.0.6" @@ -3587,8 +3955,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ "lazycell", - "log", - "mio", + "log 0.4.14", + "mio 0.6.23", "slab", ] @@ -3598,8 +3966,8 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" dependencies = [ - "log", - "mio", + "log 0.4.14", + "mio 0.6.23", "miow 0.3.7", "winapi 0.3.9", ] @@ -3612,7 +3980,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", - "mio", + "mio 0.6.23", ] [[package]] @@ -3690,6 +4058,24 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +[[package]] +name = "multipart" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050aeedc89243f5347c3e237e3e13dc76fbe4ae3742a57b94dc14f69acf76d4" +dependencies = [ + "buf_redux", + "httparse", + "log 0.4.14", + "mime 0.3.16", + "mime_guess", + "quick-error 1.2.3", + "rand 0.7.3", + "safemem", + "tempfile", + "twoway", +] + [[package]] name = "multistream-select" version = "0.10.2" @@ -3698,7 +4084,7 @@ checksum = "7d91ec0a2440aaff5f78ec35631a7027d50386c6163aa975f7caa0d5da4b6ff8" dependencies = [ "bytes 1.0.1", "futures 0.3.15", - "log", + "log 0.4.14", "pin-project 1.0.7", "smallvec 1.6.1", "unsigned-varint 0.7.0", @@ -3742,6 +4128,24 @@ dependencies = [ "rand 0.3.23", ] +[[package]] +name = "native-tls" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" +dependencies = [ + "lazy_static", + "libc", + "log 0.4.14", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework 2.3.1", + "security-framework-sys 2.3.0", + "tempfile", +] + [[package]] name = "net2" version = "0.2.37" @@ -3759,7 +4163,7 @@ version = "3.0.0" dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", - "jsonrpc-core", + "jsonrpc-core 15.1.0", "node-template-runtime", "pallet-transaction-payment-rpc", "sc-basic-authorship", @@ -3848,7 +4252,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "memchr", - "version_check", + "version_check 0.9.3", +] + +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", ] [[package]] @@ -3857,7 +4270,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg", + "autocfg 1.0.1", "num-integer", "num-traits", ] @@ -3877,7 +4290,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg", + "autocfg 1.0.1", "num-traits", ] @@ -3887,7 +4300,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg", + "autocfg 1.0.1", "num-bigint", "num-integer", "num-traits", @@ -3899,7 +4312,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ - "autocfg", + "autocfg 1.0.1", "num-integer", "num-traits", ] @@ -3910,7 +4323,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg", + "autocfg 1.0.1", "libm", ] @@ -3964,12 +4377,45 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-sys", +] + [[package]] name = "openssl-probe" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +[[package]] +name = "openssl-sys" +version = "0.9.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d" +dependencies = [ + "autocfg 1.0.1", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "os_str_bytes" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" + [[package]] name = "owning_ref" version = "0.4.1" @@ -4017,7 +4463,7 @@ dependencies = [ "frame-benchmarking", "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "frame-system 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "log", + "log 0.4.14", "max-encoded-len", "parity-scale-codec", "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -4045,7 +4491,7 @@ dependencies = [ "frame-benchmarking", "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "frame-system 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "log", + "log 0.4.14", "pallet-authorship", "pallet-session", "parity-scale-codec", @@ -4081,7 +4527,7 @@ dependencies = [ "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "frame-system 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "lite-json", - "log", + "log 0.4.14", "pallet-balances", "parity-scale-codec", "serde", @@ -4114,7 +4560,7 @@ dependencies = [ "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "frame-system 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "impl-trait-for-tuples", - "log", + "log 0.4.14", "pallet-timestamp", "parity-scale-codec", "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -4148,7 +4594,7 @@ dependencies = [ "frame-support 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "frame-system 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "impl-trait-for-tuples", - "log", + "log 0.4.14", "parity-scale-codec", "sp-inherents 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -4178,8 +4624,8 @@ name = "pallet-transaction-payment-rpc" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", + "jsonrpc-core 15.1.0", + "jsonrpc-core-client 15.1.0", "jsonrpc-derive", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", @@ -4212,7 +4658,7 @@ dependencies = [ "fs2", "hex", "libc", - "log", + "log 0.4.14", "memmap2", "parking_lot 0.11.1", "rand 0.8.4", @@ -4277,7 +4723,7 @@ dependencies = [ "bytes 0.4.12", "futures 0.1.31", "libc", - "log", + "log 0.4.14", "mio-named-pipes", "miow 0.3.7", "rand 0.7.3", @@ -4344,8 +4790,8 @@ dependencies = [ "byteorder", "bytes 0.4.12", "httparse", - "log", - "mio", + "log 0.4.14", + "mio 0.6.23", "mio-extras", "rand 0.7.3", "sha-1 0.8.2", @@ -4633,7 +5079,7 @@ checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25" dependencies = [ "cfg-if 1.0.0", "libc", - "log", + "log 0.4.14", "wepoll-ffi", "winapi 0.3.9", ] @@ -4665,6 +5111,29 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +[[package]] +name = "price-feed" +version = "0.1.0" +dependencies = [ + "chrono", + "clap 3.0.0-beta.2", + "custom_derive", + "enum_derive", + "env_logger 0.9.0", + "futures 0.3.15", + "jsonrpc-client-transports 18.0.0", + "jsonrpc-core 18.0.0", + "jsonrpc-core-client 18.0.0", + "log 0.4.14", + "serde", + "serde_json", + "signal-hook", + "signal-hook-tokio", + "tokio 1.9.0", + "url 1.7.2", + "warp", +] + [[package]] name = "primitive-types" version = "0.9.1" @@ -4706,7 +5175,7 @@ dependencies = [ "proc-macro2", "quote", "syn", - "version_check", + "version_check 0.9.3", ] [[package]] @@ -4717,7 +5186,7 @@ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "version_check", + "version_check 0.9.3", ] [[package]] @@ -4774,7 +5243,7 @@ dependencies = [ "bytes 1.0.1", "heck", "itertools 0.9.0", - "log", + "log 0.4.14", "multimap", "petgraph", "prost", @@ -4822,7 +5291,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0c1a2f10b47d446372a4f397c58b329aaea72b2daf9395a623a411cb8ccb54f" dependencies = [ "byteorder", - "log", + "log 0.4.14", "parity-wasm 0.42.2", ] @@ -4887,6 +5356,25 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.7", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg 0.1.2", + "rand_xorshift", + "winapi 0.3.9", +] + [[package]] name = "rand" version = "0.7.3" @@ -4898,7 +5386,7 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc 0.2.0", - "rand_pcg", + "rand_pcg 0.2.1", ] [[package]] @@ -4913,6 +5401,16 @@ dependencies = [ "rand_hc 0.3.1", ] +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.3.1", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -4976,6 +5474,15 @@ dependencies = [ "rand 0.8.4", ] +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -4994,6 +5501,50 @@ dependencies = [ "rand_core 0.6.3", ] +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi 0.3.9", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.9", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.4.2", +] + [[package]] name = "rand_pcg" version = "0.2.1" @@ -5003,6 +5554,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -5015,7 +5575,7 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" dependencies = [ - "autocfg", + "autocfg 1.0.1", "crossbeam-deque 0.8.0", "either", "rayon-core", @@ -5094,7 +5654,7 @@ version = "0.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" dependencies = [ - "log", + "log 0.4.14", "rustc-hash", "serde", "smallvec 1.6.1", @@ -5241,7 +5801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ "base64 0.12.3", - "log", + "log 0.4.14", "ring", "sct", "webpki", @@ -5254,7 +5814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.0", - "log", + "log 0.4.14", "ring", "sct", "webpki", @@ -5269,7 +5829,7 @@ dependencies = [ "openssl-probe", "rustls 0.18.1", "schannel", - "security-framework", + "security-framework 1.0.0", ] [[package]] @@ -5308,6 +5868,12 @@ dependencies = [ "rustc_version 0.2.3", ] +[[package]] +name = "safemem" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" + [[package]] name = "salsa20" version = "0.7.2" @@ -5333,7 +5899,7 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", - "log", + "log 0.4.14", "parity-scale-codec", "sc-block-builder", "sc-client-api", @@ -5407,7 +5973,7 @@ dependencies = [ "futures 0.3.15", "hex", "libp2p", - "log", + "log 0.4.14", "names", "parity-scale-codec", "rand 0.7.3", @@ -5446,7 +6012,7 @@ dependencies = [ "hash-db", "kvdb", "lazy_static", - "log", + "log 0.4.14", "parity-scale-codec", "parking_lot 0.11.1", "sc-executor", @@ -5480,7 +6046,7 @@ dependencies = [ "kvdb-memorydb", "kvdb-rocksdb", "linked-hash-map", - "log", + "log 0.4.14", "parity-db", "parity-scale-codec", "parity-util-mem", @@ -5521,7 +6087,7 @@ dependencies = [ "derive_more", "futures 0.3.15", "futures-timer 3.0.2", - "log", + "log 0.4.14", "parity-scale-codec", "sc-block-builder", "sc-client-api", @@ -5553,7 +6119,7 @@ dependencies = [ "fork-tree", "futures 0.3.15", "futures-timer 3.0.2", - "log", + "log 0.4.14", "merlin", "num-bigint", "num-rational 0.2.4", @@ -5611,7 +6177,7 @@ dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", "impl-trait-for-tuples", - "log", + "log 0.4.14", "parity-scale-codec", "sc-client-api", "sc-telemetry", @@ -5649,7 +6215,7 @@ dependencies = [ "derive_more", "lazy_static", "libsecp256k1", - "log", + "log 0.4.14", "parity-scale-codec", "parity-wasm 0.42.2", "parking_lot 0.11.1", @@ -5692,7 +6258,7 @@ name = "sc-executor-wasmi" version = "0.9.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "log", + "log 0.4.14", "parity-scale-codec", "sc-executor-common", "sp-allocator", @@ -5709,7 +6275,7 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "cfg-if 1.0.0", "libc", - "log", + "log 0.4.14", "parity-scale-codec", "parity-wasm 0.42.2", "sc-executor-common", @@ -5734,7 +6300,7 @@ dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", "linked-hash-map", - "log", + "log 0.4.14", "parity-scale-codec", "parking_lot 0.11.1", "pin-project 1.0.7", @@ -5770,7 +6336,7 @@ dependencies = [ "ansi_term 0.12.1", "futures 0.3.15", "futures-timer 3.0.2", - "log", + "log 0.4.14", "parity-util-mem", "sc-client-api", "sc-network", @@ -5843,7 +6409,7 @@ dependencies = [ "libp2p", "linked-hash-map", "linked_hash_set", - "log", + "log 0.4.14", "lru", "nohash-hasher", "parity-scale-codec", @@ -5880,7 +6446,7 @@ dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", "libp2p", - "log", + "log 0.4.14", "lru", "sc-network", "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -5901,7 +6467,7 @@ dependencies = [ "hex", "hyper 0.13.10", "hyper-rustls", - "log", + "log 0.4.14", "num_cpus", "parity-scale-codec", "parking_lot 0.11.1", @@ -5924,7 +6490,7 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "futures 0.3.15", "libp2p", - "log", + "log 0.4.14", "serde_json", "sp-utils", "wasm-timer", @@ -5935,7 +6501,7 @@ name = "sc-proposer-metrics" version = "0.9.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "log", + "log 0.4.14", "substrate-prometheus-endpoint", ] @@ -5946,9 +6512,9 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "futures 0.3.15", "hash-db", - "jsonrpc-core", - "jsonrpc-pubsub", - "log", + "jsonrpc-core 15.1.0", + "jsonrpc-pubsub 15.1.0", + "log 0.4.14", "parity-scale-codec", "parking_lot 0.11.1", "sc-block-builder", @@ -5981,11 +6547,11 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "derive_more", "futures 0.3.15", - "jsonrpc-core", - "jsonrpc-core-client", + "jsonrpc-core 15.1.0", + "jsonrpc-core-client 15.1.0", "jsonrpc-derive", - "jsonrpc-pubsub", - "log", + "jsonrpc-pubsub 15.1.0", + "log 0.4.14", "parity-scale-codec", "parking_lot 0.11.1", "serde", @@ -6005,12 +6571,12 @@ version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "futures 0.1.31", - "jsonrpc-core", + "jsonrpc-core 15.1.0", "jsonrpc-http-server", "jsonrpc-ipc-server", - "jsonrpc-pubsub", + "jsonrpc-pubsub 15.1.0", "jsonrpc-ws-server", - "log", + "log 0.4.14", "serde", "serde_json", "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -6029,10 +6595,10 @@ dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", "hash-db", - "jsonrpc-core", - "jsonrpc-pubsub", + "jsonrpc-core 15.1.0", + "jsonrpc-pubsub 15.1.0", "lazy_static", - "log", + "log 0.4.14", "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.1", @@ -6087,7 +6653,7 @@ name = "sc-state-db" version = "0.9.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "log", + "log 0.4.14", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", @@ -6105,7 +6671,7 @@ dependencies = [ "chrono", "futures 0.3.15", "libp2p", - "log", + "log 0.4.14", "parking_lot 0.11.1", "pin-project 1.0.7", "rand 0.7.3", @@ -6126,7 +6692,7 @@ dependencies = [ "atty", "erased-serde", "lazy_static", - "log", + "log 0.4.14", "once_cell", "parking_lot 0.11.1", "regex", @@ -6173,7 +6739,7 @@ dependencies = [ "derive_more", "futures 0.3.15", "linked-hash-map", - "log", + "log 0.4.14", "parity-util-mem", "parking_lot 0.11.1", "retain_mut", @@ -6194,7 +6760,7 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "futures 0.3.15", "intervalier", - "log", + "log 0.4.14", "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.1", @@ -6299,29 +6865,52 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b" dependencies = [ "bitflags", - "core-foundation", - "core-foundation-sys", + "core-foundation 0.7.0", + "core-foundation-sys 0.7.0", "libc", - "security-framework-sys", + "security-framework-sys 1.0.0", ] [[package]] -name = "security-framework-sys" -version = "1.0.0" +name = "security-framework" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7" +checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" dependencies = [ - "core-foundation-sys", + "bitflags", + "core-foundation 0.9.1", + "core-foundation-sys 0.8.2", "libc", + "security-framework-sys 2.3.0", ] [[package]] -name = "semver" -version = "0.6.0" +name = "security-framework-sys" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7" dependencies = [ - "semver-parser 0.7.0", + "core-foundation-sys 0.7.0", + "libc", +] + +[[package]] +name = "security-framework-sys" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284" +dependencies = [ + "core-foundation-sys 0.8.2", + "libc", +] + +[[package]] +name = "semver" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +dependencies = [ + "semver-parser 0.7.0", ] [[package]] @@ -6389,6 +6978,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "sha-1" version = "0.8.2" @@ -6414,6 +7015,12 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" + [[package]] name = "sha2" version = "0.8.2" @@ -6485,6 +7092,18 @@ dependencies = [ "libc", ] +[[package]] +name = "signal-hook-tokio" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6c5d32165ff8b94e68e7b3bdecb1b082e958c22434b363482cfb89dcd6f3ff8" +dependencies = [ + "futures-core", + "libc", + "signal-hook", + "tokio 1.9.0", +] + [[package]] name = "signature" version = "1.3.1" @@ -6583,7 +7202,7 @@ dependencies = [ "flate2", "futures 0.3.15", "httparse", - "log", + "log 0.4.14", "rand 0.7.3", "sha-1 0.9.6", ] @@ -6593,7 +7212,7 @@ name = "sp-allocator" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "log", + "log 0.4.14", "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-wasm-interface 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -6606,7 +7225,7 @@ version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "hash-db", - "log", + "log 0.4.14", "parity-scale-codec", "sp-api-proc-macro", "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -6629,19 +7248,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-application-crypto" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52e2e6d43036b97c4fce1ed87c5262c1ffdc78c655ada4d3024a3f8094bdd2c" -dependencies = [ - "parity-scale-codec", - "serde", - "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sp-application-crypto" version = "3.0.0" @@ -6656,16 +7262,15 @@ dependencies = [ ] [[package]] -name = "sp-arithmetic" +name = "sp-application-crypto" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f1c69966c192d1dee8521f0b29ece2b14db07b9b44d801a94e295234761645" +checksum = "c52e2e6d43036b97c4fce1ed87c5262c1ffdc78c655ada4d3024a3f8094bdd2c" dependencies = [ - "integer-sqrt", - "num-traits", "parity-scale-codec", "serde", - "sp-debug-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6683,6 +7288,20 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-arithmetic" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f1c69966c192d1dee8521f0b29ece2b14db07b9b44d801a94e295234761645" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "serde", + "sp-debug-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sp-authorship" version = "3.0.0" @@ -6713,7 +7332,7 @@ version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "futures 0.3.15", - "log", + "log 0.4.14", "lru", "parity-scale-codec", "parking_lot 0.11.1", @@ -6743,7 +7362,7 @@ dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", "libp2p", - "log", + "log 0.4.14", "parity-scale-codec", "parking_lot 0.11.1", "serde", @@ -6825,8 +7444,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbc8d4e9b8a7d5819ed26f1374017bb32833ef4890e4ff065e1da30669876bc" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "base58", "blake2-rfc", @@ -6840,7 +7458,8 @@ dependencies = [ "impl-serde", "lazy_static", "libsecp256k1", - "log", + "log 0.4.14", + "max-encoded-len", "merlin", "num-traits", "parity-scale-codec", @@ -6853,24 +7472,25 @@ dependencies = [ "secrecy", "serde", "sha2 0.9.5", - "sp-debug-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-runtime-interface 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-storage 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "substrate-bip39", "thiserror", "tiny-bip39", "tiny-keccak", "twox-hash", - "wasmi 0.6.2", + "wasmi 0.9.0", "zeroize", ] [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abbc8d4e9b8a7d5819ed26f1374017bb32833ef4890e4ff065e1da30669876bc" dependencies = [ "base58", "blake2-rfc", @@ -6884,8 +7504,7 @@ dependencies = [ "impl-serde", "lazy_static", "libsecp256k1", - "log", - "max-encoded-len", + "log 0.4.14", "merlin", "num-traits", "parity-scale-codec", @@ -6898,17 +7517,17 @@ dependencies = [ "secrecy", "serde", "sha2 0.9.5", - "sp-debug-derive 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-runtime-interface 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-storage 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-debug-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-bip39", "thiserror", "tiny-bip39", "tiny-keccak", "twox-hash", - "wasmi 0.9.0", + "wasmi 0.6.2", "zeroize", ] @@ -6924,8 +7543,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e80275f23b4e7ba8f54dec5f90f016530e7307d2ee9445f617ab986cbe97f31e" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "proc-macro2", "quote", @@ -6935,7 +7553,8 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e80275f23b4e7ba8f54dec5f90f016530e7307d2ee9445f617ab986cbe97f31e" dependencies = [ "proc-macro2", "quote", @@ -6945,24 +7564,24 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fdc625f8c7b13b9a136d334888b21b5743d2081cb666cb03efca1dc9b8f74d1" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-storage 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fdc625f8c7b13b9a136d334888b21b5743d2081cb666cb03efca1dc9b8f74d1" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-storage 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6971,7 +7590,7 @@ version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "finality-grandpa", - "log", + "log 0.4.14", "parity-scale-codec", "serde", "sp-api", @@ -6982,19 +7601,6 @@ dependencies = [ "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] -[[package]] -name = "sp-inherents" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2542380b535c6941502a0a3069a657eb5abb70fd67b11afa164d4a4b038ba73a" -dependencies = [ - "parity-scale-codec", - "parking_lot 0.11.1", - "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror", -] - [[package]] name = "sp-inherents" version = "3.0.0" @@ -7010,28 +7616,16 @@ dependencies = [ ] [[package]] -name = "sp-io" +name = "sp-inherents" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fd69f0a6e91bedc2fb1c5cc3689c212474b6c918274cb4cb14dbbe3c428c14" +checksum = "2542380b535c6941502a0a3069a657eb5abb70fd67b11afa164d4a4b038ba73a" dependencies = [ - "futures 0.3.15", - "hash-db", - "libsecp256k1", - "log", "parity-scale-codec", "parking_lot 0.11.1", "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-keystore 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-state-machine 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing", - "tracing-core", + "thiserror", ] [[package]] @@ -7042,7 +7636,7 @@ dependencies = [ "futures 0.3.15", "hash-db", "libsecp256k1", - "log", + "log 0.4.14", "parity-scale-codec", "parking_lot 0.11.1", "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -7059,6 +7653,31 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "sp-io" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fd69f0a6e91bedc2fb1c5cc3689c212474b6c918274cb4cb14dbbe3c428c14" +dependencies = [ + "futures 0.3.15", + "hash-db", + "libsecp256k1", + "log 0.4.14", + "parity-scale-codec", + "parking_lot 0.11.1", + "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-keystore 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-state-machine 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing", + "tracing-core", +] + [[package]] name = "sp-keyring" version = "3.0.0" @@ -7073,8 +7692,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6ccd2baf189112355338e8b224dc513cd239b974dbd717f12b3dc7a7248c3b" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "async-trait", "derive_more", @@ -7083,14 +7701,16 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", "schnorrkel", - "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6ccd2baf189112355338e8b224dc513cd239b974dbd717f12b3dc7a7248c3b" dependencies = [ "async-trait", "derive_more", @@ -7099,9 +7719,8 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", "schnorrkel", - "serde", - "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7126,8 +7745,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54702e109f1c8a870dd4065a497d2612d42cec5817126e96cc0658c5ea975784" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "backtrace", ] @@ -7135,7 +7753,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54702e109f1c8a870dd4065a497d2612d42cec5817126e96cc0658c5ea975784" dependencies = [ "backtrace", ] @@ -7154,90 +7773,89 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa4b353b76f04616dbdb8d269d58dcac47acb31c006d3b70e7b64233e68695e" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", - "log", + "log 0.4.14", + "max-encoded-len", "parity-scale-codec", "parity-util-mem", "paste 1.0.5", "rand 0.7.3", "serde", - "sp-application-crypto 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-arithmetic 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-arithmetic 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa4b353b76f04616dbdb8d269d58dcac47acb31c006d3b70e7b64233e68695e" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", - "log", - "max-encoded-len", + "log 0.4.14", "parity-scale-codec", "parity-util-mem", "paste 1.0.5", "rand 0.7.3", "serde", - "sp-application-crypto 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-arithmetic 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-application-crypto 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e5c88b4bc8d607e4e2ff767a85db58cf7101f3dd6064f06929342ea67fe8fb" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface-proc-macro 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-runtime-interface-proc-macro 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-storage 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-tracing 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-wasm-interface 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "static_assertions", ] [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5c88b4bc8d607e4e2ff767a85db58cf7101f3dd6064f06929342ea67fe8fb" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-runtime-interface-proc-macro 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-storage 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-tracing 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-wasm-interface 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface-proc-macro 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a6c7c2251512c9e533d15db8a863b06ece1cbee778130dd9adbe44b6b39aa9" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "Inflector", - "proc-macro-crate 0.1.5", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -7246,10 +7864,11 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a6c7c2251512c9e533d15db8a863b06ece1cbee778130dd9adbe44b6b39aa9" dependencies = [ "Inflector", - "proc-macro-crate 1.0.0", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -7280,43 +7899,43 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc729eb10f8809c61a1fe439ac118a4413de004aaf863003ee8752ac0b596e73" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "parity-scale-codec", - "sp-runtime 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc729eb10f8809c61a1fe439ac118a4413de004aaf863003ee8752ac0b596e73" dependencies = [ "parity-scale-codec", - "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-runtime 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-state-machine" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fa4143e58e9130f726d4e8a9b86f3530a8bd19a2eedcdcf4af205f4b5a6d4f" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "hash-db", - "log", + "log 0.4.14", "num-traits", "parity-scale-codec", "parking_lot 0.11.1", "rand 0.7.3", "smallvec 1.6.1", - "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-panic-handler 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-panic-handler 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-trie 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "thiserror", + "tracing", "trie-db", "trie-root", ] @@ -7324,22 +7943,22 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46fa4143e58e9130f726d4e8a9b86f3530a8bd19a2eedcdcf4af205f4b5a6d4f" dependencies = [ "hash-db", - "log", + "log 0.4.14", "num-traits", - "parity-scale-codec", - "parking_lot 0.11.1", - "rand 0.7.3", - "smallvec 1.6.1", - "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-panic-handler 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-trie 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "parity-scale-codec", + "parking_lot 0.11.1", + "rand 0.7.3", + "smallvec 1.6.1", + "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-panic-handler 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror", - "tracing", "trie-db", "trie-root", ] @@ -7347,39 +7966,39 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35391ea974fa5ee869cb094d5b437688fbf3d8127d64d1b9fed5822a1ed39b12" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35391ea974fa5ee869cb094d5b437688fbf3d8127d64d1b9fed5822a1ed39b12" [[package]] name = "sp-storage" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86af458d4a0251c490cdde9dcaaccb88d398f3b97ac6694cdd49ed9337e6b961" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", ] [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86af458d4a0251c490cdde9dcaaccb88d398f3b97ac6694cdd49ed9337e6b961" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-debug-derive 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7387,7 +8006,7 @@ name = "sp-tasks" version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "log", + "log 0.4.14", "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-externalities 0.9.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-io 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -7402,7 +8021,7 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "async-trait", "futures-timer 3.0.2", - "log", + "log 0.4.14", "parity-scale-codec", "sp-api", "sp-inherents 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -7415,12 +8034,16 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567382d8d4e14fb572752863b5cd57a78f9e9a6583332b590b726f061f3ea957" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ - "log", + "erased-serde", + "log 0.4.14", "parity-scale-codec", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.2", + "serde", + "serde_json", + "slog", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "tracing", "tracing-core", "tracing-subscriber", @@ -7429,16 +8052,12 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567382d8d4e14fb572752863b5cd57a78f9e9a6583332b590b726f061f3ea957" dependencies = [ - "erased-serde", - "log", + "log 0.4.14", "parity-scale-codec", - "parking_lot 0.10.2", - "serde", - "serde_json", - "slog", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tracing", "tracing-core", "tracing-subscriber", @@ -7451,7 +8070,7 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "derive_more", "futures 0.3.15", - "log", + "log 0.4.14", "parity-scale-codec", "serde", "sp-api", @@ -7466,7 +8085,7 @@ version = "3.0.0" source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "async-trait", - "log", + "log 0.4.14", "parity-scale-codec", "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "sp-inherents 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", @@ -7478,14 +8097,13 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85b7f745da41ef825c6f7b93f1fdc897b03df94a4884adfbb70fbcd0aed1298" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", - "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", "trie-db", "trie-root", ] @@ -7493,13 +8111,14 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b85b7f745da41ef825c6f7b93f1fdc897b03df94a4884adfbb70fbcd0aed1298" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", - "sp-core 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-core 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db", "trie-root", ] @@ -7519,27 +8138,27 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbeffa538a13d715d30e01d57a2636ba32845b737a29a3ea32403576588222e7" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "impl-serde", "parity-scale-codec", "serde", - "sp-runtime 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "sp-version-proc-macro", ] [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbeffa538a13d715d30e01d57a2636ba32845b737a29a3ea32403576588222e7" dependencies = [ "impl-serde", "parity-scale-codec", "serde", - "sp-runtime 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "sp-version-proc-macro", + "sp-runtime 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7557,24 +8176,24 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b214e125666a6416cf30a70cc6a5dacd34a4e5197f8a3d479f714af7e1dc7a47" +source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", - "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2", + "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", + "wasmi 0.9.0", ] [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617#d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b214e125666a6416cf30a70cc6a5dacd34a4e5197f8a3d479f714af7e1dc7a47" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", - "sp-std 3.0.0 (git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e319dc0a5a3ace5543f9617)", - "wasmi 0.9.0", + "sp-std 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2", ] [[package]] @@ -7633,13 +8252,19 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "structopt" version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69b041cdcb67226aca307e6e7be44c8806423d83e018bd662360a93dabce4d71" dependencies = [ - "clap", + "clap 2.33.3", "lazy_static", "structopt-derive", ] @@ -7706,10 +8331,10 @@ source = "git+https://github.com/paritytech/substrate.git?rev=d6c33e7ec313f9bd5e dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.15", - "jsonrpc-core", - "jsonrpc-core-client", + "jsonrpc-core 15.1.0", + "jsonrpc-core-client 15.1.0", "jsonrpc-derive", - "log", + "log 0.4.14", "parity-scale-codec", "sc-client-api", "sc-rpc-api", @@ -7731,7 +8356,7 @@ dependencies = [ "derive_more", "futures-util", "hyper 0.13.10", - "log", + "log 0.4.14", "prometheus", "tokio 0.2.25", ] @@ -7837,6 +8462,15 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789" +dependencies = [ + "unicode-width", +] + [[package]] name = "thiserror" version = "1.0.26" @@ -7936,7 +8570,7 @@ checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" dependencies = [ "bytes 0.4.12", "futures 0.1.31", - "mio", + "mio 0.6.23", "num_cpus", "tokio-codec", "tokio-current-thread", @@ -7965,7 +8599,7 @@ dependencies = [ "lazy_static", "libc", "memchr", - "mio", + "mio 0.6.23", "mio-uds", "num_cpus", "pin-project-lite 0.1.12", @@ -7974,6 +8608,26 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "tokio" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b7b349f11a7047e6d1276853e612d152f5e8a352c61917887cc2169e2366b4c" +dependencies = [ + "autocfg 1.0.1", + "bytes 1.0.1", + "libc", + "memchr", + "mio 0.7.13", + "num_cpus", + "once_cell", + "parking_lot 0.11.1", + "pin-project-lite 0.2.7", + "signal-hook-registry", + "tokio-macros", + "winapi 0.3.9", +] + [[package]] name = "tokio-buf" version = "0.1.1" @@ -8035,7 +8689,18 @@ checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" dependencies = [ "bytes 0.4.12", "futures 0.1.31", - "log", + "log 0.4.14", +] + +[[package]] +name = "tokio-macros" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -8046,11 +8711,21 @@ checksum = "9d282d483052288b2308ba5ee795f5673b159c9bdf63c385a05609da782a5eae" dependencies = [ "bytes 0.4.12", "futures 0.1.31", - "mio", + "mio 0.6.23", "mio-named-pipes", "tokio 0.1.22", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio 1.9.0", +] + [[package]] name = "tokio-reactor" version = "0.1.12" @@ -8060,8 +8735,8 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.31", "lazy_static", - "log", - "mio", + "log 0.4.14", + "mio 0.6.23", "num_cpus", "parking_lot 0.9.0", "slab", @@ -8091,6 +8766,17 @@ dependencies = [ "futures 0.1.31", ] +[[package]] +name = "tokio-stream" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f" +dependencies = [ + "futures-core", + "pin-project-lite 0.2.7", + "tokio 1.9.0", +] + [[package]] name = "tokio-sync" version = "0.1.8" @@ -8110,7 +8796,7 @@ dependencies = [ "bytes 0.4.12", "futures 0.1.31", "iovec", - "mio", + "mio 0.6.23", "tokio-io", "tokio-reactor", ] @@ -8126,7 +8812,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.31", "lazy_static", - "log", + "log 0.4.14", "num_cpus", "slab", "tokio-executor", @@ -8144,6 +8830,30 @@ dependencies = [ "tokio-executor", ] +[[package]] +name = "tokio-tls" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" +dependencies = [ + "futures 0.1.31", + "native-tls", + "tokio-io", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1a5f475f1b9d077ea1017ecbc60890fda8e54942d680ca0b1d2b47cfa2d861b" +dependencies = [ + "futures-util", + "log 0.4.14", + "pin-project 1.0.7", + "tokio 1.9.0", + "tungstenite", +] + [[package]] name = "tokio-udp" version = "0.1.6" @@ -8152,8 +8862,8 @@ checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" dependencies = [ "bytes 0.4.12", "futures 0.1.31", - "log", - "mio", + "log 0.4.14", + "mio 0.6.23", "tokio-codec", "tokio-io", "tokio-reactor", @@ -8169,8 +8879,8 @@ dependencies = [ "futures 0.1.31", "iovec", "libc", - "log", - "mio", + "log 0.4.14", + "mio 0.6.23", "mio-uds", "tokio-codec", "tokio-io", @@ -8186,11 +8896,25 @@ dependencies = [ "bytes 0.5.6", "futures-core", "futures-sink", - "log", + "log 0.4.14", "pin-project-lite 0.1.12", "tokio 0.2.25", ] +[[package]] +name = "tokio-util" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" +dependencies = [ + "bytes 1.0.1", + "futures-core", + "futures-sink", + "log 0.4.14", + "pin-project-lite 0.2.7", + "tokio 1.9.0", +] + [[package]] name = "toml" version = "0.5.8" @@ -8213,7 +8937,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ "cfg-if 1.0.0", - "log", + "log 0.4.14", "pin-project-lite 0.2.7", "tracing-attributes", "tracing-core", @@ -8256,7 +8980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" dependencies = [ "lazy_static", - "log", + "log 0.4.14", "tracing-core", ] @@ -8292,6 +9016,12 @@ dependencies = [ "tracing-serde", ] +[[package]] +name = "traitobject" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" + [[package]] name = "trie-db" version = "0.22.6" @@ -8300,7 +9030,7 @@ checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" dependencies = [ "hash-db", "hashbrown 0.11.2", - "log", + "log 0.4.14", "rustc-hex", "smallvec 1.6.1", ] @@ -8330,7 +9060,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "log", + "log 0.4.14", "rand 0.8.4", "smallvec 1.6.1", "thiserror", @@ -8348,7 +9078,7 @@ dependencies = [ "futures-util", "ipconfig", "lazy_static", - "log", + "log 0.4.14", "lru-cache", "parking_lot 0.11.1", "resolv-conf", @@ -8363,6 +9093,34 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +[[package]] +name = "tungstenite" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ada8297e8d70872fa9a551d93250a9f407beb9f37ef86494eb20012a2ff7c24" +dependencies = [ + "base64 0.13.0", + "byteorder", + "bytes 1.0.1", + "http 0.2.4", + "httparse", + "input_buffer", + "log 0.4.14", + "rand 0.8.4", + "sha-1 0.9.6", + "url 2.2.2", + "utf-8", +] + +[[package]] +name = "twoway" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" +dependencies = [ + "memchr", +] + [[package]] name = "twox-hash" version = "1.6.0" @@ -8374,6 +9132,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typeable" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" + [[package]] name = "typenum" version = "1.13.0" @@ -8398,13 +9162,22 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unicase" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +dependencies = [ + "version_check 0.1.5", +] + [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check", + "version_check 0.9.3", ] [[package]] @@ -8512,6 +9285,12 @@ dependencies = [ "percent-encoding 2.1.0", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "value-bag" version = "1.0.0-alpha.7" @@ -8519,7 +9298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae" dependencies = [ "ctor", - "version_check", + "version_check 0.9.3", ] [[package]] @@ -8534,6 +9313,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" + [[package]] name = "version_check" version = "0.9.3" @@ -8570,7 +9355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" dependencies = [ "futures 0.1.31", - "log", + "log 0.4.14", "try-lock", ] @@ -8580,10 +9365,39 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log", + "log 0.4.14", "try-lock", ] +[[package]] +name = "warp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d47745e9a0c38636dbd454729b147d16bd1ed08ae67b3ab281c4506771054" +dependencies = [ + "bytes 1.0.1", + "futures 0.3.15", + "headers", + "http 0.2.4", + "hyper 0.14.11", + "log 0.4.14", + "mime 0.3.16", + "mime_guess", + "multipart", + "percent-encoding 2.1.0", + "pin-project 1.0.7", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio 1.9.0", + "tokio-stream", + "tokio-tungstenite", + "tokio-util 0.6.7", + "tower-service", + "tracing", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -8614,7 +9428,7 @@ checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" dependencies = [ "bumpalo", "lazy_static", - "log", + "log 0.4.14", "proc-macro2", "quote", "syn", @@ -8668,7 +9482,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" dependencies = [ - "log", + "log 0.4.14", "parity-wasm 0.32.0", "rustc-demangle", ] @@ -8755,7 +9569,7 @@ dependencies = [ "indexmap", "lazy_static", "libc", - "log", + "log 0.4.14", "paste 1.0.5", "psm", "region", @@ -8787,7 +9601,7 @@ dependencies = [ "errno", "file-per-thread-logger", "libc", - "log", + "log 0.4.14", "serde", "sha2 0.9.5", "toml", @@ -8838,7 +9652,7 @@ dependencies = [ "cranelift-wasm", "gimli", "indexmap", - "log", + "log 0.4.14", "more-asserts", "serde", "thiserror", @@ -8871,7 +9685,7 @@ dependencies = [ "cranelift-native", "cranelift-wasm", "gimli", - "log", + "log 0.4.14", "more-asserts", "object 0.24.0", "rayon", @@ -8935,7 +9749,7 @@ dependencies = [ "indexmap", "lazy_static", "libc", - "log", + "log 0.4.14", "mach", "memoffset 0.6.4", "more-asserts", @@ -8994,6 +9808,47 @@ dependencies = [ "webpki", ] +[[package]] +name = "websocket" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413b37840b9e27b340ce91b319ede10731de8c72f5bc4cb0206ec1ca4ce581d0" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "hyper 0.10.16", + "native-tls", + "rand 0.6.5", + "tokio-codec", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-tls", + "unicase 1.4.2", + "url 1.7.2", + "websocket-base", +] + +[[package]] +name = "websocket-base" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e3810f0d00c4dccb54c30a4eee815e703232819dec7b007db115791c42aa374" +dependencies = [ + "base64 0.10.1", + "bitflags", + "byteorder", + "bytes 0.4.12", + "futures 0.1.31", + "native-tls", + "rand 0.6.5", + "sha1", + "tokio-codec", + "tokio-io", + "tokio-tcp", + "tokio-tls", +] + [[package]] name = "wepoll-ffi" version = "0.1.2" @@ -9105,7 +9960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" dependencies = [ "futures 0.3.15", - "log", + "log 0.4.14", "nohash-hasher", "parking_lot 0.11.1", "rand 0.8.4", diff --git a/Cargo.toml b/Cargo.toml index 8d375400f1d..27d4c33c78e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,4 +5,5 @@ panic = 'unwind' members = [ 'node', 'runtime', + 'price-feed', ] diff --git a/price-feed/Cargo.toml b/price-feed/Cargo.toml new file mode 100644 index 00000000000..8c82c380d56 --- /dev/null +++ b/price-feed/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "price-feed" +version = "0.1.0" +edition = "2018" + +[dependencies] +enum_derive = "0.1.7" +custom_derive = "0.1.7" +env_logger = "0.9.0" +log = "0.4.14" +tokio = { version = "1.9", features = [ "full" ] } +url = "1.7.0" +chrono = "0.4.19" +serde = { version = "1.0", features = [ "derive" ] } +serde_json = "1.0" +jsonrpc-core = "18.0.0" +jsonrpc-core-client = "18.0.0" +jsonrpc-client-transports = "18.0.0" +clap = "3.0.0-beta.2" +warp = "0.3" +signal-hook = "0.3" +signal-hook-tokio = { version = "0.3", features = [ "futures-v0_3" ] } +futures = "0.3" diff --git a/price-feed/src/asset.rs b/price-feed/src/asset.rs new file mode 100644 index 00000000000..b35b554b670 --- /dev/null +++ b/price-feed/src/asset.rs @@ -0,0 +1,15 @@ +custom_derive! { + #[derive(EnumFromStr, Copy, Clone, PartialEq, Eq, Hash, Debug)] + pub enum Asset { + BTC, + ETH, + LTC, + USD, + } +} + +pub type AssetPair = (Asset, Asset); + +pub fn symbol((x, y): AssetPair) -> String { + format!("{:?}/{:?}", x, y) +} diff --git a/price-feed/src/feed/mod.rs b/price-feed/src/feed/mod.rs new file mode 100644 index 00000000000..3af1739bb84 --- /dev/null +++ b/price-feed/src/feed/mod.rs @@ -0,0 +1,29 @@ +pub mod pyth; +use serde::Serialize; + +use crate::asset::AssetPair; + +#[derive(Serialize, Copy, Clone, Debug)] +pub struct TimeStamp(i64); + +#[derive(Serialize, Copy, Clone, Debug)] +#[repr(transparent)] +pub struct Price(u64); + +#[derive(Serialize, Copy, Clone, Debug)] +pub struct TimeStamped { + pub value: T, + pub timestamp: TimeStamp, +} + +#[derive(PartialEq, Eq, Hash, Debug)] +pub enum Feed { + Pyth, +} + +#[derive(Debug)] +pub enum FeedNotification { + Opened(Feed, AssetPair), + Closed(Feed, AssetPair), + PriceUpdated(Feed, AssetPair, TimeStamped), +} diff --git a/price-feed/src/feed/pyth.rs b/price-feed/src/feed/pyth.rs new file mode 100644 index 00000000000..b496a41ffd0 --- /dev/null +++ b/price-feed/src/feed/pyth.rs @@ -0,0 +1,165 @@ +use super::{Feed, FeedNotification, Price, TimeStamped}; +use crate::{ + asset::{symbol, AssetPair}, + feed::TimeStamp, +}; +use chrono::Utc; +use jsonrpc_client_transports::{ + transports::ws::connect, RpcError, TypedClient, TypedSubscriptionStream, +}; +use jsonrpc_core_client::futures::StreamExt; +use serde::{Deserialize, Serialize}; +use tokio::{ + sync::mpsc::{self, error::SendError}, + task::JoinHandle, +}; + +#[derive(Debug, Deserialize)] +struct PythNotification { + price: u64, +} + +#[derive(Clone, Debug, Deserialize)] +struct PythProductPrice { + account: String, +} + +#[derive(Clone, Debug, Deserialize)] +struct PythProductAttributes { + symbol: String, +} + +#[derive(Clone, Debug, Deserialize)] +struct PythProduct { + account: String, + attr_dict: PythProductAttributes, + price: Vec, +} + +#[derive(Debug)] +pub enum PythError { + RpcError(RpcError), + ChannelError(SendError), +} + +#[derive(Serialize)] +struct PythSubscribeParams { + account: String, +} + +pub struct Pyth { + client: TypedClient, + handles: Vec>>, +} + +impl Pyth { + pub async fn new(url: &url::Url) -> Result { + let client = connect::(url) + .await + .map_err(|e| PythError::RpcError(e))?; + Ok(Pyth { + client, + handles: Vec::new(), + }) + } + + async fn get_product_list(&self) -> Result, PythError> { + let result = self + .client + .call_method::<(), Vec>("get_product_list", "", ()) + .await + .map_err(|e| PythError::RpcError(e))?; + log::info!("Products: {:?}", result); + Ok(result) + } + + async fn subscribe( + &mut self, + output: mpsc::Sender, + asset_pair: AssetPair, + account: String, + ) -> Result<(), PythError> { + log::info!( + "Subscribing to asset pair {:?} from account {:?}", + asset_pair, + account + ); + let mut stream: TypedSubscriptionStream = self + .client + .subscribe( + "subscribe_price", + [PythSubscribeParams { + account: account.to_string(), + }], + "notify_price", + "", + "", + ) + .map_err(|e| PythError::RpcError(e))?; + let join_handle = tokio::spawn(async move { + output + .send(FeedNotification::Opened(Feed::Pyth, asset_pair)) + .await + .map_err(|e| PythError::ChannelError(e))?; + 'a: loop { + match stream.next().await { + Some(notification) => match notification { + Ok(price_notification) => { + log::info!( + "received price, {:?} = {:?}", + asset_pair, + price_notification + ); + output + .send(FeedNotification::PriceUpdated( + Feed::Pyth, + asset_pair, + TimeStamped { + value: Price(price_notification.price), + timestamp: TimeStamp(Utc::now().timestamp()), + }, + )) + .await + .map_err(|e| PythError::ChannelError(e))?; + } + _ => { + log::warn!("invalid notification?: {:?}", notification); + } + }, + None => break 'a, + } + } + output + .send(FeedNotification::Closed(Feed::Pyth, asset_pair)) + .await + .map_err(|e| PythError::ChannelError(e))?; + Ok(()) + }); + self.handles.push(join_handle); + Ok(()) + } + + pub async fn subscribe_to_asset( + &mut self, + output: &mpsc::Sender, + asset_pair: AssetPair, + ) -> Result<(), PythError> { + let asset_pair_symbol = symbol(asset_pair); + let products = self.get_product_list().await?; + let price_accounts = products + .iter() + .filter(|p| p.attr_dict.symbol == asset_pair_symbol) + .flat_map(|p| p.price.clone()) + .map(|p| p.account.clone()) + .collect::>(); + log::info!("Accounts for {:?}: {:?}", asset_pair_symbol, price_accounts); + for account in price_accounts { + self.subscribe(output.clone(), asset_pair, account).await? + } + Ok(()) + } + + pub async fn terminate(&self) { + self.handles.iter().for_each(drop); + } +} diff --git a/price-feed/src/main.rs b/price-feed/src/main.rs new file mode 100644 index 00000000000..1e991dc1db9 --- /dev/null +++ b/price-feed/src/main.rs @@ -0,0 +1,144 @@ +mod asset; +mod feed; +mod opts; + +#[macro_use] +extern crate custom_derive; +#[macro_use] +extern crate enum_derive; +use crate::{ + asset::{Asset, AssetPair}, + feed::{pyth::Pyth, FeedNotification, Price, TimeStamped}, +}; +use futures::stream::StreamExt; +use signal_hook::consts::signal::*; +use signal_hook_tokio::Signals; +use std::{ + collections::HashMap, + net::SocketAddr, + str::FromStr, + sync::{Arc, RwLock}, +}; +use tokio::{ + sync::{mpsc, oneshot}, + task::JoinHandle, +}; +use url::Url; +use warp::{ + hyper::StatusCode, + reply::{json, with_status}, + Filter, +}; + +async fn run_http_frontend( + listening_address: &String, + prices: Arc>>>, +) -> (oneshot::Sender<()>, JoinHandle<()>) { + let get_price = warp::path!("price" / Asset / Asset) + .and(warp::get()) + .map(move |x, y| { + let asset_pair = (x, y); + match prices.read().unwrap().get(&asset_pair) { + Some(latest_price) => with_status(json(latest_price), StatusCode::OK), + // TODO: how to 404 without content??? + None => with_status(json(&"NOT_FOUND"), StatusCode::NOT_FOUND), + } + }); + + // Channel that will allow warp to gracefully shutdown when a signal is comming. + let (tx, rx) = oneshot::channel::<()>(); + let (_, server) = warp::serve(get_price).bind_with_graceful_shutdown( + SocketAddr::from_str(listening_address).expect("invalid listening address."), + async { + rx.await.ok(); + }, + ); + + // Allow us to join the shutdown later. + let server_handle = tokio::spawn(server); + + (tx, server_handle) +} + +// TODO: manage multiple feeds +async fn create_subscriptions(pythd_host: &String) -> (Pyth, mpsc::Receiver) { + /* Its important to drop the initial feed_in as it will be cloned for all subsequent tasks + The received won't get notified if all cloned senders are closed but not the 'main' one. + */ + let (feed_in, feed_out) = mpsc::channel::(128); + + let mut pyth = Pyth::new(&Url::parse(&pythd_host).expect("invalid pythd host address.")) + .await + .expect("connection to pyth-client failed"); + + // TODO: subscribe to all asset prices? cli configurable? + log::info!("successfully connected to pyth-client."); + for &asset in [Asset::BTC, Asset::ETH, Asset::LTC].iter() { + pyth.subscribe_to_asset(&feed_in, (asset, Asset::USD)) + .await + .expect("failed to subscribe to asset"); + } + + (pyth, feed_out) +} + +#[tokio::main] +async fn main() { + env_logger::init(); + + let opts = opts::get_opts(); + + let (pyth, mut feed_out) = create_subscriptions(&opts.pythd_host).await; + + let prices: Arc>>> = + Arc::new(RwLock::new(HashMap::new())); + + let (server_shutdown, server_handle) = + run_http_frontend(&opts.listening_address, prices.clone()).await; + + let mut signals = Signals::new(&[SIGTERM, SIGINT, SIGQUIT]) + .expect("could not create signals stream") + .fuse(); + + let terminate = async { + log::info!("terminating pyth subscriptions..."); + pyth.terminate().await; + log::info!("signaling warp for termination..."); + server_shutdown.send(()).unwrap(); + log::info!("waiting for warp to terminate..."); + server_handle.await.unwrap(); + }; + + 'a: loop { + tokio::select! { + _ = signals.next() => { + log::info!("terminating signal received."); + terminate.await; + break 'a; + } + message = feed_out.recv() => { + match message { + Some(notification) => { + log::info!("notification received: {:?}", notification); + /* TODO: how are we going to handles X feeds: + - do we just expose every one of them from their own endpoint? + - do we merge the prices (median?), if so, merging will depend on timestamp? + On notification close, do we remove the price as we are no + longer getting new prices? + */ + if let FeedNotification::PriceUpdated(_, a, p) = notification { + prices.write().expect("failed to acquire write lock...").insert(a, p); + }; + } + None => { + log::info!("no more feed available... exiting handler."); + terminate.await; + break 'a; + } + } + } + } + } + + log::info!("farewell."); +} diff --git a/price-feed/src/opts.rs b/price-feed/src/opts.rs new file mode 100644 index 00000000000..e53c74e293f --- /dev/null +++ b/price-feed/src/opts.rs @@ -0,0 +1,15 @@ +use clap::{AppSettings, Clap}; + +#[derive(Clap)] +#[clap(version = "1.0", author = "MLabs")] +#[clap(setting = AppSettings::ColoredHelp)] +pub struct Opts { + #[clap(short, long, default_value = "http://127.0.0.1:8910")] + pub pythd_host: String, + #[clap(short, long, default_value = "127.0.0.1:8081")] + pub listening_address: String +} + +pub fn get_opts() -> Opts { + Opts::parse() +} From a68543914b7c8e8a3b657e69e2f7ead7dac789e3 Mon Sep 17 00:00:00 2001 From: Hussein Ait Lahcen Date: Wed, 4 Aug 2021 10:05:02 +0200 Subject: [PATCH 2/2] introduce run_pyth nix script for fast local setup --- price-feed/run_pyth.nix | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 price-feed/run_pyth.nix diff --git a/price-feed/run_pyth.nix b/price-feed/run_pyth.nix new file mode 100644 index 00000000000..b97751620d0 --- /dev/null +++ b/price-feed/run_pyth.nix @@ -0,0 +1,47 @@ +with import {}; +let + pythd = stdenv.mkDerivation rec { + name = "pyth-daemon-${version}"; + version = "2.1"; + buildInputs = [ cmake zlib.dev libudev openssl.dev zstd.dev ]; + src = pkgs.fetchFromGitHub { + repo = "pyth-client"; + owner = "hussein-aitlahcen"; + rev = "update-jsonrpc"; + sha256 = "sha256:1ca8z33pnn6x9dkxii70s1lcskh56fzng1x9lqxzk84q5fffysdb"; + }; + configurePhase = '' + mkdir build + cd build + cmake .. + ''; + buildPhase = '' + make + ''; + installPhase = '' + mkdir -p $out/bin + mv pythd $out/bin + mv pyth_tx $out/bin + ''; + }; +in mkShell { + packages = [ pythd ]; + SOLANA_ENV = "devnet"; + shellHook = '' + echo "Running up pyth_tx & puthd" + export PYTH_TX_LOG=$(mktemp) + pyth_tx -l $PYTH_TX_LOG -d -r api.$SOLANA_ENV.solana.com & + export PYTH_TX_PID=$! + export PYTHD_LOG=$(mktemp) + pythd -l $PYTHD_LOG -d -r api.$SOLANA_ENV.solana.com & + export PYTHD_PID=$! + teardown() { + echo "Shuting down pyth_tx & pythd"; + kill -2 $PYTHD_PID + kill -2 $PYTH_TX_PID + rm $PYTH_TX_LOG + rm $PYTHD_LOG + } + trap teardown EXIT + ''; +}