diff --git a/Cargo.lock b/Cargo.lock index 477e1bd6e..922d7fc5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,22 +158,6 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "async-attributes" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "async-channel" version = "1.6.1" @@ -258,7 +242,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" dependencies = [ - "async-attributes", "async-channel", "async-global-executor", "async-io", @@ -965,15 +948,6 @@ dependencies = [ "generic-array 0.14.5", ] -[[package]] -name = "ckb-merkle-mountain-range" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f061f97d64fd1822664bdfb722f7ae5469a97b77567390f7442be5b5dc82a5b" -dependencies = [ - "cfg-if 0.1.10", -] - [[package]] name = "clang-sys" version = "1.3.1" @@ -1625,26 +1599,6 @@ dependencies = [ "syn", ] -[[package]] -name = "enumflags2" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" -dependencies = [ - "enumflags2_derive", -] - -[[package]] -name = "enumflags2_derive" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "env_logger" version = "0.6.2" @@ -2023,20 +1977,6 @@ dependencies = [ "sp-trie", ] -[[package]] -name = "frame-election-provider-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-npos-elections", - "sp-std", -] - [[package]] name = "frame-executive" version = "4.0.0-dev" @@ -2154,17 +2094,6 @@ dependencies = [ "sp-api", ] -[[package]] -name = "frame-try-runtime" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "sp-api", - "sp-runtime", - "sp-std", -] - [[package]] name = "fs-swap" version = "0.2.6" @@ -2607,12 +2536,6 @@ dependencies = [ "proc-macro-hack", ] -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - [[package]] name = "hex-literal-impl" version = "0.2.3" @@ -3059,7 +2982,7 @@ dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "frame-support", - "hex-literal 0.2.2", + "hex-literal", "interbtc-primitives", "interbtc-rpc", "interbtc-runtime-standalone", @@ -4912,208 +4835,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "node-cli" -version = "3.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-system", - "frame-system-rpc-runtime-api", - "futures 0.3.21", - "hex-literal 0.3.4", - "log 0.4.16", - "node-executor", - "node-primitives", - "node-rpc", - "node-runtime", - "pallet-asset-tx-payment", - "pallet-balances", - "pallet-im-online", - "pallet-transaction-payment", - "parity-scale-codec", - "rand 0.8.5", - "sc-authority-discovery", - "sc-basic-authorship", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-consensus-babe", - "sc-consensus-slots", - "sc-consensus-uncles", - "sc-executor", - "sc-finality-grandpa", - "sc-network", - "sc-rpc", - "sc-service", - "sc-sync-state-rpc", - "sc-telemetry", - "sc-transaction-pool", - "sc-transaction-pool-api", - "serde", - "sp-api", - "sp-authority-discovery", - "sp-authorship", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-finality-grandpa", - "sp-inherents", - "sp-keyring", - "sp-keystore", - "sp-runtime", - "sp-timestamp", - "sp-transaction-pool", - "sp-transaction-storage-proof", - "sp-trie", -] - -[[package]] -name = "node-executor" -version = "3.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "node-primitives", - "node-runtime", - "parity-scale-codec", - "sc-executor", - "scale-info", - "sp-core", - "sp-keystore", - "sp-state-machine", - "sp-tracing", - "sp-trie", -] - -[[package]] -name = "node-primitives" -version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "node-rpc" -version = "3.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "jsonrpc-core", - "node-primitives", - "pallet-contracts-rpc", - "pallet-mmr-rpc", - "pallet-transaction-payment-rpc", - "sc-chain-spec", - "sc-client-api", - "sc-consensus-babe", - "sc-consensus-babe-rpc", - "sc-consensus-epochs", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", - "sc-rpc", - "sc-rpc-api", - "sc-sync-state-rpc", - "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-keystore", - "sp-runtime", - "substrate-frame-rpc-system", -] - -[[package]] -name = "node-runtime" -version = "3.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "log 0.4.16", - "node-primitives", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-contracts", - "pallet-contracts-primitives", - "pallet-contracts-rpc-runtime-api", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-elections-phragmen", - "pallet-gilt", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-lottery", - "pallet-membership", - "pallet-mmr", - "pallet-multisig", - "pallet-offences", - "pallet-preimage", - "pallet-proxy", - "pallet-randomness-collective-flip", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-society", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-state-trie-migration", - "pallet-sudo", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-transaction-storage", - "pallet-treasury", - "pallet-uniques", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-core", - "sp-inherents", - "sp-io", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-sandbox", - "sp-session", - "sp-staking", - "sp-std", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", -] - [[package]] name = "nodrop" version = "0.1.14" @@ -5514,85 +5235,70 @@ dependencies = [ ] [[package]] -name = "pallet-asset-tx-payment" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "pallet-transaction-payment", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-assets" +name = "pallet-aura" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", + "pallet-timestamp", "parity-scale-codec", "scale-info", + "sp-application-crypto", + "sp-consensus-aura", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-aura" +name = "pallet-authorship" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", - "pallet-timestamp", + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-aura", + "sp-authorship", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-authority-discovery" +name = "pallet-balances" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", - "pallet-session", + "log 0.4.16", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-authority-discovery", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-authorship" +name = "pallet-collective" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples", + "log 0.4.16", "parity-scale-codec", "scale-info", - "sp-authorship", + "sp-core", + "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-babe" +name = "pallet-grandpa" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ @@ -5602,12 +5308,11 @@ dependencies = [ "log 0.4.16", "pallet-authorship", "pallet-session", - "pallet-timestamp", "parity-scale-codec", "scale-info", "sp-application-crypto", - "sp-consensus-babe", - "sp-consensus-vrf", + "sp-core", + "sp-finality-grandpa", "sp-io", "sp-runtime", "sp-session", @@ -5616,44 +5321,44 @@ dependencies = [ ] [[package]] -name = "pallet-bags-list" +name = "pallet-membership" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "frame-election-provider-support", + "frame-benchmarking", "frame-support", "frame-system", "log 0.4.16", "parity-scale-codec", "scale-info", + "sp-core", + "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-balances" +name = "pallet-multisig" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.16", "parity-scale-codec", "scale-info", + "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-bounties" +name = "pallet-preimage" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.16", - "pallet-treasury", "parity-scale-codec", "scale-info", "sp-core", @@ -5663,504 +5368,38 @@ dependencies = [ ] [[package]] -name = "pallet-child-bounties" +name = "pallet-scheduler" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log 0.4.16", - "pallet-bounties", - "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core", "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-collective" +name = "pallet-session" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log 0.4.16", + "pallet-timestamp", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-contracts" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "bitflags", - "frame-benchmarking", - "frame-support", - "frame-system", - "log 0.4.16", - "pallet-contracts-primitives", - "pallet-contracts-proc-macro", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "serde", - "smallvec", - "sp-core", - "sp-io", - "sp-runtime", - "sp-sandbox", - "sp-std", - "wasm-instrument", - "wasmi-validation", -] - -[[package]] -name = "pallet-contracts-primitives" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "bitflags", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-contracts-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pallet-contracts-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "pallet-contracts-primitives", - "pallet-contracts-rpc-runtime-api", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", -] - -[[package]] -name = "pallet-contracts-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "pallet-contracts-primitives", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-conviction-voting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "assert_matches", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-democracy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-election-provider-multi-phase" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-election-provider-support", - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "rand 0.7.3", - "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-std", - "static_assertions", - "strum", -] - -[[package]] -name = "pallet-elections-phragmen" -version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-npos-elections", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-gilt" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log 0.4.16", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-core", - "sp-finality-grandpa", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", -] - -[[package]] -name = "pallet-identity" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-im-online" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "log 0.4.16", - "pallet-authorship", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", -] - -[[package]] -name = "pallet-indices" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-lottery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-membership" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-mmr" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "ckb-merkle-mountain-range", - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-mmr-primitives", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-mmr-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "serde", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-mmr-rpc" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "pallet-mmr-primitives", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "pallet-multisig" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-offences" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "log 0.4.16", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "serde", - "sp-runtime", - "sp-staking", - "sp-std", -] - -[[package]] -name = "pallet-preimage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-proxy" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-randomness-collective-flip" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "safe-mix", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-recovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-referenda" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-scheduler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-session" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log 0.4.16", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-session", - "sp-staking", + "sp-session", + "sp-staking", "sp-std", "sp-trie", ] @@ -6179,55 +5418,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-election-provider-support", - "frame-support", - "frame-system", - "log 0.4.16", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "scale-info", - "serde", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", -] - -[[package]] -name = "pallet-staking-reward-curve" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pallet-state-trie-migration" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-sudo" version = "4.0.0-dev" @@ -6259,24 +5449,6 @@ dependencies = [ "sp-timestamp", ] -[[package]] -name = "pallet-tips" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "log 0.4.16", - "pallet-treasury", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" @@ -6322,24 +5494,6 @@ dependencies = [ "sp-runtime", ] -[[package]] -name = "pallet-transaction-storage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "serde", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-transaction-storage-proof", -] - [[package]] name = "pallet-treasury" version = "4.0.0-dev" @@ -6351,57 +5505,13 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "serde", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-uniques" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-utility" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-vesting" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "frame-support", - "frame-system", - "log 0.4.16", - "parity-scale-codec", - "scale-info", + "serde", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-whitelist" +name = "pallet-utility" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ @@ -6409,7 +5519,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-api", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -7624,15 +6734,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.3.3" @@ -7746,15 +6847,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" -[[package]] -name = "safe-mix" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" -dependencies = [ - "rustc_version 0.2.3", -] - [[package]] name = "safemem" version = "0.3.3" @@ -7790,33 +6882,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-authority-discovery" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "ip_network", - "libp2p", - "log 0.4.16", - "parity-scale-codec", - "prost", - "prost-build", - "rand 0.7.3", - "sc-client-api", - "sc-network", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-core", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", -] - [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" @@ -8028,86 +7093,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "async-trait", - "fork-tree", - "futures 0.3.21", - "log 0.4.16", - "merlin", - "num-bigint", - "num-rational 0.2.4", - "num-traits", - "parity-scale-codec", - "parking_lot 0.12.0", - "rand 0.7.3", - "retain_mut", - "sc-client-api", - "sc-consensus", - "sc-consensus-epochs", - "sc-consensus-slots", - "sc-keystore", - "sc-telemetry", - "schnorrkel", - "serde", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-slots", - "sp-consensus-vrf", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-version", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-rpc-api", - "serde", - "sp-api", - "sp-application-crypto", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-keystore", - "sp-runtime", - "thiserror", -] - -[[package]] -name = "sc-consensus-epochs" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "fork-tree", - "parity-scale-codec", - "sc-client-api", - "sc-consensus", - "sp-blockchain", - "sp-runtime", -] - [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" @@ -8133,17 +7118,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-consensus-uncles" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "sc-client-api", - "sp-authorship", - "sp-runtime", - "thiserror", -] - [[package]] name = "sc-executor" version = "0.10.0-dev" @@ -8262,30 +7236,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-finality-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "finality-grandpa", - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-pubsub", - "log 0.4.16", - "parity-scale-codec", - "sc-client-api", - "sc-finality-grandpa", - "sc-rpc", - "serde", - "serde_json", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", -] - [[package]] name = "sc-informant" version = "0.10.0-dev" @@ -8585,27 +7535,6 @@ dependencies = [ "sp-core", ] -[[package]] -name = "sc-sync-state-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "parity-scale-codec", - "sc-chain-spec", - "sc-client-api", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-finality-grandpa", - "serde", - "serde_json", - "sp-blockchain", - "sp-runtime", - "thiserror", -] - [[package]] name = "sc-telemetry" version = "4.0.0-dev" @@ -8906,15 +7835,6 @@ dependencies = [ "semver-parser 0.7.0", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - [[package]] name = "semver" version = "0.11.0" @@ -9303,19 +8223,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-authorship" version = "4.0.0-dev" @@ -9395,29 +8302,6 @@ dependencies = [ "sp-timestamp", ] -[[package]] -name = "sp-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "async-trait", - "merlin", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-consensus", - "sp-consensus-slots", - "sp-consensus-vrf", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", - "sp-std", - "sp-timestamp", -] - [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" @@ -9432,18 +8316,6 @@ dependencies = [ "sp-timestamp", ] -[[package]] -name = "sp-consensus-vrf" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "parity-scale-codec", - "schnorrkel", - "sp-core", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-core" version = "6.0.0" @@ -9639,32 +8511,6 @@ dependencies = [ "zstd", ] -[[package]] -name = "sp-npos-elections" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-arithmetic", - "sp-core", - "sp-npos-elections-solution-type", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "sp-npos-elections-solution-type" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-offchain" version = "4.0.0-dev" @@ -9746,20 +8592,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-sandbox" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" -dependencies = [ - "log 0.4.16", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", -] - [[package]] name = "sp-serializer" version = "4.0.0-dev" @@ -10163,21 +8995,17 @@ dependencies = [ name = "subxt-client" version = "0.1.0" dependencies = [ - "async-std", - "env_logger 0.8.4", "futures 0.1.31", "futures 0.3.21", "jsonrpsee", "jsonrpsee-core", "jsonrpsee-types", "log 0.4.16", - "node-cli", "sc-client-db", "sc-network", "sc-service", "serde_json", "sp-keyring", - "tempdir", "thiserror", "tokio", ] @@ -11200,7 +10028,6 @@ checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" dependencies = [ "downcast-rs", "libc", - "libm", "memory_units", "num-rational 0.2.4", "num-traits", diff --git a/runtime/client/Cargo.toml b/runtime/client/Cargo.toml index b727b1a68..c281fe81d 100644 --- a/runtime/client/Cargo.toml +++ b/runtime/client/Cargo.toml @@ -12,7 +12,7 @@ description = "Embed a substrate node into your subxt application." keywords = ["parity", "substrate", "blockchain"] [dependencies] -async-std = "1.8.0" +tokio = { version = "1.10", features = ["time", "rt-multi-thread"] } futures = { version = "0.3.9", features = ["compat"], package = "futures" } futures01 = { package = "futures", version = "0.1.29" } jsonrpsee = "0.10.1" @@ -28,15 +28,7 @@ sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkad sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false } sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false } -tokio = { version = "1.10", features = ["time", "rt-multi-thread"] } - [target.'cfg(target_arch="x86_64")'.dependencies] sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false, features = [ "wasmtime", ] } - -[dev-dependencies] -async-std = { version = "1.8.0", features = ["attributes"] } -env_logger = "0.8.2" -node-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false } -tempdir = "0.3.7" \ No newline at end of file diff --git a/runtime/client/src/lib.rs b/runtime/client/src/lib.rs index 43cfad89a..261519fcb 100644 --- a/runtime/client/src/lib.rs +++ b/runtime/client/src/lib.rs @@ -1,4 +1,3 @@ -use async_std::{sync::Mutex, task}; use futures::{ channel::mpsc, future::{select, FutureExt}, @@ -19,8 +18,8 @@ use sc_service::{ ChainSpec, Configuration, KeepBlocks, RpcHandlers, RpcSession, TaskManager, }; pub use sp_keyring::AccountKeyring; -use std::sync::Arc; use thiserror::Error; +use tokio::task; /// Error thrown by the client. #[derive(Debug, Error)] @@ -34,20 +33,17 @@ pub enum SubxtClientError { } /// Sending end. -#[derive(Clone)] -pub struct Sender(Arc>>); +pub struct Sender(mpsc::UnboundedSender); /// Receiving end -#[derive(Clone)] -pub struct Receiver(Arc>>); +pub struct Receiver(mpsc::UnboundedReceiver); #[async_trait] impl TransportSenderT for Sender { type Error = SubxtClientError; async fn send(&mut self, msg: String) -> Result<(), Self::Error> { - let mut lock = self.0.lock().await; - lock.send(msg).await?; + self.0.send(msg).await?; Ok(()) } } @@ -57,15 +53,14 @@ impl TransportReceiverT for Receiver { type Error = SubxtClientError; async fn receive(&mut self) -> Result { - let mut lock = self.0.lock().await; - let msg = lock.next().await.expect("channel should be open"); + let msg = self.0.next().await.expect("channel should be open"); Ok(msg) } } /// Client for an embedded substrate node. -#[derive(Clone)] pub struct SubxtClient { + rpc: RpcHandlers, sender: Sender, receiver: Receiver, } @@ -76,6 +71,7 @@ impl SubxtClient { let (to_back, from_front) = mpsc::unbounded(); let (to_front, from_back) = mpsc::unbounded(); + let rpc_copy = rpc.clone(); let session = RpcSession::new(to_front.clone()); task::spawn( select( @@ -98,8 +94,9 @@ impl SubxtClient { ); Self { - sender: Sender(Arc::new(Mutex::new(to_back))), - receiver: Receiver(Arc::new(Mutex::new(from_back))), + rpc: rpc_copy, + sender: Sender(to_back), + receiver: Receiver(from_back), } } @@ -114,6 +111,33 @@ impl SubxtClient { } } +impl Clone for SubxtClient { + fn clone(&self) -> Self { + let (to_back, from_front) = mpsc::unbounded(); + let (to_front, from_back) = mpsc::unbounded(); + + let rpc = self.rpc.clone(); + let session = RpcSession::new(to_front.clone()); + task::spawn(Box::pin(from_front.for_each(move |message: String| { + let rpc = rpc.clone(); + let session = session.clone(); + let mut to_front = to_front.clone(); + async move { + let response = rpc.rpc_query(&session, &message).await; + if let Some(response) = response { + to_front.send(response).await.ok(); + } + } + }))); + + Self { + rpc: self.rpc.clone(), + sender: Sender(to_back), + receiver: Receiver(from_back), + } + } +} + impl From for JsonRpcClient { fn from(client: SubxtClient) -> Self { (client.sender, client.receiver).into() diff --git a/runtime/src/tests.rs b/runtime/src/tests.rs index 46d4b0df0..09b227c16 100644 --- a/runtime/src/tests.rs +++ b/runtime/src/tests.rs @@ -40,7 +40,6 @@ async fn set_exchange_rate(client: SubxtClient) { #[tokio::test(flavor = "multi_thread")] async fn test_getters() { let (client, _tmp_dir) = default_provider_client(AccountKeyring::Alice).await; - println!("got client"); let parachain_rpc = setup_provider(client.clone(), AccountKeyring::Alice).await; tokio::join!(