Skip to content
Snippets Groups Projects
  1. Jun 27, 2024
  2. Jun 26, 2024
  3. Jun 25, 2024
  4. Jun 24, 2024
    • dashangcun's avatar
    • Muharem Ismailov's avatar
      treasury pallet: remove unused config parameters (#4831) · 5e62782d
      Muharem Ismailov authored
      Remove unused config parameters `ApproveOrigin` and `OnSlash` from the
      treasury pallet. Add `OnSlash` config parameter to the bounties and tips
      pallets.
      
      part of https://github.com/paritytech/polkadot-sdk/issues/3800
    • Oliver Tale-Yazdi's avatar
      CI quick-checks: Pull Rust deps in advance (#4867) · 10b68db9
      Oliver Tale-Yazdi authored
      
      Pull the Rust dependencies in advance to see if there is an issue with
      timeouts.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    • Muharem Ismailov's avatar
      pallet ranked collective: max member count per rank (#4807) · 0b11c27e
      Muharem Ismailov authored
      Configuration for the maximum member count per rank, with the option for
      no limit.
    • Oliver Tale-Yazdi's avatar
      Lift all dependencies (the big one) (#4716) · 8efa0544
      Oliver Tale-Yazdi authored
      
      After preparing in https://github.com/paritytech/polkadot-sdk/pull/4633,
      we can lift also all internal dependencies up to the workspace.
      
      This does not actually change anything, but uses `workspace = true` for
      all dependencies. You can check it with:
      ```bash
      git checkout -q $(git merge-base oty-lift-all-deps origin/master)
      cargo tree -e features > master.out
      
      git checkout -q oty-lift-all-deps
      cargo tree -e features > new.out
      diff master.out new.out
      ```
      
      It did not yet lift 100% of dependencies, some inside of `target.*` or
      some that had conflicting aliases introduced recently. But i will do
      these together in a follow-up with CI checks.
      
      Can be reproduced with [zepter](https://github.com/ggwpez/zepter/):
      `zepter transpose d lift-to-workspace "regex:.*" --version-resolver
      highest --skip-package "polkadot-sdk" --ignore-errors --fix`.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    • Bastian Köcher's avatar
      Ensure earliest allowed block is at minimum the next block (#4823) · b7767168
      Bastian Köcher authored
      When `min_enactment_period == 0` and `desired == At(n)` where `n` is
      smaller than the current block number, the scheduling would fail. This
      happened for example here:
      https://collectives.subsquare.io/fellowship/referenda/126
      
      To ensure that this doesn't happen again, ensure that the earliest
      allowed block is at minimum the next block.
    • Deepak Chaudhary's avatar
      pallet-membership should implement ContainsLengthBound (#4865) · fed81f7e
      Deepak Chaudhary authored
      
      ### ISSUE
      Link to the issue:
      https://github.com/paritytech/polkadot-sdk/issues/1143
      
      Deliverables
       - Implement trait `ContainsLengthBound` for pallet-membership
       
      
      ### Test Outcomes
      ___
      Successful tests by running `cargo test -p pallet-membership --features
      runtime-benchmarks`
      
      
      
      running 22 tests
      test tests::__construct_runtime_integrity_test::runtime_integrity_tests
      ... ok
      test benchmark::bench_clear_prime ... ok
      test tests::add_member_works ... ok
      test tests::change_key_with_same_caller_as_argument_changes_nothing ...
      ok
      test tests::change_key_works ... ok
      test benchmark::bench_set_prime ... ok
      test benchmark::bench_remove_member ... ok
      test benchmark::bench_change_key ... ok
      test tests::change_key_works_that_does_not_change_order ... ok
      test benchmark::bench_reset_members ... ok
      test benchmark::bench_add_member ... ok
      test tests::genesis_build_panics_with_duplicate_members - should panic
      ... ok
      test benchmark::bench_swap_member ... ok
      test tests::query_membership_works ... ok
      test tests::prime_member_works ... ok
      test tests::test_genesis_config_builds ... ok
      test tests::remove_member_works ... ok
      test tests::migration_v4 ... ok
      test tests::swap_member_with_identical_arguments_changes_nothing ... ok
      test tests::swap_member_works_that_does_not_change_order ... ok
      test tests::swap_member_works ... ok
      test tests::reset_members_works ... ok
      
      test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
      out; finished in 0.01s
      
         Doc-tests pallet_membership
      
      running 0 tests
      
      test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
      out; finished in 0.00s
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    • Oliver Tale-Yazdi's avatar
  5. Jun 23, 2024
  6. Jun 22, 2024
    • Muharem Ismailov's avatar
      Frame: `Consideration` trait generic over `Footprint` and indicates zero cost (#4596) · 812dbff1
      Muharem Ismailov authored
      `Consideration` trait generic over `Footprint` and indicates zero cost
      for a give footprint.
      
      `Consideration` trait is generic over `Footprint` (currently defined
      over the type with the same name). This makes it possible to setup a
      custom footprint (e.g. current number of proposals in the storage).
      
      `Consideration::new` and `Consideration::update` return an
      `Option<Self>` instead `Self`, this make it possible to indicate a no
      cost for a specific footprint (e.g. if current number of proposals in
      the storage < max_proposal_count / 2 then no cost).
      
      These cases need to be handled for
      https://github.com/paritytech/polkadot-sdk/pull/3151
  7. Jun 21, 2024
    • Bastian Köcher's avatar
      Bump time to fix compilation on latest nightly (#4862) · c4b3c1c6
      Bastian Köcher authored
      Closes: https://github.com/paritytech/polkadot-sdk/issues/4748
    • Dmitry Markin's avatar
      sc-network-types: implement `From<IpAddr> for Multiaddr` (#4855) · 3b3a1d2b
      Dmitry Markin authored
      Add `From` implementation used by downstream project.
      
      Ref.
      https://github.com/paritytech/polkadot-sdk/pull/4198#discussion_r1648676102
      
      CC @nazar-pc
    • Pablo Andrés Dorado Suárez's avatar
      Implement `pallet-assets-freezer` (#3951) · a477bd0b
      Pablo Andrés Dorado Suárez authored
      Closes #3342
      
      cc/ @liamaharon
      
      
      
      TODO:
      
      - [x] Improve docs.
      - [x] Define public interface (See #3342).
        In case we define public calls to the pallet implementation:
        - Implement public calls.
        - Benchmarks.
        
      polkadot address: 12gMhxHw8QjEwLQvnqsmMVY1z5gFa54vND74aMUbhhwN6mJR
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarLiam Aharon <liam.aharon@hotmail.com>
    • Oliver Tale-Yazdi's avatar
      [HRMP] Dont partially modify pages (#4710) · d18d3623
      Oliver Tale-Yazdi authored
      
      Changes:
      - The XCMP queue does not partially modify pages anymore by using
      `try_mutate` instead of `mutate`.
      - The XCMP queue max page size is now the min between the value that the
      relay reports and the local limit.
      
      Thanks to whom pointed this out to me via DM.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    • José Molina Colmenero's avatar
      Do not make pallet-nfts benchmarks signature-dependent (#4756) · 2657cfba
      José Molina Colmenero authored
      This PR:
      
      - Adds extra functionality to pallet-nfts's `BenchmarkHelper` to provide
      signers and sign message.
      - Abstracts away the explicit link with Sr25519 schema in the
      benchmarks, allowing parachains with a different one to be able to run
      them and calculate the weights.
      - Adds a default implementation for the empty tuple that leaves the code
      equivalent.
    • Alexander Samusev's avatar
      [ci] Change storage type for forklift in GHA (#4850) · b301218d
      Alexander Samusev authored
      PR changes forklift authentication to gcs
      
      cc https://github.com/paritytech/ci_cd/issues/987
    • dependabot[bot]'s avatar
      Bump ws from 8.16.0 to 8.17.1 in /bridges/testing/framework/utils/generate_hex_encoded_call (#4825) · a23abb17
      dependabot[bot] authored
      
      Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.1.
      <details>
      <summary>Release notes</summary>
      <p><em>Sourced from <a
      href="https://github.com/websockets/ws/releases">ws's
      releases</a>.</em></p>
      <blockquote>
      <h2>8.17.1</h2>
      <h1>Bug fixes</h1>
      <ul>
      <li>Fixed a DoS vulnerability (<a
      href="https://redirect.github.com/websockets/ws/issues/2231">#2231</a>).</li>
      </ul>
      <p>A request with a number of headers exceeding
      the[<code>server.maxHeadersCount</code>][]
      threshold could be used to crash a ws server.</p>
      <pre lang="js"><code>const http = require('http');
      const WebSocket = require('ws');
      <p>const wss = new WebSocket.Server({ port: 0 }, function () {
      const chars =
      &quot;!#$%&amp;'*+-.0123456789abcdefghijklmnopqrstuvwxyz^_`|~&quot;.split('');
      const headers = {};
      let count = 0;</p>
      <p>for (let i = 0; i &lt; chars.length; i++) {
      if (count === 2000) break;</p>
      <pre><code>for (let j = 0; j &amp;lt; chars.length; j++) {
        const key = chars[i] + chars[j];
        headers[key] = 'x';
      
        if (++count === 2000) break;
      }
      </code></pre>
      <p>}</p>
      <p>headers.Connection = 'Upgrade';
      headers.Upgrade = 'websocket';
      headers['Sec-WebSocket-Key'] = 'dGhlIHNhbXBsZSBub25jZQ==';
      headers['Sec-WebSocket-Version'] = '13';</p>
      <p>const request = http.request({
      headers: headers,
      host: '127.0.0.1',
      port: wss.address().port
      });</p>
      <p>request.end();
      });
      </code></pre></p>
      <p>The vulnerability was reported by <a
      href="https://github.com/rrlapointe">Ryan LaPointe</a> in <a
      href="https://redirect.github.com/websockets/ws/issues/2230">websockets/ws#2230</a>.</p>
      <p>In vulnerable versions of ws, the issue can be mitigated in the
      following ways:</p>
      <ol>
      <li>Reduce the maximum allowed length of the request headers using the
      [<code>--max-http-header-size=size</code>][] and/or the
      [<code>maxHeaderSize</code>][] options so
      that no more headers than the <code>server.maxHeadersCount</code> limit
      can be sent.</li>
      </ol>
      <!-- raw HTML omitted -->
      </blockquote>
      <p>... (truncated)</p>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/websockets/ws/commit/3c56601092872f7d7566989f0e379271afd0e4a1"><code>3c56601</code></a>
      [dist] 8.17.1</li>
      <li><a
      href="https://github.com/websockets/ws/commit/e55e5106f10fcbaac37cfa89759e4cc0d073a52c"><code>e55e510</code></a>
      [security] Fix crash when the Upgrade header cannot be read (<a
      href="https://redirect.github.com/websockets/ws/issues/2231">#2231</a>)</li>
      <li><a
      href="https://github.com/websockets/ws/commit/6a00029edd924499f892aed8003cef1fa724cfe5"><code>6a00029</code></a>
      [test] Increase code coverage</li>
      <li><a
      href="https://github.com/websockets/ws/commit/ddfe4a804d79e7788ab136290e609f91cf68423f"><code>ddfe4a8</code></a>
      [perf] Reduce the amount of <code>crypto.randomFillSync()</code>
      calls</li>
      <li><a
      href="https://github.com/websockets/ws/commit/b73b11828d166e9692a9bffe9c01a7e93bab04a8"><code>b73b118</code></a>
      [dist] 8.17.0</li>
      <li><a
      href="https://github.com/websockets/ws/commit/29694a5905fa703e86667928e6bacac397469471"><code>29694a5</code></a>
      [test] Use the <code>highWaterMark</code> variable</li>
      <li><a
      href="https://github.com/websockets/ws/commit/934c9d6b938b93c045cb13e5f7c19c27a8dd925a"><code>934c9d6</code></a>
      [ci] Test on node 22</li>
      <li><a
      href="https://github.com/websockets/ws/commit/1817bac06e1204bfb578b8b3f4bafd0fa09623d0"><code>1817bac</code></a>
      [ci] Do not test on node 21</li>
      <li><a
      href="https://github.com/websockets/ws/commit/96c9b3deddf56cacb2d756aaa918071e03cdbc42"><code>96c9b3d</code></a>
      [major] Flip the default value of <code>allowSynchronousEvents</code>
      (<a
      href="https://redirect.github.com/websockets/ws/issues/2221">#2221</a>)</li>
      <li><a
      href="https://github.com/websockets/ws/commit/e5f32c7e1e6d3d19cd4a1fdec84890e154db30c1"><code>e5f32c7</code></a>
      [fix] Emit at most one event per event loop iteration (<a
      href="https://redirect.github.com/websockets/ws/issues/2218">#2218</a>)</li>
      <li>Additional commits viewable in <a
      href="https://github.com/websockets/ws/compare/8.16.0...8.17.1">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ws&package-manager=npm_and_yarn&previous-version=8.16.0&new-version=8.17.1)](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 this major version` will close this PR and stop
      Dependabot creating any more for this major version (unless you reopen
      the PR or upgrade to it yourself)
      - `@dependabot ignore this minor version` will close this PR and stop
      Dependabot creating any more for this minor version (unless you reopen
      the PR or upgrade to it yourself)
      - `@dependabot ignore this dependency` will close this PR and stop
      Dependabot creating any more for this dependency (unless you reopen the
      PR or upgrade to it yourself)
      You can disable automated security fix PRs for this repo from the
      [Security Alerts
      page](https://github.com/paritytech/polkadot-sdk/network/alerts).
      
      </details>
      
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
  8. Jun 20, 2024
    • dependabot[bot]'s avatar
      Bump curve25519-dalek from 4.1.2 to 4.1.3 (#4824) · 74decbbd
      dependabot[bot] authored
      
      Bumps
      [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek)
      from 4.1.2 to 4.1.3.
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/5312a0311ec40df95be953eacfa8a11b9a34bc54"><code>5312a03</code></a>
      curve: Bump version to 4.1.3 (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/660">#660</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/b4f9e4df92a4689fb59e312a21f940ba06ba7013"><code>b4f9e4d</code></a>
      SECURITY: fix timing variability in backend/serial/u32/scalar.rs (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/661">#661</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/415892acf1cdf9161bd6a4c99bc2f4cb8fae5e6a"><code>415892a</code></a>
      SECURITY: fix timing variability in backend/serial/u64/scalar.rs (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/659">#659</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/56bf398d0caed63ef1d1edfbd35eb5335132aba2"><code>56bf398</code></a>
      Updates license field to valid SPDX format (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/647">#647</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/9252fa5c0d09054fed4ac4d649e63c40fad7abaf"><code>9252fa5</code></a>
      Mitigate check-cfg until MSRV 1.77 (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/652">#652</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/1efe6a93b176c4389b78e81e52b2cf85d728aac6"><code>1efe6a9</code></a>
      Fix a minor typo in signing.rs (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/649">#649</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/cc3421a22fa7ee1f557cbe9243b450da53bbe962"><code>cc3421a</code></a>
      Indicate that the rand_core feature is required (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/641">#641</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/858c4ca8ae03d33fe8b71b4504c4d3f5ff5b45c0"><code>858c4ca</code></a>
      Address new nightly clippy unnecessary qualifications (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/639">#639</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/31ccb6705067d68782cb135e23c79b640a6a06ee"><code>31ccb67</code></a>
      Remove platforms in favor using CARGO_CFG_TARGET_POINTER_WIDTH (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/636">#636</a>)</li>
      <li><a
      href="https://github.com/dalek-cryptography/curve25519-dalek/commit/19c7f4a5d5e577adc9cc65a837abef9ed7ebf0a4"><code>19c7f4a</code></a>
      Fix new nightly redundant import lint warns (<a
      href="https://redirect.github.com/dalek-cryptography/curve25519-dalek/issues/638">#638</a>)</li>
      <li>Additional commits viewable in <a
      href="https://github.com/dalek-cryptography/curve25519-dalek/compare/curve25519-4.1.2...curve25519-4.1.3">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=curve25519-dalek&package-manager=cargo&previous-version=4.1.2&new-version=4.1.3)](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 this major version` will close this PR and stop
      Dependabot creating any more for this major version (unless you reopen
      the PR or upgrade to it yourself)
      - `@dependabot ignore this minor version` will close this PR and stop
      Dependabot creating any more for this minor version (unless you reopen
      the PR or upgrade to it yourself)
      - `@dependabot ignore this dependency` will close this PR and stop
      Dependabot creating any more for this dependency (unless you reopen the
      PR or upgrade to it yourself)
      You can disable automated security fix PRs for this repo from the
      [Security Alerts
      page](https://github.com/paritytech/polkadot-sdk/network/alerts).
      
      </details>
      
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>