Skip to content

Commit 2f588b5

Browse files
serban300seadandaliamaharonsvyatonikbkontur
authored andcommitted
[polkadot-staging] Backport polkadot-sdk changes + update refs (#2798)
* Fix clippy lints behind feature gates and add new CI step all features (#2569) Many clippy lints usually enforced by `-Dcomplexity` and `-Dcorrectness` are not caught by CI as they are gated by `features`, like `runtime-benchmarks`, while the clippy CI job runs with only the default features for all targets. This PR also adds a CI step to run clippy with `--all-features` to ensure the code quality is maintained behind feature gates from now on. To improve local development, clippy lints are downgraded to warnings, but they still will result in an error at CI due to the `-Dwarnings` rustflag. --------- Co-authored-by: Liam Aharon <[email protected]> * Cleanup bridges tests: with-grandpa-chain case (#2763) related to paritytech/parity-bridges-common#2739 Co-authored-by: Branislav Kontur <[email protected]> * Adds Snowbridge to Rococo runtime (#2522) # Description Adds Snowbridge to the Rococo bridge hub runtime. Includes config changes required in Rococo asset hub. --------- Co-authored-by: Alistair Singh <[email protected]> Co-authored-by: ron <[email protected]> Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: claravanstaden <Cats 4 life!> * Bump the known_good_semver group with 4 updates (#2845) Bumps the known_good_semver group with 4 updates: [serde](https://github.com/serde-rs/serde), [serde_json](https://github.com/serde-rs/json), [clap](https://github.com/clap-rs/clap) and [serde_yaml](https://github.com/dtolnay/serde-yaml). Updates `serde` from 1.0.193 to 1.0.194 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde's releases</a>.</em></p> <blockquote> <h2>v1.0.194</h2> <ul> <li>Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/d2d977a6c6dcff237ae956336d18b0c900c61aad"><code>d2d977a</code></a> Release 1.0.194</li> <li><a href="https://github.com/serde-rs/serde/commit/a9a6ee9d7f2e3a3306ad7c7a8f21dcf369c6acb7"><code>a9a6ee9</code></a> Pull in proc-macro2 sccache fix</li> <li><a href="https://github.com/serde-rs/serde/commit/28c5d215c11b66368b725f04cb92e49e4350bcdc"><code>28c5d21</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2669">#2669</a> from dtolnay/optionifletelse</li> <li><a href="https://github.com/serde-rs/serde/commit/3d6a789562579fb7ea783e0d7f35530914d8baca"><code>3d6a789</code></a> Remove option_if_let_else clippy suppression</li> <li><a href="https://github.com/serde-rs/serde/commit/a0e68698e33fa928f1d9f208d68b17df9f8bb568"><code>a0e6869</code></a> Work around doc_link_with_quotes pedantic clippy lint</li> <li>See full diff in <a href="https://github.com/serde-rs/serde/compare/v1.0.193...v1.0.194">compare view</a></li> </ul> </details> <br /> Updates `serde_json` from 1.0.108 to 1.0.110 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p> <blockquote> <h2>v1.0.109</h2> <ul> <li>Documentation improvements</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/json/commit/df5cf215b70fb6341b255e7c0a210c06f64c0669"><code>df5cf21</code></a> Release 1.0.110</li> <li><a href="https://github.com/serde-rs/json/commit/c35856a93c37b48b3d6efc4fec8e05554dd3f9d5"><code>c35856a</code></a> Pull in proc-macro2 sccache fix</li> <li><a href="https://github.com/serde-rs/json/commit/f88bf1fccb05aa4de129675de44eb6aaf3fec0a0"><code>f88bf1f</code></a> Release 1.0.109</li> <li><a href="https://github.com/serde-rs/json/commit/bb62c73ecef901e689b0a7a67ed613a32975520c"><code>bb62c73</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/json/issues/1097">#1097</a> from serde-rs/doccfg</li> <li><a href="https://github.com/serde-rs/json/commit/df36d109fd9f9cdd22a874c0177cafec12237f95"><code>df36d10</code></a> Restore doc cfg on re-exports</li> <li><a href="https://github.com/serde-rs/json/commit/c3670913423329c166add9d85ecdfc3e3da21e7a"><code>c367091</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/json/issues/1095">#1095</a> from dtolnay/hashtest</li> <li><a href="https://github.com/serde-rs/json/commit/b328ee7df4dd772922f084600aa7cea39218b694"><code>b328ee7</code></a> Eliminate hash closure in favor of calling hash_one directly</li> <li><a href="https://github.com/serde-rs/json/commit/b9bcbad3c094042f79f1a45189ec0edbb8f9f322"><code>b9bcbad</code></a> Use BuildHasher::hash_one</li> <li><a href="https://github.com/serde-rs/json/commit/7ff6c9e30c2ecc2cdcf089ed86c7ccfe7a41721c"><code>7ff6c9e</code></a> Use random hasher state for number hashing test</li> <li><a href="https://github.com/serde-rs/json/commit/fe031cd1de4dde5b47e0f18934632b41bd18b48d"><code>fe031cd</code></a> Delete trace_macros! functionality from test</li> <li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/v1.0.108...v1.0.110">compare view</a></li> </ul> </details> <br /> Updates `clap` from 4.4.11 to 4.4.12 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.4.12</h2> <h2>[4.4.12] - 2023-12-28</h2> <h3>Performance</h3> <ul> <li>Only ask <code>TypedValueParser</code> for possible values if needed</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.4.12] - 2023-12-28</h2> <h3>Performance</h3> <ul> <li>Only ask <code>TypedValueParser</code> for possible values if needed</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/clap-rs/clap/commit/6d601e6f312857d78f47741268f1748840484d4a"><code>6d601e6</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/048e7f0fbc4f8108894e4307af768c8d332a0576"><code>048e7f0</code></a> docs: Update changelog</li> <li><a href="https://github.com/clap-rs/clap/commit/53f5b820988c1c03f0d2696fc144857ad461edc1"><code>53f5b82</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5267">#5267</a> from vermiculus/sa/avoid-pv-expansion-in-help</li> <li><a href="https://github.com/clap-rs/clap/commit/05cd057978db743a65fb5fde33213af752d064e7"><code>05cd057</code></a> perf: Avoid retrieving possible_values unless used</li> <li><a href="https://github.com/clap-rs/clap/commit/29208083b0598ba7d1b80e79821c0ba3eb2342ce"><code>2920808</code></a> test: Update snapshots</li> <li><a href="https://github.com/clap-rs/clap/commit/28763ebb6d8714f6ca588bf477729040e0e760b0"><code>28763eb</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/ace7bb5b4570b030f7c2d0fa91e0afaaac1b0030"><code>ace7bb5</code></a> docs(complete): Update changelog</li> <li><a href="https://github.com/clap-rs/clap/commit/76beca4d4d42a817bbb578f23553c64ded2aea97"><code>76beca4</code></a> docs(complete): Polish API reference for dynamic</li> <li><a href="https://github.com/clap-rs/clap/commit/3630e582d3ec59912b8e9369c38687695ddb1f43"><code>3630e58</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5273">#5273</a> from epage/docsrs</li> <li><a href="https://github.com/clap-rs/clap/commit/3724b9e2e4c2a2e69337b6d809949b246d3fef39"><code>3724b9e</code></a> docs: Include more content on docs.rs</li> <li>See full diff in <a href="https://github.com/clap-rs/clap/compare/v4.4.11...v4.4.12">compare view</a></li> </ul> </details> <br /> Updates `serde_yaml` from 0.9.29 to 0.9.30 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/serde-yaml/releases">serde_yaml's releases</a>.</em></p> <blockquote> <h2>0.9.30</h2> <ul> <li>Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/serde-yaml/commit/09ee25156f608f95150b27edd120bd5471db3c64"><code>09ee251</code></a> Release 0.9.30</li> <li><a href="https://github.com/dtolnay/serde-yaml/commit/caea939ece85ab54ac41de0672d683905f1e406a"><code>caea939</code></a> Pull in proc-macro2 sccache fix</li> <li><a href="https://github.com/dtolnay/serde-yaml/commit/d255918c141fd72d01f169bb5aa0152234981699"><code>d255918</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/serde-yaml/issues/403">#403</a> from dtolnay/optionifletelse</li> <li><a href="https://github.com/dtolnay/serde-yaml/commit/8cfeedd766f83dab24d03b9fb11b72886a247425"><code>8cfeedd</code></a> Remove option_if_let_else clippy suppression</li> <li>See full diff in <a href="https://github.com/dtolnay/serde-yaml/compare/0.9.29...0.9.30">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix clippy warnings (#2861) Fix some issues reported by clippy * Bump the known_good_semver group with 4 updates (#2865) Bumps the known_good_semver group with 4 updates: [serde](https://github.com/serde-rs/serde), [serde_json](https://github.com/serde-rs/json), [clap](https://github.com/clap-rs/clap) and [syn](https://github.com/dtolnay/syn). Updates `serde` from 1.0.194 to 1.0.195 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde's releases</a>.</em></p> <blockquote> <h2>v1.0.195</h2> <ul> <li>Prevent remote definitions of tuple struct or tuple variant from triggering dead_code warning (<a href="https://redirect.github.com/serde-rs/serde/issues/2671">#2671</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/03eec42c3313b36da416be1486e9ecac345784d5"><code>03eec42</code></a> Release 1.0.195</li> <li><a href="https://github.com/serde-rs/serde/commit/196f311ae2fd8ad94fe38a57830419859a4d3dbb"><code>196f311</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2671">#2671</a> from dtolnay/deadremote</li> <li><a href="https://github.com/serde-rs/serde/commit/38d9e0b2091e9b6150486c2c37367819b86bcc39"><code>38d9e0b</code></a> Revert &quot;Add FIXME to fix dead_code warning when using serde(remote)&quot;</li> <li><a href="https://github.com/serde-rs/serde/commit/6502b3131697eff6420786ad71f87f29cfff3a13"><code>6502b31</code></a> Fix new dead_code warning in tuple struct and tuple variant remote defs</li> <li><a href="https://github.com/serde-rs/serde/commit/6f1a8c3115c8d2502178c25d610fbaee2e82c46b"><code>6f1a8c3</code></a> Add FIXME to fix dead_code warning when using serde(remote)</li> <li><a href="https://github.com/serde-rs/serde/commit/d883c94cc9fe72d0512dc7f4def7191a401595c9"><code>d883c94</code></a> Work around dead_code warning in tests</li> <li><a href="https://github.com/serde-rs/serde/commit/961fa59a7469c5b5e323b9723323df412048d60d"><code>961fa59</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2670">#2670</a> from serde-rs/exhaustive</li> <li><a href="https://github.com/serde-rs/serde/commit/8bc71def551df190e6817d3311e5c76f751f53e6"><code>8bc71de</code></a> Fill in omitted patterns for GenericArguments match</li> <li><a href="https://github.com/serde-rs/serde/commit/7c65a9dc0eab2d4d829b258a7b3549351bbe8dcd"><code>7c65a9d</code></a> Pick up changes to non_exhaustive_omitted_patterns lint</li> <li>See full diff in <a href="https://github.com/serde-rs/serde/compare/v1.0.194...v1.0.195">compare view</a></li> </ul> </details> <br /> Updates `serde_json` from 1.0.110 to 1.0.111 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p> <blockquote> <h2>v1.0.111</h2> <ul> <li>Improve floating point parsing performance on loongarch64 (<a href="https://redirect.github.com/serde-rs/json/issues/1100">#1100</a>, thanks <a href="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/heiher"><code>@​heiher</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/json/commit/0131ac68212e8094bd14ee618587d731b4f9a68b"><code>0131ac6</code></a> Release 1.0.111</li> <li><a href="https://github.com/serde-rs/json/commit/96ecfadd3f7dd6366a2d07a098e228d15df93cb4"><code>96ecfad</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/json/issues/1100">#1100</a> from heiher/limb-64-la64</li> <li><a href="https://github.com/serde-rs/json/commit/c80dbaf8ff5902ca670e0a48bbe495065b9314f5"><code>c80dbaf</code></a> Set limb width to 64 for loongarch64</li> <li>See full diff in <a href="https://github.com/serde-rs/json/compare/v1.0.110...v1.0.111">compare view</a></li> </ul> </details> <br /> Updates `clap` from 4.4.12 to 4.4.13 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.4.13</h2> <h2>[4.4.13] - 2024-01-04</h2> <h3>Documentation</h3> <ul> <li>Fix link to structopt migration guide</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.4.13] - 2024-01-04</h2> <h3>Documentation</h3> <ul> <li>Fix link to structopt migration guide</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/clap-rs/clap/commit/2ab48b295c2463ce8c141a9868095b811ccf3b99"><code>2ab48b2</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/7a06a8cd619db704c6d826bf752eae3b86ce23a8"><code>7a06a8c</code></a> docs: Update changelog</li> <li><a href="https://github.com/clap-rs/clap/commit/cca190efedf40f48147a3a4a777a9cc17728abdf"><code>cca190e</code></a> docs: Correct link to StructOpt migration guide</li> <li><a href="https://github.com/clap-rs/clap/commit/5c31f453c1a9f46109db8e0a47ed212748c0556c"><code>5c31f45</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5281">#5281</a> from Manishearth/safety-docs</li> <li><a href="https://github.com/clap-rs/clap/commit/ddae7e6f411c4c87294212152b8d9beea16637e7"><code>ddae7e6</code></a> Correct safety docs</li> <li><a href="https://github.com/clap-rs/clap/commit/48d28aa689bfd0fb44ec025244b30ba261e2515a"><code>48d28aa</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/748ce18cc2ccc3f7c07fa8b7c5b6f90ed9242b72"><code>748ce18</code></a> docs: Update changelog</li> <li><a href="https://github.com/clap-rs/clap/commit/adbe6ec4cb6a617070c41927a389d0bea7b30936"><code>adbe6ec</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5278">#5278</a> from henry-hsieh/fix-nosort</li> <li><a href="https://github.com/clap-rs/clap/commit/2b48858ba84c62e9af97bee4734d70530254cd8a"><code>2b48858</code></a> fix: Skip nosort option below bash 4.4</li> <li><a href="https://github.com/clap-rs/clap/commit/777b744102cde324dc75534ef043efc15a9f40be"><code>777b744</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/5277">#5277</a> from clap-rs/renovate/actions-setup-python-5.x</li> <li>Additional commits viewable in <a href="https://github.com/clap-rs/clap/compare/v4.4.12...v4.4.13">compare view</a></li> </ul> </details> <br /> Updates `syn` from 2.0.47 to 2.0.48 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/syn/releases">syn's releases</a>.</em></p> <blockquote> <h2>2.0.48</h2> <ul> <li>Improve error message on unexpected token after <code>else</code> (<a href="https://redirect.github.com/dtolnay/syn/issues/1578">#1578</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/5e16fc24e68b16a381cb7ef22455dba9db143083"><code>5e16fc2</code></a> Release 2.0.48</li> <li><a href="https://github.com/dtolnay/syn/commit/dc40084b15ab4a443179fc39cbadac6452408838"><code>dc40084</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1578">#1578</a> from dtolnay/elseblock</li> <li><a href="https://github.com/dtolnay/syn/commit/82fcefce69d36e78301936c5af91f005d6a24357"><code>82fcefc</code></a> Fix error message on unexpected token after 'else'</li> <li><a href="https://github.com/dtolnay/syn/commit/e8a5c68ad45194e575a923f6b1e08f1817196331"><code>e8a5c68</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/syn/issues/1576">#1576</a> from dtolnay/exhaustive</li> <li><a href="https://github.com/dtolnay/syn/commit/97b1df6d935cb4801f4090782304577c8574d024"><code>97b1df6</code></a> Pick up changes to non_exhaustive_omitted_patterns lint</li> <li>See full diff in <a href="https://github.com/dtolnay/syn/compare/2.0.47...2.0.48">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Snowbridge Rococo deployment updates (#2792) - Includes the introduction of the `fast-runtime` feature, which cleans up our features - Updates beacon client fork versions config to Sepolia's versions - Cleanup of AgentIdOf --------- Co-authored-by: Ron <[email protected]> Co-authored-by: claravanstaden <Cats 4 life!> * Update Snowbridge versions and prep for publishing (#2894) - updates snowbridge crates to `0.9.0` - updates Cargo.toml files in preparation for publishing to crates.io - adds Kusama and Polkadot Snowbridge runtime config crates - moves runtime tests from the Snowbridge subtree into the bridge hub tests dir --------- Co-authored-by: claravanstaden <Cats 4 life!> Co-authored-by: Ron <[email protected]> * Run bridges zombienet tests on CI (#2439) Brridges zombienet tests are non-standard - zombienet currently missing multiple relay chains support (see e.g. paritytech/zombienet#796), so we need to go live with two relay networks, their parachains + custom test runner (which e.g. doesn't shutdown net when its tests are finished and instead waits for both networks tests to complete). So we are stuck with native zombienet provider => this PR is an attempt to gather everything in a single docker container and run tests there ~Draft, because it is far from finishing - what I want now is to see how it works on CI~ * XCMv4 (#1230) # Note for reviewer Most changes are just syntax changes necessary for the new version. Most important files should be the ones under the `xcm` folder. # Description Added XCMv4. ## Removed `Multi` prefix The following types have been renamed: - MultiLocation -> Location - MultiAsset -> Asset - MultiAssets -> Assets - InteriorMultiLocation -> InteriorLocation - MultiAssetFilter -> AssetFilter - VersionedMultiAsset -> VersionedAsset - WildMultiAsset -> WildAsset - VersionedMultiLocation -> VersionedLocation In order to fix a name conflict, the `Assets` in `xcm-executor` were renamed to `HoldingAssets`, as they represent assets in holding. ## Removed `Abstract` asset id It was not being used anywhere and this simplifies the code. Now assets are just constructed as follows: ```rust let asset: Asset = (AssetId(Location::new(1, Here)), 100u128).into(); ``` No need for specifying `Concrete` anymore. ## Outcome is now a named fields struct Instead of ```rust pub enum Outcome { Complete(Weight), Incomplete(Weight, Error), Error(Error), } ``` we now have ```rust pub enum Outcome { Complete { used: Weight }, Incomplete { used: Weight, error: Error }, Error { error: Error }, } ``` ## Added Reanchorable trait Now both locations and assets implement this trait, making it easier to reanchor both. ## New syntax for building locations and junctions Now junctions are built using the following methods: ```rust let location = Location { parents: 1, interior: [Parachain(1000), PalletInstance(50), GeneralIndex(1984)].into() }; ``` or ```rust let location = Location::new(1, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)]); ``` And they are matched like so: ```rust match location.unpack() { (1, [Parachain(id)]) => ... (0, Here) => ..., (1, [_]) => ..., } ``` This syntax is mandatory in v4, and has been also implemented for v2 and v3 for easier migration. This was needed to make all sizes smaller. # TODO - [x] Scaffold v4 - [x] Port github.com/paritytech/polkadot/pull/7236 - [x] Remove `Multi` prefix - [x] Remove `Abstract` asset id --------- Co-authored-by: command-bot <> Co-authored-by: Keith Yeung <[email protected]> * Fix typos (#2983) * Update polkadot-sdk refs * Update deprecated struct * Remove snowbridge folder * Westend/Rococo Asset Hub: pay xcm fees with sufficient assets (#2978) Set up the `TakeFirstAssetTrader` trader for Westend and Rococo Asset Hubs to cover XCM fees with sufficient assets. This PR reintroduces previously [removed](#1845) trader setups, as it was decided to keep both traders, `TakeFirstAssetTrader` and `SwapFirstAssetTrader`, during the transition period. --------- Co-authored-by: Svyatoslav Nikolsky <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Clara van Staden <[email protected]> Co-authored-by: Alistair Singh <[email protected]> Co-authored-by: ron <[email protected]> Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tsvetomir Dimitrov <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: cristiantroy <[email protected]> Co-authored-by: Muharem <[email protected]>
1 parent 241a3b4 commit 2f588b5

File tree

12 files changed

+67
-79
lines changed

12 files changed

+67
-79
lines changed

bridges/bin/runtime-common/src/messages_benchmarking.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use frame_support::weights::Weight;
3838
use pallet_bridge_messages::benchmarking::{MessageDeliveryProofParams, MessageProofParams};
3939
use sp_runtime::traits::{Header, Zero};
4040
use sp_std::prelude::*;
41-
use xcm::v3::prelude::*;
41+
use xcm::latest::prelude::*;
4242

4343
/// Prepare inbound bridge message according to given message proof parameters.
4444
fn prepare_inbound_message(
@@ -266,19 +266,19 @@ where
266266
/// Returns callback which generates `BridgeMessage` from Polkadot XCM builder based on
267267
/// `expected_message_size` for benchmark.
268268
pub fn generate_xcm_builder_bridge_message_sample(
269-
destination: InteriorMultiLocation,
269+
destination: InteriorLocation,
270270
) -> impl Fn(usize) -> MessagePayload {
271271
move |expected_message_size| -> MessagePayload {
272272
// For XCM bridge hubs, it is the message that
273273
// will be pushed further to some XCM queue (XCMP/UMP)
274-
let location = xcm::VersionedInteriorMultiLocation::V3(destination);
274+
let location = xcm::VersionedInteriorLocation::V4(destination.clone());
275275
let location_encoded_size = location.encoded_size();
276276

277277
// we don't need to be super-precise with `expected_size` here
278278
let xcm_size = expected_message_size.saturating_sub(location_encoded_size);
279279
let xcm_data_size = xcm_size.saturating_sub(
280280
// minus empty instruction size
281-
xcm::v3::Instruction::<()>::ExpectPallet {
281+
Instruction::<()>::ExpectPallet {
282282
index: 0,
283283
name: vec![],
284284
module_name: vec![],
@@ -294,8 +294,8 @@ pub fn generate_xcm_builder_bridge_message_sample(
294294
expected_message_size, location_encoded_size, xcm_size, xcm_data_size,
295295
);
296296

297-
let xcm = xcm::VersionedXcm::<()>::V3(
298-
vec![xcm::v3::Instruction::<()>::ExpectPallet {
297+
let xcm = xcm::VersionedXcm::<()>::V4(
298+
vec![Instruction::<()>::ExpectPallet {
299299
index: 0,
300300
name: vec![42; xcm_data_size],
301301
module_name: vec![],

bridges/bin/runtime-common/src/messages_xcm_extension.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ impl<
126126
#[cfg_attr(feature = "std", derive(Debug, Eq, PartialEq))]
127127
pub struct SenderAndLane {
128128
/// Sending chain relative location.
129-
pub location: MultiLocation,
129+
pub location: Location,
130130
/// Message lane, used by the sending chain.
131131
pub lane: LaneId,
132132
}
133133

134134
impl SenderAndLane {
135135
/// Create new object using provided location and lane.
136-
pub fn new(location: MultiLocation, lane: LaneId) -> Self {
136+
pub fn new(location: Location, lane: LaneId) -> Self {
137137
SenderAndLane { location, lane }
138138
}
139139
}
@@ -171,7 +171,7 @@ pub struct XcmBlobHaulerAdapter<XcmBlobHauler, Lanes>(
171171

172172
impl<
173173
H: XcmBlobHauler,
174-
Lanes: Get<sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))>>,
174+
Lanes: Get<sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))>>,
175175
> OnMessagesDelivered for XcmBlobHaulerAdapter<H, Lanes>
176176
{
177177
fn on_messages_delivered(lane: LaneId, enqueued_messages: MessageNonce) {
@@ -291,7 +291,7 @@ impl<H: XcmBlobHauler> LocalXcmQueueManager<H> {
291291
/// Send congested signal to the `sending_chain_location`.
292292
fn send_congested_signal(sender_and_lane: &SenderAndLane) -> Result<(), SendError> {
293293
if let Some(msg) = H::CongestedMessage::get() {
294-
send_xcm::<H::ToSourceChainSender>(sender_and_lane.location, msg)?;
294+
send_xcm::<H::ToSourceChainSender>(sender_and_lane.location.clone(), msg)?;
295295
OutboundLanesCongestedSignals::<H::Runtime, H::MessagesInstance>::insert(
296296
sender_and_lane.lane,
297297
true,
@@ -303,7 +303,7 @@ impl<H: XcmBlobHauler> LocalXcmQueueManager<H> {
303303
/// Send `uncongested` signal to the `sending_chain_location`.
304304
fn send_uncongested_signal(sender_and_lane: &SenderAndLane) -> Result<(), SendError> {
305305
if let Some(msg) = H::UncongestedMessage::get() {
306-
send_xcm::<H::ToSourceChainSender>(sender_and_lane.location, msg)?;
306+
send_xcm::<H::ToSourceChainSender>(sender_and_lane.location.clone(), msg)?;
307307
OutboundLanesCongestedSignals::<H::Runtime, H::MessagesInstance>::remove(
308308
sender_and_lane.lane,
309309
);
@@ -318,10 +318,10 @@ impl<H: XcmBlobHauler> LocalXcmQueueManager<H> {
318318
pub struct XcmVersionOfDestAndRemoteBridge<Version, RemoteBridge>(
319319
sp_std::marker::PhantomData<(Version, RemoteBridge)>,
320320
);
321-
impl<Version: GetVersion, RemoteBridge: Get<MultiLocation>> GetVersion
321+
impl<Version: GetVersion, RemoteBridge: Get<Location>> GetVersion
322322
for XcmVersionOfDestAndRemoteBridge<Version, RemoteBridge>
323323
{
324-
fn get_version_for(dest: &MultiLocation) -> Option<XcmVersion> {
324+
fn get_version_for(dest: &Location) -> Option<XcmVersion> {
325325
let dest_version = Version::get_version_for(dest);
326326
let bridge_hub_version = Version::get_version_for(&RemoteBridge::get());
327327

@@ -345,11 +345,11 @@ mod tests {
345345

346346
parameter_types! {
347347
pub TestSenderAndLane: SenderAndLane = SenderAndLane {
348-
location: MultiLocation::new(1, X1(Parachain(1000))),
348+
location: Location::new(1, [Parachain(1000)]),
349349
lane: TEST_LANE_ID,
350350
};
351-
pub TestLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))> = sp_std::vec![
352-
(TestSenderAndLane::get(), (NetworkId::ByGenesis([0; 32]), InteriorMultiLocation::Here))
351+
pub TestLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![
352+
(TestSenderAndLane::get(), (NetworkId::ByGenesis([0; 32]), InteriorLocation::Here))
353353
];
354354
pub DummyXcmMessage: Xcm<()> = Xcm::new();
355355
}
@@ -366,7 +366,7 @@ mod tests {
366366
type Ticket = ();
367367

368368
fn validate(
369-
_destination: &mut Option<MultiLocation>,
369+
_destination: &mut Option<Location>,
370370
_message: &mut Option<Xcm<()>>,
371371
) -> SendResult<Self::Ticket> {
372372
Ok(((), Default::default()))

bridges/modules/parachains/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ pub(crate) mod tests {
14941494
);
14951495

14961496
// then if someone is pretending to provide updated head#10 of parachain#1 at relay
1497-
// block#30, and actualy provides it
1497+
// block#30, and actually provides it
14981498
//
14991499
// => we'll update value
15001500
proceed(30, state_root_10_at_30);

bridges/modules/relayers/src/benchmarking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ benchmarks! {
104104
// create slash destination account
105105
let lane = LaneId([0, 0, 0, 0]);
106106
let slash_destination = RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain);
107-
T::prepare_rewards_account(slash_destination.clone(), Zero::zero());
107+
T::prepare_rewards_account(slash_destination, Zero::zero());
108108
}: {
109109
crate::Pallet::<T>::slash_and_deregister(&relayer, slash_destination)
110110
}
@@ -121,7 +121,7 @@ benchmarks! {
121121
let account_params =
122122
RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain);
123123
}: {
124-
crate::Pallet::<T>::register_relayer_reward(account_params.clone(), &relayer, One::one());
124+
crate::Pallet::<T>::register_relayer_reward(account_params, &relayer, One::one());
125125
}
126126
verify {
127127
assert_eq!(RelayerRewards::<T>::get(relayer, &account_params), Some(One::one()));

bridges/modules/xcm-bridge-hub-router/src/benchmarking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ pub trait Config<I: 'static>: crate::Config<I> {
3737
/// Returns destination which is valid for this router instance.
3838
/// (Needs to pass `T::Bridges`)
3939
/// Make sure that `SendXcm` will pass.
40-
fn ensure_bridged_target_destination() -> Result<MultiLocation, BenchmarkError> {
41-
Ok(MultiLocation::new(
40+
fn ensure_bridged_target_destination() -> Result<Location, BenchmarkError> {
41+
Ok(Location::new(
4242
Self::UniversalLocation::get().len() as u8,
43-
X1(GlobalConsensus(Self::BridgedNetworkId::get().unwrap())),
43+
[GlobalConsensus(Self::BridgedNetworkId::get().unwrap())],
4444
))
4545
}
4646
}

bridges/modules/xcm-bridge-hub-router/src/lib.rs

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub mod pallet {
8080
type WeightInfo: WeightInfo;
8181

8282
/// Universal location of this runtime.
83-
type UniversalLocation: Get<InteriorMultiLocation>;
83+
type UniversalLocation: Get<InteriorLocation>;
8484
/// The bridged network that this config is for if specified.
8585
/// Also used for filtering `Bridges` by `BridgedNetworkId`.
8686
/// If not specified, allows all networks pass through.
@@ -235,9 +235,9 @@ type ViaBridgeHubExporter<T, I> = SovereignPaidRemoteExporter<
235235
impl<T: Config<I>, I: 'static> ExporterFor for Pallet<T, I> {
236236
fn exporter_for(
237237
network: &NetworkId,
238-
remote_location: &InteriorMultiLocation,
238+
remote_location: &InteriorLocation,
239239
message: &Xcm<()>,
240-
) -> Option<(MultiLocation, Option<MultiAsset>)> {
240+
) -> Option<(Location, Option<Asset>)> {
241241
// ensure that the message is sent to the expected bridged network (if specified).
242242
if let Some(bridged_network) = T::BridgedNetworkId::get() {
243243
if *network != bridged_network {
@@ -268,7 +268,7 @@ impl<T: Config<I>, I: 'static> ExporterFor for Pallet<T, I> {
268268
// take `base_fee` from `T::Brides`, but it has to be the same `T::FeeAsset`
269269
let base_fee = match maybe_payment {
270270
Some(payment) => match payment {
271-
MultiAsset { fun: Fungible(amount), id } if id.eq(&T::FeeAsset::get()) => amount,
271+
Asset { fun: Fungible(amount), id } if id.eq(&T::FeeAsset::get()) => amount,
272272
invalid_asset => {
273273
log::error!(
274274
target: LOG_TARGET,
@@ -318,7 +318,7 @@ impl<T: Config<I>, I: 'static> SendXcm for Pallet<T, I> {
318318
type Ticket = (u32, <T::ToBridgeHubSender as SendXcm>::Ticket);
319319

320320
fn validate(
321-
dest: &mut Option<MultiLocation>,
321+
dest: &mut Option<Location>,
322322
xcm: &mut Option<Xcm<()>>,
323323
) -> SendResult<Self::Ticket> {
324324
// `dest` and `xcm` are required here
@@ -446,7 +446,7 @@ mod tests {
446446
run_test(|| {
447447
assert_eq!(
448448
send_xcm::<XcmBridgeHubRouter>(
449-
MultiLocation::new(2, X2(GlobalConsensus(Rococo), Parachain(1000))),
449+
Location::new(2, [GlobalConsensus(Rococo), Parachain(1000)]),
450450
vec![].into(),
451451
),
452452
Err(SendError::NotApplicable),
@@ -459,7 +459,7 @@ mod tests {
459459
run_test(|| {
460460
assert_eq!(
461461
send_xcm::<XcmBridgeHubRouter>(
462-
MultiLocation::new(2, X2(GlobalConsensus(Rococo), Parachain(1000))),
462+
Location::new(2, [GlobalConsensus(Rococo), Parachain(1000)]),
463463
vec![ClearOrigin; HARD_MESSAGE_SIZE_LIMIT as usize].into(),
464464
),
465465
Err(SendError::ExceedsMaxMessageSize),
@@ -483,14 +483,14 @@ mod tests {
483483
#[test]
484484
fn returns_proper_delivery_price() {
485485
run_test(|| {
486-
let dest = MultiLocation::new(2, X1(GlobalConsensus(BridgedNetworkId::get())));
486+
let dest = Location::new(2, [GlobalConsensus(BridgedNetworkId::get())]);
487487
let xcm: Xcm<()> = vec![ClearOrigin].into();
488488
let msg_size = xcm.encoded_size();
489489

490490
// initially the base fee is used: `BASE_FEE + BYTE_FEE * msg_size + HRMP_FEE`
491491
let expected_fee = BASE_FEE + BYTE_FEE * (msg_size as u128) + HRMP_FEE;
492492
assert_eq!(
493-
XcmBridgeHubRouter::validate(&mut Some(dest), &mut Some(xcm.clone()))
493+
XcmBridgeHubRouter::validate(&mut Some(dest.clone()), &mut Some(xcm.clone()))
494494
.unwrap()
495495
.1
496496
.get(0),
@@ -518,10 +518,7 @@ mod tests {
518518
run_test(|| {
519519
let old_bridge = XcmBridgeHubRouter::bridge();
520520
assert_ok!(send_xcm::<XcmBridgeHubRouter>(
521-
MultiLocation::new(
522-
2,
523-
X2(GlobalConsensus(BridgedNetworkId::get()), Parachain(1000))
524-
),
521+
Location::new(2, [GlobalConsensus(BridgedNetworkId::get()), Parachain(1000)]),
525522
vec![ClearOrigin].into(),
526523
)
527524
.map(drop));
@@ -538,10 +535,7 @@ mod tests {
538535

539536
let old_bridge = XcmBridgeHubRouter::bridge();
540537
assert_ok!(send_xcm::<XcmBridgeHubRouter>(
541-
MultiLocation::new(
542-
2,
543-
X2(GlobalConsensus(BridgedNetworkId::get()), Parachain(1000))
544-
),
538+
Location::new(2, [GlobalConsensus(BridgedNetworkId::get()), Parachain(1000)]),
545539
vec![ClearOrigin].into(),
546540
)
547541
.map(drop));
@@ -560,10 +554,7 @@ mod tests {
560554

561555
let old_bridge = XcmBridgeHubRouter::bridge();
562556
assert_ok!(send_xcm::<XcmBridgeHubRouter>(
563-
MultiLocation::new(
564-
2,
565-
X2(GlobalConsensus(BridgedNetworkId::get()), Parachain(1000))
566-
),
557+
Location::new(2, [GlobalConsensus(BridgedNetworkId::get()), Parachain(1000)]),
567558
vec![ClearOrigin].into(),
568559
)
569560
.map(drop));

bridges/modules/xcm-bridge-hub-router/src/mock.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ construct_runtime! {
4949
parameter_types! {
5050
pub ThisNetworkId: NetworkId = Polkadot;
5151
pub BridgedNetworkId: NetworkId = Kusama;
52-
pub UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(ThisNetworkId::get()), Parachain(1000));
53-
pub SiblingBridgeHubLocation: MultiLocation = ParentThen(X1(Parachain(1002))).into();
54-
pub BridgeFeeAsset: AssetId = MultiLocation::parent().into();
52+
pub UniversalLocation: InteriorLocation = [GlobalConsensus(ThisNetworkId::get()), Parachain(1000)].into();
53+
pub SiblingBridgeHubLocation: Location = ParentThen([Parachain(1002)].into()).into();
54+
pub BridgeFeeAsset: AssetId = Location::parent().into();
5555
pub BridgeTable: Vec<NetworkExportTableItem>
5656
= vec![
5757
NetworkExportTableItem::new(
@@ -61,7 +61,7 @@ parameter_types! {
6161
Some((BridgeFeeAsset::get(), BASE_FEE).into())
6262
)
6363
];
64-
pub UnknownXcmVersionLocation: MultiLocation = MultiLocation::new(2, X2(GlobalConsensus(BridgedNetworkId::get()), Parachain(9999)));
64+
pub UnknownXcmVersionLocation: Location = Location::new(2, [GlobalConsensus(BridgedNetworkId::get()), Parachain(9999)]);
6565
}
6666

6767
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
@@ -87,11 +87,11 @@ impl pallet_xcm_bridge_hub_router::Config<()> for TestRuntime {
8787
}
8888

8989
pub struct LatestOrNoneForLocationVersionChecker<Location>(sp_std::marker::PhantomData<Location>);
90-
impl<Location: Contains<MultiLocation>> GetVersion
91-
for LatestOrNoneForLocationVersionChecker<Location>
90+
impl<LocationValue: Contains<Location>> GetVersion
91+
for LatestOrNoneForLocationVersionChecker<LocationValue>
9292
{
93-
fn get_version_for(dest: &MultiLocation) -> Option<XcmVersion> {
94-
if Location::contains(dest) {
93+
fn get_version_for(dest: &Location) -> Option<XcmVersion> {
94+
if LocationValue::contains(dest) {
9595
return None
9696
}
9797
Some(XCM_VERSION)
@@ -110,7 +110,7 @@ impl SendXcm for TestToBridgeHubSender {
110110
type Ticket = ();
111111

112112
fn validate(
113-
_destination: &mut Option<MultiLocation>,
113+
_destination: &mut Option<Location>,
114114
_message: &mut Option<Xcm<()>>,
115115
) -> SendResult<Self::Ticket> {
116116
Ok(((), (BridgeFeeAsset::get(), HRMP_FEE).into()))

bridges/modules/xcm-bridge-hub/src/exporter.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ where
5353
fn validate(
5454
network: NetworkId,
5555
channel: u32,
56-
universal_source: &mut Option<InteriorMultiLocation>,
57-
destination: &mut Option<InteriorMultiLocation>,
56+
universal_source: &mut Option<InteriorLocation>,
57+
destination: &mut Option<InteriorLocation>,
5858
message: &mut Option<Xcm<()>>,
59-
) -> Result<(Self::Ticket, MultiAssets), SendError> {
59+
) -> Result<(Self::Ticket, Assets), SendError> {
6060
// Find supported lane_id.
6161
let sender_and_lane = Self::lane_for(
6262
universal_source.as_ref().ok_or(SendError::MissingArgument)?,
@@ -134,11 +134,11 @@ mod tests {
134134
use frame_support::assert_ok;
135135
use xcm_executor::traits::export_xcm;
136136

137-
fn universal_source() -> InteriorMultiLocation {
138-
X2(GlobalConsensus(RelayNetwork::get()), Parachain(SIBLING_ASSET_HUB_ID))
137+
fn universal_source() -> InteriorLocation {
138+
[GlobalConsensus(RelayNetwork::get()), Parachain(SIBLING_ASSET_HUB_ID)].into()
139139
}
140140

141-
fn universal_destination() -> InteriorMultiLocation {
141+
fn universal_destination() -> InteriorLocation {
142142
BridgedDestination::get()
143143
}
144144

bridges/modules/xcm-bridge-hub/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,25 @@ pub mod pallet {
4545
BridgeMessagesConfig<Self::BridgeMessagesPalletInstance>
4646
{
4747
/// Runtime's universal location.
48-
type UniversalLocation: Get<InteriorMultiLocation>;
48+
type UniversalLocation: Get<InteriorLocation>;
4949
// TODO: https://github.com/paritytech/parity-bridges-common/issues/1666 remove `ChainId` and
5050
// replace it with the `NetworkId` - then we'll be able to use
5151
// `T as pallet_bridge_messages::Config<T::BridgeMessagesPalletInstance>::BridgedChain::NetworkId`
5252
/// Bridged network as relative location of bridged `GlobalConsensus`.
5353
#[pallet::constant]
54-
type BridgedNetwork: Get<MultiLocation>;
54+
type BridgedNetwork: Get<Location>;
5555
/// Associated messages pallet instance that bridges us with the
5656
/// `BridgedNetworkId` consensus.
5757
type BridgeMessagesPalletInstance: 'static;
5858

5959
/// Price of single message export to the bridged consensus (`Self::BridgedNetworkId`).
60-
type MessageExportPrice: Get<MultiAssets>;
60+
type MessageExportPrice: Get<Assets>;
6161
/// Checks the XCM version for the destination.
6262
type DestinationVersion: GetVersion;
6363

6464
/// Get point-to-point links with bridged consensus (`Self::BridgedNetworkId`).
6565
/// (this will be replaced with dynamic on-chain bridges - `Bridges V2`)
66-
type Lanes: Get<sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorMultiLocation))>>;
66+
type Lanes: Get<sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))>>;
6767
/// Support for point-to-point links
6868
/// (this will be replaced with dynamic on-chain bridges - `Bridges V2`)
6969
type LanesSupport: XcmBlobHauler;
@@ -86,10 +86,10 @@ pub mod pallet {
8686
impl<T: Config<I>, I: 'static> Pallet<T, I> {
8787
/// Returns dedicated/configured lane identifier.
8888
pub(crate) fn lane_for(
89-
source: &InteriorMultiLocation,
90-
dest: (&NetworkId, &InteriorMultiLocation),
89+
source: &InteriorLocation,
90+
dest: (&NetworkId, &InteriorLocation),
9191
) -> Option<SenderAndLane> {
92-
let source = source.relative_to(&T::UniversalLocation::get());
92+
let source = source.clone().relative_to(&T::UniversalLocation::get());
9393

9494
// Check that we have configured a point-to-point lane for 'source' and `dest`.
9595
T::Lanes::get()

0 commit comments

Comments
 (0)