Skip to content
  1. Mar 11, 2024
    • Dónal Murray's avatar
      [pallet_broker] Fix `adapt_price` behaviour at zero (#3636) · aa353283
      Dónal Murray authored
      
      
      This fixes the behaviour of `Linear` which is the default implementation
      of the `AdaptPrice` trait in the broker pallet. Previously if cores were
      offered but not sold in only one sale, the price would be set to zero
      and due to the logic being purely multiplicative, the price would stay
      at 0 indefinitely.
      
      This could be further paired with a configurable minimum in the broker
      pallet itself, which will be a future PR.
      
      This affects the Rococo and Westend Coretime chains, but Kusama has a
      different implementation so this isn't required for the Kusama launch. I
      actually thought I opened this a while ago.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      aa353283
    • eskimor's avatar
      Remove unused FullCandidateReceipt (#3641) · 8dc6048d
      eskimor authored
      
      
      Currently redesigning candidate data structures, noticed that this one
      seems dead.
      
      Co-authored-by: default avatareskimor <[email protected]>
      8dc6048d
    • Egor_P's avatar
      Fix release docker image GHA (#3547) · a6713c55
      Egor_P authored
      This PR add extra checks for the input fields in the GHA which does the
      docker image build and publishing.
      a6713c55
  2. Mar 10, 2024
  3. Mar 09, 2024
    • Viki Val's avatar
      🐛 Depositing PalletAttributeSet on incorrect nft (#2740) · 1c435e91
      Viki Val authored
      
      
      ## Context
      
      Implementing `HolderOf(collection_id)` we have observed a fancy glitch
      where pallet deposits event with incorrect values
      
      ### Test case 
      
      [Observe following
      extrinsic](https://assethub-polkadot.subscan.io/extrinsic/0xdc72321b7674aa209c2f194ed49bd6bd12708af103f98b5b9196e0132dcba777)
      
      To mint in collection `51` user needs to be `HolderOf(50)`.
      Therefore current user is owner of item `394` `witness_data {
      owned_item: 394 }`
      
      All checking is done correctly, storage is updated correctly
      
       
      ![photo_2023-12-18 16 07
      11](https://github.com/paritytech/polkadot-sdk/assets/22471030/ca991272-156d-4db1-97b2-1a2873fc5d3f)
      
      However the event which is emitted does not make semantic sense as we
      updated storage for `50-394` not for `51-114`
      
      ![photo_2023-12-18 16 07
      17](https://github.com/paritytech/polkadot-sdk/assets/22471030/c998a92c-e306-4433-aad8-103078140e23)
      
      ## The fix 
      
      This PR fixes that depositing `PalletAttributeSet` emits correct values.
      
      ---------
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      1c435e91
    • Michal Kucharczyk's avatar
      core: replace secp256k with k256 in crypto::ecdsa (#3525) · 9f5d9fa9
      Michal Kucharczyk authored
      
      
      This PR replaces the usage of
      [secp256k](https://crates.io/crates/secp256k1) crate with
      [k256](https://crates.io/crates/k256) in `core::crypto::ecdsa` for
      `non-std` environments as outcome of discussion in #3448.
      
      `secp256k1` is used in `std`, meaning that we should not affect host
      performance with this PR.
      `k256` is enabled in runtimes (`no-std`), and is required to proceed
      with #2044.
      
      If desirable, in future we can switch to `k256` also for `std`. That
      would require some performance evaluation (e.g. for EVM chains as per
      https://github.com/paritytech/polkadot-sdk/issues/3448#issuecomment-1976780391).
      
      Closes https://github.com/paritytech/polkadot-sdk/issues/3448
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      9f5d9fa9
  4. Mar 08, 2024
    • cuinix's avatar
      fix some typos (#3587) · ea458d0b
      cuinix authored
      
      
      Signed-off-by: default avatarcuinix <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      ea458d0b
    • PG Herveou's avatar
      Contracts: Fix terminate benchmark (#3558) · 1fe3c5f2
      PG Herveou authored
      
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: command-bot <>
      1fe3c5f2
    • PG Herveou's avatar
      benchmark: allow range trailing comma in RangeArgs (#3598) · a0c9a3d6
      PG Herveou authored
      
      
      Rustfmt will add a trailing comma for longer expression, this change
      will make sure that the Range parameters can still be parsed.
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      a0c9a3d6
    • Alexandru Gheorghe's avatar
      collator-protocol: Always stay connected to validators in backing group (#3544) · 6f3caac0
      Alexandru Gheorghe authored
      
      
      Looking at rococo-asset-hub
      https://github.com/paritytech/polkadot-sdk/issues/3519 there seems to be
      a lot of instances where collator did not advertise their collations,
      while there are multiple problems there, one of it is that we are
      connecting and disconnecting to our assigned validators every block,
      because on reconnect_timeout every 4s we call connect_to_validators and
      that will produce 0 validators when all went well, so set_reseverd_peers
      called from validator discovery will disconnect all our peers.
      More details here:
      https://github.com/paritytech/polkadot-sdk/issues/3519#issuecomment-1972667343
      
      Now, this shouldn't be a problem, but it stacks with an existing bug in
      our network stack where if disconnect from a peer the peer might not
      notice it, so it won't detect the reconnect either and it won't send us
      the necessary view updates, so we won't advertise the collation to it
      more details here:
      
      https://github.com/paritytech/polkadot-sdk/issues/3519#issuecomment-1972958276
      
      To avoid hitting this condition that often, let's keep the peers in the
      reserved set for the entire duration we are allocated to a backing
      group. Backing group sizes(1 rococo, 3 kusama, 5 polkadot) are really
      small, so this shouldn't lead to that many connections. Additionally,
      the validators would disconnect us any way if we don't advertise
      anything for 4 blocks.
      
      ## TODO
      - [x] More testing.
      - [x] Confirm on rococo that this is improving the situation. (It
      doesn't but just because other things are going wrong there).
      
      ---------
      
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      6f3caac0
    • PG Herveou's avatar
      Contracts Bump ApiVersion and add test (#3619) · f977c211
      PG Herveou authored
      ApiVersion should have been bumped with
      https://github.com/paritytech/polkadot-sdk/pull/3606
      this does that and add a test so we don't forget to do that everytime
      f977c211
  5. Mar 07, 2024
  6. Mar 06, 2024
  7. Mar 05, 2024
  8. Mar 04, 2024
    • dependabot[bot]'s avatar
      Bump mio from 0.8.8 to 0.8.11 (#3569) · ec30d2f5
      dependabot[bot] authored
      
      
      Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.8 to 0.8.11.
      <details>
      <summary>Changelog</summary>
      <p><em>Sourced from <a
      href="https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md">mio's
      changelog</a>.</em></p>
      <blockquote>
      <h1>0.8.11</h1>
      <ul>
      <li>Fix receiving IOCP events after deregistering a Windows named pipe
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1760">tokio-rs/mio#1760</a>,
      backport pr:
      <a
      href="https://redirect.github.com/tokio-rs/mio/pull/1761">tokio-rs/mio#1761</a>).</li>
      </ul>
      <h1>0.8.10</h1>
      <h2>Added</h2>
      <ul>
      <li>Solaris support
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1724">tokio-rs/mio#1724</a>).</li>
      </ul>
      <h1>0.8.9</h1>
      <h2>Added</h2>
      <ul>
      <li>ESP-IDF framework support
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1692">tokio-rs/mio#1692</a>).</li>
      <li>AIX operating system support
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1704">tokio-rs/mio#1704</a>).</li>
      <li>Vita support
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1721">tokio-rs/mio#1721</a>).</li>
      <li><code>{UnixListener,UnixStream}:bind_addr</code>
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1630">tokio-rs/mio#1630</a>).</li>
      <li><code>mio_unsupported_force_poll_poll</code> and
      <code>mio_unsupported_force_waker_pipe</code>
      <strong>unsupported</strong> configuration flags to force a specific
      poll or waker
      implementation
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1684">tokio-rs/mio#1684</a>,
      <a
      href="https://redirect.github.com/tokio-rs/mio/pull/1685">tokio-rs/mio#1685</a>,
      <a
      href="https://redirect.github.com/tokio-rs/mio/pull/1692">tokio-rs/mio#1692</a>).</li>
      </ul>
      <h2>Fixed</h2>
      <ul>
      <li>The <code>pipe(2)</code> based waker (swapped file descriptors)
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1722">tokio-rs/mio#1722</a>).</li>
      <li>The duplicate waker check to work correctly with cloned
      <code>Registry</code>s.
      (<a
      href="https://redirect.github.com/tokio-rs/mio/pull/1706">tokio-rs/mio#1706</a>).</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/0328bdef900b6396b8d00d33c825cd8af748553d"><code>0328bde</code></a>
      Release v0.8.11</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/708449851283b57eb6f514c8f289b66e982720b3"><code>7084498</code></a>
      Fix warnings</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/90d4fe00df870acd3d38f3dc4face9aacab8fbb9"><code>90d4fe0</code></a>
      named-pipes: fix receiving IOCP events after deregister</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/c710a307f8627c4d63ac1003252aa45175e08399"><code>c710a30</code></a>
      Add v0.8.x to the CI</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/c29e21c244b2b835e8b3e015b92c708c33c7d70a"><code>c29e21c</code></a>
      Release v0.8.10</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/f6a20da1c81c2d56a78bc6f6832b9904b9215914"><code>f6a20da</code></a>
      Add Solaris operating system support (<a
      href="https://redirect.github.com/tokio-rs/mio/issues/1724">#1724</a>)</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/e80c3b21b59b92238f4c8c331fcfc4a71508d1c5"><code>e80c3b2</code></a>
      Release v0.8.9</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/862786bbbf719886be55631c0d150d4813a9a1b6"><code>862786b</code></a>
      Fix importing of IoSourceState</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/40348728e4f06f5e150783d8f1559ee974e5e834"><code>4034872</code></a>
      Add support for vita target</li>
      <li><a
      href="https://github.com/tokio-rs/mio/commit/8eb4010a92bede550850e177d3dd7c4c76eb90ba"><code>8eb4010</code></a>
      Fix receiver and sender fd in pipe based waker</li>
      <li>Additional commits viewable in <a
      href="https://github.com/tokio-rs/mio/compare/v0.8.8...v0.8.11">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mio&package-manager=cargo&previous-version=0.8.8&new-version=0.8.11)](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] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      ec30d2f5
    • PG Herveou's avatar
      Contracts: Fix typo (#3563) · 0708cf38
      PG Herveou authored
      0708cf38