diff --git a/.github/workflows/europa.yml b/.github/workflows/europa.yml index 9fb86a2..9797e4b 100644 --- a/.github/workflows/europa.yml +++ b/.github/workflows/europa.yml @@ -11,7 +11,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout the source code uses: actions/checkout@v1 @@ -21,6 +21,8 @@ jobs: toolchain: nightly-2021-02-10 target: wasm32-unknown-unknown override: true + - name: Install Dependencies + run: sudo apt install -y clang curl libssl-dev llvm libudev-dev - name: Cache substrate deps uses: actions/cache@v1 env: @@ -29,7 +31,7 @@ jobs: path: ./target key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Cargo.lock') }} - name: Init - run: git submodule update --init --remote + run: git submodule update --init --recursive - name: Build run: cargo build --all -vv - name: Run tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ca5eb7..d987cf8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,7 +87,7 @@ jobs: - name: Checkout source uses: actions/checkout@v1 - name: Init - run: git submodule update --init --remote + run: git submodule update --init --recursive - name: Build run: cargo build --release diff --git a/Cargo.lock b/Cargo.lock index 249150f..a41bf36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -107,6 +107,17 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" +[[package]] +name = "ahash" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +dependencies = [ + "getrandom 0.2.1", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.15" @@ -142,9 +153,9 @@ checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61" [[package]] name = "approx" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" dependencies = [ "num-traits", ] @@ -233,7 +244,7 @@ dependencies = [ "derivative", "num-bigint 0.4.0", "num-traits", - "paste 1.0.4", + "paste", "rustc_version 0.3.0", "zeroize", ] @@ -570,26 +581,21 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.54.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36" +checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" dependencies = [ "bitflags", "cexpr", - "cfg-if 0.1.10", "clang-sys", - "clap", - "env_logger", "lazy_static", "lazycell", - "log", "peeking_take_while", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "which 3.1.1", ] [[package]] @@ -937,13 +943,13 @@ dependencies = [ [[package]] name = "clang-sys" -version = "0.29.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6837df1d5cba2397b835c8530f51723267e16abbf83892e9e5af4f0e5dd10a" +checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.7.0", ] [[package]] @@ -1470,6 +1476,7 @@ dependencies = [ "sc-telemetry", "sc-tracing", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -1479,7 +1486,6 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-tracing", - "sp-transaction-pool", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tracing", @@ -1602,6 +1608,7 @@ dependencies = [ "sc-service", "sc-tracing", "sc-transaction-pool", + "sc-transaction-pool-api", "serde_json", "sp-api", "sp-blockchain", @@ -1612,6 +1619,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", + "sp-storage", "sp-timestamp", "sp-tracing", "sp-transaction-pool", @@ -1762,7 +1770,7 @@ dependencies = [ "europa-executor", "europa-rpc", "europa-runtime", - "pallet-contracts 3.0.0", + "pallet-contracts", "sc-cli", "sc-consensus", "sc-consensus-manual-seal", @@ -1795,7 +1803,7 @@ dependencies = [ "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", - "pallet-contracts 3.0.0", + "pallet-contracts", "pallet-contracts-primitives", "pallet-contracts-rpc", "pallet-contracts-rpc-runtime-api", @@ -1805,6 +1813,7 @@ dependencies = [ "sc-keystore", "sc-rpc", "sc-rpc-api", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -1814,7 +1823,6 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-transaction-pool", "substrate-frame-rpc-system", ] @@ -1828,7 +1836,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "hex", "pallet-balances", - "pallet-contracts 3.0.0", + "pallet-contracts", "pallet-contracts-primitives", "pallet-contracts-rpc-runtime-api", "pallet-randomness-collective-flip", @@ -1986,7 +1994,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", ] @@ -2004,14 +2012,14 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "frame-system", "linregress", "log", "parity-scale-codec", - "paste 1.0.4", + "paste", "sp-api", "sp-io", "sp-runtime", @@ -2023,7 +2031,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "frame-system", @@ -2038,7 +2046,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "serde", @@ -2049,17 +2057,16 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "bitflags", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "log", - "max-encoded-len", "once_cell", "parity-scale-codec", - "paste 1.0.4", + "paste", "serde", "smallvec 1.6.1", "sp-arithmetic", @@ -2076,7 +2083,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2088,7 +2095,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2100,7 +2107,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "proc-macro2", "quote", @@ -2110,7 +2117,7 @@ dependencies = [ [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -2127,7 +2134,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "sp-api", @@ -2141,7 +2148,7 @@ checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" dependencies = [ "lazy_static", "libc", - "libloading", + "libloading 0.5.2", "winapi 0.3.9", ] @@ -2359,15 +2366,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "generic-array" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.4" @@ -2517,7 +2515,16 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" dependencies = [ - "ahash", + "ahash 0.4.7", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.4", ] [[package]] @@ -2790,9 +2797,9 @@ dependencies = [ [[package]] name = "impl-codec" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df170efa359aebdd5cb7fe78edcc67107748e4737bdca8a8fb40d15ea7a877ed" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" dependencies = [ "parity-scale-codec", ] @@ -2824,7 +2831,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.9.1", "serde", ] @@ -3080,9 +3087,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8891bd853eff90e33024195d79d578dc984c82f9e0715fcd2b525a0c19d52811" +checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" dependencies = [ "parity-util-mem", "smallvec 1.6.1", @@ -3090,9 +3097,9 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a0da8e08caf08d384a620ec19bb6c9b85c84137248e202617fb91881f25912" +checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" dependencies = [ "kvdb", "parity-util-mem", @@ -3101,9 +3108,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34446c373ccc494c2124439281c198c7636ccdc2752c06722bbffd56d459c1e4" +checksum = "431ca65516efab86e65d96281f750ebb54277dec656fcf6c027f3d1c0cb69e4c" dependencies = [ "fs-swap", "kvdb", @@ -3164,6 +3171,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "libloading" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +dependencies = [ + "cfg-if 1.0.0", + "winapi 0.3.9", +] + [[package]] name = "libm" version = "0.2.1" @@ -3606,9 +3623,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "6.11.4" +version = "6.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b56f651c204634b936be2f92dbb42c36867e00ff7fe2405591f3b9fa66f09" +checksum = "5da125e1c0f22c7cae785982115523a0738728498547f415c9054cb17c7e89f9" dependencies = [ "bindgen", "cc", @@ -3660,9 +3677,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0ad4b5cc8385a881c561fac3501353d63d2a2b7a357b5064d71815c9a92724" +checksum = "1e6e407dadb4ca4b31bc69c27aff00e7ca4534fdcee855159b039a7cebb5f395" dependencies = [ "nalgebra", "statrs", @@ -3726,7 +3743,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f374d42cdfc1d7dbf3d3dec28afab2eb97ffbf43a3234d795b5986dbf4b90ba" dependencies = [ - "hashbrown", + "hashbrown 0.9.1", ] [[package]] @@ -3770,35 +3787,13 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "matrixmultiply" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" dependencies = [ "rawpointer", ] -[[package]] -name = "max-encoded-len" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" -dependencies = [ - "impl-trait-for-tuples", - "max-encoded-len-derive", - "parity-scale-codec", - "primitive-types", -] - -[[package]] -name = "max-encoded-len-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" -dependencies = [ - "proc-macro-crate 1.0.0", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "maybe-uninit" version = "2.0.0" @@ -3840,12 +3835,12 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814bbecfc0451fc314eeea34f05bbcd5b98a7ad7af37faee088b86a1e633f1d4" +checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.11.2", "parity-util-mem", ] @@ -4043,22 +4038,33 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.21.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6147c3d50b4f3cdabfe2ecc94a0191fd3d6ad58aefd9664cf396285883486" +checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" dependencies = [ "approx", - "generic-array 0.13.2", "matrixmultiply", + "nalgebra-macros", "num-complex", - "num-rational", + "num-rational 0.4.0", "num-traits", - "rand 0.7.3", + "rand 0.8.3", "rand_distr", "simba", "typenum", ] +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "names" version = "0.11.0" @@ -4148,11 +4154,10 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.2.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" dependencies = [ - "autocfg", "num-traits", ] @@ -4178,6 +4183,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.14" @@ -4253,7 +4269,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "frame-system", @@ -4267,7 +4283,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-benchmarking", "frame-support", @@ -4290,13 +4306,12 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "max-encoded-len", "parity-scale-codec", "sp-runtime", "sp-std", @@ -4317,7 +4332,7 @@ dependencies = [ "hex", "log", "pallet-contracts-primitives", - "pallet-contracts-proc-macro 3.0.0", + "pallet-contracts-proc-macro", "parity-scale-codec", "pwasm-utils 0.18.1 (git+https://github.com/patractlabs/wasm-utils?branch=v0.18.1)", "serde", @@ -4330,33 +4345,10 @@ dependencies = [ "wasmi-validation 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "pallet-contracts" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" -dependencies = [ - "bitflags", - "frame-support", - "frame-system", - "log", - "pallet-contracts-primitives", - "pallet-contracts-proc-macro 3.0.0 (git+https://github.com/paritytech/substrate?branch=master)", - "parity-scale-codec", - "pwasm-utils 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde", - "smallvec 1.6.1", - "sp-core", - "sp-io", - "sp-runtime", - "sp-sandbox", - "sp-std", - "wasmi-validation 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pallet-contracts-primitives" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "bitflags", "parity-scale-codec", @@ -4376,20 +4368,10 @@ dependencies = [ "syn", ] -[[package]] -name = "pallet-contracts-proc-macro" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pallet-contracts-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4408,7 +4390,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -4420,7 +4402,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "frame-system", @@ -4433,7 +4415,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "frame-system", @@ -4453,7 +4435,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "frame-system", @@ -4466,7 +4448,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-benchmarking", "frame-support", @@ -4483,7 +4465,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-support", "frame-system", @@ -4499,7 +4481,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4516,7 +4498,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4561,24 +4543,25 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f518afaa5a47d0d6386229b0a6e01e86427291d643aa4cabb4992219f504f8" +checksum = "8975095a2a03bbbdc70a74ab11a4f76a6d0b84680d87c68d722531b0ac28e8a9" dependencies = [ "arrayvec 0.7.0", "bitvec 0.20.1", "byte-slice-cast", + "impl-trait-for-tuples", "parity-scale-codec-derive", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44c5f94427bd0b5076e8f7e15ca3f60a4d8ac0077e4793884e6fdfd8915344e" +checksum = "40dbbfef7f0a1143c5b06e0d76a6278e25dac0bc1af4be51a0fbb73f07e7ad09" dependencies = [ - "proc-macro-crate 0.1.5", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -4611,12 +4594,12 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664a8c6b8e62d8f9f2f937e391982eb433ab285b4cd9545b342441e04a906e42" +checksum = "7ad6f1acec69b95caf435bbd158d486e5a0a44fcf51531e84922c59ff09e8457" dependencies = [ "cfg-if 1.0.0", - "hashbrown", + "hashbrown 0.11.2", "impl-trait-for-tuples", "parity-util-mem-derive", "parking_lot 0.11.1", @@ -4749,31 +4732,12 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "paste" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] - [[package]] name = "paste" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1" -[[package]] -name = "paste-impl" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" -dependencies = [ - "proc-macro-hack", -] - [[package]] name = "pbkdf2" version = "0.3.0" @@ -4947,9 +4911,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "primitive-types" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", "impl-codec", @@ -5060,7 +5024,7 @@ dependencies = [ "prost", "prost-types", "tempfile", - "which 4.0.2", + "which", ] [[package]] @@ -5258,11 +5222,12 @@ dependencies = [ [[package]] name = "rand_distr" -version = "0.2.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2" +checksum = "051b398806e42b9cd04ad9ec8f81e355d0a382c543ac6672c62f5a5b452ef142" dependencies = [ - "rand 0.7.3", + "num-traits", + "rand 0.8.3", ] [[package]] @@ -5482,9 +5447,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6" +checksum = "c749134fda8bfc90d0de643d59bfc841dcb3ac8a1062e12b6754bd60235c48b3" dependencies = [ "libc", "librocksdb-sys", @@ -5503,11 +5468,11 @@ dependencies = [ [[package]] name = "runtime-log" version = "0.1.1" -source = "git+https://github.com/patractlabs/ink-log#e738c20484357b61af3824ea9fb9d23b45a2fdc7" +source = "git+https://github.com/patractlabs/ink-log#45308ee8416ddf4a7a38c3161b2fb279258fab55" dependencies = [ "frame-support", "funty", - "pallet-contracts 3.0.0 (git+https://github.com/paritytech/substrate?branch=master)", + "log", "parity-scale-codec", ] @@ -5651,10 +5616,21 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sc-allocator" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" +dependencies = [ + "log", + "sp-core", + "sp-wasm-interface", + "thiserror", +] + [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5670,7 +5646,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -5682,7 +5658,6 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-chain-spec", "sp-consensus-babe", "sp-core", "sp-runtime", @@ -5691,7 +5666,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -5702,7 +5677,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "chrono", "fdlimit", @@ -5740,7 +5715,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "derive_more", "fnv", @@ -5752,6 +5727,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", "sc-executor", + "sc-transaction-pool-api", "sp-api", "sp-blockchain", "sp-consensus", @@ -5764,7 +5740,6 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-storage", - "sp-transaction-pool", "sp-trie", "sp-utils", "sp-version", @@ -5774,7 +5749,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "blake2-rfc", "hash-db", @@ -5804,8 +5779,9 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ + "async-trait", "parking_lot 0.11.1", "sc-client-api", "sp-blockchain", @@ -5816,7 +5792,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "derive_more", @@ -5826,7 +5802,7 @@ dependencies = [ "log", "merlin", "num-bigint 0.2.6", - "num-rational", + "num-rational 0.2.4", "num-traits", "parity-scale-codec", "parking_lot 0.11.1", @@ -5862,7 +5838,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "fork-tree", "parity-scale-codec", @@ -5875,7 +5851,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "assert_matches", "async-trait", @@ -5891,6 +5867,7 @@ dependencies = [ "sc-consensus-babe", "sc-consensus-epochs", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "sp-api", "sp-blockchain", @@ -5903,14 +5880,13 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-transaction-pool", "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "futures 0.3.13", @@ -5938,7 +5914,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "sc-client-api", "sp-authorship", @@ -5949,7 +5925,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "derive_more", "lazy_static", @@ -5977,12 +5953,12 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "derive_more", "parity-scale-codec", "pwasm-utils 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-allocator", + "sc-allocator", "sp-core", "sp-maybe-compressed-blob", "sp-serializer", @@ -5994,12 +5970,12 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "log", "parity-scale-codec", + "sc-allocator", "sc-executor-common", - "sp-allocator", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -6009,7 +5985,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "derive_more", @@ -6050,7 +6026,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "ansi_term 0.12.1", "futures 0.3.13", @@ -6059,16 +6035,16 @@ dependencies = [ "parity-util-mem", "sc-client-api", "sc-network", + "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", - "sp-transaction-pool", "wasm-timer", ] [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "derive_more", @@ -6088,7 +6064,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "hash-db", "lazy_static", @@ -6107,7 +6083,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-std", "async-trait", @@ -6160,7 +6136,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.3.13", "futures-timer 3.0.2", @@ -6177,7 +6153,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "bytes 0.5.6", "fnv", @@ -6205,7 +6181,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.3.13", "libp2p", @@ -6218,7 +6194,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6227,7 +6203,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.3.13", "hash-db", @@ -6237,15 +6213,16 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-executor", "sc-keystore", "sc-rpc-api", "sc-tracing", + "sc-transaction-pool-api", "serde_json", "sp-api", "sp-blockchain", - "sp-chain-spec", "sp-core", "sp-keystore", "sp-offchain", @@ -6254,7 +6231,6 @@ dependencies = [ "sp-session", "sp-state-machine", "sp-tracing", - "sp-transaction-pool", "sp-utils", "sp-version", ] @@ -6262,7 +6238,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "derive_more", "futures 0.3.13", @@ -6273,21 +6249,21 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.11.1", + "sc-chain-spec", + "sc-transaction-pool-api", "serde", "serde_json", - "sp-chain-spec", "sp-core", "sp-rpc", "sp-runtime", "sp-tracing", - "sp-transaction-pool", "sp-version", ] [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.1.30", "jsonrpc-core", @@ -6305,7 +6281,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "directories", @@ -6338,6 +6314,7 @@ dependencies = [ "sc-telemetry", "sc-tracing", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -6353,6 +6330,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", + "sp-storage", "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", @@ -6370,7 +6348,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "log", "parity-scale-codec", @@ -6385,7 +6363,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "chrono", "futures 0.3.13", @@ -6405,7 +6383,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "ansi_term 0.12.1", "atty", @@ -6442,7 +6420,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -6451,50 +6429,47 @@ dependencies = [ ] [[package]] -name = "sc-transaction-graph" +name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "derive_more", "futures 0.3.13", + "intervalier", "linked-hash-map", "log", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.1", "retain_mut", + "sc-client-api", + "sc-transaction-pool-api", "serde", + "sp-api", "sp-blockchain", "sp-core", "sp-runtime", + "sp-tracing", "sp-transaction-pool", "sp-utils", + "substrate-prometheus-endpoint", "thiserror", "wasm-timer", ] [[package]] -name = "sc-transaction-pool" +name = "sc-transaction-pool-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ + "derive_more", "futures 0.3.13", - "intervalier", "log", "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.11.1", - "sc-client-api", - "sc-transaction-graph", - "sp-api", + "serde", "sp-blockchain", - "sp-core", "sp-runtime", - "sp-tracing", - "sp-transaction-pool", - "sp-utils", - "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] @@ -6778,14 +6753,14 @@ checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" [[package]] name = "simba" -version = "0.1.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb931b1367faadea6b1ab1c306a860ec17aaa5fa39f367d0c744e69d971a1fb2" +checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" dependencies = [ "approx", "num-complex", "num-traits", - "paste 0.1.18", + "paste", ] [[package]] @@ -6873,22 +6848,10 @@ dependencies = [ "sha-1 0.9.2", ] -[[package]] -name = "sp-allocator" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" -dependencies = [ - "log", - "sp-core", - "sp-std", - "sp-wasm-interface", - "thiserror", -] - [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "hash-db", "log", @@ -6905,7 +6868,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -6917,9 +6880,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ - "max-encoded-len", "parity-scale-codec", "serde", "sp-core", @@ -6930,7 +6892,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "integer-sqrt", "num-traits", @@ -6944,7 +6906,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "parity-scale-codec", @@ -6956,7 +6918,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "sp-api", @@ -6968,7 +6930,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.3.13", "log", @@ -6983,19 +6945,10 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sp-chain-spec" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "futures 0.3.13", @@ -7022,7 +6975,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "parity-scale-codec", @@ -7039,7 +6992,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "merlin", @@ -7061,7 +7014,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -7071,7 +7024,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7083,7 +7036,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "base58", "blake2-rfc", @@ -7098,7 +7051,6 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "max-encoded-len", "merlin", "num-traits", "parity-scale-codec", @@ -7128,7 +7080,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -7137,7 +7089,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "proc-macro2", "quote", @@ -7147,7 +7099,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "environmental", "parity-scale-codec", @@ -7158,7 +7110,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "finality-grandpa", "log", @@ -7175,7 +7127,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -7189,7 +7141,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.3.13", "hash-db", @@ -7214,7 +7166,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "lazy_static", "sp-core", @@ -7225,7 +7177,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "derive_more", @@ -7242,7 +7194,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "ruzstd", "zstd", @@ -7251,7 +7203,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "sp-api", "sp-core", @@ -7261,7 +7213,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "backtrace", ] @@ -7269,7 +7221,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "rustc-hash", "serde", @@ -7280,16 +7232,15 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", - "max-encoded-len", "parity-scale-codec", "parity-util-mem", - "paste 1.0.4", + "paste", "rand 0.7.3", "serde", "sp-application-crypto", @@ -7302,7 +7253,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7319,7 +7270,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -7328,23 +7279,10 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-sandbox" -version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" -dependencies = [ - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "serde", "serde_json", @@ -7353,7 +7291,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "sp-api", @@ -7366,7 +7304,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7376,7 +7314,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "hash-db", "log", @@ -7399,12 +7337,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7417,7 +7355,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "log", "sp-core", @@ -7430,7 +7368,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -7447,7 +7385,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "erased-serde", "log", @@ -7465,23 +7403,16 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ - "derive_more", - "futures 0.3.13", - "log", - "parity-scale-codec", - "serde", "sp-api", - "sp-blockchain", "sp-runtime", - "thiserror", ] [[package]] name = "sp-transaction-storage-proof" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "log", @@ -7496,7 +7427,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "hash-db", "memory-db", @@ -7510,7 +7441,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.3.13", "futures-core", @@ -7522,20 +7453,22 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "impl-serde", "parity-scale-codec", + "parity-wasm 0.42.2", "serde", "sp-runtime", "sp-std", "sp-version-proc-macro", + "thiserror", ] [[package]] name = "sp-version-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "parity-scale-codec", "proc-macro-crate 1.0.0", @@ -7547,7 +7480,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7575,11 +7508,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "statrs" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce16f6de653e88beca7bd13780d08e09d4489dbca1f9210e041bc4852481382" +checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" dependencies = [ - "rand 0.7.3", + "approx", + "lazy_static", + "nalgebra", + "num-traits", + "rand 0.8.3", ] [[package]] @@ -7668,7 +7605,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "platforms", ] @@ -7676,7 +7613,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.13", @@ -7687,19 +7624,19 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-rpc-api", + "sc-transaction-pool-api", "serde", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-runtime", - "sp-transaction-pool", ] [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-std", "derive_more", @@ -7713,7 +7650,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "async-trait", "futures 0.1.30", @@ -7742,7 +7679,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "cfg-if 1.0.0", "frame-support", @@ -7783,7 +7720,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "futures 0.3.13", "parity-scale-codec", @@ -7804,7 +7741,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e447c49537e66d0b6e3a408c6ae5c424c7344a7c" +source = "git+https://github.com/paritytech/substrate?branch=master#deac6324a16fc4128b94a7b4c3826eebcb86917f" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8359,12 +8296,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd81fe0c8bc2b528a51c9d2c31dae4483367a26a723a3c9a4a8120311d7774e3" +checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.11.2", "log", "rustc-hex", "smallvec 1.6.1", @@ -8767,7 +8704,7 @@ dependencies = [ "downcast-rs", "libc", "memory_units", - "num-rational", + "num-rational 0.2.4", "num-traits", "parity-wasm 0.42.2", "wasmi-validation 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8781,7 +8718,7 @@ dependencies = [ "downcast-rs", "libc", "memory_units", - "num-rational", + "num-rational 0.2.4", "num-traits", "parity-wasm 0.42.2", "rustc-demangle", @@ -8826,7 +8763,7 @@ dependencies = [ "lazy_static", "libc", "log", - "paste 1.0.4", + "paste", "psm", "region", "rustc-demangle", @@ -9073,15 +9010,6 @@ dependencies = [ "cc", ] -[[package]] -name = "which" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" -dependencies = [ - "libc", -] - [[package]] name = "which" version = "4.0.2" diff --git a/README.md b/README.md index 7d22d74..15e15f7 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ In those branch: More information about this forked substrate refers to [this repo](https://github.com/patractlabs/substrate) - Currently, the tracked substrate commit is [e447c49537e66d0b6e3a408c6ae5c424c7344a7c](https://github.com/paritytech/substrate/commit/e447c49537e66d0b6e3a408c6ae5c424c7344a7c) + Currently, the tracked substrate commit is [deac6324a16fc4128b94a7b4c3826eebcb86917f](https://github.com/paritytech/substrate/commit/deac6324a16fc4128b94a7b4c3826eebcb86917f) * `substrate/v3.0.0` branch is fixed in v3.0.0 substrate: @@ -52,7 +52,7 @@ In those branch: > P.S. We do not advice you to use v2.0.0, for we no longer maintain this version. -For master, Europa is tracking [newest substrate (e447c495)](https://github.com/paritytech/substrate/commit/e447c49537e66d0b6e3a408c6ae5c424c7344a7c) now. +For master, Europa is tracking [newest substrate (deac6324)](https://github.com/paritytech/substrate/commit/deac6324a16fc4128b94a7b4c3826eebcb86917f) now. Thus, `pallet-contracts` can use the newest features. ## Extending types @@ -130,6 +130,12 @@ Europa self modifications: } ``` +- [ ] `pallet-contracts` self features. + For now, Europa is tracing the version before 4.0.0-dev(commit [deac6324a16fc4128b94a7b4c3826eebcb86917f](https://github.com/paritytech/substrate/commit/deac6324a16fc4128b94a7b4c3826eebcb86917f)). + + Thus, the recent feature: "contracts: Allow contracts to dispatch calls into the runtime ([#9276](https://github.com/paritytech/substrate/pull/9276))" can support. + This feature and the following modifications will be merged **after substrate release 4.0.0**. + ChainExtensions features: - [x] Contract Logger support, refer to this link [PIP-102](https://github.com/patractlabs/PIPs/blob/main/PIPs/pip-102.md) diff --git a/bin/europa/rpc/Cargo.toml b/bin/europa/rpc/Cargo.toml index 91b2c11..fd91557 100644 --- a/bin/europa/rpc/Cargo.toml +++ b/bin/europa/rpc/Cargo.toml @@ -18,7 +18,6 @@ sp-api = { version = "3.0.0", git = "https://github.com/paritytech/substrate", b sp-core = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-rpc = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } -sp-transaction-pool = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-block-builder = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } @@ -28,6 +27,7 @@ sc-rpc = { version = "3.0.0", git = "https://github.com/paritytech/substrate", b sc-rpc-api = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-consensus-epochs = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-keystore = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } +sc-transaction-pool-api = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } frame-system = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/bin/europa/rpc/src/lib.rs b/bin/europa/rpc/src/lib.rs index 857c8af..9110461 100644 --- a/bin/europa/rpc/src/lib.rs +++ b/bin/europa/rpc/src/lib.rs @@ -37,10 +37,10 @@ mod contracts_ext; use std::sync::Arc; pub use sc_rpc_api::DenyUnsafe; +use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; -use sp_transaction_pool::TransactionPool; use europa_runtime::{opaque::Block, AccountId, Balance, BlockNumber, Hash, Index}; diff --git a/bin/europa/runtime/src/chain_extensions.rs b/bin/europa/runtime/src/chain_extensions.rs index 418bd64..fbe2d74 100644 --- a/bin/europa/runtime/src/chain_extensions.rs +++ b/bin/europa/runtime/src/chain_extensions.rs @@ -6,7 +6,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::Encode; -use frame_support::log::{debug, error, info, trace, warn}; +use frame_support::log::{error, trace}; use pallet_contracts::chain_extension::{ ChainExtension, Environment, Ext, InitState, RetVal, SysConfig, UncheckedFrom, }; @@ -26,7 +26,7 @@ impl ChainExtension for EuropaExt { 0x01000000..=0x010000ff => { let mut env = env.buf_in_buf_out(); // The memory of the vm stores buf in scale-codec - let input: Vec = env.read_as()?; + let input: Vec = env.read_as_unbounded(env.in_len())?; // currently only support [PIP-101](https://github.com/patractlabs/PIPs/blob/main/PIPs/pip-101.md) // TODO just charge weight in a simple way. ADD/MUL is less then SHA256's weight // and Paring is more than SHA256's weight. Change this part with benchmark result in future. diff --git a/bin/europa/runtime/src/lib.rs b/bin/europa/runtime/src/lib.rs index adf215e..fd6133f 100644 --- a/bin/europa/runtime/src/lib.rs +++ b/bin/europa/runtime/src/lib.rs @@ -294,7 +294,7 @@ impl pallet_contracts::Config for Runtime { type RentFraction = RentFraction; type SurchargeReward = SurchargeReward; type CallStack = [pallet_contracts::Frame; 31]; - type WeightPrice = pallet_transaction_payment::Module; + type WeightPrice = pallet_transaction_payment::Pallet; type WeightInfo = pallet_contracts::weights::SubstrateWeight; type ChainExtension = EuropaExt; type DeletionQueueDepth = DeletionQueueDepth; @@ -419,8 +419,9 @@ impl_runtime_apis! { fn validate_transaction( source: TransactionSource, tx: ::Extrinsic, + block_hash: ::Hash, ) -> TransactionValidity { - Executive::validate_transaction(source, tx) + Executive::validate_transaction(source, tx, block_hash) } } diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index 78bd910..f101735 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -32,7 +32,7 @@ sc-client-api = { version = "3.0.0", git = "https://github.com/paritytech/substr sp-consensus = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-inherents = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-telemetry = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } -sp-transaction-pool = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } +sc-transaction-pool-api = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-block-builder = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-proposer-metrics = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/basic-authorship/src/basic_authorship.rs b/client/basic-authorship/src/basic_authorship.rs index 55dfae6..1ca2456 100644 --- a/client/basic-authorship/src/basic_authorship.rs +++ b/client/basic-authorship/src/basic_authorship.rs @@ -36,6 +36,7 @@ use log::{debug, error, info, trace, warn}; use sc_block_builder::{BlockBuilderApi, BlockBuilderProvider}; use sc_client_api::backend; use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_INFO}; +use sc_transaction_pool_api::{InPoolTransaction, TransactionPool}; use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_blockchain::{ApplyExtrinsicFailed::Validity, Error::ApplyExtrinsicFailed, HeaderBackend}; use sp_consensus::{ @@ -50,7 +51,6 @@ use sp_runtime::{ }, SaturatedConversion, }; -use sp_transaction_pool::{InPoolTransaction, TransactionPool}; use std::marker::PhantomData; use prometheus_endpoint::Registry as PrometheusRegistry; diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index 34001c9..081557b 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -5,8 +5,8 @@ authors = ["patract labs "] edition = "2018" [dependencies] -kvdb = "0.9.0" -kvdb-rocksdb = { version = "0.11.0" } +kvdb = "0.10.0" +kvdb-rocksdb = { version = "0.12.0" } log = "0.4" sp-std = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 439b5cc..5aa6b37 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -37,6 +37,7 @@ sp-transaction-pool = { version = "3.0.0", git = "https://github.com/paritytech/ sp-session = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-trie = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-keystore = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } +sp-storage = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-block-builder = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-client-api = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } @@ -46,6 +47,7 @@ sc-service = { version = "0.9.0", git = "https://github.com/paritytech/substrate sc-rpc-server = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-transaction-pool = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } +sc-transaction-pool-api = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-consensus = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-consensus-manual-seal = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "master" } sc-chain-spec = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index b22b14e..dc0eb01 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -10,6 +10,7 @@ use jsonrpc_pubsub::manager::SubscriptionManager; use sc_client_api::{ BlockBackend, BlockchainEvents, ExecutorProvider, ProofProvider, StorageProvider, UsageProvider, }; +use sc_transaction_pool_api::MaintainedTransactionPool; use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::block_validation::Chain; @@ -17,7 +18,6 @@ use sp_core::traits::{CodeExecutor, SpawnNamed}; use sp_keystore::{CryptoStore, SyncCryptoStorePtr}; use sp_runtime::traits::{BlockIdTo, Zero}; use sp_runtime::{traits::Block as BlockT, BuildStorage}; -use sp_transaction_pool::MaintainedTransactionPool; use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender}; use sc_client_api::{ @@ -393,7 +393,7 @@ where let (chain, state, child_state) = { let chain = sc_rpc::chain::new_full(client.clone(), subscriptions.clone()); let (state, child_state) = - sc_rpc::state::new_full(client.clone(), subscriptions.clone(), deny_unsafe); + sc_rpc::state::new_full(client.clone(), subscriptions.clone(), deny_unsafe, None); (chain, state, child_state) }; diff --git a/client/service/src/builder_ext.rs b/client/service/src/builder_ext.rs index 974c74e..5c54ce8 100644 --- a/client/service/src/builder_ext.rs +++ b/client/service/src/builder_ext.rs @@ -190,7 +190,7 @@ where block_import: client.clone(), env: proposer, client: client.clone(), - pool: transaction_pool.pool().clone(), + pool: transaction_pool.clone(), commands_stream, select_chain, consensus_data_provider: None, diff --git a/client/service/src/client/call_executor.rs b/client/service/src/client/call_executor.rs index 1ce08b9..d9c677c 100644 --- a/client/service/src/client/call_executor.rs +++ b/client/service/src/client/call_executor.rs @@ -23,7 +23,7 @@ use std::{cell::RefCell, panic::UnwindSafe, result, sync::Arc}; use sc_client_api::{backend, call_executor::CallExecutor}; -use sp_api::{InitializeBlock, ProofRecorder, StorageTransactionCache}; +use sp_api::{ProofRecorder, StorageTransactionCache}; use sp_core::{ traits::{CodeExecutor, SpawnNamed}, NativeOrEncoded, NeverNativeValue, @@ -118,8 +118,6 @@ where } fn contextual_call< - 'a, - IB: Fn() -> sp_blockchain::Result<()>, EM: Fn( Result, Self::Error>, Result, Self::Error>, @@ -128,13 +126,11 @@ where NC: FnOnce() -> result::Result + UnwindSafe, >( &self, - initialize_block_fn: IB, at: &BlockId, method: &str, call_data: &[u8], changes: &RefCell, storage_transaction_cache: Option<&RefCell>>, - initialize_block: InitializeBlock<'a, Block>, execution_manager: ExecutionManager, native_call: Option, recorder: &Option>, @@ -143,20 +139,6 @@ where where ExecutionManager: Clone, { - match initialize_block { - InitializeBlock::Do(ref init_block) - if init_block - .borrow() - .as_ref() - .map(|id| id != at) - .unwrap_or(true) => - { - initialize_block_fn()?; - } - // We don't need to initialize the runtime at a block. - _ => {} - } - let changes_trie_state = backend::changes_tries_state_at_block(at, self.backend.changes_trie_storage())?; let mut storage_transaction_cache = storage_transaction_cache.map(|c| c.borrow_mut()); @@ -208,6 +190,7 @@ where let runtime_code = state_runtime_code .runtime_code() .map_err(sp_blockchain::Error::RuntimeCode)?; + let mut state_machine = StateMachine::new( &state, changes_trie_state, diff --git a/client/service/src/client/mod.rs b/client/service/src/client/mod.rs index 39ef5da..9ae0928 100644 --- a/client/service/src/client/mod.rs +++ b/client/service/src/client/mod.rs @@ -35,7 +35,7 @@ use sp_blockchain::{ }; use sp_consensus::{ BlockCheckParams, BlockImportParams, BlockOrigin, BlockStatus, Error as ConsensusError, - ForkChoiceStrategy, ImportResult, + ForkChoiceStrategy, ImportResult, StateAction, }; use sp_core::{ convert_hash, @@ -105,6 +105,11 @@ impl PrePostHeader { } } +enum PrepareStorageChangesResult, Block: BlockT> { + Discard(ImportResult), + Import(Option>>), +} + /// europa sandbox client pub struct Client where @@ -345,6 +350,9 @@ where operation: &mut ClientImportOperation, import_block: BlockImportParams>, new_cache: HashMap>, + storage_changes: Option< + sp_consensus::StorageChanges>, + >, ) -> sp_blockchain::Result where Self: ProvideRuntimeApi, @@ -357,7 +365,6 @@ where justifications, post_digests, body, - storage_changes, finalized, auxiliary, fork_choice, @@ -415,7 +422,9 @@ where import_headers: PrePostHeader, justification: Option, body: Option>, - storage_changes: Option, Block>>, + storage_changes: Option< + sp_consensus::StorageChanges>, + >, new_cache: HashMap>, finalized: bool, aux: Vec<(Vec, Option>)>, @@ -458,8 +467,45 @@ where let storage_changes = match storage_changes { Some(storage_changes) => { - self.backend - .begin_state_operation(&mut operation.op, BlockId::Hash(parent_hash))?; + let storage_changes = match storage_changes { + sp_consensus::StorageChanges::Changes(storage_changes) => { + self.backend + .begin_state_operation(&mut operation.op, BlockId::Hash(parent_hash))?; + let (main_sc, child_sc, _offchain_sc, tx, _, changes_trie_tx, tx_index) = + storage_changes.into_inner(); + + // if self.config.offchain_indexing_api { + // operation.op.update_offchain_storage(offchain_sc)?; + // } + + operation.op.update_db_storage(tx)?; + operation + .op + .update_storage(main_sc.clone(), child_sc.clone())?; + operation.op.update_transaction_index(tx_index)?; + + if let Some(changes_trie_transaction) = changes_trie_tx { + operation.op.update_changes_trie(changes_trie_transaction)?; + } + + Some((main_sc, child_sc)) + } + sp_consensus::StorageChanges::Import(changes) => { + let storage = sp_storage::Storage { + top: changes.state.into_iter().collect(), + children_default: Default::default(), + }; + + let state_root = operation.op.reset_storage(storage)?; + if state_root != *import_headers.post().state_root() { + // State root mismatch when importing state. This should not happen in safe fast sync mode, + // but may happen in unsafe mode. + warn!("Error imporing state: State root mismatch."); + return Err(Error::InvalidStateRoot); + } + None + } + }; // ensure parent block is finalized to maintain invariant that // finality is called sequentially. @@ -474,21 +520,7 @@ where } operation.op.update_cache(new_cache); - - let (main_sc, child_sc, _, tx, _, changes_trie_tx, tx_index) = - storage_changes.into_inner(); - - operation.op.update_db_storage(tx)?; - operation - .op - .update_storage(main_sc.clone(), child_sc.clone())?; - operation.op.update_transaction_index(tx_index)?; - - if let Some(changes_trie_transaction) = changes_trie_tx { - operation.op.update_changes_trie(changes_trie_transaction)?; - } - - Some((main_sc, child_sc)) + storage_changes } None => None, }; @@ -561,7 +593,7 @@ where fn prepare_block_storage_changes( &self, import_block: &mut BlockImportParams>, - ) -> sp_blockchain::Result> + ) -> sp_blockchain::Result> where Self: ProvideRuntimeApi, >::Api: @@ -569,83 +601,43 @@ where { let parent_hash = import_block.header.parent_hash(); let at = BlockId::Hash(*parent_hash); - let enact_state = match self.block_status(&at)? { - BlockStatus::Unknown => return Ok(Some(ImportResult::UnknownParent)), - BlockStatus::InChainWithState | BlockStatus::Queued => true, - BlockStatus::InChainPruned if import_block.allow_missing_state => false, - BlockStatus::InChainPruned => return Ok(Some(ImportResult::MissingState)), - BlockStatus::KnownBad => return Ok(Some(ImportResult::KnownBad)), + let state_action = std::mem::replace(&mut import_block.state_action, StateAction::Skip); + let (enact_state, storage_changes) = match (self.block_status(&at)?, state_action) { + (BlockStatus::Unknown, _) => { + return Ok(PrepareStorageChangesResult::Discard( + ImportResult::UnknownParent, + )) + } + (BlockStatus::KnownBad, _) => { + return Ok(PrepareStorageChangesResult::Discard(ImportResult::KnownBad)) + } + (_, StateAction::Skip) => (false, None), + ( + BlockStatus::InChainPruned, + StateAction::ApplyChanges(sp_consensus::StorageChanges::Changes(_)), + ) => { + return Ok(PrepareStorageChangesResult::Discard( + ImportResult::MissingState, + )) + } + (BlockStatus::InChainPruned, StateAction::Execute) => { + return Ok(PrepareStorageChangesResult::Discard( + ImportResult::MissingState, + )) + } + (BlockStatus::InChainPruned, StateAction::ExecuteIfPossible) => (false, None), + (_, StateAction::Execute) => (true, None), + (_, StateAction::ExecuteIfPossible) => (true, None), + (_, StateAction::ApplyChanges(changes)) => (true, Some(changes)), }; - // - // let runtime_api = self.runtime_api(); - // let execution_context = if import_block.origin == BlockOrigin::NetworkInitialSync { - // ExecutionContext::Syncing - // } else { - // ExecutionContext::Importing - // }; - // let header = import_block.header.clone(); - // let exec_func = |body: &Vec| { - // // TODO exec ? - // let targets = "pallet,frame,state"; - // let block_subscriber = BlockSubscriber::new(targets); - // let dispatch = Dispatch::new(block_subscriber); - // { - // let dispatcher_span = tracing::debug_span!( - // target: "state_tracing", - // "execute_block", - // extrinsics_len = body.len(), - // ); - // let _guard = dispatcher_span.enter(); - // if let Err(e) = dispatcher::with_default(&dispatch, || { - // let span = tracing::info_span!( - // target: "block_trace", - // "trace_block", - // ); - // let _enter = span.enter(); - // runtime_api.execute_block_with_context( - // &at, - // execution_context, - // Block::new(header, body.clone()), - // ) - // }) { - // println!("fxck!!!!"); - // } - // } - // let block_subscriber = dispatch.downcast_ref::() - // .expect(""); - // // .ok_or(Error::Dispatch( - // // "Cannot downcast Dispatch to BlockSubscriber after tracing block".to_string() - // // ))?; - // let spans: Vec<_> = block_subscriber.spans - // .lock() - // .drain() - // // Patch wasm identifiers - // // .filter_map(|(_, s)| patch_and_filter(SpanDatum::from(s), targets)) - // .collect(); - // let events: Vec<_> = block_subscriber.events - // .lock() - // .drain(..) - // // .filter(|e| self.storage_keys - // // .as_ref() - // // .map(|keys| event_key_filter(e, keys)) - // // .unwrap_or(false) - // // ) - // // .map(|s| s.into()) - // .collect(); - // info!(target: "state_tracing", "Captured {} spans and {} events", spans.len(), events.len()); - // }; - - match ( - enact_state, - &mut import_block.storage_changes, - &mut import_block.body, - ) { + + let storage_changes = match (enact_state, storage_changes, &import_block.body) { // We have storage changes and should enact the state, so we don't need to do anything // here - (true, Some(_), _) => {} + (true, changes @ Some(_), _) => changes, // We should enact state, but don't have any storage changes, so we need to execute the // block. - (true, ref mut storage_changes @ None, Some(ref body)) => { + (true, None, Some(ref body)) => { let runtime_api = self.runtime_api(); let execution_context = if import_block.origin == BlockOrigin::NetworkInitialSync { ExecutionContext::Syncing @@ -670,19 +662,16 @@ where if import_block.header.state_root() != &gen_storage_changes.transaction_storage_root { return Err(Error::InvalidStateRoot); - } else { - **storage_changes = Some(gen_storage_changes); } + Some(sp_consensus::StorageChanges::Changes(gen_storage_changes)) } // No block body, no storage changes - (true, None, None) => {} + (true, None, None) => None, // We should not enact the state, so we set the storage changes to `None`. - (false, changes, _) => { - changes.take(); - } + (false, _, _) => None, }; - Ok(None) + Ok(PrepareStorageChangesResult::Import(storage_changes)) } fn apply_finality_with_block_hash( @@ -972,24 +961,6 @@ where trace!("Collected {} uncles", uncles.len()); Ok(uncles) } - - /// Prepare in-memory header that is used in execution environment. - fn prepare_environment_block( - &self, - parent: &BlockId, - ) -> sp_blockchain::Result { - let parent_header = self.backend.blockchain().expect_header(*parent)?; - Ok(<::Header as HeaderT>::new( - self.backend - .blockchain() - .expect_block_number_from_id(parent)? - + One::one(), - Default::default(), - Default::default(), - parent_header.hash(), - Default::default(), - )) - } } impl UsageProvider for Client @@ -1059,6 +1030,33 @@ where ) -> sp_blockchain::Result> { Err(sp_blockchain::Error::NotAvailableOnLightClient) } + + fn read_proof_collection( + &self, + _: &BlockId, + _: &[u8], + _: usize, + ) -> blockchain::Result<(StorageProof, u32)> { + Err(sp_blockchain::Error::NotAvailableOnLightClient) + } + + fn storage_collection( + &self, + _: &BlockId, + _: &[u8], + _: usize, + ) -> blockchain::Result, Vec)>> { + Err(sp_blockchain::Error::NotAvailableOnLightClient) + } + + fn verify_range_proof( + &self, + _: Block::Hash, + _: StorageProof, + _: &[u8], + ) -> blockchain::Result<(Vec<(Vec, Vec)>, bool)> { + Err(sp_blockchain::Error::NotAvailableOnLightClient) + } } impl BlockBuilderProvider for Client @@ -1173,6 +1171,21 @@ where Ok(KeyIterator::new(state, prefix, start_key)) } + fn child_storage_keys_iter<'a>( + &self, + id: &BlockId, + child_info: ChildInfo, + prefix: Option<&'a StorageKey>, + start_key: Option<&StorageKey>, + ) -> sp_blockchain::Result> { + let state = self.state_at(id)?; + let start_key = start_key + .or(prefix) + .map(|key| key.0.clone()) + .unwrap_or_else(Vec::new); + Ok(KeyIterator::new_child(state, child_info, prefix, start_key)) + } + fn storage( &self, id: &BlockId, @@ -1503,12 +1516,10 @@ where 'a, R: Encode + Decode + PartialEq, NC: FnOnce() -> result::Result + UnwindSafe, - C: CoreApi, >( &self, - params: CallApiAtParams<'a, Block, C, NC, B::State>, + params: CallApiAtParams<'a, Block, NC, B::State>, ) -> Result, sp_api::ApiError> { - let core_api = params.core_api; let at = params.at; let (manager, mut extensions) = self @@ -1520,18 +1531,12 @@ where )); self.executor - .contextual_call::<_, fn(_, _) -> _, _, _>( - || { - core_api - .initialize_block(at, &self.prepare_environment_block(at)?) - .map_err(Error::RuntimeApiError) - }, + .contextual_call:: _, _, _>( at, params.function, ¶ms.arguments, params.overlayed_changes, Some(params.storage_transaction_cache), - params.initialize_block, manager, params.native_call, params.recorder, @@ -1581,20 +1586,23 @@ where let span = tracing::span!(tracing::Level::DEBUG, "import_block"); let _enter = span.enter(); - if let Some(res) = self + let storage_changes = match self .prepare_block_storage_changes(&mut import_block) .map_err(|e| { warn!("Block prepare storage changes error:\n{:?}", e); ConsensusError::ClientImport(e.to_string()) })? { - return Ok(res); - } + PrepareStorageChangesResult::Discard(res) => return Ok(res), + PrepareStorageChangesResult::Import(storage_changes) => storage_changes, + }; - self.lock_import_and_run(|operation| self.apply_block(operation, import_block, new_cache)) - .map_err(|e| { - warn!("Block import error:\n{:?}", e); - ConsensusError::ClientImport(e.to_string()).into() - }) + self.lock_import_and_run(|operation| { + self.apply_block(operation, import_block, new_cache, storage_changes) + }) + .map_err(|e| { + warn!("Block import error:\n{:?}", e); + ConsensusError::ClientImport(e.to_string()).into() + }) } /// Check block preconditions. diff --git a/client/service/src/config.rs b/client/service/src/config.rs index cfc2349..325430a 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -27,7 +27,7 @@ pub use sc_client_db::{ }; use sc_chain_spec::ChainSpec; -pub use sc_transaction_pool::txpool::Options as TransactionPoolOptions; +pub use sc_transaction_pool::Options as TransactionPoolOptions; pub use sc_network::config::Role; pub use sc_service::config::{ diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 1ce5196..8ab10f3 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -222,6 +222,7 @@ fn start_rpc_servers< deny_unsafe(&address, &config.rpc_methods), sc_rpc_server::RpcMiddleware::new(rpc_metrics.clone(), "http"), ), + None, ) })? .map(|s| waiting::HttpServer(Some(s))), @@ -234,6 +235,7 @@ fn start_rpc_servers< deny_unsafe(&address, &config.rpc_methods), sc_rpc_server::RpcMiddleware::new(rpc_metrics.clone(), "ws"), ), + None, ) })? .map(|s| waiting::WsServer(Some(s))), diff --git a/vendor/substrate b/vendor/substrate index 37703ea..7e3cb72 160000 --- a/vendor/substrate +++ b/vendor/substrate @@ -1 +1 @@ -Subproject commit 37703ea554ef7505e9b2b95cd61cd89b17a4fbac +Subproject commit 7e3cb722faae14bca5eebe10c05d464f7b3aa178