Skip to content
Snippets Groups Projects
  1. Nov 07, 2024
    • Branislav Kontur's avatar
      Remove internal `ViaBridgeHubExporter/SovereignPaidRemoteExporter` and allow... · 7c032bc3
      Branislav Kontur authored
      Remove internal `ViaBridgeHubExporter/SovereignPaidRemoteExporter` and allow to externalize it with `ToBridgeHubSender`.
    • Branislav Kontur's avatar
      Nits · 2a9df690
      Branislav Kontur authored
    • Xavier Lau's avatar
      Migrate pallet-elections-phragmen benchmark to v2 and improve doc (#6314) · c4e94d35
      Xavier Lau authored
      
      Part of:
      
      - #6202.
      
      ---------
      
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Alin Dima's avatar
      make prospective-parachains debug logs less spammy (#6406) · 2680f20a
      Alin Dima authored
      Fixes https://github.com/paritytech/polkadot-sdk/issues/6172
    • Andrei Eres's avatar
      Add networking benchmarks for libp2p (#6077) · 8795ae66
      Andrei Eres authored
      
      # Description
      
      Implemented benchmarks for Notifications and RequestResponse protocols
      with libp2p implementation. These benchmarks allow us to monitor
      regressions and implement fixes before they are observed in real chain.
      In the future, they can be used for targeted optimizations of litep2p
      compared to libp2p.
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/5220
      
      Next steps:
      - Add benchmarks for litep2p implementation
      - Optimize load to get better results
      - Add benchmarks to CI to catch regressions
      
      
      
      ## Integration
      
      Benchmarks don't affect downstream projects.
      
      ---------
      
      Co-authored-by: default avataralvicsam <alvicsam@gmail.com>
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Alexandre R. Baldé's avatar
      Add missing events to identity pallet (#6261) · 65e79720
      Alexandre R. Baldé authored
      # Description
      
      E2E tests to Polkadot/Kusama's people chains (in
      https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/63)
      revealed that 2 of the identity pallet's extrinsics did not emit events
      in case of success:
      * `pallet_identity::rename_sub`, and
      * `pallet_identity::set_subs`
      
      This PR fixes that.
      
      ## Integration
      
      Other than 2 extrinsics emiting an event when previously they did not,
      no other behavior in pallets/extrinsics was modified, so no integration
      is needed.
      
      ## Review Notes
      
      N/A
    • Michal Kucharczyk's avatar
      gensis-config: patching default `RuntimeGenesisConfig` fixed (#6382) · 566706dd
      Michal Kucharczyk authored
      
      This PR changes the behavior of `json_patch::merge` function which no
      longer removes any keys from the base JSON object.
      
      fixes: #6306
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Egor_P's avatar
      [Release|CI/CD] Add node version to deb package version (#6399) · 1100c184
      Egor_P authored
      This PR has small addition to the db package version. As `cargodeb`
      takes the version from the `*.toml` file, this PR adds an extra flag to
      the `cargodeb` command so that the version of the deb package matches
      the `polkadot` node version.
    • Andrei Eres's avatar
      PVF: drop backing jobs if it is too late (#5616) · 6c8a347a
      Andrei Eres authored
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/5530
      
      This PR introduces the removal of backing jobs that have been back
      pressured for longer than `allowedAncestryLen`, as these candidates are
      no longer viable.
      
      It is reasonable to expect a result for a backing job execution within
      `allowedAncestryLen` blocks. Therefore, we set the job TTL as a relay
      block number and synchronize the validation host by sending activated
      leaves.
      
      ---------
      
      Co-authored-by: default avatarAndrei Sandu <54316454+sandreim@users.noreply.github.com>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
    • Alexandru Vasile's avatar
      net/discovery: Do not propagate external addr with different peerIDs (#6380) · bb8c7a3b
      Alexandru Vasile authored
      
      This PR ensures that external addresses with different PeerIDs are not
      propagated to the higher layer of the network code.
      
      While at it, this ensures that libp2p only adds the `/p2p/peerid` part
      to the discovered address if it does not contain it already.
      
      This is a followup from:
      - https://github.com/paritytech/polkadot-sdk/pull/6298
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
    • Ankan's avatar
      [pallet-staking] Add page info to `PayoutStarted` event (#5984) · 8c146a7c
      Ankan authored
      
      fixes https://github.com/paritytech/polkadot-sdk/issues/5966
      
      ---------
      
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
    • Nazar Mokrynskyi's avatar
      Syncing strategy refactoring (part 3) (#5737) · 12d90524
      Nazar Mokrynskyi authored
      # Description
      
      This is a continuation of
      https://github.com/paritytech/polkadot-sdk/pull/5666 that finally fixes
      https://github.com/paritytech/polkadot-sdk/issues/5333.
      
      This should allow developers to create custom syncing strategies or even
      the whole syncing engine if they so desire. It also moved syncing engine
      creation and addition of corresponding protocol outside
      `build_network_advanced` method, which is something Bastian expressed as
      desired in
      https://github.com/paritytech/polkadot-sdk/issues/5#issuecomment-1700816458
      
      Here I replaced strategy-specific types and methods in `SyncingStrategy`
      trait with generic ones. Specifically `SyncingAction` is now used by all
      strategies instead of strategy-specific types with conversions.
      `StrategyKey` was an enum with a fixed set of options and now replaced
      with an opaque type that strategies create privately and send to upper
      layers as an opaque type. Requests and responses are now handled in a
      generic way regardl...
    • Alexandru Vasile's avatar
      substrate/zombienet: Fix 0002-validators-warp-sync (#6379) · 3c7b9a0e
      Alexandru Vasile authored
      
      This PR fixes the `0002-validators-warp-sync` zombienet test by matching
      for a specific error case.
      
      The following PR introduced a new error for validators that don't have
      public addresses available for publishing in the DHT:
      - https://github.com/paritytech/polkadot-sdk/pull/6298
      The log line was moved from `eprintln!("Warning: ...` in sc-cli to the
      authority discovery where it is printed properly as an error.
      
      
      cc @paritytech/sdk-node
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
    • Alin Dima's avatar
      fix shared-core-idle-parachain flaky test (#6387) · ec77843c
      Alin Dima authored
      https://github.com/paritytech/polkadot-sdk/issues/6343
    • Xavier Lau's avatar
    • dependabot[bot]'s avatar
      Bump futures from 0.3.30 to 0.3.31 (#6252) · 27bf54b4
      dependabot[bot] authored
      
      Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.30 to
      0.3.31.
      <details>
      <summary>Release notes</summary>
      <p><em>Sourced from <a
      href="https://github.com/rust-lang/futures-rs/releases">futures's
      releases</a>.</em></p>
      <blockquote>
      <h2>0.3.31</h2>
      <ul>
      <li>Fix use after free of task in <code>FuturesUnordered</code> when
      dropped future panics (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li>
      <li>Fix soundness bug in <code>task::waker_ref</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>)
      This is a breaking change but allowed because it is soundness bug
      fix.</li>
      <li>Fix bugs in <code>AsyncBufRead::read_line</code> and
      <code>AsyncBufReadExt::lines</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
      <li>Fix parsing issue in
      <code>select!</code>/<code>select_biased!</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>)
      This is technically a breaking change as it will now reject a very odd
      undocumented syntax that was previously accidentally accepted.</li>
      <li>Work around issue due to upstream <code>Waker::will_wake</code>
      change (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
      <li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
      <li>Add <code>future::AlwaysReady</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li>
      <li>Relax trait bound on non-constructor methods of
      <code>io::{BufReader,BufWriter}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Changelog</summary>
      <p><em>Sourced from <a
      href="https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md">futures's
      changelog</a>.</em></p>
      <blockquote>
      <h1>0.3.31 - 2024-10-05</h1>
      <ul>
      <li>Fix use after free of task in <code>FuturesUnordered</code> when
      dropped future panics (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li>
      <li>Fix soundness bug in <code>task::waker_ref</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>)
      This is a breaking change but allowed because it is soundness bug
      fix.</li>
      <li>Fix bugs in <code>AsyncBufRead::read_line</code> and
      <code>AsyncBufReadExt::lines</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
      <li>Fix parsing issue in
      <code>select!</code>/<code>select_biased!</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>)
      This is technically a breaking change as it will now reject a very odd
      undocumented syntax that was previously accidentally accepted.</li>
      <li>Work around issue due to upstream <code>Waker::will_wake</code>
      change (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
      <li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
      <li>Add <code>future::AlwaysReady</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li>
      <li>Relax trait bound on non-constructor methods of
      <code>io::{BufReader,BufWriter}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/1e052816b09890925cfdfcbe8d390cdaae5e4c38"><code>1e05281</code></a>
      Release 0.3.31</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/8a8b085a8c1a7396173a104c67e0cf2f5b74fc74"><code>8a8b085</code></a>
      Fix clippy::uninit_vec warning</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/f3fb74df310d070d91df7995c942f223cba6720a"><code>f3fb74d</code></a>
      Document how <code>BoxFuture</code>s / <code>BoxStream</code>s are often
      made (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2887">#2887</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/f00e7afb467e5f9b3c81724cc3cac1f0687fff7c"><code>f00e7af</code></a>
      Fix use after free of task in FuturesUnordered when dropped future
      panics (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2">#2</a>...</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/33c46b3dc65e151e0e794636ad62872330733557"><code>33c46b3</code></a>
      ci: Work around sanitizer issue on latest Linux kernel</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/7bf5a72826c0daed633ec48e8ddaecd8a32f0d11"><code>7bf5a72</code></a>
      Fix issues with <code>AsyncBufRead::read_line</code> and
      <code>AsyncBufReadExt::lines</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/87afaf3973e8652228f7ccaadd04e7b0e456c63d"><code>87afaf3</code></a>
      Use <code>#[inline(always)]</code> on <code>clone_arc_raw</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/549b90b1793a044bcade67b81a3d7eabd95f3971"><code>549b90b</code></a>
      Add accessors for the inner of stream::Iter (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/07b004ac7e0d72e09ff652f234d00e4f26a5f558"><code>07b004a</code></a>
      Add missing symbols (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2883">#2883</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/86dc069fa278d4197de91eb6e038e0ec64857684"><code>86dc069</code></a>
      Various fixes too make the CI green (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2885">#2885</a>)</li>
      <li>Additional commits viewable in <a
      href="https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=futures&package-manager=cargo&previous-version=0.3.30&new-version=0.3.31)](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] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  2. Nov 06, 2024
    • Ankan's avatar
      [Pools] New runtime api that returns the pot accounts associated with the pool (#6357) · 1f381f60
      Ankan authored
      closes https://github.com/paritytech/polkadot-sdk/issues/6358
      
      Adds the following runtime api to pallet-nomination-pools.
      `pool_accounts(pool_id)`: Returns `(bonded_account, reward_account)`
      associated with the `pool_id`.
      
      cc: @rossbulat
      
      
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
    • Francisco Aguirre's avatar
      XCM v5 (#4826) · 85521e87
      Francisco Aguirre authored
      # Context
      
      This PR aims to introduce XCMv5, for now it's in progress and will be
      updated over time.
      This branch will serve as a milestone branch for merging in all features
      we want to add to XCM, roughly outlined
      [here](https://github.com/polkadot-fellows/xcm-format/issues/60).
      More features could be added.
      
      ## TODO
      - [x] Migrate foreign assets from v3 to v4
      - [x] Setup v5 skeleton
      - [x] Remove XCMv2
      - [x] https://github.com/paritytech/polkadot-sdk/pull/5390
      - [x] https://github.com/paritytech/polkadot-sdk/pull/5585
      - [x] https://github.com/paritytech/polkadot-sdk/pull/5420
      - [x] https://github.com/paritytech/polkadot-sdk/pull/5876
      - [x] https://github.com/paritytech/polkadot-sdk/pull/5971
      - [x] https://github.com/paritytech/polkadot-sdk/pull/6148
      - [x] https://github.com/paritytech/polkadot-sdk/pull/6228
      
      Fixes #3434 
      Fixes https://github.com/paritytech/polkadot-sdk/issues/4190
      Fixes https://github.com/paritytech/polkadot-sdk/issues/5209
      Fixes https://github.com/paritytech/polkadot-sdk/iss...
    • Bastian Köcher's avatar
    • eskimor's avatar
      Fix #6102 (#6384) · 86e1e386
      eskimor authored
      
      Relax requirements for `assign_core` so that it accepts updates for the
      last scheduled entry.
      
      Fixes #6102
      
      ---------
      
      Co-authored-by: default avatareskimor <eskimor@no-such-url.com>
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Dastan's avatar
      sp-api: `impl_runtime_apis!` replace the use of `Self` as a type argument (#4012) · a1aa71ea
      Dastan authored
      
      closes #1890 
      
      ### Overview 
      
      Introduces similar checker struct to `CheckTraitDecls` in
      `decl_runtime_apis!` - `CheckTraitImpls`. Overrides
      `visit::visit_type_path` to detect usage of `Self` as a type argument
      within the scope of `impl_runtime_apis!`.
      
      **Note**: only prevents the usage of `Self` as a type argument in an
      angle bracket `<>`, as it is the only use case that fails to compile.
      For example, the code
      [below](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs#L1002)
      compiles fine:
      
      ```rs
      impl BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance> for Runtime {
        fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
      	  let bench_lane_id = <Self as BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance>>::bench_lane_id();
      	  // ...
      ```
      
      ### Result
      
      Given a block of code like this:
      
      ```rs
      impl_runtime_apis! {
      	impl apis::Core<Block> for Runtime {
      		fn initialize_block(header: &HeaderFor<Self>) -> ExtrinsicInclusionMode {
      			let _: HeaderFor<Self> = header.clone();
      			RuntimeExecutive::initialize_block(header)
      		}
      		// ...
               }
      // ...
      ```
      
      <details open>
      
      <summary>Output:</summary>
      
      ```bash
      $ cargo build --release -p minimal-template-node
        error: `Self` can not be used as type argument in the scope of `impl_runtime_apis!`. Use `Runtime` instead.
           --> /polkadot-sdk/templates/minimal/runtime/src/lib.rs:133:11
            |
        133 |             let _: HeaderFor<Self> = header.clone();
            |                    ^^^^^^^^^^^^^^^
      
        error: `Self` can not be used as type argument in the scope of `impl_runtime_apis!`. Use `Runtime` instead.
           --> /polkadot-sdk/templates/minimal/runtime/src/lib.rs:132:32
            |
        132 |         fn initialize_block(header: &HeaderFor<Self>) -> ExtrinsicInclusionMode {
      ```
      
      </details>
      
      ---------
      
      Co-authored-by: default avatarPavlo Khrystenko <p.khrystenko@gmail.com>
      Co-authored-by: default avatarPavlo Khrystenko <45178695+pkhry@users.noreply.github.com>
      Co-authored-by: default avatarAlexandru Vasile <60601340+lexnv@users.noreply.github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    • Alin Dima's avatar
      collator protocol: validate descriptor version on the validator side (#6011) · 67394cd1
      Alin Dima authored
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/5047
      
      TODO:
      
      - [x] prdoc
      - [x] fix/add tests
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
      Co-authored-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
      Co-authored-by: default avatarAndrei Sandu <54316454+sandreim@users.noreply.github.com>
    • Egor_P's avatar
      [Release|CI/CD] Fix GH_TOKEN owner (#6381) · 6170c37f
      Egor_P authored
      A quick fix to the step that generates a temporary token used in the
      pipeline
    • James Wilson's avatar
      Don't expose metadata for Runtime APIs that haven't been implemented (#6337) · c81569ef
      James Wilson authored
      
      # Description
      
      Prior to this PR, the metadata for runtime APIs was entirely based on
      that generated by `decl_runtime_apis`. It therefore didn't take into
      account that `impl_runtime_apis` might implement older versions of APIs
      than what has been declared.
      
      This PR filters the returned runtime API metadata to only include
      methods actually implemented, and also avoids including methods labelled
      with `changed_in` (which the previous code was atempting to do already
      but not successfully, owing to the attr being removed prior to the
      check).
      
      We also change all version related things to be `u32`s (rather than
      VERSION being `u32` and `api_version`s being `u64`) for consistency /
      ease of comparison.
      
      A test is added which works with both the `enable-staging-api` feature
      in api/tests enabled or disabled, to check all of this.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Bastian Köcher's avatar
      polkadot-service: Fix flaky tests (#6376) · d1620f06
      Bastian Köcher authored
      The tests used the same paths. When run on CI, each test is run in its
      own process and thus, this "serial_test" crate wasn't used. The tests
      are now using their own thread local tempdir, which ensures that the
      tests are working when running in parallel in the same program or when
      being run individually.
    • Alexandru Vasile's avatar
      litep2p/peerset: Do not disconnect all peers on `SetReservedPeers` command (#6016) · ccb2a889
      Alexandru Vasile authored
      
      Previously, when receiving the `SetReservedPeers { reserved }` all peers
      not in the `reserved` set were removed.
      
      This is incorrect, the intention of `SetReservedPeers` is to change the
      active set of reserved peers and disconnect previously reserved peers
      not in the new set.
      
      While at it, have added a few other improvements to make the peerset
      more robust:
      - `SetReservedPeers`: does not disconnect all peers
      - `SetReservedPeers`: if a reserved peer is no longer reserved, the
      peerset tries to move the peers to the regular set if the slots allow
      this move. This ensures the (now regular) peer counts towards slot
      allocation.
      - every 1 seconds: If we don't have enough connect peers, add the
      reserved peers to the list that the peerstore ignores. Reserved peers
      are already connected and the peerstore might return otherwise a
      reserved peer
      
      
      ### Next Steps
      
      - [x] More testing
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
      Co-authored-by: default avatarMichal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
    • davidk-pt's avatar
      pallet-child-bounties index child bounty by parent bounty (#6255) · a4791617
      davidk-pt authored
      
      Resolves https://github.com/paritytech/polkadot-sdk/issues/5929
      
      Migrates `ChildBountyDescriptions` to be indexed instead of unique child
      bounty id unique per all child bounties in the pallet to be unique per
      every parent bounty.
      
      Migrates `(ParentBounty, ChildBounty)` keys inside `ChildBounties`
      storage item to use new `ChildBounty` ids starting from `0`.
      
      @paritytech/frame-coders
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarDavidK <davidk@parity.io>
      Co-authored-by: default avatarmuharem <ismailov.m.h@gmail.com>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  3. Nov 05, 2024
    • Michal Kucharczyk's avatar
      `chain-spec-builder`: info about patch/full files added (#6373) · b667c279
      Michal Kucharczyk authored
      
      There was no good example of what is patch and full genesis config file.
      Some explanation and example were added to the `chain-spec-builder` doc.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarIulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
    • Nazar Mokrynskyi's avatar
      Remove `sp_runtime::RuntimeString` and replace with `Cow<'static, str>` or... · c5444f38
      Nazar Mokrynskyi authored
      Remove `sp_runtime::RuntimeString` and replace with `Cow<'static, str>` or `String` depending on use case (#5693)
      
      # Description
      
      As described in https://github.com/paritytech/polkadot-sdk/issues/4001
      `RuntimeVersion` was not encoded consistently using serde. Turned out it
      was a remnant of old times and no longer actually needed. As such I
      removed it completely in this PR and replaced with `Cow<'static, str>`
      for spec/impl names and `String` for error cases.
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/4001.
      
      ## Integration
      
      For downstream projects the upgrade will primarily consist of following
      two changes:
      ```diff
      #[sp_version::runtime_version]
      pub const VERSION: RuntimeVersion = RuntimeVersion {
      -	spec_name: create_runtime_str!("statemine"),
      -	impl_name: create_runtime_str!("statemine"),
      +	spec_name: alloc::borrow::Cow::Borrowed("statemine"),
      +	impl_name: alloc::borrow::Cow::Borrowed("statemine"),
      ```
      ```diff
      		fn dispatch_benchmark(
      			config: frame_benchmarking::BenchmarkConfig
      -		) -> Res...
    • Andrei Sandu's avatar
      Fix statement distribution benchmark (#6369) · 52a7325e
      Andrei Sandu authored
      
      I've broken this test with
      https://github.com/paritytech/polkadot-sdk/pull/5883 and this is the
      fix.
      
      The benchmark is now updated to use proper core index and session index
      for the generated candidates.
      
      TODO:
      - [ ] <del> PRDoc </del>
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
    • Xavier Lau's avatar
      Migrate pallet-im-online benchmark to v2 (#6295) · 8b6c6eb2
      Xavier Lau authored
      
      Part of:
      
      - #6202.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
    • Alexander Theißen's avatar
      pallet-revive: Use `RUSTUP_TOOLCHAIN` if set (#6365) · 6f078d18
      Alexander Theißen authored
      
      We were not passing through the `RUSTUP_TOOLCHAIN` variable to the
      `build.rs` script of our fixtures. This means that setting the toolchain
      like `cargo +1.81 build` had no effect on the fixture build. It would
      always fall back to the default toolchain.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • PG Herveou's avatar
      [eth-rpc] proxy /health (#6360) · 76f297da
      PG Herveou authored
      
      make the eth-rpc proxy /health and /health/readiness from the proxied
      substrate chain
      see #4802
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Egor_P's avatar
      [Release|CI/CD] adjust release pipelines (#6366) · 32e116a6
      Egor_P authored
      This PR contains adjustments to the release pipelines. 
      - RC Automation and Branchoff pipelines now use the PGPKMS key generated
      by the release team to sign related commits directly in the Github flow
      - RC Automation does not use old tagging action. Instead, it creates a
      tag and pushes it using git
      - RC binary is going to be done on the larger github runners setup in
      the` paritytech-release` org
      
      Closes: https://github.com/paritytech/release-engineering/issues/233
    • dependabot[bot]'s avatar
      Bump the known_good_semver group across 1 directory with 3 updates (#6339) · c4ef438f
      dependabot[bot] authored
      
      Bumps the known_good_semver group with 2 updates in the / directory:
      [serde](https://github.com/serde-rs/serde) and
      [syn](https://github.com/dtolnay/syn).
      
      Updates `serde` from 1.0.210 to 1.0.214
      <details>
      <summary>Release notes</summary>
      <p><em>Sourced from <a
      href="https://github.com/serde-rs/serde/releases">serde's
      releases</a>.</em></p>
      <blockquote>
      <h2>v1.0.214</h2>
      <ul>
      <li>Implement IntoDeserializer for all Deserializers in serde::de::value
      module (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a>,
      thanks <a
      href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
      </ul>
      <h2>v1.0.213</h2>
      <ul>
      <li>Fix support for macro-generated <code>with</code> attributes inside
      a newtype struct (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a>)</li>
      </ul>
      <h2>v1.0.212</h2>
      <ul>
      <li>Fix hygiene of macro-generated local variable accesses in
      serde(with) wrappers (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2845">#2845</a>)</li>
      </ul>
      <h2>v1.0.211</h2>
      <ul>
      <li>Improve error reporting about mismatched signature in
      <code>with</code> and <code>default</code> attributes (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2558">#2558</a>,
      thanks <a
      href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
      <li>Show variant aliases in error message when variant deserialization
      fails (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2566">#2566</a>,
      thanks <a
      href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
      <li>Improve binary size of untagged enum and internally tagged enum
      deserialization by about 12% (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2821">#2821</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/serde-rs/serde/commit/418062165f9fe395461db9f61569c3142c584854"><code>4180621</code></a>
      Release 1.0.214</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/210373b3b65a2eaf9754c158b43da0429807359c"><code>210373b</code></a>
      Merge pull request <a
      href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a>
      from Mingun/into_deserializer-for-deserializers</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/9cda0157331ca09dec16cd8a0b57bd8eb24f8442"><code>9cda015</code></a>
      Implement IntoDeserializer for all Deserializers in serde::de::value
      module</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/58a8d229315553c4ae0a8d7eee8e382fbae4b4bf"><code>58a8d22</code></a>
      Release 1.0.213</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/ef0ed22593a17a5af5ebe48d3b6ef7c3de1b116a"><code>ef0ed22</code></a>
      Merge pull request <a
      href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a>
      from dtolnay/newtypewith</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/79925ac3947483013ba8136e43bc0449b99bd10c"><code>79925ac</code></a>
      Ignore dead_code warning in regression test</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/b60e4092ec83c70e8c7d39574778349b2c5d9f05"><code>b60e409</code></a>
      Hygiene for macro-generated newtype struct deserialization with 'with'
      attr</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/fdc36e5c06def28b33d3154f0517969d90b744d8"><code>fdc36e5</code></a>
      Add regression test for issue 2846</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/49e11ce1bae9fbb9128c9144c4e1051daf7a29ed"><code>49e11ce</code></a>
      Ignore trivially_copy_pass_by_ref pedantic clippy lint in test</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/7ae1b5f8f39d7a80daaddcc04565f995427bfc41"><code>7ae1b5f</code></a>
      Release 1.0.212</li>
      <li>Additional commits viewable in <a
      href="https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.214">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      Updates `serde_derive` from 1.0.210 to 1.0.214
      <details>
      <summary>Release notes</summary>
      <p><em>Sourced from <a
      href="https://github.com/serde-rs/serde/releases">serde_derive's
      releases</a>.</em></p>
      <blockquote>
      <h2>v1.0.214</h2>
      <ul>
      <li>Implement IntoDeserializer for all Deserializers in serde::de::value
      module (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a>,
      thanks <a
      href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
      </ul>
      <h2>v1.0.213</h2>
      <ul>
      <li>Fix support for macro-generated <code>with</code> attributes inside
      a newtype struct (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a>)</li>
      </ul>
      <h2>v1.0.212</h2>
      <ul>
      <li>Fix hygiene of macro-generated local variable accesses in
      serde(with) wrappers (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2845">#2845</a>)</li>
      </ul>
      <h2>v1.0.211</h2>
      <ul>
      <li>Improve error reporting about mismatched signature in
      <code>with</code> and <code>default</code> attributes (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2558">#2558</a>,
      thanks <a
      href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
      <li>Show variant aliases in error message when variant deserialization
      fails (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2566">#2566</a>,
      thanks <a
      href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
      <li>Improve binary size of untagged enum and internally tagged enum
      deserialization by about 12% (<a
      href="https://redirect.github.com/serde-rs/serde/issues/2821">#2821</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/serde-rs/serde/commit/418062165f9fe395461db9f61569c3142c584854"><code>4180621</code></a>
      Release 1.0.214</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/210373b3b65a2eaf9754c158b43da0429807359c"><code>210373b</code></a>
      Merge pull request <a
      href="https://redirect.github.com/serde-rs/serde/issues/2568">#2568</a>
      from Mingun/into_deserializer-for-deserializers</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/9cda0157331ca09dec16cd8a0b57bd8eb24f8442"><code>9cda015</code></a>
      Implement IntoDeserializer for all Deserializers in serde::de::value
      module</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/58a8d229315553c4ae0a8d7eee8e382fbae4b4bf"><code>58a8d22</code></a>
      Release 1.0.213</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/ef0ed22593a17a5af5ebe48d3b6ef7c3de1b116a"><code>ef0ed22</code></a>
      Merge pull request <a
      href="https://redirect.github.com/serde-rs/serde/issues/2847">#2847</a>
      from dtolnay/newtypewith</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/79925ac3947483013ba8136e43bc0449b99bd10c"><code>79925ac</code></a>
      Ignore dead_code warning in regression test</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/b60e4092ec83c70e8c7d39574778349b2c5d9f05"><code>b60e409</code></a>
      Hygiene for macro-generated newtype struct deserialization with 'with'
      attr</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/fdc36e5c06def28b33d3154f0517969d90b744d8"><code>fdc36e5</code></a>
      Add regression test for issue 2846</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/49e11ce1bae9fbb9128c9144c4e1051daf7a29ed"><code>49e11ce</code></a>
      Ignore trivially_copy_pass_by_ref pedantic clippy lint in test</li>
      <li><a
      href="https://github.com/serde-rs/serde/commit/7ae1b5f8f39d7a80daaddcc04565f995427bfc41"><code>7ae1b5f</code></a>
      Release 1.0.212</li>
      <li>Additional commits viewable in <a
      href="https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.214">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      Updates `syn` from 2.0.82 to 2.0.87
      <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.87</h2>
      <ul>
      <li>Add <a
      href="https://docs.rs/syn/2/syn/buffer/struct.Cursor.html#method.any_group"><code>Cursor::any_group</code></a>
      (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1777">#1777</a>)</li>
      <li>Add <a
      href="https://docs.rs/syn/2/syn/enum.Expr.html#method.peek"><code>Expr::peek</code></a>
      (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1778">#1778</a>)</li>
      <li>Improve syntax support for enum discriminant expressions in
      non-&quot;full&quot; mode (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1779">#1779</a>)</li>
      </ul>
      <h2>2.0.86</h2>
      <ul>
      <li>Support peeking the end of a parse stream (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1689">#1689</a>)</li>
      <li>Allow <code>parse_quote!</code> to produce Vec&lt;Attribute&gt; (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1775">#1775</a>)</li>
      </ul>
      <h2>2.0.85</h2>
      <ul>
      <li>Preserve extern static unsafety in ForeignItem::Verbatim (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1773">#1773</a>)</li>
      </ul>
      <h2>2.0.84</h2>
      <ul>
      <li>Parse safe and explicitly unsafe extern items (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1768">#1768</a>, <a
      href="https://redirect.github.com/rust-lang/rust/issues/123743">rust-lang/rust#123743</a>,
      <a
      href="https://redirect.github.com/rust-lang/rfcs/pull/3484">rust-lang/rfcs#3484</a>)</li>
      <li>Parse self captures: <code>impl Sized + use&lt;Self&gt;</code> (<a
      href="https://redirect.github.com/dtolnay/syn/issues/1772">#1772</a>)</li>
      </ul>
      <h2>2.0.83</h2>
      <ul>
      <li>Documentation improvements</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/dtolnay/syn/commit/a777cff00528f270b43f40b0a58c5c26fc85a2bd"><code>a777cff</code></a>
      Release 2.0.87</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/1f103d4c175ab62b27537a6907c4b77b6aed6ae7"><code>1f103d4</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1779">#1779</a>
      from dtolnay/scan</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/0986a66e1764ed37a4931dde8c509412474636fe"><code>0986a66</code></a>
      Ignore enum_glob_use pedantic clippy lint</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/ca97c7d82d9837c1b49c085a546a481cf879e619"><code>ca97c7d</code></a>
      Translate expr scanner to table driven</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/8039cb37a02cbf080f48416651141d4c77c05075"><code>8039cb3</code></a>
      Test that every expr can be scanned</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/0132c447fe045431906945178bea219816d5e55f"><code>0132c44</code></a>
      Make scan_expr compilable from integration test</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/7c102c3c8b3dc076c03cbe842266a2b140be6323"><code>7c102c3</code></a>
      Extract non-full expr scanner to module</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/ceaf4d693b2af783874b9aa4d50bb208b84a2609"><code>ceaf4d6</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1778">#1778</a>
      from dtolnay/exprpeek</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/a890e9da22b463b05c06696d4cc767c6cb9d3114"><code>a890e9d</code></a>
      Expose can_begin_expr as Expr::peek</li>
      <li><a
      href="https://github.com/dtolnay/syn/commit/12f068ce0889c41e3bd21662e8a0adfaa07d01d9"><code>12f068c</code></a>
      Merge pull request <a
      href="https://redirect.github.com/dtolnay/syn/issues/1777">#1777</a>
      from dtolnay/anygroup</li>
      <li>Additional commits viewable in <a
      href="https://github.com/dtolnay/syn/compare/2.0.82...2.0.87">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] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarBastian Köcher <info@kchr.de>
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
    • Alexander Samusev's avatar
      Run check semver in MQ (#6287) · 16e877be
      Alexander Samusev authored
      For marking `Check SemVer` required
    • davidk-pt's avatar
      [Deprecation] deprecate treasury `spend_local` call and related items (#6169) · 7725890d
      davidk-pt authored
      
      Resolves https://github.com/paritytech/polkadot-sdk/issues/5930
      
      `spend_local` from `treasury` pallet and associated types are
      deprecated. `spend_local` was being used before with native currency in
      the treasury.
      
      This PR provides a documentation on how to migrate to the `spend` call
      instead.
      
      ### Migration
      
      #### For users who were using only `spend_local` before
      
      To replace `spend_local` functionality configure `Paymaster` pallet
      configuration to be `PayFromAccount` and configure `AssetKind` to be
      `()` and use `spend` call instead.
      This way `spend` call will function as deprecated `spend_local`.
      
      Example:
      ```
      impl pallet_treasury::Config for Runtime {
          ..
          type AssetKind = ();
          type Paymaster = PayFromAccount<Self::Currency, TreasuryAccount>;
          // convert balance 1:1 ratio with native currency
          type BalanceConverter = UnityAssetBalanceConversion;
          ..
      }
      ```
      
      #### For users who were already using `spend` with all other assets,
      except the native asset
      
      Use `NativeOrWithId` type for `AssetKind` and have a `UnionOf` for
      native and non-native assets, then use that with `PayAssetFromAccount`.
      
      Example from `kitchensink-runtime`:
      ```
      // Union of native currency and assets
      pub type NativeAndAssets =
          UnionOf<Balances, Assets, NativeFromLeft, NativeOrWithId<u32>, AccountId>;
      
      impl pallet_treasury::Config for Runtime {
          ..
          type AssetKind = NativeOrWithId<u32>;
          type Paymaster = PayAssetFromAccount<NativeAndAssets, TreasuryAccount>;
          type BalanceConverter = AssetRate;
          ..
      }
      
      // AssetRate pallet configuration
      impl pallet_asset_rate::Config for Runtime {
          ..
          type Currency = Balances;
          type AssetKind = NativeOrWithId<u32>;
          ..
      }
      ```
      
      ---------
      
      Co-authored-by: default avatarDavidK <davidk@parity.io>
      Co-authored-by: default avatarMuharem <ismailov.m.h@gmail.com>
    • Alin Dima's avatar
      refactor and harden check_core_index (#6217) · 74ec1ee2
      Alin Dima authored
      Resolves https://github.com/paritytech/polkadot-sdk/issues/6179
    • Alexandru Vasile's avatar
      litep2p: Update litep2p to v0.8.0 (#6353) · 94389a93
      Alexandru Vasile authored
      
      This PR updates litep2p to the latest release.
      
      - `KademliaEvent::PutRecordSucess` is renamed to fix word typo
      - `KademliaEvent::GetProvidersSuccess` and
      `KademliaEvent::IncomingProvider` are needed for bootnodes on DHT work
      and will be utilized later
      
      
      ### Added
      
      - kad: Providers part 8: unit, e2e, and `libp2p` conformance tests
      ([#258](https://github.com/paritytech/litep2p/pull/258))
      - kad: Providers part 7: better types and public API, public addresses &
      known providers ([#246](https://github.com/paritytech/litep2p/pull/246))
      - kad: Providers part 6: stop providing
      ([#245](https://github.com/paritytech/litep2p/pull/245))
      - kad: Providers part 5: `GET_PROVIDERS` query
      ([#236](https://github.com/paritytech/litep2p/pull/236))
      - kad: Providers part 4: refresh local providers
      ([#235](https://github.com/paritytech/litep2p/pull/235))
      - kad: Providers part 3: publish provider records (start providing)
      ([#234](https://github.com/paritytech/litep2p/pull/234))
      
      ### Changed
      
      - transport_service: Improve connection stability by downgrading
      connections on substream inactivity
      ([#260](https://github.com/paritytech/litep2p/pull/260))
      - transport: Abort canceled dial attempts for TCP, WebSocket and Quic
      ([#255](https://github.com/paritytech/litep2p/pull/255))
      - kad/executor: Add timeout for writting frames
      ([#277](https://github.com/paritytech/litep2p/pull/277))
      - kad: Avoid cloning the `KademliaMessage` and use reference for
      `RoutingTable::closest`
      ([#233](https://github.com/paritytech/litep2p/pull/233))
      - peer_state: Robust state machine transitions
      ([#251](https://github.com/paritytech/litep2p/pull/251))
      - address_store: Improve address tracking and add eviction algorithm
      ([#250](https://github.com/paritytech/litep2p/pull/250))
      - kad: Remove unused serde cfg
      ([#262](https://github.com/paritytech/litep2p/pull/262))
      - req-resp: Refactor to move functionality to dedicated methods
      ([#244](https://github.com/paritytech/litep2p/pull/244))
      - transport_service: Improve logs and move code from tokio::select macro
      ([#254](https://github.com/paritytech/litep2p/pull/254))
      
      ### Fixed
      
      - tcp/websocket/quic: Fix cancel memory leak
      ([#272](https://github.com/paritytech/litep2p/pull/272))
      - transport: Fix pending dials memory leak
      ([#271](https://github.com/paritytech/litep2p/pull/271))
      - ping: Fix memory leak of unremoved `pending_opens`
      ([#274](https://github.com/paritytech/litep2p/pull/274))
      - identify: Fix memory leak of unused `pending_opens`
      ([#273](https://github.com/paritytech/litep2p/pull/273))
      - kad: Fix not retrieving local records
      ([#221](https://github.com/paritytech/litep2p/pull/221))
      
      See release changelog for more details:
      https://github.com/paritytech/litep2p/releases/tag/v0.8.0
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
    • Ankan's avatar
      [pallet-staking] Additional check for virtual stakers (#5985) · be26d628
      Ankan authored
      
      closes https://github.com/paritytech/polkadot-sdk/issues/5791.
      
      This is not strictly necessary but serves as a defensive check.
      
      The staking pallet exposes
      [apis](https://paritytech.github.io/polkadot-sdk/master/sp_staking/trait.StakingUnchecked.html#tymethod.virtual_bond)
      that other runtime pallets (pallet-delegated-staking) can use to create
      virtual stakers. However, there’s no way for pallet-staking to ensure
      that the staker is truly keyless. If the caller (this is a trusted
      caller so this would only happen due to a bug) registers an account with
      a private key as a virtual_staker, these accounts could later interact
      directly with pallet-staking dispatchables (such as
      [bond_extra](https://paritytech.github.io/polkadot-sdk/master/pallet_staking/dispatchables/fn.bond_extra.html))
      and bypass any locking mechanism. The check above ensures this scenario
      can never occur by performing an integrity check.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: command-bot <>