diff --git a/Cargo.lock b/Cargo.lock index 9d99306d2a08..0525135b157e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2032,6 +2032,7 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", + "penpal-runtime", "rococo-system-emulated-network", "rococo-westend-system-emulated-network", "scale-info", @@ -12229,6 +12230,7 @@ dependencies = [ "sp-core", "sp-genesis-builder", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", diff --git a/bridges/snowbridge/Cargo.lock b/bridges/snowbridge/Cargo.lock index f090b5a0395d..883d4cc4a5f1 100644 --- a/bridges/snowbridge/Cargo.lock +++ b/bridges/snowbridge/Cargo.lock @@ -43,7 +43,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -105,22 +105,10 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" dependencies = [ - "alloy-rlp-derive", - "arrayvec 0.7.4", + "arrayvec", "bytes", ] -[[package]] -name = "alloy-rlp-derive" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - [[package]] name = "alloy-sol-macro" version = "0.4.2" @@ -133,7 +121,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", "syn-solidity", "tiny-keccak", ] @@ -174,6 +162,54 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.80" @@ -200,7 +236,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -568,89 +604,21 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "asset-test-utils" -version = "7.0.0" -dependencies = [ - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "frame-support", - "frame-system", - "pallet-assets", - "pallet-balances", - "pallet-collator-selection", - "pallet-session", - "pallet-timestamp", - "pallet-xcm", - "pallet-xcm-bridge-hub-router", - "parachains-common", - "parachains-runtimes-test-utils", - "parity-scale-codec", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", -] - -[[package]] -name = "assets-common" -version = "0.7.0" -dependencies = [ - "cumulus-primitives-core", - "frame-support", - "impl-trait-for-tuples", - "log", - "pallet-asset-conversion", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-runtime", - "sp-std 14.0.0", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", -] - [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "syn 2.0.58", ] [[package]] @@ -661,7 +629,7 @@ checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -698,7 +666,7 @@ dependencies = [ "ark-std 0.4.0", "dleq_vrf", "fflonk", - "merlin 3.0.0", + "merlin", "rand_chacha 0.3.1", "rand_core 0.6.4", "ring", @@ -735,19 +703,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bip39" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" -dependencies = [ - "bitcoin_hashes", - "rand", - "rand_core 0.6.4", - "serde", - "unicode-normalization", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -763,11 +718,21 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bitcoin-internals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + [[package]] name = "bitcoin_hashes" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative", +] [[package]] name = "bitflags" @@ -810,29 +775,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -841,16 +794,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", + "generic-array", ] [[package]] @@ -865,130 +809,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bp-header-chain" -version = "0.7.0" -dependencies = [ - "bp-runtime", - "finality-grandpa", - "frame-support", - "parity-scale-codec", - "scale-info", - "serde", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "bp-messages" -version = "0.7.0" -dependencies = [ - "bp-header-chain", - "bp-runtime", - "frame-support", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-std 14.0.0", -] - -[[package]] -name = "bp-parachains" -version = "0.7.0" -dependencies = [ - "bp-header-chain", - "bp-polkadot-core", - "bp-runtime", - "frame-support", - "impl-trait-for-tuples", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "bp-polkadot-core" -version = "0.7.0" -dependencies = [ - "bp-messages", - "bp-runtime", - "frame-support", - "frame-system", - "parity-scale-codec", - "parity-util-mem", - "scale-info", - "serde", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "bp-relayers" -version = "0.7.0" -dependencies = [ - "bp-messages", - "bp-runtime", - "frame-support", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "bp-runtime" -version = "0.7.0" -dependencies = [ - "frame-support", - "frame-system", - "hash-db", - "impl-trait-for-tuples", - "log", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std 14.0.0", - "sp-trie", - "trie-db", -] - -[[package]] -name = "bp-test-utils" -version = "0.7.0" -dependencies = [ - "bp-header-chain", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "ed25519-dalek", - "finality-grandpa", - "parity-scale-codec", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", - "sp-trie", -] - -[[package]] -name = "bp-xcm-bridge-hub" -version = "0.2.0" -dependencies = [ - "sp-std 14.0.0", -] - [[package]] name = "bp-xcm-bridge-hub-router" version = "0.6.0" @@ -1001,7 +821,7 @@ dependencies = [ [[package]] name = "bridge-hub-common" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1015,80 +835,6 @@ dependencies = [ "staging-xcm", ] -[[package]] -name = "bridge-hub-test-utils" -version = "0.7.0" -dependencies = [ - "asset-test-utils", - "bp-header-chain", - "bp-messages", - "bp-polkadot-core", - "bp-relayers", - "bp-runtime", - "bp-test-utils", - "bridge-runtime-common", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-balances", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-parachains", - "pallet-bridge-relayers", - "pallet-timestamp", - "pallet-utility", - "parachains-common", - "parachains-runtimes-test-utils", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std 14.0.0", - "sp-tracing 16.0.0", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", -] - -[[package]] -name = "bridge-runtime-common" -version = "0.7.0" -dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-relayers", - "bp-runtime", - "bp-xcm-bridge-hub", - "bp-xcm-bridge-hub-router", - "frame-support", - "frame-system", - "hash-db", - "log", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-parachains", - "pallet-bridge-relayers", - "pallet-transaction-payment", - "pallet-utility", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", - "sp-trie", - "staging-xcm", - "staging-xcm-builder", - "static_assertions", -] - [[package]] name = "bs58" version = "0.5.0" @@ -1119,12 +865,6 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - [[package]] name = "bytemuck" version = "1.14.3" @@ -1221,6 +961,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "common" version = "0.1.0" @@ -1233,7 +979,7 @@ dependencies = [ "ark-std 0.4.0", "fflonk", "getrandom_or_panic", - "merlin 3.0.0", + "merlin", "rand_chacha 0.3.1", ] @@ -1402,7 +1148,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "generic-array 0.14.7", + "generic-array", "rand_core 0.6.4", "subtle", "zeroize", @@ -1414,7 +1160,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.7", + "generic-array", "rand_core 0.6.4", "typenum", ] @@ -1425,37 +1171,10 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.7", + "generic-array", "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" -dependencies = [ - "generic-array 0.14.7", - "subtle", -] - -[[package]] -name = "cumulus-pallet-aura-ext" -version = "0.7.0" -dependencies = [ - "cumulus-pallet-parachain-system", - "frame-support", - "frame-system", - "pallet-aura", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-application-crypto", - "sp-consensus-aura", - "sp-runtime", - "sp-std 14.0.0", -] - [[package]] name = "cumulus-pallet-parachain-system" version = "0.7.0" @@ -1474,6 +1193,7 @@ dependencies = [ "pallet-message-queue", "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", "sp-core", @@ -1490,44 +1210,16 @@ dependencies = [ ] [[package]] -name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.6.0" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.50", -] - -[[package]] -name = "cumulus-pallet-session-benchmarking" -version = "9.0.0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-session", - "parity-scale-codec", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "cumulus-pallet-xcm" -version = "0.7.0" -dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", - "staging-xcm", -] - -[[package]] +name = "cumulus-pallet-parachain-system-proc-macro" +version = "0.6.0" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] name = "cumulus-pallet-xcmp-queue" version = "0.7.0" dependencies = [ @@ -1590,26 +1282,6 @@ dependencies = [ "sp-trie", ] -[[package]] -name = "cumulus-primitives-utility" -version = "0.7.0" -dependencies = [ - "cumulus-primitives-core", - "frame-support", - "log", - "pallet-asset-conversion", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", -] - [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.7.0" @@ -1623,19 +1295,6 @@ dependencies = [ "sp-trie", ] -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -1674,7 +1333,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -1701,7 +1360,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -1718,7 +1377,7 @@ checksum = "5d914fcc6452d133236ee067a9538be25ba6a644a450e1a6c617da84bf029854" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -1753,6 +1412,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1766,22 +1436,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -1808,32 +1469,32 @@ dependencies = [ "ark-serialize 0.4.2", "ark-std 0.4.0", "ark-transcript", - "arrayvec 0.7.4", + "arrayvec", "zeroize", ] [[package]] name = "docify" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" dependencies = [ "common-path", - "derive-syn-parse", + "derive-syn-parse 0.2.0", "once_cell", "proc-macro2", "quote", "regex", - "syn 2.0.50", + "syn 2.0.58", "termcolor", "toml", "walkdir", @@ -1882,6 +1543,7 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] @@ -1940,11 +1602,12 @@ dependencies = [ "crypto-bigint", "digest 0.10.7", "ff", - "generic-array 0.14.7", + "generic-array", "group", "pkcs8", "rand_core 0.6.4", "sec1", + "serdect", "subtle", "zeroize", ] @@ -1972,7 +1635,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -1983,20 +1646,30 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", +] + +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", ] [[package]] name = "env_logger" -version = "0.9.3" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ - "atty", + "anstream", + "anstyle", + "env_filter", "humantime", "log", - "regex", - "termcolor", ] [[package]] @@ -2072,15 +1745,9 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -2105,7 +1772,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "auto_impl", "bytes", ] @@ -2130,7 +1797,7 @@ dependencies = [ "ark-poly", "ark-serialize 0.4.2", "ark-std 0.4.0", - "merlin 3.0.0", + "merlin", ] [[package]] @@ -2151,22 +1818,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "finality-grandpa" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" -dependencies = [ - "either", - "futures", - "futures-timer", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot", - "scale-info", -] - [[package]] name = "fixed-hash" version = "0.8.0" @@ -2225,7 +1876,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -2244,23 +1895,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "frame-executive" -version = "28.0.0" -dependencies = [ - "frame-support", - "frame-system", - "frame-try-runtime", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", - "sp-tracing 16.0.0", -] - [[package]] name = "frame-metadata" version = "16.0.0" @@ -2319,7 +1953,7 @@ version = "23.0.0" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", + "derive-syn-parse 0.2.0", "expander", "frame-support-procedural-tools", "itertools", @@ -2328,7 +1962,7 @@ dependencies = [ "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -2339,7 +1973,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -2348,7 +1982,7 @@ version = "11.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -2370,39 +2004,6 @@ dependencies = [ "sp-weights", ] -[[package]] -name = "frame-system-benchmarking" -version = "28.0.0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "frame-system-rpc-runtime-api" -version = "26.0.0" -dependencies = [ - "parity-scale-codec", - "sp-api", -] - -[[package]] -name = "frame-try-runtime" -version = "0.34.0" -dependencies = [ - "frame-support", - "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std 14.0.0", -] - [[package]] name = "fs-err" version = "2.11.0" @@ -2475,7 +2076,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -2490,12 +2091,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -2514,15 +2109,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2632,15 +2218,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.8" @@ -2653,6 +2230,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-conservative" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ed443af458ccb6d81c1e7e661545f94d3176752fb1df2f543b902a1e0f51e2" + [[package]] name = "hex-literal" version = "0.4.1" @@ -2665,17 +2248,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.0", + "crypto-mac", "digest 0.9.0", ] @@ -2695,7 +2268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.7", + "generic-array", "hmac 0.8.1", ] @@ -2831,7 +2404,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.8", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -2870,6 +2443,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2 0.10.8", ] @@ -2990,18 +2564,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "lru" -version = "0.8.1" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown 0.12.3", -] +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "mach" @@ -3021,7 +2586,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -3031,11 +2596,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -3046,7 +2611,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -3057,7 +2622,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -3069,6 +2634,15 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matrixmultiply" version = "0.3.8" @@ -3112,18 +2686,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "merlin" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "merlin" version = "3.0.0" @@ -3178,6 +2740,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.4" @@ -3204,7 +2776,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "itoa", ] @@ -3244,124 +2816,59 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.8", + "hermit-abi", "libc", ] [[package]] -name = "object" -version = "0.30.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" -dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", - "memchr", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "pallet-asset-conversion" -version = "10.0.0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-api", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "pallet-asset-rate" -version = "7.0.0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "pallet-asset-tx-payment" -version = "28.0.0" +name = "object" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-transaction-payment", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", + "crc32fast", + "hashbrown 0.13.2", + "indexmap 1.9.3", + "memchr", ] [[package]] -name = "pallet-assets" -version = "29.0.0" +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", + "memchr", ] [[package]] -name = "pallet-aura" -version = "27.0.0" +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pallet-asset-rate" +version = "7.0.0" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", - "log", - "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-consensus-aura", + "sp-core", "sp-runtime", "sp-std 14.0.0", ] @@ -3432,82 +2939,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "pallet-bridge-grandpa" -version = "0.7.0" -dependencies = [ - "bp-header-chain", - "bp-runtime", - "bp-test-utils", - "finality-grandpa", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-consensus-grandpa", - "sp-runtime", - "sp-std 14.0.0", - "sp-trie", -] - -[[package]] -name = "pallet-bridge-messages" -version = "0.7.0" -dependencies = [ - "bp-messages", - "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "num-traits", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "pallet-bridge-parachains" -version = "0.7.0" -dependencies = [ - "bp-header-chain", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-bridge-grandpa", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std 14.0.0", - "sp-trie", -] - -[[package]] -name = "pallet-bridge-relayers" -version = "0.7.0" -dependencies = [ - "bp-messages", - "bp-relayers", - "bp-runtime", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "pallet-bridge-messages", - "parity-scale-codec", - "scale-info", - "sp-arithmetic", - "sp-runtime", - "sp-std 14.0.0", -] - [[package]] name = "pallet-broker" version = "0.6.0" @@ -3518,6 +2949,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", + "sp-api", "sp-arithmetic", "sp-core", "sp-runtime", @@ -3561,7 +2993,7 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std 14.0.0", - "strum", + "strum 0.26.2", ] [[package]] @@ -3630,21 +3062,6 @@ dependencies = [ "sp-weights", ] -[[package]] -name = "pallet-multisig" -version = "28.0.0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", -] - [[package]] name = "pallet-session" version = "28.0.0" @@ -3730,17 +3147,6 @@ dependencies = [ "sp-std 14.0.0", ] -[[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "28.0.0" -dependencies = [ - "pallet-transaction-payment", - "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-weights", -] - [[package]] name = "pallet-treasury" version = "27.0.0" @@ -3808,72 +3214,7 @@ dependencies = [ "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", -] - -[[package]] -name = "pallet-xcm-benchmarks" -version = "7.0.0" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", -] - -[[package]] -name = "pallet-xcm-bridge-hub-router" -version = "0.5.0" -dependencies = [ - "bp-xcm-bridge-hub-router", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std 14.0.0", - "staging-xcm", - "staging-xcm-builder", -] - -[[package]] -name = "parachains-common" -version = "7.0.0" -dependencies = [ - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-support", - "frame-system", - "log", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", - "pallet-message-queue", - "pallet-xcm", - "parity-scale-codec", - "polkadot-primitives", - "scale-info", - "sp-consensus-aura", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 14.0.0", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-executor", - "substrate-wasm-builder", + "xcm-fee-payment-runtime-api", ] [[package]] @@ -3906,6 +3247,19 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "parity-bip39" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" +dependencies = [ + "bitcoin_hashes", + "rand", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + [[package]] name = "parity-bytes" version = "0.1.2" @@ -3918,7 +3272,7 @@ version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "bitvec", "byte-slice-cast", "bytes", @@ -3939,35 +3293,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parity-util-mem" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" -dependencies = [ - "cfg-if", - "ethereum-types", - "hashbrown 0.12.3", - "impl-trait-for-tuples", - "lru", - "parity-util-mem-derive", - "parking_lot", - "primitive-types", - "smallvec", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "parity-wasm" version = "0.45.0" @@ -3997,6 +3322,17 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "paste" version = "1.0.14" @@ -4005,11 +3341,12 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" -version = "0.8.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "crypto-mac 0.11.0", + "digest 0.10.7", + "password-hash", ] [[package]] @@ -4143,7 +3480,6 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", - "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-parachains", @@ -4233,13 +3569,28 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817" +[[package]] +name = "polkavm-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" + +[[package]] +name = "polkavm-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125" +dependencies = [ + "polkavm-derive-impl-macro 0.8.0", +] + [[package]] name = "polkavm-derive" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125" +checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" dependencies = [ - "polkavm-derive-impl-macro", + "polkavm-derive-impl-macro 0.9.0", ] [[package]] @@ -4248,10 +3599,22 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c" dependencies = [ - "polkavm-common", + "polkavm-common 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" +dependencies = [ + "polkavm-common 0.9.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -4260,21 +3623,31 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66" dependencies = [ - "polkavm-derive-impl", - "syn 2.0.50", + "polkavm-derive-impl 0.8.0", + "syn 2.0.58", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" +dependencies = [ + "polkavm-derive-impl 0.9.0", + "syn 2.0.58", ] [[package]] name = "polkavm-linker" -version = "0.8.2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdec1451cb18261d5d01de82acc15305e417fb59588cdcb3127d3dcc9672b925" +checksum = "9c7be503e60cf56c0eb785f90aaba4b583b36bff00e93997d93fef97f9553c39" dependencies = [ "gimli 0.28.1", "hashbrown 0.14.3", "log", "object 0.32.2", - "polkavm-common", + "polkavm-common 0.9.0", "regalloc2", "rustc-demangle", ] @@ -4359,7 +3732,7 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -4528,7 +3901,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -4611,7 +3984,7 @@ dependencies = [ "blake2", "common", "fflonk", - "merlin 3.0.0", + "merlin", ] [[package]] @@ -4761,9 +4134,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.10.0" +version = "2.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" dependencies = [ "bitvec", "cfg-if", @@ -4775,9 +4148,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.10.0" +version = "2.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -4796,22 +4169,6 @@ dependencies = [ "hashbrown 0.13.2", ] -[[package]] -name = "schnorrkel" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "curve25519-dalek 2.1.3", - "merlin 2.0.1", - "rand_core 0.5.1", - "sha2 0.8.2", - "subtle", - "zeroize", -] - [[package]] name = "schnorrkel" version = "0.11.4" @@ -4820,10 +4177,10 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead", "arrayref", - "arrayvec 0.7.4", + "arrayvec", "curve25519-dalek 4.1.2", "getrandom_or_panic", - "merlin 3.0.0", + "merlin", "rand_core 0.6.4", "serde_bytes", "sha2 0.10.8", @@ -4857,8 +4214,9 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", - "generic-array 0.14.7", + "generic-array", "pkcs8", + "serdect", "subtle", "zeroize", ] @@ -4967,7 +4325,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -4991,15 +4349,13 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.8.2" +name = "serdect" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "base16ct", + "serde", ] [[package]] @@ -5012,7 +4368,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -5118,11 +4474,10 @@ dependencies = [ [[package]] name = "snowbridge-beacon-primitives" -version = "0.9.0" +version = "0.2.0" dependencies = [ "byte-slice-cast", "frame-support", - "frame-system", "hex", "hex-literal", "parity-scale-codec", @@ -5137,12 +4492,11 @@ dependencies = [ "sp-std 14.0.0", "ssz_rs", "ssz_rs_derive", - "static_assertions", ] [[package]] name = "snowbridge-core" -version = "0.9.0" +version = "0.2.0" dependencies = [ "ethabi-decode", "frame-support", @@ -5165,7 +4519,7 @@ dependencies = [ [[package]] name = "snowbridge-ethereum" -version = "0.9.0" +version = "0.3.0" dependencies = [ "ethabi-decode", "ethbloom", @@ -5175,12 +4529,10 @@ dependencies = [ "parity-scale-codec", "rand", "rlp", - "rustc-hex", "scale-info", "serde", "serde-big-array", "serde_json", - "sp-core", "sp-io", "sp-runtime", "sp-std 14.0.0", @@ -5204,7 +4556,7 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-merkle-tree" -version = "0.9.0" +version = "0.3.0" dependencies = [ "array-bytes 4.2.0", "env_logger", @@ -5219,24 +4571,20 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-runtime-api" -version = "0.9.0" +version = "0.2.0" dependencies = [ "frame-support", "parity-scale-codec", "snowbridge-core", "snowbridge-outbound-queue-merkle-tree", "sp-api", - "sp-core", "sp-std 14.0.0", - "staging-xcm", ] [[package]] name = "snowbridge-pallet-ethereum-client" -version = "0.9.0" +version = "0.2.0" dependencies = [ - "bp-runtime", - "byte-slice-cast", "frame-benchmarking", "frame-support", "frame-system", @@ -5245,7 +4593,6 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "rand", - "rlp", "scale-info", "serde", "serde_json", @@ -5258,8 +4605,6 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-std 14.0.0", - "ssz_rs", - "ssz_rs_derive", "static_assertions", ] @@ -5267,9 +4612,6 @@ dependencies = [ name = "snowbridge-pallet-ethereum-client-fixtures" version = "0.9.0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", @@ -5279,24 +4621,21 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue" -version = "0.9.0" +version = "0.2.0" dependencies = [ "alloy-primitives", - "alloy-rlp", "alloy-sol-types", "frame-benchmarking", "frame-support", "frame-system", "hex-literal", "log", - "num-traits", "pallet-balances", "parity-scale-codec", "scale-info", "serde", "snowbridge-beacon-primitives", "snowbridge-core", - "snowbridge-ethereum", "snowbridge-pallet-ethereum-client", "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-router-primitives", @@ -5306,17 +4645,13 @@ dependencies = [ "sp-runtime", "sp-std 14.0.0", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "snowbridge-pallet-inbound-queue-fixtures" -version = "0.9.0" +version = "0.10.0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", @@ -5326,14 +4661,13 @@ dependencies = [ [[package]] name = "snowbridge-pallet-outbound-queue" -version = "0.9.0" +version = "0.2.0" dependencies = [ "bridge-hub-common", "ethabi-decode", "frame-benchmarking", "frame-support", "frame-system", - "hex-literal", "pallet-message-queue", "parity-scale-codec", "scale-info", @@ -5346,14 +4680,12 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-std 14.0.0", - "staging-xcm", ] [[package]] name = "snowbridge-pallet-system" -version = "0.9.0" +version = "0.2.0" dependencies = [ - "ethabi-decode", "frame-benchmarking", "frame-support", "frame-system", @@ -5373,7 +4705,6 @@ dependencies = [ "sp-runtime", "sp-std 14.0.0", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", ] @@ -5381,31 +4712,26 @@ dependencies = [ name = "snowbridge-router-primitives" version = "0.9.0" dependencies = [ - "ethabi-decode", "frame-support", - "frame-system", "hex-literal", "log", "parity-scale-codec", "rustc-hex", "scale-info", - "serde", "snowbridge-core", "sp-core", "sp-io", "sp-runtime", "sp-std 14.0.0", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "snowbridge-runtime-common" -version = "0.9.0" +version = "0.2.0" dependencies = [ "frame-support", - "frame-system", "log", "parity-scale-codec", "snowbridge-core", @@ -5418,89 +4744,41 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" -version = "0.9.0" +version = "0.2.0" dependencies = [ - "assets-common", - "bridge-hub-test-utils", - "bridge-runtime-common", - "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", - "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "log", - "pallet-aura", - "pallet-authorship", "pallet-balances", "pallet-collator-selection", "pallet-message-queue", - "pallet-multisig", "pallet-session", "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", - "scale-info", - "serde", - "smallvec", - "snowbridge-beacon-primitives", "snowbridge-core", - "snowbridge-outbound-queue-runtime-api", "snowbridge-pallet-ethereum-client", "snowbridge-pallet-ethereum-client-fixtures", - "snowbridge-pallet-inbound-queue", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", - "snowbridge-router-primitives", - "snowbridge-system-runtime-api", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", "sp-core", - "sp-genesis-builder", - "sp-inherents", "sp-io", "sp-keyring", - "sp-offchain", "sp-runtime", - "sp-session", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-transaction-pool", - "sp-version", "staging-parachain-info", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", - "static_assertions", ] [[package]] name = "snowbridge-system-runtime-api" -version = "0.9.0" +version = "0.2.0" dependencies = [ "parity-scale-codec", "snowbridge-core", "sp-api", - "sp-core", "sp-std 14.0.0", "staging-xcm", ] @@ -5536,7 +4814,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -5555,6 +4833,7 @@ dependencies = [ name = "sp-arithmetic" version = "23.0.0" dependencies = [ + "docify", "integer-sqrt", "num-traits", "parity-scale-codec", @@ -5591,17 +4870,6 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "sp-block-builder" -version = "26.0.0" -dependencies = [ - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std 14.0.0", ] [[package]] @@ -5616,7 +4884,6 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std 14.0.0", "sp-timestamp", ] @@ -5634,27 +4901,9 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std 14.0.0", "sp-timestamp", ] -[[package]] -name = "sp-consensus-grandpa" -version = "13.0.0" -dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std 14.0.0", -] - [[package]] name = "sp-consensus-slots" version = "0.32.0" @@ -5662,7 +4911,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 14.0.0", "sp-timestamp", ] @@ -5672,7 +4920,6 @@ version = "28.0.0" dependencies = [ "array-bytes 6.2.2", "bandersnatch_vrfs", - "bip39", "bitflags 1.3.2", "blake2", "bounded-collections", @@ -5684,16 +4931,18 @@ dependencies = [ "hash256-std-hasher", "impl-serde", "itertools", + "k256", "libsecp256k1", "log", - "merlin 3.0.0", + "merlin", + "parity-bip39", "parity-scale-codec", "parking_lot", "paste", "primitive-types", "rand", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel", "secp256k1", "secrecy", "serde", @@ -5734,7 +4983,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" -version = "0.0.0" +version = "0.1.0" dependencies = [ "blake2b_simd", "byteorder", @@ -5746,11 +4995,11 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" -version = "0.0.0" +version = "0.1.0" dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -5759,7 +5008,7 @@ version = "14.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -5769,7 +5018,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk#de6d02591b57d03f70ed8db dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -5778,7 +5027,6 @@ version = "0.25.0" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 14.0.0", "sp-storage 19.0.0", ] @@ -5795,12 +5043,13 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.7.0" +version = "0.8.0" dependencies = [ + "parity-scale-codec", + "scale-info", "serde_json", "sp-api", "sp-runtime", - "sp-std 14.0.0", ] [[package]] @@ -5812,7 +5061,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0", "thiserror", ] @@ -5825,6 +5073,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", + "polkavm-derive 0.9.1", "rustversion", "secp256k1", "sp-core", @@ -5846,7 +5095,7 @@ version = "31.0.0" dependencies = [ "sp-core", "sp-runtime", - "strum", + "strum 0.26.2", ] [[package]] @@ -5874,7 +5123,6 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 14.0.0", ] [[package]] @@ -5887,16 +5135,6 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 14.0.0", -] - -[[package]] -name = "sp-offchain" -version = "26.0.0" -dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", ] [[package]] @@ -5938,7 +5176,7 @@ dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive", + "polkavm-derive 0.9.1", "primitive-types", "sp-externalities 0.25.0", "sp-runtime-interface-proc-macro 17.0.0", @@ -5957,7 +5195,7 @@ dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive", + "polkavm-derive 0.8.0", "primitive-types", "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -5977,7 +5215,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -5990,7 +5228,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -6004,7 +5242,6 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 14.0.0", ] [[package]] @@ -6017,7 +5254,6 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 14.0.0", ] [[package]] @@ -6033,7 +5269,6 @@ dependencies = [ "sp-core", "sp-externalities 0.25.0", "sp-panic-handler", - "sp-std 14.0.0", "sp-trie", "thiserror", "tracing", @@ -6058,7 +5293,6 @@ dependencies = [ "ref-cast", "serde", "sp-debug-derive 14.0.0", - "sp-std 14.0.0", ] [[package]] @@ -6082,7 +5316,6 @@ dependencies = [ "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 14.0.0", "thiserror", ] @@ -6091,10 +5324,9 @@ name = "sp-tracing" version = "16.0.0" dependencies = [ "parity-scale-codec", - "sp-std 14.0.0", "tracing", "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.3.18", ] [[package]] @@ -6106,15 +5338,7 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "sp-transaction-pool" -version = "26.0.0" -dependencies = [ - "sp-api", - "sp-runtime", + "tracing-subscriber 0.2.25", ] [[package]] @@ -6133,7 +5357,6 @@ dependencies = [ "schnellru", "sp-core", "sp-externalities 0.25.0", - "sp-std 14.0.0", "thiserror", "tracing", "trie-db", @@ -6163,19 +5386,16 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] name = "sp-wasm-interface" version = "20.0.0" dependencies = [ - "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 14.0.0", - "wasmtime", ] [[package]] @@ -6202,7 +5422,6 @@ dependencies = [ "smallvec", "sp-arithmetic", "sp-debug-derive 14.0.0", - "sp-std 14.0.0", ] [[package]] @@ -6341,8 +5560,14 @@ name = "strum" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ - "strum_macros", + "strum_macros 0.26.2", ] [[package]] @@ -6359,15 +5584,26 @@ dependencies = [ ] [[package]] -name = "substrate-bip39" -version = "0.4.5" +name = "strum_macros" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.58", +] + +[[package]] +name = "substrate-bip39" +version = "0.4.7" dependencies = [ - "hmac 0.11.0", + "hmac 0.12.1", "pbkdf2", - "schnorrkel 0.9.1", - "sha2 0.9.9", + "schnorrkel", + "sha2 0.10.8", "zeroize", ] @@ -6382,7 +5618,7 @@ dependencies = [ "parity-wasm", "polkavm-linker", "sp-maybe-compressed-blob", - "strum", + "strum 0.26.2", "tempfile", "toml", "walkdir", @@ -6408,9 +5644,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -6426,19 +5662,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.50", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", + "syn 2.0.58", ] [[package]] @@ -6491,7 +5715,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -6614,7 +5838,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -6638,6 +5862,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-serde" version = "0.1.3" @@ -6657,7 +5892,7 @@ dependencies = [ "ansi_term", "chrono", "lazy_static", - "matchers", + "matchers 0.0.1", "regex", "serde", "serde_json", @@ -6666,18 +5901,35 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.1.4", "tracing-serde", ] +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers 0.1.0", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.2.0", +] + [[package]] name = "trie-db" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" +checksum = "65ed83be775d85ebb0e272914fff6462c39b3ddd6dc67b5c1c41271aad280c69" dependencies = [ "hash-db", - "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", @@ -6784,6 +6036,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "valuable" version = "0.1.0" @@ -6866,7 +6124,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", "wasm-bindgen-shared", ] @@ -6900,7 +6158,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6933,7 +6191,7 @@ checksum = "a5211b7550606857312bba1d978a8ec75692eae187becc5e680444fffc5e6f89" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -6944,8 +6202,8 @@ checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -7403,6 +6661,20 @@ dependencies = [ "tap", ] +[[package]] +name = "xcm-fee-payment-runtime-api" +version = "0.1.0" +dependencies = [ + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std 14.0.0", + "sp-weights", + "staging-xcm", +] + [[package]] name = "xcm-procedural" version = "7.0.0" @@ -7410,7 +6682,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -7430,7 +6702,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] @@ -7450,7 +6722,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.58", ] [[package]] diff --git a/bridges/snowbridge/pallets/system/src/lib.rs b/bridges/snowbridge/pallets/system/src/lib.rs index 39c73e3630e7..50493c089cab 100644 --- a/bridges/snowbridge/pallets/system/src/lib.rs +++ b/bridges/snowbridge/pallets/system/src/lib.rs @@ -89,8 +89,8 @@ fn ensure_sibling(location: &Location) -> Result<(ParaId, H256), DispatchErro where T: Config, { - match location.unpack() { - (1, [Parachain(para_id)]) => { + match (location.parent_count(), location.first_interior()) { + (1, Some(Parachain(para_id))) => { let agent_id = agent_id_of::(location)?; Ok(((*para_id).into(), agent_id)) }, @@ -99,7 +99,7 @@ where } /// Hash the location to produce an agent id -fn agent_id_of(location: &Location) -> Result { +pub fn agent_id_of(location: &Location) -> Result { T::AgentIdOf::convert_location(location).ok_or(Error::::LocationConversionFailed.into()) } diff --git a/bridges/snowbridge/pallets/system/src/tests.rs b/bridges/snowbridge/pallets/system/src/tests.rs index 09f24195a30a..d88704c5c87c 100644 --- a/bridges/snowbridge/pallets/system/src/tests.rs +++ b/bridges/snowbridge/pallets/system/src/tests.rs @@ -285,7 +285,7 @@ fn create_channel_bad_origin() { BadOrigin, ); - // child of sibling location not allowed + // child of sibling location is allowed assert_noop!( EthereumSystem::create_channel( make_xcm_origin(Location::new( @@ -294,7 +294,7 @@ fn create_channel_bad_origin() { )), OperatingMode::Normal, ), - BadOrigin, + Error::::NoAgent, ); // local account location not allowed @@ -357,7 +357,7 @@ fn update_channel_bad_origin() { BadOrigin, ); - // child of sibling location not allowed + // child of sibling location is allowed assert_noop!( EthereumSystem::update_channel( make_xcm_origin(Location::new( @@ -366,7 +366,7 @@ fn update_channel_bad_origin() { )), mode, ), - BadOrigin, + Error::::NoChannel, ); // local account location not allowed diff --git a/bridges/snowbridge/primitives/core/src/lib.rs b/bridges/snowbridge/primitives/core/src/lib.rs index ed1af4225d24..6f2d5c759198 100644 --- a/bridges/snowbridge/primitives/core/src/lib.rs +++ b/bridges/snowbridge/primitives/core/src/lib.rs @@ -47,7 +47,10 @@ where pub struct AllowSiblingsOnly; impl Contains for AllowSiblingsOnly { fn contains(location: &Location) -> bool { - matches!(location.unpack(), (1, [Parachain(_)])) + return match (location.parent_count(), location.first_interior()) { + (1, Some(Parachain(_))) => true, + _ => false, + } } } diff --git a/bridges/snowbridge/primitives/core/src/outbound.rs b/bridges/snowbridge/primitives/core/src/outbound.rs index 0ba0fdb61089..d85671f323f9 100644 --- a/bridges/snowbridge/primitives/core/src/outbound.rs +++ b/bridges/snowbridge/primitives/core/src/outbound.rs @@ -2,7 +2,8 @@ use codec::{Decode, Encode}; use frame_support::PalletError; use scale_info::TypeInfo; use sp_arithmetic::traits::{BaseArithmetic, Unsigned}; -use sp_core::{RuntimeDebug, H256}; +use sp_core::{RuntimeDebug, H160, H256}; +use sp_std::vec::Vec; pub use v1::{AgentExecuteCommand, Command, Initializer, Message, OperatingMode, QueuedMessage}; /// Enqueued outbound messages need to be versioned to prevent data corruption @@ -139,6 +140,17 @@ mod v1 { // Fee multiplier multiplier: UD60x18, }, + /// Execute a contract on the target chain + Transact { + /// ID of the agent + agent_id: H256, + /// Target contract address + target: H160, + /// The call data to the contract + payload: Vec, + /// The dynamic gas component that needs to be specified when executing the contract + gas_limit: u64, + }, } impl Command { @@ -154,6 +166,7 @@ mod v1 { Command::TransferNativeFromAgent { .. } => 6, Command::SetTokenTransferFees { .. } => 7, Command::SetPricingParameters { .. } => 8, + Command::Transact { .. } => 9, } } @@ -211,6 +224,13 @@ mod v1 { Token::Uint(U256::from(*delivery_cost)), Token::Uint(multiplier.clone().into_inner()), ])]), + Command::Transact { agent_id, target, payload, gas_limit, .. } => + ethabi::encode(&[Token::Tuple(vec![ + Token::FixedBytes(agent_id.as_bytes().to_owned()), + Token::Address(*target), + Token::Bytes(payload.clone()), + Token::Uint(U256::from(*gas_limit)), + ])]), } } } @@ -403,6 +423,7 @@ impl GasMeter for ConstantGasMeter { }, Command::SetTokenTransferFees { .. } => 60_000, Command::SetPricingParameters { .. } => 60_000, + Command::Transact { gas_limit, .. } => *gas_limit, } } } @@ -416,3 +437,10 @@ impl GasMeter for () { } pub const ETHER_DECIMALS: u8 = 18; + +#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] +pub struct TransactInfo { + pub target: H160, + pub call: Vec, + pub gas_limit: u64, +} diff --git a/bridges/snowbridge/primitives/router/src/outbound/mod.rs b/bridges/snowbridge/primitives/router/src/outbound/mod.rs index ddc36ce8cb61..1383aaa3319e 100644 --- a/bridges/snowbridge/primitives/router/src/outbound/mod.rs +++ b/bridges/snowbridge/primitives/router/src/outbound/mod.rs @@ -7,12 +7,12 @@ mod tests; use core::slice::Iter; -use codec::{Decode, Encode}; +use codec::{Decode, DecodeAll, Encode}; use frame_support::{ensure, traits::Get}; use snowbridge_core::{ - outbound::{AgentExecuteCommand, Command, Message, SendMessage}, - ChannelId, ParaId, + outbound::{AgentExecuteCommand, Command, Message, SendMessage, TransactInfo}, + AgentIdOf, ChannelId, ParaId, }; use sp_core::{H160, H256}; use sp_std::{iter::Peekable, marker::PhantomData, prelude::*}; @@ -87,37 +87,31 @@ where SendError::MissingArgument })?; - let mut converter = XcmConverter::new(&message, &expected_network); - let (agent_execute_command, message_id) = converter.convert().map_err(|err|{ + let mut converter = XcmConverter::::new( + &message, + expected_network, + para_id.into(), + ); + let (command, message_id) = converter.convert().map_err(|err|{ log::error!(target: "xcm::ethereum_blob_exporter", "unroutable due to pattern matching error '{err:?}'."); SendError::Unroutable })?; - let source_location = Location::new(1, local_sub.clone()); - let agent_id = match AgentHashedDescription::convert_location(&source_location) { - Some(id) => id, - None => { - log::error!(target: "xcm::ethereum_blob_exporter", "unroutable due to not being able to create agent id. '{source_location:?}'"); - return Err(SendError::Unroutable) - }, - }; - let channel_id: ChannelId = ParaId::from(para_id).into(); - let outbound_message = Message { - id: Some(message_id.into()), - channel_id, - command: Command::AgentExecute { agent_id, command: agent_execute_command }, - }; + let outbound_message = + Message { id: Some(message_id.into()), channel_id, command: command.clone() }; // validate the message - let (ticket, fee) = OutboundQueue::validate(&outbound_message).map_err(|err| { + let (ticket, fees) = OutboundQueue::validate(&outbound_message).map_err(|err| { log::error!(target: "xcm::ethereum_blob_exporter", "OutboundQueue validation of message failed. {err:?}"); SendError::Unroutable })?; - - // convert fee to Asset - let fee = Asset::from((Location::parent(), fee.total())).into(); + let fee = match command { + Command::Transact { .. } => + Ok::(Asset::from((Location::parent(), fees.local)).into()), + _ => Ok::(Asset::from((Location::parent(), fees.total())).into()), + }?; Ok(((ticket.encode(), message_id), fee)) } @@ -154,6 +148,12 @@ enum XcmConverterError { AssetResolutionFailed, InvalidFeeAsset, SetTopicExpected, + TransactExpected, + TransactSovereignAccountExpected, + TransactDecodeFailed, + UnexpectedInstruction, + ConvertAgentFailed, + TransactDescendOriginExpected, } macro_rules! match_expression { @@ -165,18 +165,31 @@ macro_rules! match_expression { }; } -struct XcmConverter<'a, Call> { +struct XcmConverter<'a, AgentHashedDescription, Call> { + xcm: &'a Xcm, iter: Peekable>>, - ethereum_network: &'a NetworkId, + ethereum_network: NetworkId, + para_id: ParaId, + _marker: PhantomData, } -impl<'a, Call> XcmConverter<'a, Call> { - fn new(message: &'a Xcm, ethereum_network: &'a NetworkId) -> Self { - Self { iter: message.inner().iter().peekable(), ethereum_network } +impl<'a, AgentHashedDescription, Call> XcmConverter<'a, AgentHashedDescription, Call> +where + AgentHashedDescription: ConvertLocation, +{ + fn new(xcm: &'a Xcm, ethereum_network: NetworkId, para_id: ParaId) -> Self { + let iter = xcm.inner().iter().peekable(); + Self { xcm, iter, ethereum_network, para_id, _marker: Default::default() } } - fn convert(&mut self) -> Result<(AgentExecuteCommand, [u8; 32]), XcmConverterError> { - // Get withdraw/deposit and make native tokens create message. - let result = self.native_tokens_unlock_message()?; + fn convert(&mut self) -> Result<(Command, [u8; 32]), XcmConverterError> { + let result = match self.peek2() { + // Transact message + Ok([DescendOrigin { .. }, Transact { .. }]) => self.transact_message(), + // Get withdraw/deposit and make native tokens create message. + Ok([WithdrawAsset { .. }, ..]) => self.native_tokens_unlock_message(), + Err(e) => Err(e), + _ => return Err(XcmConverterError::UnexpectedInstruction), + }?; // All xcm instructions must be consumed before exit. if self.next().is_ok() { @@ -186,9 +199,40 @@ impl<'a, Call> XcmConverter<'a, Call> { Ok(result) } - fn native_tokens_unlock_message( - &mut self, - ) -> Result<(AgentExecuteCommand, [u8; 32]), XcmConverterError> { + fn transact_message(&mut self) -> Result<(Command, [u8; 32]), XcmConverterError> { + use XcmConverterError::*; + let interior_origin = match_expression!(self.next()?, DescendOrigin(origin), origin) + .ok_or(TransactDescendOriginExpected)? + .first() + .ok_or(TransactDescendOriginExpected)?; + + let origin = + Location::new(1, [Parachain(self.para_id.into()), interior_origin.clone().into()]); + let agent_id = AgentIdOf::convert_location(&origin).ok_or(ConvertAgentFailed)?; + + let call_data = if let Transact { origin_kind, call, .. } = self.next()? { + ensure!(*origin_kind == OriginKind::SovereignAccount, TransactSovereignAccountExpected); + call + } else { + return Err(TransactExpected) + }; + + let message = TransactInfo::decode_all(&mut call_data.clone().into_encoded().as_slice()) + .map_err(|_| TransactDecodeFailed)?; + + let topic_id = match_expression!(self.next()?, SetTopic(id), id).ok_or(SetTopicExpected)?; + Ok(( + Command::Transact { + agent_id, + target: message.target, + payload: message.call, + gas_limit: message.gas_limit, + }, + *topic_id, + )) + } + + fn native_tokens_unlock_message(&mut self) -> Result<(Command, [u8; 32]), XcmConverterError> { use XcmConverterError::*; // Get the reserve assets from WithdrawAsset. @@ -262,7 +306,19 @@ impl<'a, Call> XcmConverter<'a, Call> { // Check if there is a SetTopic and skip over it if found. let topic_id = match_expression!(self.next()?, SetTopic(id), id).ok_or(SetTopicExpected)?; - Ok((AgentExecuteCommand::TransferToken { token, recipient, amount }, *topic_id)) + let agent_id = AgentHashedDescription::convert_location(&Location::new( + 1, + Parachain(self.para_id.into()), + )) + .ok_or(ConvertAgentFailed)?; + + Ok(( + Command::AgentExecute { + agent_id, + command: AgentExecuteCommand::TransferToken { token, recipient, amount }, + }, + *topic_id, + )) } fn next(&mut self) -> Result<&'a Instruction, XcmConverterError> { @@ -275,9 +331,17 @@ impl<'a, Call> XcmConverter<'a, Call> { fn network_matches(&self, network: &Option) -> bool { if let Some(network) = network { - network == self.ethereum_network + network.clone() == self.ethereum_network } else { true } } + + fn peek2(&self) -> Result<[Instruction; 2], XcmConverterError> { + let instructions = self.xcm.clone().into_inner(); + ensure!(instructions.len() >= 2, XcmConverterError::UnexpectedEndOfXcm); + let first = instructions.get(0).ok_or(XcmConverterError::UnexpectedEndOfXcm)?; + let second = instructions.get(1).ok_or(XcmConverterError::UnexpectedEndOfXcm)?; + Ok([first.clone(), second.clone()]) + } } diff --git a/bridges/snowbridge/primitives/router/src/outbound/tests.rs b/bridges/snowbridge/primitives/router/src/outbound/tests.rs index 111243bb45a7..a861453ce059 100644 --- a/bridges/snowbridge/primitives/router/src/outbound/tests.rs +++ b/bridges/snowbridge/primitives/router/src/outbound/tests.rs @@ -410,11 +410,14 @@ fn xcm_converter_convert_success() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); - let expected_payload = AgentExecuteCommand::TransferToken { - token: token_address.into(), - recipient: beneficiary_address.into(), - amount: 1000, + let mut converter = XcmConverter::::new(&message, network, 1000.into()); + let expected_payload = Command::AgentExecute { + agent_id: hex!("81c5ab2571199e3188135178f3c2c8e2d268be1313d029b30f534fa579b69b79").into(), + command: AgentExecuteCommand::TransferToken { + token: token_address.into(), + recipient: beneficiary_address.into(), + amount: 1000, + }, }; let result = converter.convert(); assert_eq!(result, Ok((expected_payload, [0; 32]))); @@ -443,11 +446,14 @@ fn xcm_converter_convert_without_buy_execution_yields_success() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); - let expected_payload = AgentExecuteCommand::TransferToken { - token: token_address.into(), - recipient: beneficiary_address.into(), - amount: 1000, + let mut converter = XcmConverter::::new(&message, network, 1000.into()); + let expected_payload = Command::AgentExecute { + agent_id: hex!("81c5ab2571199e3188135178f3c2c8e2d268be1313d029b30f534fa579b69b79").into(), + command: AgentExecuteCommand::TransferToken { + token: token_address.into(), + recipient: beneficiary_address.into(), + amount: 1000, + }, }; let result = converter.convert(); assert_eq!(result, Ok((expected_payload, [0; 32]))); @@ -478,11 +484,14 @@ fn xcm_converter_convert_with_wildcard_all_asset_filter_succeeds() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); - let expected_payload = AgentExecuteCommand::TransferToken { - token: token_address.into(), - recipient: beneficiary_address.into(), - amount: 1000, + let mut converter = XcmConverter::::new(&message, network, 1000.into()); + let expected_payload = Command::AgentExecute { + agent_id: hex!("81c5ab2571199e3188135178f3c2c8e2d268be1313d029b30f534fa579b69b79").into(), + command: AgentExecuteCommand::TransferToken { + token: token_address.into(), + recipient: beneficiary_address.into(), + amount: 1000, + }, }; let result = converter.convert(); assert_eq!(result, Ok((expected_payload, [0; 32]))); @@ -513,11 +522,14 @@ fn xcm_converter_convert_with_fees_less_than_reserve_yields_success() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); - let expected_payload = AgentExecuteCommand::TransferToken { - token: token_address.into(), - recipient: beneficiary_address.into(), - amount: 1000, + let mut converter = XcmConverter::::new(&message, network, 1000.into()); + let expected_payload = Command::AgentExecute { + agent_id: hex!("81c5ab2571199e3188135178f3c2c8e2d268be1313d029b30f534fa579b69b79").into(), + command: AgentExecuteCommand::TransferToken { + token: token_address.into(), + recipient: beneficiary_address.into(), + amount: 1000, + }, }; let result = converter.convert(); assert_eq!(result, Ok((expected_payload, [0; 32]))); @@ -547,7 +559,7 @@ fn xcm_converter_convert_without_set_topic_yields_set_topic_expected() { ClearTopic, ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::SetTopicExpected)); } @@ -564,7 +576,8 @@ fn xcm_converter_convert_with_partial_message_yields_unexpected_end_of_xcm() { .into(); let message: Xcm<()> = vec![WithdrawAsset(assets)].into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); + let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::UnexpectedEndOfXcm)); } @@ -595,7 +608,7 @@ fn xcm_converter_with_different_fee_asset_fails() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::InvalidFeeAsset)); } @@ -625,18 +638,18 @@ fn xcm_converter_with_fees_greater_than_reserve_fails() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::InvalidFeeAsset)); } #[test] -fn xcm_converter_convert_with_empty_xcm_yields_unexpected_end_of_xcm() { +fn xcm_converter_convert_with_empty_xcm_yields_unexpected_instruction() { let network = BridgedNetwork::get(); let message: Xcm<()> = vec![].into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::UnexpectedEndOfXcm)); @@ -668,14 +681,14 @@ fn xcm_converter_convert_with_extra_instructions_yields_end_of_xcm_message_expec ClearError, ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::EndOfXcmMessageExpected)); } #[test] -fn xcm_converter_convert_without_withdraw_asset_yields_withdraw_expected() { +fn xcm_converter_convert_without_withdraw_asset_yields_unexpected_instruction() { let network = BridgedNetwork::get(); let token_address: [u8; 20] = hex!("1000000000000000000000000000000000000000"); @@ -698,10 +711,10 @@ fn xcm_converter_convert_without_withdraw_asset_yields_withdraw_expected() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); - assert_eq!(result.err(), Some(XcmConverterError::WithdrawAssetExpected)); + assert_eq!(result.err(), Some(XcmConverterError::UnexpectedInstruction)); } #[test] @@ -723,7 +736,7 @@ fn xcm_converter_convert_without_withdraw_asset_yields_deposit_expected() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::DepositAssetExpected)); @@ -756,7 +769,7 @@ fn xcm_converter_convert_without_assets_yields_no_reserve_assets() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::NoReserveAssets)); @@ -794,7 +807,7 @@ fn xcm_converter_convert_with_two_assets_yields_too_many_assets() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::TooManyAssets)); @@ -825,7 +838,7 @@ fn xcm_converter_convert_without_consuming_filter_yields_filter_does_not_consume SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::FilterDoesNotConsumeAllAssets)); @@ -856,7 +869,7 @@ fn xcm_converter_convert_with_zero_amount_asset_yields_zero_asset_transfer() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::ZeroAssetTransfer)); @@ -886,7 +899,7 @@ fn xcm_converter_convert_non_ethereum_asset_yields_asset_resolution_failed() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::AssetResolutionFailed)); @@ -919,7 +932,7 @@ fn xcm_converter_convert_non_ethereum_chain_asset_yields_asset_resolution_failed SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::AssetResolutionFailed)); @@ -952,7 +965,7 @@ fn xcm_converter_convert_non_ethereum_chain_yields_asset_resolution_failed() { SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::AssetResolutionFailed)); @@ -989,7 +1002,7 @@ fn xcm_converter_convert_with_non_ethereum_beneficiary_yields_beneficiary_resolu SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::BeneficiaryResolutionFailed)); @@ -1025,7 +1038,7 @@ fn xcm_converter_convert_with_non_ethereum_chain_beneficiary_yields_beneficiary_ SetTopic([0; 32]), ] .into(); - let mut converter = XcmConverter::new(&message, &network); + let mut converter = XcmConverter::::new(&message, network, 1000.into()); let result = converter.convert(); assert_eq!(result.err(), Some(XcmConverterError::BeneficiaryResolutionFailed)); diff --git a/bridges/snowbridge/runtime/runtime-common/src/lib.rs b/bridges/snowbridge/runtime/runtime-common/src/lib.rs index aae45520ff4b..d2acd7f9fc2c 100644 --- a/bridges/snowbridge/runtime/runtime-common/src/lib.rs +++ b/bridges/snowbridge/runtime/runtime-common/src/lib.rs @@ -119,7 +119,8 @@ impl::Runtime>( + &Location::new( + 1, + [ + Parachain(PenpalA::para_id().into()), + AccountId32 { network: None, id: PenpalASender::get().into() }, + ], + ), + ) + .unwrap(); + + // Create agent and channel + BridgeHubRococo::execute_with(|| { + type Runtime = ::Runtime; + snowbridge_pallet_system::Agents::::insert(agent_id, ()); + let channel_id: ChannelId = PenpalA::para_id().into(); + snowbridge_pallet_system::Channels::::insert( + channel_id, + Channel { agent_id, para_id: PenpalA::para_id() }, + ) + }); + + PenpalA::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type RuntimeOrigin = ::RuntimeOrigin; + let sender = PenpalASender::get(); + let initial_fund = 4_000_000_000_000; + assert_ok!(::ForeignAssets::mint_into( + xcm::v3::Location::parent(), + (&sender.clone()).into(), + initial_fund, + )); + + assert_ok!(::TransactHelper::transact_to_ethereum( + RuntimeOrigin::signed(sender.clone()), + //contract + hex!("ee9170abfbf9421ad6dd07f6bdec9d89f2b581e0").into(), + //call + hex!("00071468656c6c6f").to_vec(), + //gas limit on Ethereum + 80_000, + )); + let balance_after = ::ForeignAssets::balance( + xcm::v3::Location::parent(), + sender.clone(), + ); + let total_cost = initial_fund - balance_after; + // Only the delivery cost + assert_eq!(total_cost > BridgeHubEthereumBaseFee::get(), true); + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::TransactHelper(penpal_runtime::pallets::transact_helper::Event::SentExportMessage { .. }) => {}, + ] + ); + }); + + BridgeHubRococo::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + BridgeHubRococo, + vec![ + RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued { .. }) => {}, + ] + ); + }); +} + +#[test] +fn create_agent_for_penpal_sender() { + BridgeHubRococo::fund_para_sovereign(PenpalA::para_id().into(), INITIAL_FUND); + + let destination = VersionedLocation::V4(Location { + parents: 1, + interior: Junctions::from([Parachain(BridgeHubRococo::para_id().into())]), + }); + + let fee_asset = Asset::from((Location::parent(), 40_000_000_000_000_u128)); + + let create_agent_call = SnowbridgeControl::Control(ControlCall::CreateAgent {}); + + let remote_xcm = VersionedXcm::from(Xcm::<()>(vec![ + WithdrawAsset(fee_asset.clone().into()), + BuyExecution { fees: fee_asset, weight_limit: Unlimited }, + DescendOrigin([AccountId32 { network: None, id: PenpalASender::get().into() }].into()), + Transact { + require_weight_at_most: 4_000_000_000.into(), + origin_kind: OriginKind::Xcm, + call: create_agent_call.encode().into(), + }, + ])); + + PenpalA::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type RuntimeOrigin = ::RuntimeOrigin; + + assert_ok!(::TransactHelper::send_as_sovereign( + RuntimeOrigin::root(), + bx!(destination), + bx!(remote_xcm), + )); + + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::TransactHelper(penpal_runtime::pallets::transact_helper::Event::Sent { .. }) => {}, + ] + ); + }); + + BridgeHubRococo::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + BridgeHubRococo, + vec![ + RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::CreateAgent { .. }) => {}, + ] + ); + }); +} diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 063c999aa7ad..c8fc60cd4ced 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -230,7 +230,9 @@ impl Contains for SafeCallFilter { snowbridge_pallet_system::Call::set_pricing_parameters { .. } | snowbridge_pallet_system::Call::force_update_channel { .. } | snowbridge_pallet_system::Call::force_transfer_native_from_agent { .. } | - snowbridge_pallet_system::Call::set_token_transfer_fees { .. }, + snowbridge_pallet_system::Call::set_token_transfer_fees { .. } | + snowbridge_pallet_system::Call::create_agent { .. } | + snowbridge_pallet_system::Call::create_channel { .. }, ) ) } diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml index 028aa002a91e..311d11d5525e 100644 --- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml @@ -55,6 +55,7 @@ sp-std = { path = "../../../../../substrate/primitives/std", default-features = sp-storage = { path = "../../../../../substrate/primitives/storage", default-features = false } sp-transaction-pool = { path = "../../../../../substrate/primitives/transaction-pool", default-features = false } sp-version = { path = "../../../../../substrate/primitives/version", default-features = false } +sp-io = { path = "../../../../../substrate/primitives/io", default-features = false } # Polkadot polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false } @@ -124,6 +125,7 @@ std = [ "sp-core/std", "sp-genesis-builder/std", "sp-inherents/std", + "sp-io/std", "sp-offchain/std", "sp-runtime/std", "sp-session/std", diff --git a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs index 919bfe83e7d7..4c476241d2f2 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs @@ -29,6 +29,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +pub mod pallets; mod weights; pub mod xcm_config; @@ -676,6 +677,8 @@ construct_runtime!( Assets: pallet_assets:: = 50, ForeignAssets: pallet_assets:: = 51, + TransactHelper: crate::pallets::transact_helper = 52, + Sudo: pallet_sudo = 255, } ); diff --git a/cumulus/parachains/runtimes/testing/penpal/src/pallets/mod.rs b/cumulus/parachains/runtimes/testing/penpal/src/pallets/mod.rs new file mode 100644 index 000000000000..06ec58b9a1d8 --- /dev/null +++ b/cumulus/parachains/runtimes/testing/penpal/src/pallets/mod.rs @@ -0,0 +1,15 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +pub mod transact_helper; diff --git a/cumulus/parachains/runtimes/testing/penpal/src/pallets/transact_helper.rs b/cumulus/parachains/runtimes/testing/penpal/src/pallets/transact_helper.rs new file mode 100644 index 000000000000..374f0b9147dd --- /dev/null +++ b/cumulus/parachains/runtimes/testing/penpal/src/pallets/transact_helper.rs @@ -0,0 +1,133 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub use pallet::*; + +#[frame_support::pallet] +pub mod pallet { + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + use sp_core::H160; + use sp_std::{boxed::Box, vec, vec::Vec}; + use xcm::prelude::*; + use xcm_executor::traits::XcmAssetTransfers; + + #[pallet::config] + pub trait Config: frame_system::Config + pallet_xcm::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type XcmRouter: SendXcm; + type XcmExecutor: ExecuteXcm<::RuntimeCall> + + XcmAssetTransfers; + } + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// ExportMessage was sent + SentExportMessage { message_id: XcmHash, message: Xcm<()> }, + /// XCM message sent. \[to, message\] + Sent { to: Location, message: Xcm<()> }, + } + + #[pallet::error] + pub enum Error { + InvalidMsg, + FeesNotMet, + SendFailure, + BadVersion, + } + + #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] + pub struct TransactInfo { + pub target: H160, + pub call: Vec, + pub gas_limit: u64, + } + + #[pallet::hooks] + impl Hooks> for Pallet {} + + #[pallet::call] + impl Pallet + where + [u8; 32]: From<::AccountId>, + { + #[pallet::call_index(0)] + #[pallet::weight(Weight::from_parts(100_000_000, 0))] + pub fn send_as_sovereign( + origin: OriginFor, + dest: Box, + message: Box>, + ) -> DispatchResult { + ensure_root(origin)?; + let dest = Location::try_from(*dest).map_err(|()| Error::::BadVersion)?; + let message: Xcm<()> = (*message).try_into().map_err(|()| Error::::BadVersion)?; + + pallet_xcm::Pallet::::send_xcm(Here, dest.clone(), message.clone()).map_err( + |e| match e { + _ => Error::::SendFailure, + }, + )?; + Self::deposit_event(Event::Sent { to: dest, message }); + Ok(()) + } + + #[pallet::call_index(1)] + #[pallet::weight(Weight::from_parts(100_000_000, 0))] + pub fn transact_to_ethereum( + origin: OriginFor, + target: H160, + call: Vec, + gas_limit: u64, + ) -> DispatchResult { + let who = ensure_signed(origin)?; + + // Ethereum as destination, hard-code chain_id for demonstration only. + let dest = Location { + parents: 2, + interior: Junctions::from([GlobalConsensus(Ethereum { chain_id: 11155111 })]), + }; + + // construct the inner xcm of ExportMessage + let transact = TransactInfo { target, call, gas_limit }; + let mut message = Xcm(vec![Transact { + origin_kind: OriginKind::SovereignAccount, + require_weight_at_most: Weight::default(), + call: transact.encode().into(), + }]); + let message_clone = message.clone(); + // Add SetTopic only for tracing + let _ = &message + .inner_mut() + .push(SetTopic(message_clone.using_encoded(sp_io::hashing::blake2_256))); + + // Send the xcm + let message_id = pallet_xcm::Pallet::::send_xcm( + AccountId32 { network: None, id: who.into() }, + dest.clone(), + message.clone(), + ) + .map_err(|e| match e { + _ => Error::::SendFailure, + })?; + + Self::deposit_event(Event::SentExportMessage { message_id, message }); + Ok(()) + } + } +} diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index c12372abbe90..2816918476b5 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -28,7 +28,7 @@ use super::{ ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; -use crate::{BaseDeliveryFee, FeeAssetId, TransactionByteFee}; +use crate::{BaseDeliveryFee, FeeAssetId, TransactionByteFee, Vec}; use core::marker::PhantomData; use frame_support::{ parameter_types, @@ -48,19 +48,20 @@ use xcm_builder::{ FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, StartsWith, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, + SignedToAccountId32, SovereignPaidRemoteExporter, SovereignSignedViaLocation, StartsWith, + TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{traits::JustTry, XcmExecutor}; parameter_types! { pub const RelayLocation: Location = Location::parent(); + pub storage RelayNetwork: NetworkId = NetworkId::Rococo; + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); + pub storage UniversalLocation: InteriorLocation = + [GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into())].into(); // Local native currency which is stored in `pallet_balances`` pub const PenpalNativeCurrency: Location = Location::here(); - pub const RelayNetwork: Option = None; - pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorLocation = [Parachain(ParachainInfo::parachain_id().into())].into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); } @@ -267,7 +268,6 @@ parameter_types! { 1, [Parachain(ASSET_HUB_ID), PalletInstance(ASSETS_PALLET_ID), GeneralIndex(RESERVABLE_ASSET_ID.into())] ); - /// The Penpal runtime is utilized for testing with various environment setups. /// This storage item provides the opportunity to customize testing scenarios /// by configuring the trusted asset from the `SystemAssetHub`. @@ -371,6 +371,13 @@ pub type XcmRouter = WithUniqueTopic<( cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, + // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum + // GlobalConsensus + SovereignPaidRemoteExporter< + to_ethereum::EthereumNetworkExportTable, + XcmpQueue, + UniversalLocation, + >, )>; impl pallet_xcm::Config for Runtime { @@ -414,3 +421,42 @@ impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper { xcm::v3::Location::new(1, [xcm::v3::Junction::Parachain(id)]) } } + +impl crate::pallets::transact_helper::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type XcmRouter = SovereignPaidRemoteExporter< + to_ethereum::EthereumNetworkExportTable, + XcmpQueue, + UniversalLocation, + >; + type XcmExecutor = XcmExecutor; +} + +pub mod to_ethereum { + use super::*; + use xcm_builder::NetworkExportTableItem; + + parameter_types! { + pub storage DefaultBridgeHubEthereumBaseFee: Balance = 4_000_000_000; + pub storage BridgeHubEthereumBaseFee: Balance = DefaultBridgeHubEthereumBaseFee::get(); + pub storage SiblingBridgeHub: Location = Location::new(1, [Parachain(1013)]); + pub storage EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 11155111 }; + pub BridgeTable: Vec = sp_std::vec![ + NetworkExportTableItem::new( + EthereumNetwork::get(), + Some(sp_std::vec![Here]), + SiblingBridgeHub::get(), + Some(( + RelayLocation::get(), + BridgeHubEthereumBaseFee::get(), + ).into()) + ), + ]; + pub EthereumBridgeTable: Vec = + Vec::new().into_iter() + .chain(BridgeTable::get()) + .collect(); + } + + pub type EthereumNetworkExportTable = xcm_builder::NetworkExportTable; +}