Skip to content
  1. Oct 15, 2023
    • Daan van der Plas's avatar
      fix: GoAhead signal only set when runtime upgrade is enacted from parachain side (#1176) · 91c4360c
      Daan van der Plas authored
      The runtime code of a parachain can be replaced on the relay-chain via:
      
      [cumulus]:
      [enact_authorized_upgrade](https://github.com/paritytech/polkadot-sdk/blob/1a38d6d6/cumulus/pallets/parachain-system/src/lib.rs#L661);
      this is used for a runtime upgrade when a parachain is not bricked.
      
      [polkadot] (these are used when a parachain is bricked):
      -
      [force_set_current_code](https://github.com/paritytech/polkadot-sdk/blob/1a38d6d6/polkadot/runtime/parachains/src/paras/mod.rs#L823):
      immediately changes the runtime code of a given para without a pvf check
      (root).
      -
      [force_schedule_code_upgrade](https://github.com/paritytech/polkadot-sdk/blob/1a38d6d6/polkadot/runtime/parachains/src/paras/mod.rs#L864):
      schedules a change to the runtime code of a given para including a pvf
      check of the new code (root).
      -
      [schedule_code_upgrade](https://github.com/paritytech/polkadot-sdk/blob/1a38d6d6/polkadot/runtime/common/src/paras_registrar.rs#L395):
      schedules a change to the runtime code of a given para including a pvf
      check of the new code. Besides root, the parachain or parachain manager
      can call this extrinsic given that the parachain is unlocked.
      
      Polkadot signals a parachain to be ready for a runtime upgrade through
      the
      [GoAhead](https://github.com/paritytech/polkadot-sdk/blob/e4949344
      
      /polkadot/primitives/src/v5/mod.rs#L1229)
      signal.
      
      When in cumulus `enact_authorized_upgrade` is executed, the same
      underlying helper function of `force_schedule_code_upgrade` &
      `schedule_code_upgrade`:
      [schedule_code_upgrade](https://github.com/paritytech/polkadot/blob/09b61286da11921a3dda0a8e4015ceb9ef9cffca/runtime/parachains/src/paras/mod.rs#L1778),
      is called on the relay-chain, which sets the `GoAhead` signal (if the
      pvf is accepted).
      
      If Cumulus receives the `GoAhead` signal from polkadot without having
      the `PendingValidationCode` ready, it will panic
      ([ref](https://github.com/paritytech/polkadot/pull/7412)). For
      `enact_authorized_upgrade` we know for sure the `PendingValidationCode`
      is set. On the contrary, for `force_schedule_code_upgrade` &
      `schedule_code_upgrade` this is not the case.
      
      This PR includes a flag such that the `GoAhead` signal will only be set
      when a runtime upgrade is enacted by the parachain
      (`enact_authorized_upgrade`).
      
      additional info: https://github.com/paritytech/polkadot/pull/7412
      
      Closes #641
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      91c4360c
    • Gonçalo Pestana's avatar
      Refactor staking ledger (#1484) · 8ee4042c
      Gonçalo Pestana authored
      This PR refactors the staking ledger logic to encapsulate all reads and
      mutations of `Ledger`, `Bonded`, `Payee` and stake locks within the
      `StakingLedger` struct implementation.
      
      With these changes, all the reads and mutations to the `Ledger`, `Payee`
      and `Bonded` storage map should be done through the methods exposed by
      StakingLedger to ensure the data and lock consistency of the operations.
      The new introduced methods that mutate and read Ledger are:
      
      - `ledger.update()`: inserts/updates a staking ledger in storage;
      updates staking locks accordingly (and ledger.bond(), which is synthatic
      sugar for ledger.update())
      - `ledger.kill()`: removes all Bonded and StakingLedger related data for
      a given ledger; updates staking locks accordingly;
      `StakingLedger::get(account)`: queries both the `Bonded` and `Ledger`
      storages and returns a `Option<StakingLedger>`. The pallet impl exposes
      fn ledger(account) as synthatic sugar for `StakingLedger::get(account)`.
      
      Retrieving a ledger with `StakingLedger::get()` can be done by providing
      either a stash or controller account. The input must be wrapped in a
      `StakingAccount` variant (Stash or Controller) which is treated
      accordingly. This simplifies the caller API but will eventually be
      deprecated once we completely get rid of the controller account in
      staking. However, this refactor will help with the work necessary when
      completely removing the controller.
      
      Other goals:
      
      - No logical changes have been introduced in this PR;
      - No breaking changes or updates in wallets required;
      - No new storage items or need to perform storage migrations;
      - Centralise the changes to bonds and ledger updates to simplify the
      OnStakingUpdate updates to the target list (related to
      https://github.com/paritytech/polkadot-sdk/issues/443)
      
      Note: it would be great to prevent or at least raise a warning if
      `Ledger<T>`, `Payee<T>` and `Bonded<T>` storage types are accessed
      outside the `StakingLedger` implementation. This PR should not get
      blocked by that feature, but there's a tracking issue here
      https://github.com/paritytech/polkadot-sdk/issues/149
      
      Related and step towards
      https://github.com/paritytech/polkadot-sdk/issues/443
      8ee4042c
    • Julian Eager's avatar
      Include polkadot version in artifact path (#1828) · 9e144704
      Julian Eager authored
      closes #695
      
      Could potentially be helpful to preserving caches when applicable, as
      discussed in #685
      
      kusama address: FvpsvV1GQAAbwqX6oyRjemgdKV11QU5bXsMg9xsonD1FLGK
      9e144704
  2. Oct 14, 2023
    • Julian Eager's avatar
      Discard `Executor` (#1855) · 9f7656df
      Julian Eager authored
      
      
      closes #622 
      
      Pros:
      * simpler interface, just functions:
      `create_runtime_from_artifact_bytes()` and `execute_artifact()`
      
      Cons:
      * extra overhead of constructing executor semantics each time
      
      I could make it a combination of
      * `create_runtime_config(params)` (such that we could clone the
      constructed semantics)
      * `create_runtime(blob, config)`
      * `execute_artifact(blob, config, params)`
      
      Not sure if it's worth it though.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      9f7656df
  3. Oct 13, 2023
  4. Oct 12, 2023
    • Anton Vilhelm Ásgeirsson's avatar
      Fix links to implementers' guide (#1865) · d2fc1d7c
      Anton Vilhelm Ásgeirsson authored
      # Description
      
      In a couple of cases, there were links pointing to the w3f github pages
      domain. In other instances, there were links pointing to the old
      polkadot repo's github pages. Both of these are now pointing to the
      relevant links in
      https://paritytech.github.io/polkadot-sdk/book/index.html.
      
      These changes were made specifically because the w3f github pages
      returns a 404, and while fixing the links, the old polkadot repo links
      were touched up as well even if they do redirect properly.
      
      This shouldn't affect anything as these are documentation link changes
      only.
      d2fc1d7c
    • Tsvetomir Dimitrov's avatar
      Disabled validators runtime API (#1257) · 7aace06b
      Tsvetomir Dimitrov authored
      
      
      Exposes disabled validators list via a runtime API.
      
      ---------
      
      Co-authored-by: default avatarordian <[email protected]>
      Co-authored-by: default avatarordian <[email protected]>
      7aace06b
    • Sam Elamin's avatar
      allow treasury to do reserve asset transfers (#1447) · 70d4907a
      Sam Elamin authored
      
      
      This pr resolves https://github.com/paritytech/polkadot-sdk/issues/1428.
      
      *Added only to Kusama for now*
      
      I did raise it
      [here](https://github.com/polkadot-fellows/runtimes/pull/19) and we
      discussed creating a chopsticks test to run an end-to-end test
      
      however, to do that I will need a build agent/custom runner that is
      powerful enough to run the build
      
      I will be doing that separately as I still think having chopsticks test
      your runtime with each commit will be very powerful and extremely useful
      for the ecosystem
      
      For now I have used XCM simulator and replicated what the other reserve
      tests do
      
      ---------
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      70d4907a
  5. Oct 11, 2023
  6. Oct 10, 2023
    • Bulat Saifullin's avatar
      Update testnet bootnode dns name (#1712) · 373b8ac7
      Bulat Saifullin authored
      # Description
      Update the DNS name of bootnodes to unify the deployment. 
      
      Each bootnode have 3 port exposed: `30333, 30334, 443`. Before, we had
      different DNS names for `30333, 30334` and `443` ports. It may confuse
      people and give the impression that it is two different nodes. Fixing it
      by using a single domain for all
      373b8ac7
    • Oliver Tale-Yazdi's avatar
      [FRAME] Warn on unchecked weight witness (#1818) · 64877492
      Oliver Tale-Yazdi authored
      Adds a warning to FRAME pallets when a function argument that starts
      with `_` is used in the weight formula.
      This is in most cases an error since the weight witness needs to be
      checked.
      
      Example:
      
      ```rust
      #[pallet::call_index(0)]
      #[pallet::weight(T::SystemWeightInfo::remark(_remark.len() as u32))]
      pub fn remark(_origin: OriginFor<T>, _remark: Vec<u8>) -> DispatchResultWithPostInfo {
      	Ok(().into())
      }
      ```
      
      Produces this warning:
      
      ```pre
      warning: use of deprecated constant `pallet::warnings::UncheckedWeightWitness_0::_w`: 
                       It is deprecated to not check weight witness data.
                       Please instead ensure that all witness data for weight calculation is checked before usage.
               
                       For more info see:
                           <https://github.com/paritytech/polkadot-sdk/pull/1818>
         --> substrate/frame/system/src/lib.rs:424:40
          |
      424 |         pub fn remark(_origin: OriginFor<T>, _remark: Vec<u8>) -> DispatchResultWithPostInfo {
          |                                              ^^^^^^^
          |
          = note: `#[warn(deprecated)]` on by default
      ```
      
      Can be suppressed like this, since in this case it is legit:
      
      ```rust
      #[pallet::call_index(0)]
      #[pallet::weight(T::SystemWeightInfo::remark(remark.len() as u32))]
      pub fn remark(_origin: OriginFor<T>, remark: Vec<u8>) -> DispatchResultWithPostInfo {
      	let _ = remark; // We dont need to check the weight witness.
      	Ok(().into())
      }
      ```
      
      Changes:
      - Add warning on uncheded weight witness
      - Respect `subkeys` limit in `System::kill_prefix`
      - Fix HRMP pallet and other warnings
      - Update`proc_macro_warning` dependency
      - Delete random folder `substrate/src/src` 🙈
      
       
      - Adding Prdoc
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      64877492
    • Branislav Kontur's avatar
      [xcm] Use `Weight::MAX` for `reserve_asset_deposited`,... · e3c97e48
      Branislav Kontur authored
      [xcm] Use `Weight::MAX` for `reserve_asset_deposited`, `receive_teleported_asset` benchmarks (#1726)
      
      # Description
      
      ## Summary
      
      Previously, the `pallet_xcm::do_reserve_transfer_assets` and
      `pallet_xcm::do_teleport_assets` functions relied on weight estimation
      for remote chain execution, which was based on guesswork derived from
      the local chain. This approach led to complications for runtimes that
      did not provide or support specific [XCM
      configurations](https://github.com/paritytech/polkadot-sdk/blob/7cbe0c76/polkadot/xcm/xcm-executor/src/config.rs#L43-L47)
      for `IsReserve` or `IsTeleporter`. Consequently, such runtimes had to
      resort to implementing hard-coded weights for XCM instructions like
      `reserve_asset_deposited` or `receive_teleported_asset` to support
      extrinsics such as `pallet_xcm::reserve_transfer_assets` and
      `pallet_xcm::teleport_assets`, which depended on remote weight
      estimation.
      
      The issue of remote weight estimation was addressed and resolved by
      [Pull Request
      #1645](https://github.com/paritytech/polkadot-sdk/pull/1645), which
      removed the need for remote weight estimation.
      
      ## Solution
      
      As a continuation of this improvement, the current PR proposes further
      cleanup by removing unnecessary hard-coded values and rectifying
      benchmark results with `Weight::MAX` that previously used
      `T::BlockWeights::get().max_block` as an override for unsupported XCM
      instructions like `ReserveAssetDeposited` and `ReceiveTeleportedAsset`.
      
      
      ## Questions
      
      - [x] Can we remove now also `Hardcoded till the XCM pallet is fixed`
      for `deposit_asset`? E.g. for AssetHubKusama
      [here](https://github.com/paritytech/polkadot-sdk/blob/7cbe0c76/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/weights/xcm/mod.rs#L129-L134)
      - [x] Are comments like
      [this](https://github.com/paritytech/polkadot-sdk/blob/7cbe0c76/polkadot/runtime/kusama/src/weights/xcm/mod.rs#L94)
      `// Kusama doesn't support ReserveAssetDeposited, so this benchmark has
      a default weight` still relevant? Shouldnt be removed/changed?
      
      
      ## TODO
      
      - [x] `bench bot` regenerate xcm weights for all runtimes
      - [x] remove hard-coded stuff from system parachain weight files
      - [ ] when merged, open `polkadot-fellow/runtimes` PR
      
      ## References
      
      Fixes #1132
      Closes #1132
      Old polkadot repo [PR](https://github.com/paritytech/polkadot/pull/7546)
      
      ---------
      
      Co-authored-by: command-bot <>
      e3c97e48
  7. Oct 07, 2023
    • Muharem Ismailov's avatar
      Treasury spends various asset kinds (#1333) · cb944dc5
      Muharem Ismailov authored
      
      
      ### Summary 
      
      This PR introduces new dispatchables to the treasury pallet, allowing
      spends of various asset types. The enhanced features of the treasury
      pallet, in conjunction with the asset-rate pallet, are set up and
      enabled for Westend and Rococo.
      
      ### Westend and Rococo runtimes.
      
      Polkadot/Kusams/Rococo Treasury can accept proposals for `spends` of
      various asset kinds by specifying the asset's location and ID.
      
      #### Treasury Instance New Dispatchables:
      - `spend(AssetKind, AssetBalance, Beneficiary, Option<ValidFrom>)` -
      propose and approve a spend;
      - `payout(SpendIndex)` - payout an approved spend or retry a failed
      payout
      - `check_payment(SpendIndex)` - check the status of a payout;
      - `void_spend(SpendIndex)` - void previously approved spend;
      > existing spend dispatchable renamed to spend_local
      
      in this context, the `AssetKind` parameter contains the asset's location
      and it's corresponding `asset_id`, for example:
      `USDT` on `AssetHub`,
      ``` rust
      location = MultiLocation(0, X1(Parachain(1000)))
      asset_id = MultiLocation(0, X2(PalletInstance(50), GeneralIndex(1984)))
      ```
      
      the `Beneficiary` parameter is a `MultiLocation` in the context of the
      asset's location, for example
      ``` rust
      // the Fellowship salary pallet's location / account
      FellowshipSalaryPallet = MultiLocation(1, X2(Parachain(1001), PalletInstance(64)))
      // or custom `AccountId`
      Alice = MultiLocation(0, AccountId32(network: None, id: [1,...]))
      ```
      
      the `AssetBalance` represents the amount of the `AssetKind` to be
      transferred to the `Beneficiary`. For permission checks, the asset
      amount is converted to the native amount and compared against the
      maximum spendable amount determined by the commanding spend origin.
      
      the `spend` dispatchable allows for batching spends with different
      `ValidFrom` arguments, enabling milestone-based spending. If the
      expectations tied to an approved spend are not met, it is possible to
      void the spend later using the `void_spend` dispatchable.
      
      Asset Rate Pallet provides the conversion rate from the `AssetKind` to
      the native balance.
      
      #### Asset Rate Instance Dispatchables:
      - `create(AssetKind, Rate)` - initialize a conversion rate to the native
      balance for the given asset
      - `update(AssetKind, Rate)` - update the conversion rate to the native
      balance for the given asset
      - `remove(AssetKind)` - remove an existing conversion rate to the native
      balance for the given asset
      
      the pallet's dispatchables can be executed by the Root or Treasurer
      origins.
      
      ### Treasury Pallet
      
      Treasury Pallet can accept proposals for `spends` of various asset kinds
      and pay them out through the implementation of the `Pay` trait.
      
      New Dispatchables:
      - `spend(Config::AssetKind, AssetBalance, Config::Beneficiary,
      Option<ValidFrom>)` - propose and approve a spend;
      - `payout(SpendIndex)` - payout an approved spend or retry a failed
      payout;
      - `check_payment(SpendIndex)` - check the status of a payout;
      - `void_spend(SpendIndex)` - void previously approved spend;
      > existing spend dispatchable renamed to spend_local
      
      The parameters' types of the `spend` dispatchable exposed via the
      pallet's `Config` and allows to propose and accept a spend of a certain
      amount.
      
      An approved spend can be claimed via the `payout` within the
      `Config::SpendPeriod`. Clients provide an implementation of the `Pay`
      trait which can pay an asset of the `AssetKind` to the `Beneficiary` in
      `AssetBalance` units.
      
      The implementation of the Pay trait might not have an immediate final
      payment status, for example if implemented over `XCM` and the actual
      transfer happens on a remote chain.
      
      The `check_status` dispatchable can be executed to update the spend's
      payment state and retry the `payout` if the payment has failed.
      
      ---------
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: command-bot <>
      cb944dc5
  8. 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
  9. Oct 05, 2023
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 1 update (#1752) · 0c592329
      dependabot[bot] authored
      
      
      Bumps the known_good_semver group with 1 update:
      [clap](https://github.com/clap-rs/clap).
      
      <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.6</h2>
      <h2>[4.4.6] - 2023-09-28</h2>
      <h3>Internal</h3>
      <ul>
      <li>Upgrade <code>anstream</code></li>
      </ul>
      <h2>v4.4.5</h2>
      <h2>[4.4.5] - 2023-09-25</h2>
      <h3>Fixes</h3>
      <ul>
      <li><em>(parser)</em> When inferring subcommand <code>name</code> or
      <code>long_flag</code>, allow ambiguous-looking matches that
      unambiguously map back to the same command</li>
      <li><em>(parser)</em> When inferring subcommand <code>long_flag</code>,
      don't panic</li>
      <li><em>(assert)</em> Clarify what action is causing a positional that
      doesn't set values which is especially useful for derive users</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.6] - 2023-09-28</h2>
      <h3>Internal</h3>
      <ul>
      <li>Upgrade <code>anstream</code></li>
      </ul>
      <h2>[4.4.5] - 2023-09-25</h2>
      <h3>Fixes</h3>
      <ul>
      <li><em>(parser)</em> When inferring subcommand <code>name</code> or
      <code>long_flag</code>, allow ambiguous-looking matches that
      unambiguously map back to the same command</li>
      <li><em>(parser)</em> When inferring subcommand <code>long_flag</code>,
      don't panic</li>
      <li><em>(assert)</em> Clarify what action is causing a positional that
      doesn't set values which is especially useful for derive users</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/clap-rs/clap/commit/39f5e807af1c08acedbf7343ce9ec379a4308636"><code>39f5e80</code></a>
      chore: Release</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/a5cb6bb988bbacb02e8cf98b6156c860d0801e08"><code>a5cb6bb</code></a>
      docs: Update changelog</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/418c0017a654e9859adfa9b051815f20e4583e31"><code>418c001</code></a>
      Merge pull request <a
      href="https://redirect.github.com/clap-rs/clap/issues/5146">#5146</a>
      from epage/update</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/485b957c4b90aa010276f813dbd429e1071f8fd9"><code>485b957</code></a>
      chore: Upgrade anstream</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/a1af8d9ad8f81eb2d71203b50c370a78ce3ec9f3"><code>a1af8d9</code></a>
      chore: Update from '_rust/main'</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/ac51f0925003597dec21529538597dbd7872d1ac"><code>ac51f09</code></a>
      chore(ci): Normalize json5 syntax</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/86c29dea384c7392a2b682fa0150f52c0f4c7f00"><code>86c29de</code></a>
      chore(ci): Updaet Renovate schema</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/204552890d316ec9ae0b21f85298ba1d5d0786f8"><code>2045528</code></a>
      chore: Release</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/55d223001682bc668f5e4db91afd5e76c2a36597"><code>55d2230</code></a>
      docs: Update changelog</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/492ee03b325ff98c7702295e024576b52b71358d"><code>492ee03</code></a>
      Merge pull request <a
      href="https://redirect.github.com/clap-rs/clap/issues/5140">#5140</a>
      from epage/dyn</li>
      <li>Additional commits viewable in <a
      href="https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.6">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.4.4&new-version=4.4.6)](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>
      0c592329
    • Sebastian Kunert's avatar
      Delete full db directory with `purge-chain` subcommand (#1786) · d21113c1
      Sebastian Kunert authored
      Closes #1767 
      
      Until now the `purge-chain` command would only remove the `full`
      subfolder of the db folder. However there is also the `parachains` db
      that currently remains and can cause problems on node restart.
      
      Example wiht old code:
      ```
      polkadot purge-chain --database paritydb --base-path /tmp/some-folder
      Are you sure to remove "/tmp/some-folder/chains/polkadot/paritydb/full"? [y/N]: y
      "/tmp/some-folder/chains/polkadot/paritydb/full" removed.
      ```
      In this case `/tmp/some-folder/chains/polkadot/paritydb/parachains`
      would remain and might cause problem on node restart because of version
      conflicts as described in #1767. After this PR the whole
      `/tmp/some-folder/chains/polkadot/paritydb` folder will be deleted.
      d21113c1
    • Marcin S.'s avatar
    • Sergejs Kostjucenko's avatar
      Remove deprecated CI config files (#1799) · 86955eef
      Sergejs Kostjucenko authored
      This PR removes deprecated CI config files
      86955eef
  10. Oct 04, 2023
  11. Oct 01, 2023
  12. Sep 29, 2023
    • Sebastian Kunert's avatar
      9485b0b4
    • Ankan's avatar
      [NPoS] Fix for Reward Deficit in the pool (#1255) · f820dc0a
      Ankan authored
      closes https://github.com/paritytech/polkadot-sdk/issues/158.
      partially addresses
      https://github.com/paritytech/polkadot-sdk/issues/226.
      
      Instead of fragile calculation of current balance by looking at `free
      balance - ED`, Nomination Pool now freezes ED in the pool reward account
      to restrict an account from going below minimum balance. This also has a
      nice side effect that if ED changes, we know how much is the imbalance
      in ED frozen in the pool and the current required ED. A pool operator
      can diligently top up the pool with the deficit in ED or vice versa,
      withdraw the excess they transferred to the pool.
      
      ## Notable changes
      - New call `adjust_pool_deposit`: Allows to top up the deficit or
      withdraw the excess deposited funds to the pool.
      - Uses Fungible trait (instead of Currency trait). Since NP was not
      doing any locking/reserving previously, no migration is needed for this.
      - One time migration of freezing ED from each of the existing pools (not
      very PoV friendly but fine for relay chain).
      f820dc0a
    • Bastian Köcher's avatar
      Remove kusama and polkadot runtime crates (#1731) · bf90cb0b
      Bastian Köcher authored
      This pull request is removing the Kusama and Polkadot runtime crates. As
      still some crates dependent on the runtime crates, this pull request is
      doing some more changes.
      
      - It removes the `hostperfcheck` CLI command. This CLI command could
      compare the current node against the standard hardware by doing some
      checks. Later we added the hardware benchmark feature to Substrate. This
      hardware benchmark is running on every node startup and prints a warning
      if the current node is too slow. This makes this CLI command a duplicate
      that was also depending on the kusama runtime.
      
      - The pull request is removing the emulated integration tests that were
      requiring the Kusama or Polkadot runtime crates.
      bf90cb0b
  13. Sep 28, 2023
    • Michal Kucharczyk's avatar
      rococo-runtime: `RococoGenesisExt` removed (#1490) · 50242a61
      Michal Kucharczyk authored
      [`RococoGenesisExt`](https://github.com/paritytech/polkadot-sdk/blob/a414ea75
      
      /polkadot/node/service/src/chain_spec.rs#L152-L171)
      is removed. It was the hack to allow overwriting
      `EpochDurationInBlocks`. Removal of `RococGenesisExt` prevents from
      manipulating the state to change the runtime constants.
      
      Changes:
      - Environment variable which controls the `time::EpochDurationInBlocks`
      value was added: `ROCOCO_EPOCH_DURATION` (epoch duration will be set to
      the value of env),
      - `10,100,600` versions of rococo-runtime are built in CI and put into `polkadot-debug` docker image.
      
      `rococo-runtime` building examples:
      - to build runtime for `versi_staging_testnet` which had
      EpochDurationInBlocks set to 100:
        ```
      ROCOCO_EPOCH_DURATION=100 cargo build --features=fast-runtime -p
      rococo-runtime
        ```
      - to build runtime for `wococo_development`
        ```
      ROCOCO_EPOCH_DURATION=10 cargo build --features=fast-runtime -p
      rococo-runtime
        ```
      - to build `versi-staging` chain spec:
        ```
      ROCOCO_EPOCH_DURATION=100 cargo run -p polkadot --features=fast-runtime
      -- build-spec --chain versi-staging --raw
        ```
      - to build `wococo-dev` chain spec:
        ```
      ROCOCO_EPOCH_DURATION=10 cargo run -p polkadot --features=fast-runtime
      -- build-spec --chain wococo-dev --raw
        ```
      
      It is also possible to change the epoch duration by replacing the `code` field in the chain spec with the hex dump of pre-built runtime wasm blob (because the epoch duration is hard-coded into wasm blob).
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      50242a61
    • Marcin S.'s avatar
      PVF: more filesystem sandboxing (#1373) · c1eb342b
      Marcin S. authored
      c1eb342b
    • Dónal Murray's avatar
      Add event field names to HRMP Event variants (#1695) · 4bc97e48
      Dónal Murray authored
      Update the HRMP pallet to use field names for Event variants to improve
      metadata for a better client experience.
      Event variants are now structs instead of unnamed tuples.
      
      Partially implements Substrate issue
      [9903](https://github.com/paritytech/substrate/issues/9903) which
      doesn't appear to have been moved to the monorepo.
      4bc97e48
  14. Sep 27, 2023
    • ordian's avatar
      runtime-api: cleanup after v7 stabilization (#1729) · 769bdd3f
      ordian authored
      Follow-up to #1543.
      769bdd3f
    • Alejandro Martinez Andres's avatar
      OpenGov in Westend and Rococo (#1177) · 69ed3087
      Alejandro Martinez Andres authored
      
      
      Migrating [PR from the archived polkadot
      repo](https://github.com/paritytech/polkadot/pull/7272)
      
      As per
      https://github.com/paritytech/polkadot/pull/7272#issuecomment-1559240466,
      the changes in this MR include the following pallets into [x] Rococo and
      [x] Westend runtimes:
      
          pallet_conviction_voting
          pallet_referenda
          pallet_ranked_collective
          pallet_custom_origins
          pallet_whitelist
      
      And only for westend-runtime:
      
          pallet_treasury
      
      Following [Kusama runtime
      config](https://github.com/paritytech/polkadot/tree/dbae30efe080a1d41fe54ef4da8af47614c9ca93/runtime/kusama/src)
      as a baseline.
      
      Benchmarking of the following pallets done for both Rococo and Westend:
      
          pallet_conviction_voting
          pallet_referenda
          pallet_ranked_collective (only on Rococo)
          pallet_whitelist
      
      And only for Westend:
      
          pallet_treasury
      
      Removed Gov1 from Rococo as in
      https://github.com/paritytech/polkadot/pull/6701
      
      Rococo Gov1 storage will be cleaned in a different PR - [issue ](https://github.com/paritytech/polkadot-sdk/issues/1618)
      
      ---------
      
      Co-authored-by: default avatarGiles Cope <[email protected]>
      69ed3087
    • Chris Sosnin's avatar
      Migrate polkadot-primitives to v6 (#1543) · 7cbe0c76
      Chris Sosnin authored
      
      
      - Async-backing related primitives are stable `primitives::v6`
      - Async-backing API is now part of `api_version(7)`
      - It's enabled on Rococo and Westend runtimes
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <[email protected]>
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      7cbe0c76
    • Michal Kucharczyk's avatar
      genesis-builder: implemented for all runtimes (#1492) · 5a2833cc
      Michal Kucharczyk authored
      This PR implements [`GenesisBuilder`
      API](https://github.com/paritytech/polkadot-sdk/blob/a414ea75
      
      /substrate/primitives/genesis-builder/src/lib.rs#L38)
      for all the runtimes in polkadot repo.
      
      Step towards: paritytech/polkadot-sdk#25
      
      ---------
      
      Co-authored-by: default avatarordian <[email protected]>
      5a2833cc
  15. Sep 25, 2023
  16. Sep 22, 2023
  17. Sep 20, 2023
    • dependabot[bot]'s avatar
      Bump the known_good_semver group with 2 updates (#1620) · 1517eb8d
      dependabot[bot] authored
      [//]: # (dependabot-start)
      ️  **Dependabot is rebasing this PR** 
      
      ️ 
      
      Rebasing might not happen immediately, so don't worry if this takes some
      time.
      
      Note: if you make any changes to this PR yourself, they will take
      precedence over the rebase.
      
      ---
      
      [//]: # (dependabot-end)
      
      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.3 to 4.4.4
      <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.4</h2>
      <h2>[4.4.4] - 2023-09-18</h2>
      <h3>Internal</h3>
      <ul>
      <li>Update <code>terminal_size</code> to 0.3</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.4] - 2023-09-18</h2>
      <h3>Internal</h3>
      <ul>
      <li>Update <code>terminal_size</code> to 0.3</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/clap-rs/clap/commit/e6e539660f36487e3521ab6835ef1381a21785a4"><code>e6e5396</code></a>
      chore: Release</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/acbb60c11389d362e3b2d23a7b2a0a0523bd2fa8"><code>acbb60c</code></a>
      docs: Update changelog</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/f09d521450c50f56153f7246489666c71e3b4739"><code>f09d521</code></a>
      Merge pull request <a
      href="https://redirect.github.com/clap-rs/clap/issues/5129">#5129</a>
      from cgwalters/widen-terminal-size</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/84f99ff979d58e3fe94716144b1800fd81723ed7"><code>84f99ff</code></a>
      chore(builder): Bump terminal_size to 0.3</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/7f8df272d90afde89e40de086492e1c9f5749897"><code>7f8df27</code></a>
      Merge pull request <a
      href="https://redirect.github.com/clap-rs/clap/issues/5124">#5124</a>
      from devinherron/master</li>
      <li><a
      href="https://github.com/clap-rs/clap/commit/4dff87386a950d8dfa8e89906e9bf54d180d13de"><code>4dff873</code></a>
      fix(doc): Fix typo in 03_04_subcommands.md</li>
      <li>See full diff in <a
      href="https://github.com/clap-rs/clap/compare/v4.4.3...v4.4.4">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      Updates `syn` from 2.0.36 to 2.0.37
      <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.37</h2>
      <ul>
      <li>Work around incorrect future compatibility warning in rustc
      1.74.0-nightly</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/syn/commit/96810880f3acbb63415cf4684ab42c82edc31e2a"><code>9681088</code></a>
      Release 2.0.37</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/fbe3bc2ddcee4192f95697a953330d031030f5a1"><code>fbe3bc2</code></a>
      Work around unknown_lints warning on rustc older than 1.64</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/75cf912e061ef5a1d97c003f4988f43d7639f5a8"><code>75cf912</code></a>
      Ignore more repr_transparent_external_private_fields</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/299c782439823b868de4aea3682b41d03351d978"><code>299c782</code></a>
      Ignore false repr_transparent_external_private_fields FCW in generated
      code</li>
      <li>See full diff in <a
      href="https://github.com/dtolnay/syn/compare/2.0.36...2.0.37">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>
      1517eb8d
    • Gavin Wood's avatar
      XCM: Deprecate old functions (#1645) · e7d29bc3
      Gavin Wood authored
      Two old functions should be deprecated and have their code altered in
      line with capabilities of XCMv2 and above.
      
      This means we can use the proper `Unlimited` form of weight limit rather
      than guessing weight from the local chain.
      e7d29bc3