Skip to content
  1. Sep 19, 2024
    • yjh's avatar
      chore: fast return for invalid request of node health (#5762) · d31bb8ac
      yjh authored
      Co-authored-by: command-bot <>
      d31bb8ac
    • Francisco Aguirre's avatar
      [xcm-emulator] Better logs for message execution and processing (#5712) · b230b0e3
      Francisco Aguirre authored
      When running XCM emulated tests and seeing the logs with `RUST_LOG=xcm`
      or `RUST_LOG=xcm=trace`, it's sometimes a bit hard to figure out the
      chain where the logs are coming from.
      
      I added a log whenever `execute_with` is called, to know the chain which
      makes the following logs. Looks like so:
      
      <img width="1499" alt="Screenshot 2024-09-13 at 20 14 13"
      src="https://github.com/user-attachments/assets/a31d7aa4-11d1-4d3e-9a65-86f38347c880">
      
      There are already log targets for when UMP, DMP and HRMP messages are
      being processed. To see them, you have to use the log targets `ump`,
      `dmp`, and `hrmp` respectively. So `RUST_LOG=xcm,ump,dmp,hrmp` would let
      you see every log.
      I prefixed the targets with `xcm::` so you can get all the relevant logs
      just by filtering by `xcm`. You can always use the whole target to see
      just the messages being processed.
      
      These logs showed the message as an array of bytes, I made them show a
      hexadecimal string instead since that's easier to copy in case you want
      to decode it or use it in another tool. They look like this now:
      
      <img width="1499" alt="Screenshot 2024-09-13 at 20 17 15"
      src="https://github.com/user-attachments/assets/5abf4a97-1ea7-4832-b3b0-d54c54905d1a">
      
      The HRMP and UMP ones are very similar.
      b230b0e3
  2. Sep 18, 2024
    • Maksym H's avatar
      make update-ui-test executable (#5760) · 69b02a3c
      Maksym H authored
      69b02a3c
    • dependabot[bot]'s avatar
      Bump soketto from 0.7.1 to 0.8.0 (#5719) · 37bdc897
      dependabot[bot] authored
      
      
      Bumps [soketto](https://github.com/paritytech/soketto) from 0.7.1 to
      0.8.0.
      <details>
      <summary>Release notes</summary>
      <p><em>Sourced from <a
      href="https://github.com/paritytech/soketto/releases">soketto's
      releases</a>.</em></p>
      <blockquote>
      <h2>v0.8.0</h2>
      <h2>0.8.0</h2>
      <ul>
      <li>[changed] move to rust 2021 <a
      href="https://redirect.github.com/paritytech/soketto/pull/56">#56</a></li>
      <li>[changed] Replace sha-1 v0.9 with sha1 v0.10 <a
      href="https://redirect.github.com/paritytech/soketto/pull/62">#62</a></li>
      <li>[changed] Update hyper requirement from v0.14 to v1.0 <a
      href="https://redirect.github.com/paritytech/soketto/pull/99">#99</a></li>
      <li>[changed] Update base64 requirement from 0.13 to 0.22 <a
      href="https://redirect.github.com/paritytech/soketto/pull/97">#97</a></li>
      <li>[changed] Bump MSRV to 1.71.1.</li>
      <li>[fixed] doc typo on Client resource field <a
      href="https://redirect.github.com/paritytech/soketto/pull/97">#79</a></li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Changelog</summary>
      <p><em>Sourced from <a
      href="https://github.com/paritytech/soketto/blob/master/CHANGELOG.md">soketto's
      changelog</a>.</em></p>
      <blockquote>
      <h2>0.8.0</h2>
      <ul>
      <li>[changed] move to rust 2021 <a
      href="https://redirect.github.com/paritytech/soketto/pull/56">#56</a></li>
      <li>[changed] Replace sha-1 v0.9 with sha1 v0.10 <a
      href="https://redirect.github.com/paritytech/soketto/pull/62">#62</a></li>
      <li>[changed] Update hyper requirement from v0.14 to v1.0 <a
      href="https://redirect.github.com/paritytech/soketto/pull/99">#99</a></li>
      <li>[changed] Update base64 requirement from 0.13 to 0.22 <a
      href="https://redirect.github.com/paritytech/soketto/pull/97">#97</a></li>
      <li>[changed] Bump MSRV to 1.71.1.</li>
      <li>[fixed] doc typo on Client resource field <a
      href="https://redirect.github.com/paritytech/soketto/pull/97">#79</a></li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/paritytech/soketto/commit/7fee76678b7d08b21f5081de0f9041c7c9c1afdd"><code>7fee766</code></a>
      Merge pull request <a
      href="https://redirect.github.com/paritytech/soketto/issues/100">#100</a>
      from paritytech/chore-release-soketto-0.8</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/f392c852b2ad7d6146accb5b75989dd60cbeaed1"><code>f392c85</code></a>
      chore: release v0.8.0</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/6f31ad11e742a3e83ec9b9b75644b2e0242f5da7"><code>6f31ad1</code></a>
      Merge pull request <a
      href="https://redirect.github.com/paritytech/soketto/issues/88">#88</a>
      from paritytech/dependabot/github_actions/actions/chec...</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/322240516dc844abd5deb9d740df3b16614c08b9"><code>3222405</code></a>
      Merge pull request <a
      href="https://redirect.github.com/paritytech/soketto/issues/99">#99</a>
      from paritytech/chore-update-hyper</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/afe56f5d26687b60b038522e7f10277adfd73c14"><code>afe56f5</code></a>
      Merge pull request <a
      href="https://redirect.github.com/paritytech/soketto/issues/97">#97</a>
      from paritytech/dependabot/cargo/base64-0.22</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/420216aad917301e3513905ad55f60ffc068a4e0"><code>420216a</code></a>
      chore(deps): update hyper v1.0</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/050d44ba45cd800877729b649a898ac483fbff97"><code>050d44b</code></a>
      Update base64 requirement from 0.21 to 0.22</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/3d65c54d37162a57c8401f6428b3f9213bed8fd7"><code>3d65c54</code></a>
      Merge pull request <a
      href="https://redirect.github.com/paritytech/soketto/issues/95">#95</a>
      from paritytech/dependabot/cargo/env_logger-0.11.1</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/153cd94dfcdcded2e0f6857ef8623d14ca4cc91a"><code>153cd94</code></a>
      Update env_logger requirement from 0.10.0 to 0.11.1</li>
      <li><a
      href="https://github.com/paritytech/soketto/commit/26a2fc647258345da8cdefe3f8d9f0a01553eb46"><code>26a2fc6</code></a>
      Merge pull request <a
      href="https://redirect.github.com/paritytech/soketto/issues/87">#87</a>
      from kayabaNerve/master</li>
      <li>Additional commits viewable in <a
      href="https://github.com/paritytech/soketto/compare/v0.7.1...v0.8.0">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=soketto&package-manager=cargo&previous-version=0.7.1&new-version=0.8.0)](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)
      
      
      </details>
      
      Signed-off-by: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      37bdc897
    • Alexander Theißen's avatar
      revive: Limit the amount of static memory a contract can use (#5726) · 310ef5ce
      Alexander Theißen authored
      
      
      This will make sure that when uploading new code that the declared
      static memory fits within a defined limit. We apply different limits to
      code and data. Reason is that code will consume much more memory per
      byte once decoded during lazy execution.
      
      This PR:
      
      1) Remove the MaxCodeLen from the `Config` to we maintain tight control
      over it.
      2) Defines a single `STATIC_MEMORY_BYTES` knob that limits the maximum
      decoded size.
      3) Enforces them only on upload but not on execution so we can raise
      them later.
      4) Adapt the worst case calculation in `integrity_check`.
      5) Bumps the max stack depth from 5 to 10 as this will still fit within
      our memory envelope.
      6) The memory limit per contract is now a cool 1MB that can be spent on
      data or code.
      7) Bump PolkaVM for good measure
      8) The blob is limited to 256kb which is just a sanity check to not even
      try parsing very big inputs.
      
      ---------
      
      Co-authored-by: default avatarCyrill Leutwiler <[email protected]>
      310ef5ce
    • Javier Viola's avatar
      Add timeout for script/after_script and debug (#5748) · 08d171e3
      Javier Viola authored
      Fix tests:
      - minimal_template_block_production_test
      - parachain_template_block_production_test
      08d171e3
    • Kazunobu Ndong's avatar
      Remove libp2p dependency from sc-network-sync (#4974) · 70633959
      Kazunobu Ndong authored
      
      
      ## Issue
      https://github.com/paritytech/polkadot-sdk/issues/4858
      
      ## Description
      This PR removes `libp2p::request_response::OutboundFailure` from
      `substrate/client/network/sync/src/engine.rs`. This way, the dependency
      with the library `libp2p` is removed from `sc-network-sync`.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarDmitry Markin <[email protected]>
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      70633959
    • Alexander Samusev's avatar
      [ci] Remove cargo check osx from gitlab (#5752) · 5524c116
      Alexander Samusev authored
      PR removes cargo check job that runs on osx runner from gitlab and moves
      `cargo-check-each-crate-macos` job to be required
      
      cc https://github.com/paritytech/ci_cd/issues/1037
      5524c116
    • Cyrill Leutwiler's avatar
      [pallet-revive] write sandbox output according to the provided output buffer length (#5743) · c0d5c4d8
      Cyrill Leutwiler authored
      
      
      Instead of error out if the provided output buffer is smaller than what
      we want to write, we can just write what fits into the output buffer
      instead. We already write back the actual bytes written to the in-out
      pointer, so contracts can check it anyways.
      
      This in turn introduces the benefit of allowing contracts to implicitly
      request only a portion of the returned data from calls and incantations.
      Which is especially beneficial for YUL as the `call` family opcodes have
      a return data size argument and this change removes the need to work
      around it in contract code.
      
      ---------
      
      Signed-off-by: default avatarxermicus <[email protected]>
      c0d5c4d8
    • Javier Viola's avatar
      add `coretime` test using `zombienet-sdk` (#4883) · ba38d31d
      Javier Viola authored
      Related to #4882
      cc: @s0me0ne-unkn0wn
      
       
      
      ```sh
      RUST_LOG=info,zombie=debug cargo test -p polkadot-zombienet-sdk-tests smoke::coretime_revenue::coretime_revenue_test --features zombie-metadata  -- --exact
      ```
      
      ---
      
      _Update_: This pr is now ready for review. `warp-sync` failing test are
      not related.
      
      ---------
      
      Co-authored-by: default avatarDmitry Sinyavin <[email protected]>
      Co-authored-by: default avatars0me0ne-unkn0wn <[email protected]>
      ba38d31d
    • gupnik's avatar
      Adds support for generics in`derive-impl` (#5584) · 69e96659
      gupnik authored
      As raised by @Kianenigma
      
       in
      https://github.com/sam0x17/macro_magic/issues/15, this PR adds the
      support for generics while using `derive_impl`.
      
      This can then be used in conjunction with `FliteFrameSystem` being
      defined [here](https://github.com/kianenigma/flite) as
      ```diff
      +#[derive_impl(FliteFrameSystem<Configuration>)]
      impl frame_system::Config for Runtime {
        type Block = Block;
      
        // .. Rest can be removed
      }
      ```
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      69e96659
  3. Sep 17, 2024
    • Bastian Köcher's avatar
      pallet-treasury: Improve `remove_approval` benchmark (#5713) · 9cdbdc5a
      Bastian Köcher authored
      When `SpendOrigin` doesn't return any `succesful_origin`, it doesn't
      mean that `RejectOrigin` will do the same. Thus, this pr fixes a
      potential wrong benchmarked weight for when `SpendOrigin` is set to e.g.
      `NeverOrigin`.
      9cdbdc5a
    • Nazar Mokrynskyi's avatar
      Syncing strategy refactoring (part 2) (#5666) · 43cd6fd4
      Nazar Mokrynskyi authored
      # Description
      
      Follow-up to https://github.com/paritytech/polkadot-sdk/pull/5469 and
      mostly covering https://github.com/paritytech/polkadot-sdk/issues/5333.
      
      The primary change here is that syncing strategy is no longer created
      inside of syncing engine, instead syncing strategy is an argument of
      syncing engine, more specifically it is an argument to `build_network`
      that most downstream users will use. This also extracts addition of
      request-response protocols outside of network construction, making sure
      they are physically not present when they don't need to be (imagine
      syncing strategy that uses none of Substrate's protocols in its
      implementation for example).
      
      This technically allows to completely replace syncing strategy with
      whatever strategy chain might need.
      
      There will be at least one follow-up PR that will simplify
      `SyncingStrategy` trait and other public interfaces to remove mentions
      of block/state/warp sync requests, replacing them with generic APIs,
      such that strategies where warp sync is not applicable don't have to
      provide dummy method implementations, etc.
      
      ## Integration
      
      Downstream projects will have to write a bit of boilerplate calling
      `build_polkadot_syncing_strategy` function to create previously default
      syncing strategy.
      
      ## Review Notes
      
      Please review PR through individual commits rather than the final diff,
      it will be easier that way. The changes are mostly just moving code
      around one step at a time.
      
      # Checklist
      
      * [x] My PR includes a detailed description as outlined in the
      "Description" and its two subsections above.
      * [x] 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.
      * [x] I have made corresponding changes to the documentation (if
      applicable)
      43cd6fd4
  4. Sep 16, 2024
  5. Sep 13, 2024
  6. Sep 12, 2024
  7. Sep 11, 2024
    • Pavlo Khrystenko's avatar
      Deprecation info support in RuntimeMetadataIR (#4851) · ec9a734f
      Pavlo Khrystenko authored
      
      
      ### Description: 
      * Adds `DeprecationStatusIR` enum to sp_metadata_ir.
      Deprecation info for simple items.
      * Adds `DeprecationInfoIR` enum to sp_metadata_ir.
      It is a deprecation info for an enums/errors/calls. Contains
      `DeprecationStatusIR`.
      Denotes full/partial deprecation of the type or its variants/calls
      * Adds `deprecation_info` field to 
             - `RuntimeApiMetadataIR`
             - `RuntimeApiMethodMetadataIR`
             - `StorageEntryMetadataIR`
             - `PalletConstantMetadataIR`
             - `PalletCallMetadataIR`
             - `PalletMetadataIR`
             - `PalletEventMetadataIR`
             - `PalletErrorMetadataIR`
      
      ### Testing done: 
      - Unit tests to check whether or not correct `note`/`since` texts are
      getting propagated to the metadata structs.
      - UI test to check for error message in case of incorrect attribute
      usage.
      There's also some test updates to make sure that deprecation attributes
      are getting propagated to the relevant structs.
      
      see: #4098, Solution: A
      
      ### Examples of produced deprecation info metadata
      They can be found in:
       - Tests for `frame-support`
       - hackmd link https://hackmd.io/@Zett98/Bys0YgbcR
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      ec9a734f
    • Ankan's avatar
      [Staking] Propagate actual system error while staking::bond (#5627) · 8f6699be
      Ankan authored
      Trivial and self explanatory changes. 
      
      Wrapping err such as these makes debugging harder as well as does not
      really give any meaningful reason why this happened. The increment of
      consumer can genuinely fail if there are no providers (account does not
      exist) or it reaches max consumers. In both cases, its better to
      propagate the actual System err.
      8f6699be
    • Niklas Adolfsson's avatar
      rpc server: fix deny unsafe on RpcMethods::Auto (#5678) · 4e7c9e7f
      Niklas Adolfsson authored
      
      
      Close #5677
      
      I made a nit when I moved this code:
      https://github.com/paritytech/polkadot-sdk/blob/v1.14.0-rc1/substrate/client/service/src/lib.rs#L379-#L385
      in https://github.com/paritytech/polkadot-sdk/pull/4792
      
      Thus:
       - (ip.is_loopback(), RpcMethods::Auto) -> allow unsafe
       - (!ip.is_loopback(), RpcMethods::Auto) -> deny unsafe
      
      ---------
      
      Co-authored-by: default avatarggwpez <[email protected]>
      4e7c9e7f
    • Oliver Tale-Yazdi's avatar
      [CI] Fix parity-publish (#5670) · 0f7acb52
      Oliver Tale-Yazdi authored
      
      
      Install with `--locked` to try to fix the CI.
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      0f7acb52
    • PG Herveou's avatar
      7d30806f
    • Maksym H's avatar
      fix cmd detached commit (#5672) · 47cc5995
      Maksym H authored
      return the repo/ref as .sha creates detached branch and doesn't let to
      push back the changes
      47cc5995
    • Alexander Theißen's avatar
      Send balance when contract doesn't exist (#5664) · ea5fb02e
      Alexander Theißen authored
      Fixes #5577 
      
      I decided to bubble up the error from where we actually try to load the
      contract info. This helps to make sure that we don't miss some entry
      point by accident. The draw back is that we have to live with some
      additional `.expect`.
      
      @pgherveou
      
       With this logic the proxy and its runtime part should be
      completely unaware whether something is a contract call or a balance
      transfer. They should just route everything into pallet_revive.
      
      ---------
      
      Co-authored-by: default avatarCyrill Leutwiler <[email protected]>
      ea5fb02e
  8. Sep 10, 2024
    • Maksym H's avatar
      Add prdoc command to /cmd (#5661) · f0e420a0
      Maksym H authored
      Fixes https://github.com/paritytech/polkadot-sdk/issues/5647
      
      - [x]  create new command (reusing original py module)
      - [x]  add unit-test cases (just the fact of proxy)
      - [x]  update docs
      f0e420a0