Skip to content
Snippets Groups Projects
  1. Jul 03, 2024
  2. Jul 01, 2024
  3. Jun 28, 2024
  4. Jun 27, 2024
  5. Jun 26, 2024
  6. Jun 25, 2024
    • gupnik's avatar
      Use real rust type for pallet alias in `runtime` macro (#4769) · 2f3a1bf8
      gupnik authored
      Fixes https://github.com/paritytech/polkadot-sdk/issues/4723. Also,
      closes https://github.com/paritytech/polkadot-sdk/issues/4622
      
      As stated in the linked issue, this PR adds the ability to use a real
      rust type for pallet alias in the new `runtime` macro:
      ```rust
      #[runtime::pallet_index(0)]
      pub type System = frame_system::Pallet<Runtime>;
      ```
      
      Please note that the current syntax still continues to be supported.
      
      CC: @shawntabrizi @Kianenigma
      
      
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      2f3a1bf8
    • Aaro Altonen's avatar
      Upgrade libp2p to 0.52.4 (#1631) · 414a8fc2
      Aaro Altonen authored
      Upgrade libp2p to 0.52.4, including a fix: 
      
      * Set Kademlia to server mode
      (https://github.com/paritytech/substrate/pull/14703)
      
      ### TODO
      - [x] Fix 3 zombienet tests failing:
        - [x] `zombienet-substrate-0002-validators-warp-sync`
      - [ ]
      ~`zombienet-polkadot-functional-0005-parachains-disputes-past-session`~
      The test is also flaky in other PRs and is not required for CI to
      succeed.
        - [x] `zombienet-polkadot-functional-0009-approval-voting-coalescing`
      - [x] Uncomment and update to the actual libp2p API tests in
      [`substrate/client/network/src/protocol/notifications/handler.rs`](https://github.com/paritytech/polkadot-sdk/blob/7331f179/substrate/client/network/src/protocol/notifications/handler.rs#L1009).
      - [x] When upgrading `multihash` crate as part of libp2p upgrade to
      version v0.19.1, uncomment the conversion code at
      https://github.com/paritytech/polkadot-sdk/blob/7547c494
      
      /substrate/client/network/types/src/multihash.rs#L159
      - [x] Perform a burn-in.
      
      ---------
      
      Co-authored-by: default avatarAnton <anton.kalyaev@gmail.com>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      414a8fc2
    • Sebastian Kunert's avatar
      chain-spec-builder: Add support for `codeSubstitutes` (#4685) · 3c213726
      Sebastian Kunert authored
      While working on https://github.com/paritytech/polkadot-sdk/pull/4600 I
      found that it would be nice if `chain-spec-builder` supported
      `codeSubstitutes`. After this PR is merged you can do:
      
      ```
      chain-spec-builder add-code-substitute chain_spec.json my_runtime.compact.compressed.wasm 1234
      ```
      
      In addition, the `chain-spec-builder` was silently removing
      `relay_chain` and `para_id` fields when used on parachain chain-specs.
      This is now fixed by providing a custom chain-spec extension that has
      these fields marked as optional.
      3c213726
    • yjh's avatar
      chore: remove unused rustc-hex deps; enable rustc-hex for primitive-types in sp-core (#4860) · a406dd52
      yjh authored
      
      Some primitives have impl Hex related traits enabled by `rustc-hex`
      feature. People wanna use H256/H160 maybe need these trait impls
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      a406dd52
    • Andrei Eres's avatar
    • Bastian Köcher's avatar
      rpc2: Finalized event doesn't indicate that the best block changes (#4872) · a0fc3b54
      Bastian Köcher authored
      We should not print a warning if the best block stays the same between
      two finality events. There is no requirement that this changes. For sure
      this doesn't need to be an error message.
      a0fc3b54
  7. Jun 24, 2024
    • dashangcun's avatar
      chore: remove repeat words (#4869) · 63e26444
      dashangcun authored
      
      Signed-off-by: default avatardashangcun <jchaodaohang@foxmail.com>
      Co-authored-by: default avatardashangcun <jchaodaohang@foxmail.com>
      63e26444
    • Muharem Ismailov's avatar
      treasury pallet: remove unused config parameters (#4831) · 5e62782d
      Muharem Ismailov authored
      Remove unused config parameters `ApproveOrigin` and `OnSlash` from the
      treasury pallet. Add `OnSlash` config parameter to the bounties and tips
      pallets.
      
      part of https://github.com/paritytech/polkadot-sdk/issues/3800
      5e62782d
    • Oliver Tale-Yazdi's avatar
      CI quick-checks: Pull Rust deps in advance (#4867) · 10b68db9
      Oliver Tale-Yazdi authored
      
      Pull the Rust dependencies in advance to see if there is an issue with
      timeouts.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      10b68db9
    • Muharem Ismailov's avatar
      pallet ranked collective: max member count per rank (#4807) · 0b11c27e
      Muharem Ismailov authored
      Configuration for the maximum member count per rank, with the option for
      no limit.
      0b11c27e
    • Oliver Tale-Yazdi's avatar
      Lift all dependencies (the big one) (#4716) · 8efa0544
      Oliver Tale-Yazdi authored
      
      After preparing in https://github.com/paritytech/polkadot-sdk/pull/4633,
      we can lift also all internal dependencies up to the workspace.
      
      This does not actually change anything, but uses `workspace = true` for
      all dependencies. You can check it with:
      ```bash
      git checkout -q $(git merge-base oty-lift-all-deps origin/master)
      cargo tree -e features > master.out
      
      git checkout -q oty-lift-all-deps
      cargo tree -e features > new.out
      diff master.out new.out
      ```
      
      It did not yet lift 100% of dependencies, some inside of `target.*` or
      some that had conflicting aliases introduced recently. But i will do
      these together in a follow-up with CI checks.
      
      Can be reproduced with [zepter](https://github.com/ggwpez/zepter/):
      `zepter transpose d lift-to-workspace "regex:.*" --version-resolver
      highest --skip-package "polkadot-sdk" --ignore-errors --fix`.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      8efa0544
    • Bastian Köcher's avatar
      Ensure earliest allowed block is at minimum the next block (#4823) · b7767168
      Bastian Köcher authored
      When `min_enactment_period == 0` and `desired == At(n)` where `n` is
      smaller than the current block number, the scheduling would fail. This
      happened for example here:
      https://collectives.subsquare.io/fellowship/referenda/126
      
      To ensure that this doesn't happen again, ensure that the earliest
      allowed block is at minimum the next block.
      b7767168
    • Deepak Chaudhary's avatar
      pallet-membership should implement ContainsLengthBound (#4865) · fed81f7e
      Deepak Chaudhary authored
      
      ### ISSUE
      Link to the issue:
      https://github.com/paritytech/polkadot-sdk/issues/1143
      
      Deliverables
       - Implement trait `ContainsLengthBound` for pallet-membership
       
      
      ### Test Outcomes
      ___
      Successful tests by running `cargo test -p pallet-membership --features
      runtime-benchmarks`
      
      
      
      running 22 tests
      test tests::__construct_runtime_integrity_test::runtime_integrity_tests
      ... ok
      test benchmark::bench_clear_prime ... ok
      test tests::add_member_works ... ok
      test tests::change_key_with_same_caller_as_argument_changes_nothing ...
      ok
      test tests::change_key_works ... ok
      test benchmark::bench_set_prime ... ok
      test benchmark::bench_remove_member ... ok
      test benchmark::bench_change_key ... ok
      test tests::change_key_works_that_does_not_change_order ... ok
      test benchmark::bench_reset_members ... ok
      test benchmark::bench_add_member ... ok
      test tests::genesis_build_panics_with_duplicate_members - should panic
      ... ok
      test benchmark::bench_swap_member ... ok
      test tests::query_membership_works ... ok
      test tests::prime_member_works ... ok
      test tests::test_genesis_config_builds ... ok
      test tests::remove_member_works ... ok
      test tests::migration_v4 ... ok
      test tests::swap_member_with_identical_arguments_changes_nothing ... ok
      test tests::swap_member_works_that_does_not_change_order ... ok
      test tests::swap_member_works ... ok
      test tests::reset_members_works ... ok
      
      test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
      out; finished in 0.01s
      
         Doc-tests pallet_membership
      
      running 0 tests
      
      test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
      out; finished in 0.00s
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      fed81f7e
    • Oliver Tale-Yazdi's avatar
  8. Jun 23, 2024