diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 1e661292a..ddca6adbf 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -81,17 +81,13 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} version: ${{ env.RUSTUP_NIGHTLY_VERSION }} -# - name: Run Tests for Pallets -# run: | -# bash ./scripts/cmd-pallets test "+${{ env.RUSTUP_NIGHTLY_VERSION }} test" "--release" - - - name: Run Tests for Other Libraries + - name: Run Tests for Pallets run: | - bash ./scripts/cmd-pallets test "+${{ env.RUSTUP_NIGHTLY_VERSION }} test" "--release" + bash ./scripts/cmd-pallets test "+${{ env.RUSTUP_NIGHTLY_VERSION }} test" "--release" -# - name: Run Tests for Clients -# run: | -# bash ./scripts/cmd-clients test "+${{ env.RUSTUP_NIGHTLY_VERSION }} test" "--release" + - name: Run Tests for Clients + run: | + bash ./scripts/cmd-clients test "+${{ env.RUSTUP_NIGHTLY_VERSION }} test" "--release" cargo-test-vault: name: Run Tests for Vault diff --git a/Cargo.lock b/Cargo.lock index 84a14489b..6b861975e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher 0.4.4", "cpufeatures", ] @@ -88,7 +88,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.15", "once_cell", "version_check", @@ -678,7 +678,7 @@ checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock 2.8.0", "autocfg", - "cfg-if", + "cfg-if 1.0.0", "concurrent-queue", "futures-lite 1.13.0", "log", @@ -697,7 +697,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ "async-lock 3.3.0", - "cfg-if", + "cfg-if 1.0.0", "concurrent-queue", "futures-io", "futures-lite 2.3.0", @@ -750,7 +750,7 @@ dependencies = [ "async-lock 2.8.0", "async-signal", "blocking", - "cfg-if", + "cfg-if 1.0.0", "event-listener 3.1.0", "futures-lite 1.13.0", "rustix 0.38.34", @@ -766,7 +766,7 @@ dependencies = [ "async-io 2.3.2", "async-lock 3.3.0", "atomic-waker", - "cfg-if", + "cfg-if 1.0.0", "futures-core", "futures-io", "rustix 0.38.34", @@ -950,7 +950,7 @@ checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line 0.21.0", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object 0.32.2", @@ -1166,7 +1166,7 @@ dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", - "cfg-if", + "cfg-if 1.0.0", "constant_time_eq 0.3.0", ] @@ -1423,6 +1423,12 @@ dependencies = [ "smallvec", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -1451,7 +1457,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher 0.4.4", "cpufeatures", ] @@ -1798,7 +1804,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1914,7 +1920,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -2096,7 +2102,7 @@ version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", @@ -2238,7 +2244,7 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.14.5", "lock_api", "once_cell", @@ -2375,6 +2381,12 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +[[package]] +name = "difference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" + [[package]] name = "difflib" version = "0.4.0" @@ -2426,7 +2438,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -2513,6 +2525,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "downcast" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb454f0228b18c7f4c3b0ebbee346ed9c52e7443b0999cd543ff3571205701d" + [[package]] name = "downcast" version = "0.11.0" @@ -2657,7 +2675,7 @@ version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -2937,7 +2955,7 @@ version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.4.1", "windows-sys 0.52.0", @@ -2988,6 +3006,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "float-cmp" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" +dependencies = [ + "num-traits", +] + [[package]] name = "float-cmp" version = "0.9.0" @@ -3035,6 +3062,15 @@ dependencies = [ "percent-encoding 2.3.1", ] +[[package]] +name = "fragile" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7464c5c4a3f014d9b2ec4073650e5c06596f385060af740fc45ad5a19f959e8" +dependencies = [ + "fragile 2.0.0", +] + [[package]] name = "fragile" version = "2.0.0" @@ -3138,7 +3174,7 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "parity-scale-codec", "scale-info", ] @@ -3149,7 +3185,7 @@ version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "parity-scale-codec", "scale-info", "serde", @@ -3242,7 +3278,7 @@ name = "frame-system" version = "4.0.0-dev" source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.6.0#f00a911c52c047db3119dedfddc86c332ff6626b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "docify", "frame-support", "log", @@ -3515,7 +3551,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -3526,7 +3562,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -3672,7 +3708,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c390a940a5d157878dd057c78680a33ce3415bcd05b4799509ea44210914b4d5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dashmap", "futures 0.3.30", "futures-timer", @@ -4350,7 +4386,7 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -4860,7 +4896,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ecdsa", "elliptic-curve", "once_cell", @@ -4951,7 +4987,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-targets 0.52.5", ] @@ -5812,28 +5848,55 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mockall" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cabea45a7fc0e37093f4f30a5e2b62602253f91791c057d5f0470c63260c3d" +dependencies = [ + "cfg-if 0.1.10", + "downcast 0.10.0", + "fragile 1.2.2", + "lazy_static", + "mockall_derive 0.8.3", + "predicates 1.0.8", + "predicates-tree", +] + [[package]] name = "mockall" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ - "cfg-if", - "downcast", - "fragile", + "cfg-if 1.0.0", + "downcast 0.11.0", + "fragile 2.0.0", "lazy_static", - "mockall_derive", - "predicates", + "mockall_derive 0.11.4", + "predicates 2.1.5", "predicates-tree", ] +[[package]] +name = "mockall_derive" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c461918bf7f59eefb1459252756bf2351a995d6bd510d0b2061bd86bcdabfa6" +dependencies = [ + "cfg-if 0.1.10", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "mockall_derive" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -6201,7 +6264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ "bitflags 1.3.2", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset 0.6.5", ] @@ -6454,7 +6517,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ "bitflags 2.5.0", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -6539,7 +6602,7 @@ dependencies = [ [[package]] name = "orml-currencies" version = "0.7.0" -source = "git+https://github.com/gianfra-t/open-runtime-module-library.git?branch=polkadot-v1.6.0#886ba6201da8f3a4bf3b89f9116f10cd2ca40f6a" +source = "git+https://github.com/pendulum-chain/open-runtime-module-library.git?branch=polkadot-v1.6.0#8d89db82cefb9003ebfe01d863aba9aecfc65873" dependencies = [ "frame-support", "frame-system", @@ -6556,7 +6619,7 @@ dependencies = [ [[package]] name = "orml-oracle" version = "0.7.0" -source = "git+https://github.com/gianfra-t/open-runtime-module-library.git?branch=polkadot-v1.6.0#886ba6201da8f3a4bf3b89f9116f10cd2ca40f6a" +source = "git+https://github.com/pendulum-chain/open-runtime-module-library.git?branch=polkadot-v1.6.0#8d89db82cefb9003ebfe01d863aba9aecfc65873" dependencies = [ "frame-support", "frame-system", @@ -6574,7 +6637,7 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.7.0" -source = "git+https://github.com/gianfra-t/open-runtime-module-library.git?branch=polkadot-v1.6.0#886ba6201da8f3a4bf3b89f9116f10cd2ca40f6a" +source = "git+https://github.com/pendulum-chain/open-runtime-module-library.git?branch=polkadot-v1.6.0#8d89db82cefb9003ebfe01d863aba9aecfc65873" dependencies = [ "frame-support", "frame-system", @@ -6591,7 +6654,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.7.0" -source = "git+https://github.com/gianfra-t/open-runtime-module-library.git?branch=polkadot-v1.6.0#886ba6201da8f3a4bf3b89f9116f10cd2ca40f6a" +source = "git+https://github.com/pendulum-chain/open-runtime-module-library.git?branch=polkadot-v1.6.0#8d89db82cefb9003ebfe01d863aba9aecfc65873" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -6611,7 +6674,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.7.0" -source = "git+https://github.com/gianfra-t/open-runtime-module-library.git?branch=polkadot-v1.6.0#886ba6201da8f3a4bf3b89f9116f10cd2ca40f6a" +source = "git+https://github.com/pendulum-chain/open-runtime-module-library.git?branch=polkadot-v1.6.0#8d89db82cefb9003ebfe01d863aba9aecfc65873" dependencies = [ "frame-support", "parity-scale-codec", @@ -6902,7 +6965,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "instant", "libc", "redox_syscall 0.2.16", @@ -6916,7 +6979,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.5.1", "smallvec", @@ -7114,7 +7177,7 @@ checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags 1.3.2", - "cfg-if", + "cfg-if 1.0.0", "concurrent-queue", "libc", "log", @@ -7128,7 +7191,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "concurrent-queue", "hermit-abi 0.3.9", "pin-project-lite 0.2.14", @@ -7154,7 +7217,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "opaque-debug 0.3.1", "universal-hash", @@ -7192,6 +7255,19 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "predicates" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49cfaf7fdaa3bfacc6fa3e7054e65148878354a5cfddcf661df4c851f8021df" +dependencies = [ + "difference", + "float-cmp 0.8.0", + "normalize-line-endings", + "predicates-core", + "regex", +] + [[package]] name = "predicates" version = "2.1.5" @@ -7199,7 +7275,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", - "float-cmp", + "float-cmp 0.9.0", "itertools 0.10.5", "normalize-line-endings", "predicates-core", @@ -7350,7 +7426,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5986aa8d62380092d2f50f8b1cdba9cb9b6731ffd4b25b51fd126b6c3e05b99c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fnv", "lazy_static", "libc", @@ -7367,7 +7443,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fnv", "lazy_static", "memchr", @@ -8100,7 +8176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.15", "libc", "spin 0.9.8", @@ -8165,6 +8241,7 @@ dependencies = [ "futures 0.3.30", "hex", "log", + "mockall 0.8.3", "nix", "parity-scale-codec", "reqwest", @@ -8186,7 +8263,7 @@ version = "1.0.13" dependencies = [ "async-trait", "backoff", - "cfg-if", + "cfg-if 1.0.0", "clap 3.2.25", "env_logger 0.8.4", "frame-support", @@ -8632,7 +8709,7 @@ dependencies = [ "futures-timer", "libp2p-identity", "log", - "mockall", + "mockall 0.11.4", "parking_lot 0.12.2", "sc-client-api", "sc-utils", @@ -8864,7 +8941,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech//polkadot-sdk?branch=release-polkadot-v1.6.0#f00a911c52c047db3119dedfddc86c332ff6626b" dependencies = [ "anyhow", - "cfg-if", + "cfg-if 1.0.0", "libc", "log", "parking_lot 0.12.2", @@ -8954,7 +9031,7 @@ dependencies = [ "libp2p", "linked_hash_set", "log", - "mockall", + "mockall 0.11.4", "parity-scale-codec", "parking_lot 0.12.2", "partial_sort", @@ -9069,7 +9146,7 @@ dependencies = [ "futures-timer", "libp2p", "log", - "mockall", + "mockall 0.11.4", "parity-scale-codec", "prost 0.11.9", "prost-build", @@ -9597,7 +9674,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "bitvec", - "cfg-if", + "cfg-if 1.0.0", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -9661,7 +9738,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" dependencies = [ "ahash 0.8.11", - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.13.2", ] @@ -9999,7 +10076,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.1", @@ -10011,7 +10088,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -10035,7 +10112,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.1", @@ -10047,7 +10124,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -11413,7 +11490,7 @@ dependencies = [ name = "spacewalk-runtime-standalone-mainnet" version = "1.0.13" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "clients-info", "currency", "dia-oracle", @@ -11477,7 +11554,7 @@ dependencies = [ name = "spacewalk-runtime-standalone-testnet" version = "1.0.13" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "clients-info", "currency", "dia-oracle", @@ -11541,7 +11618,7 @@ dependencies = [ name = "spacewalk-standalone" version = "1.0.13" dependencies = [ - "clap 3.2.25", + "clap 4.5.4", "frame-benchmarking", "frame-benchmarking-cli", "frame-support", @@ -11560,6 +11637,7 @@ dependencies = [ "pallet-transaction-payment-rpc", "parity-scale-codec", "sc-basic-authorship", + "sc-chain-spec", "sc-cli", "sc-client-api", "sc-consensus", @@ -12090,7 +12168,7 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71eb43e528fdc239f08717ec2a378fdb017dddbc3412de15fff527554591a66c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "core-foundation-sys", "libc", "ntapi", @@ -12148,7 +12226,7 @@ version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand 2.1.0", "rustix 0.38.34", "windows-sys 0.52.0", @@ -12217,7 +12295,7 @@ version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", ] @@ -12677,7 +12755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", - "cfg-if", + "cfg-if 1.0.0", "data-encoding", "enum-as-inner", "futures-channel", @@ -12702,7 +12780,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "futures-util", "ipconfig", "lazy_static", @@ -12772,7 +12850,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "digest 0.10.7", "rand 0.8.5", "static_assertions", @@ -12931,7 +13009,7 @@ dependencies = [ "async-trait", "base64 0.13.1", "bincode", - "cfg-if", + "cfg-if 1.0.0", "clap 3.2.25", "console-subscriber", "env_logger 0.8.4", @@ -13156,7 +13234,7 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] @@ -13181,7 +13259,7 @@ version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -13338,7 +13416,7 @@ checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", - "cfg-if", + "cfg-if 1.0.0", "indexmap 1.9.3", "libc", "log", @@ -13364,7 +13442,7 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -13452,7 +13530,7 @@ dependencies = [ "addr2line 0.19.0", "anyhow", "bincode", - "cfg-if", + "cfg-if 1.0.0", "cpp_demangle", "gimli 0.27.3", "log", @@ -13484,7 +13562,7 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "windows-sys 0.45.0", ] @@ -13497,7 +13575,7 @@ checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", - "cfg-if", + "cfg-if 1.0.0", "indexmap 1.9.3", "libc", "log", @@ -13876,7 +13954,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] @@ -13886,7 +13964,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] diff --git a/Cargo.toml b/Cargo.toml index 12dcfc2ba..587dcc46e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -160,6 +160,7 @@ sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "r pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false } @@ -172,10 +173,10 @@ substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk # Orml dependencies -orml-currencies = { package = "orml-currencies", git = "https://github.com/gianfra-t/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } -orml-tokens = { package = "orml-tokens", git = "https://github.com/gianfra-t/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } -orml-traits = { package = "orml-traits", git = "https://github.com/gianfra-t/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } -orml-oracle = { package = "orml-oracle", git = "https://github.com/gianfra-t/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } +orml-currencies = { package = "orml-currencies", git = "https://github.com/pendulum-chain/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } +orml-tokens = { package = "orml-tokens", git = "https://github.com/pendulum-chain/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } +orml-traits = { package = "orml-traits", git = "https://github.com/pendulum-chain/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } +orml-oracle = { package = "orml-oracle", git = "https://github.com/pendulum-chain/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" } # Git dependency from Pendulum Chain diff --git a/clients/runner/Cargo.toml b/clients/runner/Cargo.toml index a06d34cf5..d40dc9ac0 100644 --- a/clients/runner/Cargo.toml +++ b/clients/runner/Cargo.toml @@ -25,5 +25,6 @@ subxt = {version = "0.33.0", default-features = false, features = ["jsonrpsee", sha2 = { workspace = true, default-features = true } [dev-dependencies] +mockall = "0.8.1" sysinfo.workspace = true tempdir.workspace = true diff --git a/clients/runtime/Cargo.toml b/clients/runtime/Cargo.toml index 9aa040840..0abf68752 100644 --- a/clients/runtime/Cargo.toml +++ b/clients/runtime/Cargo.toml @@ -57,7 +57,7 @@ primitives = { path = "../../primitives", package = "spacewalk-primitives" } # Dependencies for the testing utils for integration tests oracle = { path = "../../pallets/oracle", optional = true } rand = { workspace = true, default-features = true, optional = true } -tempdir = { workspace = true, default-features = true, optional = true } +tempdir = { workspace = true, optional = true } testchain = { package = "spacewalk-standalone", path = "../../testchain/node", optional = true } testchain-runtime = { package = "spacewalk-runtime-standalone-testnet", path = "../../testchain/runtime/testnet", optional = true } mainnet-runtime = { package = "spacewalk-runtime-standalone-mainnet", path = "../../testchain/runtime/mainnet", optional = true } diff --git a/clients/runtime/src/integration/mod.rs b/clients/runtime/src/integration/mod.rs index 70f4a76a0..ade08cc88 100644 --- a/clients/runtime/src/integration/mod.rs +++ b/clients/runtime/src/integration/mod.rs @@ -87,7 +87,7 @@ pub async fn default_provider_client( role: Role::Authority(key), telemetry: None, wasm_method: WasmExecutionMethod::Compiled { - instantiation_strategy: WasmtimeInstantiationStrategy::LegacyInstanceReuse, + instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, }, tokio_handle: tokio::runtime::Handle::current(), }; diff --git a/testchain/node/Cargo.toml b/testchain/node/Cargo.toml index 0e2161f67..4ccfea0b4 100644 --- a/testchain/node/Cargo.toml +++ b/testchain/node/Cargo.toml @@ -15,7 +15,7 @@ name = "spacewalk-standalone" substrate-build-script-utils = { workspace = true } [dependencies] -clap = { workspace = true, features = ["derive"] } +clap = { version = "4.5.3", features = [ "derive" ] } codec = { workspace = true, default-features = true, version = "3.0.0" } hex-literal = { workspace = true, default-features = true } log = { workspace = true, default-features = true } @@ -38,6 +38,7 @@ sc-consensus = { workspace = true, default-features = true } sc-consensus-aura = { workspace = true, default-features = true } sc-consensus-manual-seal = { workspace = true, default-features = true } sc-executor = { workspace = true, default-features = true } +sc-chain-spec = { workspace = true, default-features = true} sc-consensus-grandpa = { workspace = true, default-features = true } sc-keystore = { workspace = true, default-features = true } sc-network = { workspace = true, default-features = true } diff --git a/testchain/node/src/chain_spec.rs b/testchain/node/src/chain_spec.rs index 12764fc88..b37798452 100644 --- a/testchain/node/src/chain_spec.rs +++ b/testchain/node/src/chain_spec.rs @@ -78,77 +78,62 @@ fn get_properties() -> Map { } pub fn mainnet_config() -> ChainSpec { - ChainSpec::from_genesis( - "spacewalk", - "dev_mainnet", - ChainType::Development, - move || { - genesis( - get_account_id_from_seed::("Alice"), - vec![authority_keys_from_seed("Alice")], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - ], - vec![get_account_id_from_seed::("Bob")], - false, - true, - ) - }, - Vec::new(), - None, - None, - None, - Some(get_properties()), - None, - ) + ChainSpec::builder(spacewalk_runtime_mainnet::WASM_BINARY.expect("WASM binary was not built, please build it!"), Default::default()) + .with_name("spacewalk") + .with_id("dev_mainnet") + .with_chain_type(ChainType::Development) + .with_properties(get_properties()) + .with_genesis_config(genesis( + get_account_id_from_seed::("Alice"), + vec![authority_keys_from_seed("Alice")], + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ], + vec![get_account_id_from_seed::("Bob")], + false, + true, + )) + .build() } - pub fn testnet_config() -> ChainSpec { - ChainSpec::from_genesis( - "spacewalk", - "dev_testnet", - ChainType::Development, - move || { - genesis( + ChainSpec::builder(spacewalk_runtime_mainnet::WASM_BINARY.expect("WASM binary was not built, please build it!"), Default::default()) + .with_name("spacewalk") + .with_id("dev_mainnet") + .with_chain_type(ChainType::Development) + .with_properties(get_properties()) + .with_genesis_config(genesis( + get_account_id_from_seed::("Alice"), + vec![authority_keys_from_seed("Alice")], + vec![ get_account_id_from_seed::("Alice"), - vec![authority_keys_from_seed("Alice")], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - ], - vec![get_account_id_from_seed::("Bob")], - false, - false, - ) - }, - Vec::new(), - None, - None, - None, - Some(get_properties()), - None, - ) + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ], + vec![get_account_id_from_seed::("Bob")], + false, + false, + )) + .build() } fn default_pair(currency_id: CurrencyId, is_public_network: bool) -> VaultCurrencyPair { @@ -176,23 +161,15 @@ fn genesis( authorized_oracles: Vec, start_shutdown: bool, is_public_network: bool, -) -> RuntimeGenesisConfig { +) -> serde_json::Value { let default_wrapped_currency = if is_public_network { WRAPPED_CURRENCY_ID_STELLAR_MAINNET } else { WRAPPED_CURRENCY_ID_STELLAR_TESTNET }; - // It's very important that we use the correct wasm binary - let wasm_binary = if is_public_network { - spacewalk_runtime_mainnet::WASM_BINARY - } else { - spacewalk_runtime_testnet::WASM_BINARY - }; - - RuntimeGenesisConfig { + let genesis_config = RuntimeGenesisConfig { system: SystemConfig { - code: wasm_binary.expect("WASM binary was not build, please build it!").to_vec(), ..Default::default() }, aura: AuraConfig { @@ -384,9 +361,12 @@ fn genesis( batching_api: b"https://dia-00.pendulumchain.tech:8070/currencies".to_vec(), coin_infos_map: vec![], }, - } + }; + + serde_json::to_value(genesis_config).expect("Serialization of genesis config should work") } + fn create_stellar_testnet_config() -> StellarRelayConfig { let old_validators = Vec::new(); let old_organizations = Vec::new(); diff --git a/testchain/node/src/cli.rs b/testchain/node/src/cli.rs index 15ceaa062..880d51ecf 100644 --- a/testchain/node/src/cli.rs +++ b/testchain/node/src/cli.rs @@ -1,4 +1,5 @@ use sc_cli::RunCmd; +use clap::Parser; #[derive(Debug, clap::Parser)] pub struct Cli { diff --git a/testchain/node/src/service.rs b/testchain/node/src/service.rs index 3c44553aa..a2eeaa03f 100644 --- a/testchain/node/src/service.rs +++ b/testchain/node/src/service.rs @@ -349,9 +349,9 @@ pub fn new_full(config: Configuration) -> Result<(TaskManager, RpcHandlers), Ser let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); - net_config.add_notification_protocol(sc_consensus_grandpa::grandpa_peers_set_config( - grandpa_protocol_name.clone(), - )); + let (grandpa_protocol_config, grandpa_notification_service) = + sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone()); + net_config.add_notification_protocol(grandpa_protocol_config); let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { @@ -363,6 +363,7 @@ pub fn new_full(config: Configuration) -> Result<(TaskManager, RpcHandlers), Ser import_queue, block_announce_validator_builder: None, warp_sync_params: None, + block_relay: None })?; if config.offchain_worker.enabled { @@ -514,6 +515,7 @@ pub fn new_full(config: Configuration) -> Result<(TaskManager, RpcHandlers), Ser shared_voter_state: SharedVoterState::empty(), telemetry: telemetry.as_ref().map(|x| x.handle()), offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool), + notification_service: grandpa_notification_service }; // the GRANDPA voter task is considered infallible, i.e. @@ -556,6 +558,7 @@ pub async fn start_instant_mainnet( import_queue, block_announce_validator_builder: None, warp_sync_params: None, + block_relay: None, })?; if config.offchain_worker.enabled { @@ -693,6 +696,7 @@ pub async fn start_instant_testnet( import_queue, block_announce_validator_builder: None, warp_sync_params: None, + block_relay: None })?; if config.offchain_worker.enabled { diff --git a/testchain/runtime/mainnet/src/lib.rs b/testchain/runtime/mainnet/src/lib.rs index 6230f4bc1..bc249e999 100644 --- a/testchain/runtime/mainnet/src/lib.rs +++ b/testchain/runtime/mainnet/src/lib.rs @@ -2,6 +2,10 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] +// // Make the WASM binary available. +// #[cfg(feature = "std")] +// include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + #[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking; diff --git a/testchain/runtime/testnet/src/lib.rs b/testchain/runtime/testnet/src/lib.rs index 55361e17c..9fac95a0b 100644 --- a/testchain/runtime/testnet/src/lib.rs +++ b/testchain/runtime/testnet/src/lib.rs @@ -2,6 +2,10 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] +// // Make the WASM binary available. +// #[cfg(feature = "std")] +// include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); + #[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking;