Skip to content
Snippets Groups Projects
  1. Aug 28, 2024
    • A Ahmad's avatar
      IBP Coretime Polkadot bootnodes (#5499) · ef3a0d8f
      A Ahmad authored
      ✄
      -----------------------------------------------------------------------------
      
      Thank you for your Pull Request! :pray:
      
       Please make sure it follows the
      contribution guidelines outlined in [this
      
      document](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md)
      and fill out the
      sections below. Once you're ready to submit your PR for review, please
      delete this section and leave only the text under
      the "Description" heading.
      
      # Description
      
      *A concise description of what your PR is doing, and what potential
      issue it is solving. Use [Github semantic
      
      linking](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
      to link the PR to an issue that must be closed once this is merged.*
      
      ## Integration
      
      *In depth notes about how this PR should be integrated by downstream
      projects. This part is mandatory, and should be
      reviewed by reviewers, if the PR does NOT have the `R0-Silent` label. In
      case of a `R0-Silent`, it can be ignored.*
      
      ## Review Notes
      
      *In depth notes about the **implementation** details of your PR. This
      should be the main guide for reviewers to
      understand your approach and effectively review it. If too long, use
      
      [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)*.
      
      *Imagine that someone who is depending on the old code wants to
      integrate your new code and the only information that
      they get is this section. It helps to include example usage and default
      value here, with a `diff` code-block to show
      possibly integration.*
      
      *Include your leftover TODOs, if any, here.*
      
      # Checklist
      
      * [ ] My PR includes a detailed description as outlined in the
      "Description" and its two subsections above.
      * [ ] My PR follows the [labeling requirements](
      
      https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process
      ) of this project (at minimum one label for `T` required)
      * External contributors: ask maintainers to put the right label on your
      PR.
      * [ ] I have made corresponding changes to the documentation (if
      applicable)
      * [ ] I have added tests that prove my fix is effective or that my
      feature works (if applicable)
      
      You can remove the "Checklist" section once all have been checked. Thank
      you for your contribution!
      
      ✄
      -----------------------------------------------------------------------------
      
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
    • Niklas Adolfsson's avatar
      rpc server: listen to `ipv6 socket` if available and... · 09254eb9
      Niklas Adolfsson authored
      rpc server: listen to `ipv6 socket` if available and `--experimental-rpc-endpoint` CLI option (#4792)
      
      Close https://github.com/paritytech/polkadot-sdk/issues/3488,
      https://github.com/paritytech/polkadot-sdk/issues/4331
      
      This changes/adds the following:
      
      1. The default setting is that substrate starts a rpc server that
      listens to localhost both Ipv4 and Ipv6 on the same port. Ipv6 is
      allowed to fail because some platforms may not support it
      2. A new RPC CLI option `--experimental-rpc-endpoint` which allow to
      configure arbitrary listen addresses including the port, if this is
      enabled no other interfaces are enabled.
      3. If the local addr is not found for any of the sockets the server is
      not started throws an error.
      4. Remove the deny_unsafe from the RPC implementations instead this is
      an extension to allow different polices for different interfaces/sockets
      such one may enable unsafe on local interface and safe on only the
      external interface.
      
      So for instance in this PR it's now possible to start up three RPC
      endpoints as follows:
      ```
      $ polkadot --experimental-rpc-endpoint "listen-addr=127.0.0.1:9944,rpc-methods=unsafe" --experimental-rpc-endpoint "listen-addr=0.0.0.0:9945,rpc-methods=safe,rate-limit=100" --experimental-rpc-endpoint "listen-addr=[::1]:9944,optional=true"
      ```
      
      #### Needs to be addressed
      
      ~1. Support binding to a random port if it's fails with the default
      stuff for backward compatible reasons~
      ~2. How to sync that the rpc CLI params and that the rpc-listen-addr
      align, hard to maintain...~
      ~3. Add similar warning prints for exposing unsafe methods on external
      interfaces..~
      ~4. Inline todos + the hacky String conversion from rpc params.~
      
      #### Cons with this PR
      
      Manual strings parsing impl more error-prone than relying on clap....
      
      //cc @jsdw @BulatSaif @PierreBesson @bkchr
      
      
      
      ---------
      
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
    • Serban Iorga's avatar
      polkadot-parachain-bin: Remove contracts parachain (#5471) · 38fce088
      Serban Iorga authored
      Related to: https://github.com/paritytech/polkadot-sdk/issues/5210
      
      Follow-up for https://github.com/paritytech/polkadot-sdk/pull/5288, as
      per this comment:
      https://github.com/paritytech/polkadot-sdk/pull/5288#discussion_r1711157476
      
      I hope I understood this correctly.
  2. Aug 27, 2024
  3. Aug 26, 2024
  4. Aug 24, 2024
  5. Aug 23, 2024
    • Branislav Kontur's avatar
      [bridges] Prune messages from confirmation tx body, not from the on_idle (#5006) · e4ffba6e
      Branislav Kontur authored
      (Please, do not merge until SA, reverted and restored of
      https://github.com/paritytech/polkadot-sdk/pull/4944)
      
      Original PR with more context:
      https://github.com/paritytech/parity-bridges-common/pull/2211
      Relates to:
      https://github.com/paritytech/parity-bridges-common/issues/2210
      
      ## TODO
      
      - [x] fresh weighs for `pallet_bridge_messages`
      - [x] add `try_state` for `pallet_bridge_messages` which checks for
      unpruned messages - relates to the
      [comment](https://github.com/paritytech/parity-bridges-common/pull/2211#issuecomment-1643224831)
      - [x] ~prepare migration, that prunes leftovers, which would be pruned
      eventually from `on_idle` the
      [comment](https://github.com/paritytech/parity-bridges-common/pull/2211#issuecomment-1643224831)~
      can be done also by `set_storage` / `kill_storage` or with
      `OnRuntimeUpgrade` implementatino when `do_try_state_for_outbound_lanes`
      detects problem.
      
      ## Open question
      
      - [ ] Do we really need `oldest_u...
    • Nazar Mokrynskyi's avatar
      Remove the need to wait for target block header in warp sync implementation (#5431) · 6d819a61
      Nazar Mokrynskyi authored
      I'm not sure if this is exactly what
      https://github.com/paritytech/polkadot-sdk/issues/3537 meant, but I
      think it should be fine to wait for relay chain before initializing
      parachain node fully, which removed the need for background task and
      extra hacks throughout the stack just to know where warp sync should
      start.
      
      Previously there were both `WarpSyncParams` and `WarpSyncConfig`, but
      there was no longer any point in having two data structures, so I
      simplified it to just `WarpSyncConfig`.
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/3537
  6. Aug 22, 2024
    • Dónal Murray's avatar
      Add the Polkadot Coretime chain-spec (#5436) · dce789dd
      Dónal Murray authored
      Add the Polkadot Coretime chain-spec to the directory with the other
      system chain-specs.
      
      This is the chain-spec used at genesis and for which the genesis head
      data was generated.
      
      It is also included in the assets for fellowship [release
      v1.3.0](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.3.0)
  7. Aug 21, 2024
  8. Aug 18, 2024
  9. Aug 15, 2024
  10. Aug 14, 2024
    • Adrian Catangiu's avatar
      [tests] dedup test code, add more tests, improve naming and docs (#5338) · e4f8a6de
      Adrian Catangiu authored
      This is mostly tests cleanup:
      - uses helper macro for generating teleport tests,
      - adds missing treasury tests,
      - improves naming and docs for transfer tests.
      
      - [x] does not need a PRDOC
      
      ---------
      
      Co-authored-by: command-bot <>
    • Francisco Aguirre's avatar
      Migrate foreign assets v3::Location to v4::Location (#4129) · be74fe92
      Francisco Aguirre authored
      
      In the move from XCMv3 to XCMv4, the `AssetId` for `ForeignAssets` in
      `asset-hub-rococo` and `asset-hub-westend` was left as `v3::Location` to
      be later migrated to `v4::Location`.
      
      This is that migration PR.
      
      Because the encoding of `v3::Location` and `v4::Location` is the same,
      we don't need to do any data migration, the keys will still be
      decodable.
      The [original idea by
      Jan](https://github.com/paritytech/polkadot/pull/7236) was to make the
      v4 changes in v3 since the ABI (the encoding/decoding) didn't change.
      Corroborated the ABI is the same iterating over all storage, the code is
      on [another
      branch](https://github.com/paritytech/polkadot-sdk/blob/cisco-assert-v3-v4-encodings-equal/cumulus/parachains/runtimes/assets/migrations/src/foreign_assets_to_v4/mod.rs).
      
      We will need a data migration when we want to update from `v4::Location`
      to `v5::Location` because of [the accepted RFC changing the NetworkId
      enum](https://github.com/polkadot-fellows/RFCs/pull/108).
      I'll configure MBMs (Multi-Block Migrations) then and make the actual
      migration.
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/4128
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: command-bot <>
  11. Aug 13, 2024
  12. Aug 12, 2024
  13. Aug 09, 2024
  14. Aug 07, 2024
  15. Aug 05, 2024
    • Alexandru Gheorghe's avatar
      make polkadot-parachain startup errors pretty (#5214) · 0cc3e170
      Alexandru Gheorghe authored
      The errors on polkadot-parachain are not printed with their full display
      context(what is marked with `#[error(`) because main returns plain
      Result and the error will be shown in its Debug format, that's not
      consistent with how the polkadot binary behave and is not user friendly
      since it does not tell them why they got the error.
      
      Fix it by using `color_eyre` as polkadot already does it. 
      
      Fixes: https://github.com/paritytech/polkadot-sdk/issues/5211
      
      ## Output before
      ```
      Error: NetworkKeyNotFound("/acala/data/Collator2/chains/mandala-tc9/network/secret_ed25519")
      ```
      
      ## Output after
      ```
      Error: 
         0: Starting an authorithy without network key in /home/alexggh/.local/share/polkadot-parachain/chains/asset-hub-kusama/network/secret_ed25519.
            
             This is not a safe operation because other authorities in the network may depend on your node having a stable identity.
            
             Otherwise these other authorities may not being able to reach you.
         ...
    • Sergej Sakac's avatar
      Coretime auto-renew (#4424) · f170af61
      Sergej Sakac authored
      
      This PR adds functionality that allows tasks to enable auto-renewal.
      Each task eligible for renewal can enable auto-renewal.
      
      A new storage value is added to track all the cores with auto-renewal
      enabled and the associated task running on the core. The `BoundedVec` is
      sorted by `CoreIndex` to make disabling auto-renewal more efficient.
      
      Cores are renewed at the start of a new bulk sale. If auto-renewal
      fails(e.g. due to the sovereign account of the task not holding
      sufficient balance), an event will be emitted, and the renewal will
      continue for the other cores.
      
      The two added extrinsics are:
      - `enable_auto_renew`: Extrinsic for enabling auto renewal.
      - `disable_auto_renew`: Extrinsic for disabling auto renewal.
      
      TODOs:
      - [x] Write benchmarks for the newly added extrinsics.
      
      Closes: #4351
      
      ---------
      
      Co-authored-by: default avatarDónal Murray <donalm@seadanda.dev>
  16. Aug 02, 2024
    • Francisco Aguirre's avatar
      Add an adapter for configuring AssetExchanger (#5130) · 8ccb6b33
      Francisco Aguirre authored
      
      Added a new adapter to xcm-builder, the `SingleAssetExchangeAdapter`.
      This adapter makes it easy to use `pallet-asset-conversion` for
      configuring the `AssetExchanger` XCM config item.
      
      I also took the liberty of adding a new function to the `AssetExchange`
      trait, with the following signature:
      
      ```rust
      fn quote_exchange_price(give: &Assets, want: &Assets, maximal: bool) -> Option<Assets>;
      ```
      
      The signature is meant to be fairly symmetric to that of
      `exchange_asset`.
      The way they interact can be seen in the doc comment for it in the
      `AssetExchange` trait.
      
      This is a breaking change but is needed for
      https://github.com/paritytech/polkadot-sdk/pull/5131.
      Another idea is to create a new trait for this but that would require
      setting it in the XCM config which is also breaking.
      
      Old PR: https://github.com/paritytech/polkadot-sdk/pull/4375.
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
  17. Jul 30, 2024
  18. Jul 29, 2024
    • girazoki's avatar
      add possibility to inject non-authorities session-keys in genesis (#5078) · d6f59871
      girazoki authored
      
      Add the possibility of injecting session-keys in genesis for
      non-validators. Currently all keys injected in genesis were considered
      as part of the initial validators set, this PR allows to inject a new
      vector with non-authority keys
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    • dependabot[bot]'s avatar
      Bump serde_json from 1.0.120 to 1.0.121 in the known_good_semver group (#5169) · 4def82e7
      dependabot[bot] authored
      
      Bumps the known_good_semver group with 1 update:
      [serde_json](https://github.com/serde-rs/json).
      
      Updates `serde_json` from 1.0.120 to 1.0.121
      <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.121</h2>
      <ul>
      <li>Optimize position search in error path (<a
      href="https://redirect.github.com/serde-rs/json/issues/1160">#1160</a>,
      thanks <a
      href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/serde-rs/json/commit/eca2658a22cb39952783cb6914eb18242659f66a"><code>eca2658</code></a>
      Release 1.0.121</li>
      <li><a
      href="https://github.com/serde-rs/json/commit/b0d678cfb473386830d559b6ab255d9e21ba39c5"><code>b0d678c</code></a>
      Merge pull request <a
      href="https://redirect.github.com/serde-rs/json/issues/1160">#1160</a>
      from iex-rs/efficient-position</li>
      <li><a
      href="https://github.com/serde-rs/json/commit/b1edc7d13f72880fd0ac569403a409e5f7961d5f"><code>b1edc7d</code></a>
      Optimize position search in error path</li>
      <li><a
      href="https://github.com/serde-rs/json/commit/40dd7f5e862436f02471fe076f3486c55e472bc2"><code>40dd7f5</code></a>
      Merge pull request <a
      href="https://redirect.github.com/serde-rs/json/issues/1159">#1159</a>
      from iex-rs/fix-recursion</li>
      <li><a
      href="https://github.com/serde-rs/json/commit/6a306e6ee9f47f3b37088217ffe3ebe9bbb54e5a"><code>6a306e6</code></a>
      Move call to tri! out of check_recursion!</li>
      <li><a
      href="https://github.com/serde-rs/json/commit/3f1c6de4af28b1f6c5100da323f2bffaf7c2083f"><code>3f1c6de</code></a>
      Ignore byte_char_slices clippy lint in test</li>
      <li><a
      href="https://github.com/serde-rs/json/commit/3fd6f5f49dc1c732d9b1d7dfece4f02c0d440d39"><code>3fd6f5f</code></a>
      Merge pull request <a
      href="https://redirect.github.com/serde-rs/json/issues/1153">#1153</a>
      from dpathakj/master</li>
      <li><a
      href="https://github.com/serde-rs/json/commit/fcb5e83e44abe0f9c27c755a240a6ad56312c090"><code>fcb5e83</code></a>
      Correct documentation URL for Value's Index impl.</li>
      <li>See full diff in <a
      href="https://github.com/serde-rs/json/compare/v1.0.120...v1.0.121">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.120&new-version=1.0.121)](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] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarBastian Köcher <info@kchr.de>
  19. Jul 26, 2024
  20. Jul 25, 2024
    • Dónal Murray's avatar
      Add people polkadot genesis chainspec (#5124) · d6f7f495
      Dónal Murray authored
      Published as part of the fellowship
      [v1.2.6](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.6)
      release and originally intentionally left out of the repo as the
      hardcoded system chains will soon be removed from the
      `polkadot-parachain`.
      
      After a conversation in
      https://github.com/paritytech/polkadot-sdk/issues/5112 it was pointed
      out by @josepot that there should be a single authoritative source for
      these chainspecs. Since this is already the place for these it will
      serve until something more fitting can be worked out.
    • Branislav Kontur's avatar
      Bridges improved tests and nits (#5128) · de6733ba
      Branislav Kontur authored
      
      This PR adds `exporter_is_compatible_with_pallet_xcm_bridge_hub_router`,
      which ensures that our `pallet_xcm_bridge_hub` and
      `pallet_xcm_bridge_hub_router` are compatible when handling
      `ExportMessage`. Other changes are just small nits and cosmetics which
      makes others stuff easier.
      
      ---------
      
      Co-authored-by: default avatarSvyatoslav Nikolsky <svyatonik@gmail.com>
  21. Jul 24, 2024
    • Muharem Ismailov's avatar
      Tx Payment: drop ED requirements for tx payments with exchangeable asset (#4488) · 5878ea27
      Muharem Ismailov authored
      Drop the Existential Deposit (ED) requirement for the asset amount
      exchangeable for the fee asset (eg. DOT/KSM) during transaction
      payments.
      
      This achieved by using `SwapCredit` implementation of swap, which works
      with imbalances and does not require a temporary balance account within
      the transaction payment.
      
      ### Problem
      Currently, every swap during transaction payment, processed with asset
      `A` for native asset, must be for an amount greater than the ED of a
      native asset if the user lacks a native asset account. Since fees are
      typically smaller, the current implementation necessitates additional
      swaps to meet the ED during `pre_dispatch`, with refunds for excess ED
      swap occurring during `post_dispatch`. Further details can be found
      [here](https://github.com/paritytech/polkadot-sdk/blob/115c2477
      
      /substrate/frame/transaction-payment/asset-conversion-tx-payment/src/payment.rs#L115).
      
      This setup presents an issue where a user is unable to transfer their
      entire balance and close the account. Instead, the user must transfer
      slightly less of asset `A` to ensure there is enough not only for the
      fee payment but also some extra to meet the ED requirement for their
      native account during `pre_dispatch`. In some cases during
      `post_dispatch`, the user will have the excess ED swapped back to asset
      `A`, while in other cases, it may not be sufficient to meet the ED
      requirement for asset `A`, leading it being left in the user's
      'temporary' native asset account.
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  22. Jul 23, 2024