Skip to content
Snippets Groups Projects
  1. Sep 18, 2024
  2. 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`.
    • 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)
  3. Sep 16, 2024
  4. Sep 13, 2024
  5. Sep 12, 2024
  6. Sep 11, 2024
  7. 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
    • Alexandru Vasile's avatar
      litep2p: Update network backend to v0.7.0 (#5609) · 12eeb5df
      Alexandru Vasile authored
      
      This release introduces several new features, improvements, and fixes to
      the litep2p library. Key updates include enhanced error handling,
      configurable connection limits, and a new API for managing public
      addresses.
      
      For a detailed set of changes, see [litep2p
      changelog](https://github.com/paritytech/litep2p/blob/master/CHANGELOG.md#070---2024-09-05).
      
      This PR makes use of:
      - connection limits to optimize network throughput
      - better errors that are propagated to substrate metrics 
      - public addresses API to report healthy addresses to the Identify
      protocol
      
      ### Warp sync time improvement
      
      Measuring warp sync time is a bit inaccurate since the network is not
      deterministic and we might end up using faster peers (peers with more
      resources to handle our requests). However, I did not see warp sync
      times of 16 minutes, instead, they are roughly stabilized between 8 and
      10 minutes.
      
      For measuring warp-sync time, I've used
      [sub-trige-logs](https://github.com/lexnv/sub-triage-logs/?tab=readme-ov-file#warp-time)
      
      ### Litep2p
      
      Phase | Time
       -|-
      Warp  | 426.999999919s
      State | 99.000000555s
      Total | 526.000000474s
      
      ### Libp2p
      
      Phase | Time
       -|-
      Warp  | 731.999999837s
      State | 71.000000882s
      Total | 803.000000719s
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/4986
      
      
      ### Low peer count
      
      After exposing the `litep2p::public_addresses` interface, we can report
      to litep2p confirmed external addresses. This should mitigate or at
      least improve: https://github.com/paritytech/polkadot-sdk/issues/4925.
      Will keep the issue around to confirm this.
      
      
      ### Improved metrics
      
      We are one step closer to exposing similar metrics as libp2p:
      https://github.com/paritytech/polkadot-sdk/issues/4681.
      
      cc @paritytech/networking 
      
      ### Next Steps
      - [x] Use public address interface to confirm addresses to identify
      protocol
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
    • Liu-Cheng Xu's avatar
      Introduce `RpcParams` in sc-cli (#5601) · 278d1bf7
      Liu-Cheng Xu authored
      
      This PR is a pure refactoring by consolidating all the RPC related
      parameters into a dedicated `RpcParams` struct, allowing us at subcoin
      to build a custom run cmd without the need to duplicate code.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
    • Nazar Mokrynskyi's avatar
      Syncing strategy refactoring (#5469) · 1f1f20a8
      Nazar Mokrynskyi authored
      This is a step towards
      https://github.com/paritytech/polkadot-sdk/issues/5333
      
      The commits with code moving (but no other changes) and actual changes
      are separated for easier review.
      
      Essentially this results in `SyncingStrategy` trait replacing struct
      (which is renamed to `PolkadotSyncingStrategy`, open for better name
      suggestions). Technically it is already possible to replace
      `PolkadotSyncingStrategy<B, Client>` with `Box<dyn SyncingStrategy<B>`
      in syncing engine, but I decided to postpone such change until we
      actually have an ability to customize it. It should also be possible to
      swap `PolkadotSyncingStrategy` with just `ChainSync` that only supports
      regular full sync from genesis (it also implements `SyncingStrategy`
      trait).
      
      While extracted trait still has a lot of non-generic stuff in it like
      exposed knowledge of warp sync and `StrategyKey` with hardcoded set of
      options, I believe this is a step in the right direction and will
      address those in upcoming PRs.
      
      With https://github.com/paritytech/polkadot-sdk/pull/5431 that landed
      earlier warp sync configuration is more straightforward, but there are
      still numerous things interleaved that will take some time to abstract
      away nicely and expose in network config for developers. For now this is
      an internal change even though data structures are technically public
      and require major version bump.
    • Oliver Tale-Yazdi's avatar
      [Bot] Use correct token in backport bot (#5654) · d887804b
      Oliver Tale-Yazdi authored
      
      The backport bot does currently not trigger the CI when opening a MR,
      like here: https://github.com/paritytech/polkadot-sdk/pull/5651
      Devs need to push an empty commit manually. Now using a token that will
      also trigger the CI.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    • Alexander Samusev's avatar
      [WIP][ci] GHA improvements (#5653) · 9079f36b
      Alexander Samusev authored
      Changes in PR: 
      - enables `Check Cargo Check Runtimes` (it was accidentally disabled)
      - reorder jobs in test-misc to make it faster
      - add `quick-benchmarks-omni` to `check-frame-omni-bencher` (the
      workflow is currently disabled)