Skip to content
  1. Jan 16, 2024
    • Francisco Aguirre's avatar
      XCMv4 (#1230) · 8428f678
      Francisco Aguirre authored
      
      
      # 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: default avatarKeith Yeung <[email protected]>
      8428f678
    • Bastian Köcher's avatar
      Some random fixes (#2936) · 1c2db174
      Bastian Köcher authored
      - Do not disable `std` feature in the integration tests
      - `contracts-fixtures` test should only check for `riscv` build when the
      feature is enabled
      1c2db174
  2. Jan 15, 2024
  3. Jan 12, 2024
  4. Jan 09, 2024
  5. Jan 08, 2024
  6. Jan 07, 2024
    • Bastian Köcher's avatar
      pallet-contracts-fixtures: Only build RISCV when the feature is enabled (#2870) · 745c02c5
      Bastian Köcher authored
      This disables building the RISCV fixtures by default. They still require
      a custom build rustc version. When there are actual tests for RISCV, the
      feature can be enabled in CI. Also fixes some unwraps that assume again
      that people are using rustup...
      745c02c5
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 4 updates (#2865) · 204fe7ff
      dependabot[bot] authored
      
      
      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="https://github.com/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: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      204fe7ff
  7. Jan 04, 2024
  8. Dec 28, 2023
    • Jun Jiang's avatar
      a813e4da
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 2 updates (#2810) · 00cb41b9
      dependabot[bot] authored
      
      
      Bumps the known_good_semver group with 2 updates:
      [syn](https://github.com/dtolnay/syn) and
      [serde_yaml](https://github.com/dtolnay/serde-yaml).
      
      Updates `syn` from 2.0.41 to 2.0.43
      <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.43</h2>
      <ul>
      <li>Insert trailing comma if not already present when printing a 1-tuple
      in pattern position (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1553">#1553</a>)</li>
      </ul>
      <h2>2.0.42</h2>
      <ul>
      <li>Documentation improvements</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/syn/commit/95ee05214030f936b8db3ee295188d5dc2c89621"><code>95ee052</code></a>
      Release 2.0.43</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/7383e81b1ab6f9983692ebd9d6caa54aeff8fb85"><code>7383e81</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1559">#1559</a>
      from dtolnay/pattuple</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/712fde5a6fce0e7bee3615ab5c7545ce442bf034"><code>712fde5</code></a>
      Fix ToTokens for PatTuple to insert trailing comma</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/ed9b94e3395cffb33db4254439e23dbc3a2e9e43"><code>ed9b94e</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1558">#1558</a>
      from dtolnay/tupletests</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/ec8517b33c137c48c38b74ba5be21815763a50f5"><code>ec8517b</code></a>
      Add tuple comma tests</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/3cf16c76bdbe4e16261a167592a77edab853c6aa"><code>3cf16c7</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1557">#1557</a>
      from dtolnay/snapshotparsequote</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/553549ff12358a6ad95baaed2601a9dab541d693"><code>553549f</code></a>
      Generalize snapshot parsing to types that do not implement Parse</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/f9ad833e4a77c61003861f4e14d16b10b9708f9e"><code>f9ad833</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1556">#1556</a>
      from dtolnay/punctuatedsnapshot</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/131b40ba2904ec8755bb34466f369072dc34d588"><code>131b40b</code></a>
      Debug impl for punctuated::Pairs superseded by Punctuated</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/3f12d652a8871955a7e27e0369933288bc387dd5"><code>3f12d65</code></a>
      Include punctuation tokens in snapshot tests containing Punctuated</li>
      <li>Additional commits viewable in <a
      href="https://github.com/dtolnay/syn/compare/2.0.41...2.0.43">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      Updates `serde_yaml` from 0.9.27 to 0.9.29
      <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.29</h2>
      <ul>
      <li>Turn on <code>deny(unsafe_op_in_unsafe_fn)</code> lint</li>
      </ul>
      <h2>0.9.28</h2>
      <ul>
      <li>Update <code>unsafe-libyaml</code> dependency to pull in unaligned
      write fix</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/serde-yaml/commit/b957d2b15d7f3d96279997800fa0610b41b8fe00"><code>b957d2b</code></a>
      Release 0.9.29</li>
      <li><a
      href="https://github.com/dtolnay/serde-yaml/commit/007fc2d5c1987847a0f1ac95885c56f8e6e5f808"><code>007fc2d</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/serde-yaml/issues/401">#401</a>
      from dtolnay/unsafeop</li>
      <li><a
      href="https://github.com/dtolnay/serde-yaml/commit/5bac2475b0017d6a635d641df17165d71b951f0e"><code>5bac247</code></a>
      Fill in unsafe blocks inside unsafe functions</li>
      <li><a
      href="https://github.com/dtolnay/serde-yaml/commit/0f6dba18ab8db598c4963e9242afd490ee0202f0"><code>0f6dba1</code></a>
      Turn on deny(unsafe_op_in_unsafe_fn)</li>
      <li><a
      href="https://github.com/dtolnay/serde-yaml/commit/1b6e44837f0db0a1c15537311fed3579a7e8c6d2"><code>1b6e448</code></a>
      Release 0.9.28</li>
      <li><a
      href="https://github.com/dtolnay/serde-yaml/commit/ec1a3145d7b6b809f7b3aa2d9dcd7db30f0588d4"><code>ec1a314</code></a>
      Force unsafe-libyaml version that contains unaligned write fix</li>
      <li><a
      href="https://github.com/dtolnay/serde-yaml/commit/a6b2dc075a6eb1bed0d927df7b7ac2bb288f3bb4"><code>a6b2dc0</code></a>
      Update name of blocks_in_if_conditions clippy lint</li>
      <li>See full diff in <a
      href="https://github.com/dtolnay/serde-yaml/compare/0.9.27...0.9.29">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: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      00cb41b9
  9. Dec 20, 2023
    • Dónal Murray's avatar
      Fix clippy lints behind feature gates and add new CI step all features (#2569) · d68868f6
      Dónal Murray authored
      
      
      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: default avatarLiam Aharon <[email protected]>
      d68868f6
  10. Dec 18, 2023
  11. Dec 14, 2023
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 1 update (#2698) · 19984f22
      dependabot[bot] authored
      
      
      Bumps the known_good_semver group with 1 update:
      [syn](https://github.com/dtolnay/syn).
      
      Updates `syn` from 2.0.40 to 2.0.41
      <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.41</h2>
      <ul>
      <li>Support parsing syn::Field in <code>parse_quote!</code> (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1548">#1548</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/syn/commit/63b17012ab20ff72f3e49aaf821719a866b1a352"><code>63b1701</code></a>
      Release 2.0.41</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/920ab7d6a061921d03541d86d7ac8daaf864bb7b"><code>920ab7d</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1548">#1548</a>
      from dtolnay/parsequotefield</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/5e1592408c3bcda68db10cd054f9d87e9e480f9b"><code>5e15924</code></a>
      Test parse_quote implementation for Field</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/c268c6793f8a71ac2f3e8ee80201701e4352b407"><code>c268c67</code></a>
      Support parsing Field in parse_quote</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/2ab0f6ae4b47d133c828d9123e86a50565a95447"><code>2ab0f6a</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1547">#1547</a>
      from dtolnay/testparsequote</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/46172a41a478920ff23c9e370a5b922fa984829d"><code>46172a4</code></a>
      Add parse_quote tests</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/0fcdad044f330f4c32e2f3b1230271669d1951ea"><code>0fcdad0</code></a>
      Support punctuated Pairs iterator in snapshot tests</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/06161ba80283edf6f741dfc86c91f6985297d168"><code>06161ba</code></a>
      Update test suite to nightly-2023-12-12</li>
      <li>See full diff in <a
      href="https://github.com/dtolnay/syn/compare/2.0.40...2.0.41">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=syn&package-manager=cargo&previous-version=2.0.40&new-version=2.0.41)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
      
      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: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      19984f22
    • Francisco Aguirre's avatar
      Add FungibleAdapter (#2684) · 10a91f82
      Francisco Aguirre authored
      In the move from the old `Currency` traits to the new `fungible/s`
      family of traits, we already had the `FungiblesAdapter` and
      `NonFungiblesAdapter` for multiple fungible and non fungible assets
      respectively. However, for handling only one fungible asset, we were
      missing a `FungibleAdapter`, and so used the old `CurrencyAdapter`
      instead. This PR aims to fill in that gap, and provide the new adapter
      for more updated examples.
      
      I marked the old `CurrencyAdapter` as deprecated as part of this PR, and
      I'll change it to the new `FungibleAdapter` in a following PR.
      The two stages are separated so as to not bloat this PR with some name
      fixes in tests.
      
      ---------
      
      Co-authored-by: command-bot <>
      10a91f82
  12. Dec 13, 2023
  13. Dec 12, 2023
    • Branislav Kontur's avatar
      [ci] Add `-D warnings` for `cargo-check-each-crate` job to fail on warnings (#2670) · d18a682b
      Branislav Kontur authored
      ## Summary
      
      This PR turns on `-D warnings` for `cargo-check-each-crate job` job to
      fail on warnings e.g. like this:
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673130
      
      Before this PR, there was a warning and `cargo-check-each-crate` job did
      not fail:
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4641444
      ```
      warning: unused import: `ToTokens`
        --> substrate/primitives/api/proc-macro/src/utils.rs:22:34
         |
      22 | use quote::{format_ident, quote, ToTokens};
         |                                  ^^^^^^^^
         |
         = note: `#[warn(unused_imports)]` on by default
      warning: `sp-api-proc-macro` (lib) generated 1 warning (run `cargo fix --lib -p sp-api-proc-macro` to apply 1 suggestion)
      ```
      
      Fixes on the way:
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4641444
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673265
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673410
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673681
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673836
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673941
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4674256
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4679328
      
      
      
      ## Questions
      - [ ] why does this check triggers only `cargo check --locked`?
      `--all-features` or `--all-targets` are not needed? Or aren't they
      avoided intentionally?
      
      ---------
      
      Co-authored-by: command-bot <>
      d18a682b
  14. Dec 11, 2023
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 2 updates (#2675) · 7b416d84
      dependabot[bot] authored
      
      
      Bumps the known_good_semver group with 2 updates:
      [clap](https://github.com/clap-rs/clap) and
      [syn](https://github.com/dtolnay/syn).
      
      Updates `clap` from 4.4.10 to 4.4.11
      <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.11</h2>
      <h2>[4.4.11] - 2023-12-04</h2>
      <h3>Features</h3>
      <ul>
      <li>Add <code>Command::mut_group</code></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.11] - 2023-12-04</h2>
      <h3>Features</h3>
      <ul>
      <li>Add <code>Command::mut_group</code></li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/clap-rs/clap/commit/d092896d61fd73a5467db85eac035a9ce2ddbc60"><code>d092896</code></a>
      chore: Release</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/c76a713f8bd40a54a58e8c1d2300a6792f1b79d5"><code>c76a713</code></a>
      chore: Update lockfile</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/b99d17bb0b78b667659982252e8973174e93ae7d"><code>b99d17b</code></a>
      docs: Update changelog</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/b47f8da4d857dd653915ce772757d4b996a36477"><code>b47f8da</code></a>
      Merge pull request <a
      href="https://redirect.github.com/clap-rs/clap/issues/5247">#5247</a>
      from epage/group</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/2e7c9d11a84b5008e2b42b4df323557a31bb0337"><code>2e7c9d1</code></a>
      Merge pull request <a
      href="https://redirect.github.com/clap-rs/clap/issues/5194">#5194</a>
      from c19/patch-1</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/37917be0b75d5cd667cd37db6ea5c6bac837c674"><code>37917be</code></a>
      feat: Add Command::mut_group</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/cf7a0272cc1d55d139983d4408e8bedab51338ad"><code>cf7a027</code></a>
      chore: Update from '_rust/main'</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/8c836eaa9d9279df467991a3b8463d748b515a0a"><code>8c836ea</code></a>
      Merge pull request <a
      href="https://redirect.github.com/clap-rs/clap/issues/10">#10</a> from
      epage/renovate/migrate-config</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/598c6244983fb392457f3fbec9badf25fab6d051"><code>598c624</code></a>
      chore(config): migrate config .github/renovate.json5</li>
      <li>See full diff in <a
      href="https://github.com/clap-rs/clap/compare/v4.4.10...v4.4.11">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      Updates `syn` from 2.0.39 to 2.0.40
      <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.40</h2>
      <ul>
      <li>Fix some edge cases of handling None-delimited groups in expression
      parser (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1539">#1539</a>, <a
      href="https://redirect.github.com/dtolnay/syn/issues/1541">#1541</a>, <a
      href="https://redirect.github.com/dtolnay/syn/issues/1542">#1542</a>, <a
      href="https://redirect.github.com/dtolnay/syn/issues/1543">#1543</a>, <a
      href="https://redirect.github.com/dtolnay/syn/issues/1544">#1544</a>, <a
      href="https://redirect.github.com/dtolnay/syn/issues/1545">#1545</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/syn/commit/cf7f40a96a7329fb4215a7a1d8d9e7c93439b169"><code>cf7f40a</code></a>
      Release 2.0.40</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/1ce8ccf5cd92824d1058019c0ae95b0616f6ac01"><code>1ce8ccf</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1538">#1538</a>
      from dtolnay/testinvisible</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/d06bff8883e794c0d9d5fe2998210dec113b6eff"><code>d06bff8</code></a>
      Add test for parsing Delimiter::None in expressions</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/9ec66d42bba0da0041ab6448604b72f673e185f1"><code>9ec66d4</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1545">#1545</a>
      from dtolnay/groupedlet</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/384621acc640779ee4a8250317c26a42e8ceef90"><code>384621a</code></a>
      Fix None-delimited let expression in stmt position</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/5325b6d1711c1c9c6787cb6239b472b5f8b5daaf"><code>5325b6d</code></a>
      Add test of let expr surrounded in None-delimited group</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/0ddfc27cf79573db0b5533c583ff895e9c7f3f72"><code>0ddfc27</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1544">#1544</a>
      from dtolnay/nonedelimloop</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/9c99b3f62ecebb2ac22f8ed99039934b0a18d0e6"><code>9c99b3f</code></a>
      Fix stmt boundary after None-delimited group containing loop</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/2781584ea868cce6c9ae750bc442e3b4b2dfd887"><code>2781584</code></a>
      Add test of None-delimited group containing loop in match arm</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/d33292808432c8530b53c951f2780d7128c4bd0b"><code>d332928</code></a>
      Simplify token stream construction in Delimiter::None tests</li>
      <li>Additional commits viewable in <a
      href="https://github.com/dtolnay/syn/compare/2.0.39...2.0.40">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: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      7b416d84
  15. Dec 08, 2023
  16. Dec 04, 2023
  17. Dec 01, 2023
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 1 update (#2575) · 87a73e7a
      dependabot[bot] authored
      
      
      Bumps the known_good_semver group with 1 update:
      [syn](https://github.com/dtolnay/syn).
      
      Updates `syn` from 2.0.38 to 2.0.39
      <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.39</h2>
      <ul>
      <li>Fix parsing of return expression in match guards (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1528">#1528</a>)</li>
      <li>Improve error message on labeled loop as value expression for break
      (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1531">#1531</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/syn/commit/924217c1734c085ee6cdb5e198d36d610c234313"><code>924217c</code></a>
      Release 2.0.39</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/95aeeb559866368d8b910d388c8e04b96083666a"><code>95aeeb5</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1531">#1531</a>
      from dtolnay/breaklabel</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/b88f86fae5c1ac284179181bf7a34549e6d96d7c"><code>b88f86f</code></a>
      Ignore single_element_loop clippy lint in test</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/a876185366557cb0e0e175c3be48721c8cc0d8e6"><code>a876185</code></a>
      Improve error on break followed by labeled loop</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/32ab9794d6b75248c1946ae18baab12a46137eb0"><code>32ab979</code></a>
      Add test of ambiguous label parsing in break</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/6f658f88a213e25b7ac7ec2dc77c537de679b745"><code>6f658f8</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1530">#1530</a>
      from dtolnay/canbeginexpr</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/20497e1a555812cfe05769b4d8c117c4e0e4edbd"><code>20497e1</code></a>
      More precise decision to parse expression after return keyword</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/c6a651aa12447d50c22db3189ef38cff90fc267b"><code>c6a651a</code></a>
      Update name of ExprReturn parse function to match variant name</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/c2745901009f7d65e7b708cd80031642038f765e"><code>c274590</code></a>
      Indicate that peek argument refers to syn::Ident</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/3e67cb0c660fc906770d212465652bfeb7a75727"><code>3e67cb0</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1529">#1529</a>
      from dtolnay/up</li>
      <li>Additional commits viewable in <a
      href="https://github.com/dtolnay/syn/compare/2.0.38...2.0.39">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=syn&package-manager=cargo&previous-version=2.0.38&new-version=2.0.39)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
      
      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: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      87a73e7a
    • Andrew Jones's avatar
      Contracts: make benchmark dependencies optional in `std` feature (#2576) · dfd7b15e
      Andrew Jones authored
      `wasm-instrument` and `rand` are optional and only used in benchmarking,
      so should not be pulled in by default as part of the `std` feature.
      dfd7b15e
    • Liam Aharon's avatar
      Enforce consistent and correct toml formatting (#2518) · 4a293bc5
      Liam Aharon authored
      Using taplo, fixes all our broken and inconsistent toml formatting and
      adds CI to keep them tidy.
      
      If people want we can customise the format rules as described here
      https://taplo.tamasfe.dev/configuration/formatter-options.html
      
      @ggwpez
      
      , I suggest zepter is used only for checking features are
      propagated, and leave formatting for taplo to avoid duplicate work and
      conflicts.
      
      TODO
      - [x] Use `exclude = [...]` syntax in taplo file to ignore zombienet
      tests instead of deleting the dir
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      4a293bc5
  18. Nov 29, 2023
    • PG Herveou's avatar
      Contracts: use compiled rust tests (#2347) · 2135fa87
      PG Herveou authored
      
      
      see #2189
      
      This PR does the following:
      - Bring the user api functions into a new pallet-contracts-uapi (They
      are currently defined in ink!
      [here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs)
      - Add older api versions and unstable to the user api trait.
      - Remove pallet-contracts-primitives and bring the types it defined in
      uapi / pallet-contracts
      - Add the infrastructure to build fixtures from Rust files and test it
      works by replacing `dummy.wat` and `call.wat`
      - Move all the doc from wasm/runtime.rs to pallet-contracts-uapi.
      
      This will be done in a follow up:
      - convert the rest of the test from .wat to rust
      - bring risc-v uapi up to date with wasm
      - finalize the uapi host fns, making sure everything is codegen from the
      source host fns in pallet-contracts
      
      ---------
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      2135fa87
  19. Nov 28, 2023
    • Aaro Altonen's avatar
      Rework the event system of `sc-network` (#1370) · e71c484d
      Aaro Altonen authored
      
      
      This commit introduces a new concept called `NotificationService` which
      allows Polkadot protocols to communicate with the underlying
      notification protocol implementation directly, without routing events
      through `NetworkWorker`. This implies that each protocol has its own
      service which it uses to communicate with remote peers and that each
      `NotificationService` is unique with respect to the underlying
      notification protocol, meaning `NotificationService` for the transaction
      protocol can only be used to send and receive transaction-related
      notifications.
      
      The `NotificationService` concept introduces two additional benefits:
        * allow protocols to start using custom handshakes
        * allow protocols to accept/reject inbound peers
      
      Previously the validation of inbound connections was solely the
      responsibility of `ProtocolController`. This caused issues with light
      peers and `SyncingEngine` as `ProtocolController` would accept more
      peers than `SyncingEngine` could accept which caused peers to have
      differing views of their own states. `SyncingEngine` would reject excess
      peers but these rejections were not properly communicated to those peers
      causing them to assume that they were accepted.
      
      With `NotificationService`, the local handshake is not sent to remote
      peer if peer is rejected which allows it to detect that it was rejected.
      
      This commit also deprecates the use of `NetworkEventStream` for all
      notification-related events and going forward only DHT events are
      provided through `NetworkEventStream`. If protocols wish to follow each
      other's events, they must introduce additional abtractions, as is done
      for GRANDPA and transactions protocols by following the syncing protocol
      through `SyncEventStream`.
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/512
      Fixes https://github.com/paritytech/polkadot-sdk/issues/514
      Fixes https://github.com/paritytech/polkadot-sdk/issues/515
      Fixes https://github.com/paritytech/polkadot-sdk/issues/554
      Fixes https://github.com/paritytech/polkadot-sdk/issues/556
      
      ---
      These changes are transferred from
      https://github.com/paritytech/substrate/pull/14197 but there are no
      functional changes compared to that PR
      
      ---------
      
      Co-authored-by: default avatarDmitry Markin <[email protected]>
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      e71c484d
    • gupnik's avatar
      Moves all test runtimes to use `derive_impl` (#2409) · cd8741c8
      gupnik authored
      
      
      Step in https://github.com/paritytech/polkadot-sdk/issues/171
      
      This PR adds `derive_impl` on all `frame_system` config impls for mock
      runtimes. The overridden configs are maintained as of now to ensure
      minimal changes.
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      cd8741c8
  20. Nov 23, 2023
  21. Nov 14, 2023
  22. Nov 10, 2023
  23. Nov 02, 2023
    • Piotr Mikołajczyk's avatar
      Make `ExecResult` encodable (#1809) · 10857d0b
      Piotr Mikołajczyk authored
      # Description
      We derive few useful traits on `ErrorOrigin` and `ExecError`, including
      `codec::Encode` and `codec::Decode`, so that `ExecResult` is
      en/decodable as well. This is required for a contract mocking feature
      (already prepared in drink:
      https://github.com/Cardinal-Cryptography/drink/pull/61). In more detail:
      `ExecResult` must be passed from runtime extension, through runtime
      interface, back to the pallet, which requires that it is serializable to
      bytes in some form (or implements some rare, auxiliary traits).
      
      **Impact on runtime size**: Since most of these traits is used directly
      in the pallet now, compiler should be able to throw it out (and thus we
      bring no new overhead). However, they are very useful in secondary tools
      like drink or other testing libraries.
      
      # Checklist
      
      - [x] My PR includes a detailed description as outlined in the
      "Description" section above
      - [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
      of this project (at minimum one label for `T`
        required)
      - [x] I have made corresponding changes to the documentation (if
      applicable)
      - [x] I have added tests that prove my fix is effective or that my
      feature works (if applicable)
      10857d0b
  24. Oct 31, 2023
  25. Oct 30, 2023
    • Liam Aharon's avatar
      contracts migration: remove unnecessary panics (#2079) · ad5163ba
      Liam Aharon authored
      Runtime migration CI is currently failing
      (https://gitlab.parity.io/parity/mirrors/polkadot-sdk/builds/4122083)
      for the contracts testnet due to unnecessary panicing in a `pre_upgrade`
      hook.
      
      Soon idempotency will be enforced
      https://github.com/paritytech/try-runtime-cli/issues/42, in the mean
      time we need to manually fix these issues as they arise.
      
      ---
      
      also removes backticks from the string in `echo`, which caused a
      'command not found' error in ci output
      ad5163ba
  26. Oct 25, 2023
  27. Oct 24, 2023
    • Kian Paimani's avatar
      Ensure correct variant count in `Runtime[Hold/Freeze]Reason` (#1900) · 35eb133b
      Kian Paimani authored
      
      
      closes https://github.com/paritytech/polkadot-sdk/issues/1882
      
      ## Breaking Changes
      
      This PR introduces a new item to `pallet_balances::Config`:
      
      ```diff
      trait Config {
      ++    type RuntimeFreezeReasons;
      }
      ```
      
      This value is only used to check it against `type MaxFreeze`. A similar
      check has been added for `MaxHolds` against `RuntimeHoldReasons`, which
      is already given to `pallet_balances`.
      
      In all contexts, you should pass the real `RuntimeFreezeReasons`
      generated by `construct_runtime` to `type RuntimeFreezeReasons`. Passing
      `()` would also work, but it would imply that the runtime uses no
      freezes at all.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      35eb133b
  28. Oct 20, 2023
    • Bastian Köcher's avatar
      `xcm`: Change `TypeInfo::path` to not include `staging` (#1948) · f3bf5c1a
      Bastian Köcher authored
      
      
      The `xcm` crate was renamed to `staging-xcm` to be able to publish it to
      crates.io as someone as squatted `xcm`. The problem with this rename is
      that the `TypeInfo` includes the crate name which ultimately lands in
      the metadata. The metadata is consumed by downstream users like
      `polkadot-js` or people building on top of `polkadot-js`. These people
      are using the entire `path` to find the type in the type registry. Thus,
      their code would break as the type path would now be [`staging_xcm`,
      `VersionedXcm`] instead of [`xcm`, `VersionedXcm`]. This pull request
      fixes this by renaming the path segment `staging_xcm` to `xcm`.
      
      This requires: https://github.com/paritytech/scale-info/pull/197
      
      ---------
      
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      f3bf5c1a
  29. Oct 11, 2023
  30. Oct 06, 2023
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 1 update (#1802) · ddf5e5c0
      dependabot[bot] authored
      
      
      Bumps the known_good_semver group with 1 update:
      [syn](https://github.com/dtolnay/syn).
      
      <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.38</h2>
      <ul>
      <li>Fix <em>&quot;method 'peek' has an incompatible type for
      trait&quot;</em> error when defining <code>bool</code> as a custom
      keyword (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1518">#1518</a>,
      thanks <a
      href="https://github.com/Vanille-N"><code>@​Vanille-N</code></a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/syn/commit/43632bfb6c78ee1f952645a268ab1ac4af162977"><code>43632bf</code></a>
      Release 2.0.38</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/abd2c214b44da64a5e420d72919308300eebc23d"><code>abd2c21</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1518">#1518</a>
      from Vanille-N/master</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/6701e6077e15013ef34b15e3ffdae2657e499d83"><code>6701e60</code></a>
      Absolute path to <code>bool</code> in
      <code>custom_punctuation.rs</code></li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/7313d242398111423f046386aa0a75548f63d236"><code>7313d24</code></a>
      Resolve single_match_else pedantic clippy lint in code generator</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/67ab64f3c09e17b23493c7cda498e7edb8830f21"><code>67ab64f</code></a>
      Include unexpected token in the test failure message</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/137ae33486de3f2652487f8f64436ad1429df496"><code>137ae33</code></a>
      Check no remaining token after the first literal</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/258e9e8a11d188c1ee1ffb2b069819239999f9ac"><code>258e9e8</code></a>
      Ignore single_match_else pedantic clippy lint in test</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/92fd50ee8cb52968d9c66fbe6d67638c1f838e26"><code>92fd50e</code></a>
      Test docs.rs documentation build in CI</li>
      <li>See full diff in <a
      href="https://github.com/dtolnay/syn/compare/2.0.37...2.0.38">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=syn&package-manager=cargo&previous-version=2.0.37&new-version=2.0.38)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
      
      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: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      ddf5e5c0
  31. Sep 29, 2023
    • Sebastian Kunert's avatar
      9485b0b4
    • Piotr Mikołajczyk's avatar
      Enable mocking contracts (#1331) · d8d90a82
      Piotr Mikołajczyk authored
      # Description
      This PR introduces two changes:
      - the previous `Tracing` trait has been modified to accept contract
      address instead of code hash (seems to be way more convenient)
      - a new trait `CallInterceptor` that allows intercepting contract calls;
      in particular the default implementation for `()` will just proceed in a
      standard way (after compilation optimizations, there will be no
      footprint of that); however, implementing type might decide to mock
      invocation and return `ExecResult` instead
      
      Note: one might try merging `before_call` and `intercept_call`. However,
      IMHO this would be bad, since it would mix two completely different
      abstractions - tracing without any effects and actual intervention into
      execution process.
      
      This will unblock working on mocking contracts utility in drink and
      similar tools (https://github.com/Cardinal-Cryptography/drink/issues/33)
      
      # Checklist
      
      - [x] My PR includes a detailed description as outlined in the
      "Description" section above
      - [ ] My PR follows the [labeling
      requirements](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md#process)
      of this project (at minimum one label for `T` required)
      - [x] I have made corresponding changes to the documentation (if
      applicable)
      - [x] I have added tests that prove my fix is effective or that my
      feature works (if applicable)
      d8d90a82