Skip to content
Snippets Groups Projects
  1. Jun 18, 2024
    • Andrei Sandu's avatar
      glutton: also increase parachain block length (#4728) · 1dc68de8
      Andrei Sandu authored
      
      Glutton currently is useful mostly for stress testing relay chain
      validators. It is unusable for testing the collator networking and block
      announcement and import scenarios. This PR resolves that by improving
      glutton pallet to also buff up the blocks, up to the runtime configured
      `BlockLength`.
      
      ### How it works
      Includes an additional inherent in each parachain block. The `garbage`
      argument passed to the inherent is filled with trash data. It's size is
      computed by applying the newly introduced `block_length` percentage to
      the maximum block length for mandatory dispatch class. After
      https://github.com/paritytech/polkadot-sdk/pull/4765 is merged, the
      length of inherent extrinsic will be added to the total block proof
      size.
      
      The remaining weight is burnt in `on_idle` as configured by the
      `storage` percentage parameter.
      
      
      TODO:
      - [x] PRDoc
      - [x] Readme update
      - [x] Add tests
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
    • Daan van der Plas's avatar
      refactor: parachain template (#4684) · 7c847f8d
      Daan van der Plas authored
      Update parachain template pallet based on polkadot sdk docs
      
      @Kianenigma
      
      
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
  2. Jun 17, 2024
  3. Jun 14, 2024
    • Andrei Sandu's avatar
      CheckWeight: account for extrinsic len as proof size (#4765) · ae0b3bf6
      Andrei Sandu authored
      
      Fix https://github.com/paritytech/polkadot-sdk/issues/4743 which allows
      us to remove the defensive limit on pov size in Cumulus after relay
      chain gets upgraded with these changes. Also add unit test to ensure
      `CheckWeight` - `StorageWeightReclaim` integration works.
      
      TODO:
      - [x] PRDoc
      - [x] Add a len to all the other tests in storage weight reclaim and
      call `CheckWeight::pre_dispatch`
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
    • Branislav Kontur's avatar
      Bridges - changes for Bridges V2 - relay client part (#4494) · 977254cc
      Branislav Kontur authored
      Contains mainly changes/nits/refactors related to the relayer code
      (`client-substrate` and `lib-substrate-relay`) migrated from the Bridges
      V2 [branch](https://github.com/paritytech/polkadot-sdk/pull/4427).
      
      Relates to:
      https://github.com/paritytech/parity-bridges-common/issues/2976
      Companion: https://github.com/paritytech/parity-bridges-common/pull/2988
      
      
      ## TODO
      - [x] fix comments
      
      ## Questions
      - [x] Do we need more testing for client V2 stuff? If so, how/what is
      the ultimate test? @svyatonik
      
      
      - [x] check
      [comment](https://github.com/paritytech/polkadot-sdk/pull/4494#issuecomment-2117181144)
      for more testing
      
      ---------
      
      Co-authored-by: default avatarSvyatoslav Nikolsky <svyatonik@gmail.com>
      Co-authored-by: default avatarSerban Iorga <serban@parity.io>
    • Serban Iorga's avatar
      `polkadot-parachain-bin`: small cosmetics and improvements (#4666) · 7f7f5fa8
      Serban Iorga authored
      Related to: https://github.com/paritytech/polkadot-sdk/issues/5
      
      A couple of cosmetics and improvements related to
      `polkadot-parachain-bin`:
      
      - Adding some convenience traits in order to avoid declaring long
      duplicate bounds
      - Specifically check if the runtime exposes `AuraApi` when executing
      `start_lookahead_aura_consensus()`
      - Some fixes for the `RelayChainCli`. Details in the commits description
  4. Jun 13, 2024
  5. Jun 12, 2024
  6. Jun 11, 2024
    • cheme's avatar
      Append overlay optimization. (#1223) · ad862092
      cheme authored
      
      This branch propose to avoid clones in append by storing offset and size
      in previous overlay depth.
      That way on rollback we can just truncate and change size of existing
      value.
      To avoid copy it also means that :
      
      - append on new overlay layer if there is an existing value: create a
      new Append entry with previous offsets, and take memory of previous
      overlay value.
      - rollback on append: restore value by applying offsets and put it back
      in previous overlay value
      - commit on append: appended value overwrite previous value (is an empty
      vec as the memory was taken). offsets of commited layer are dropped, if
      there is offset in previous overlay layer they are maintained.
      - set value (or remove) when append offsets are present: current
      appended value is moved back to previous overlay value with offset
      applied and current empty entry is overwrite (no offsets kept).
      
      The modify mechanism is not needed anymore.
      This branch lacks testing and break some existing genericity (bit of
      duplicated code), but good to have to check direction.
      
      Generally I am not sure if it is worth or we just should favor
      differents directions (transients blob storage for instance), as the
      current append mechanism is a bit tricky (having a variable length in
      first position means we sometime need to insert in front of a vector).
      
      Fix #30.
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarEgorPopelyaev <egor@parity.io>
      Co-authored-by: default avatarAlexandru Vasile <60601340+lexnv@users.noreply.github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarjoe petrowski <25483142+joepetrowski@users.noreply.github.com>
      Co-authored-by: default avatarLiam Aharon <liam.aharon@hotmail.com>
      Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
      Co-authored-by: default avatarBastian Köcher <info@kchr.de>
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
    • Sebastian Kunert's avatar
      finalization: Skip tree route calculation if no forks present (#4721) · 96ab6869
      Sebastian Kunert authored
      ## Issue
      
      Currently, syncing parachains from scratch can lead to a very long
      finalization time once they reach the tip of the chain. The problem is
      that we try to finalize everything from 0 to the tip, which can be
      thousands or even millions of blocks.
      
      We finalize sequentially and try to compute displaced branches during
      finalization. So for every block on the way, we compute an expensive
      tree route.
      
      ## Proposed Improvements
      
      In this PR, I propose improvements that solve this situation:
      
      - **Skip tree route calculation if `leaves().len() == 1`:** This should
      be enough for 90% of cases where there is only one leaf after sync.
      - **Optimize finalization for long distances:** It can happen that the
      parachain has imported some leaf and then receives a relay chain
      notification with the finalized block. In that case, the previous
      optimization will not trigger. A second mechanism should ensure that we
      do not need to compute the full tree route. If the finalization distance
      is long, we check the lowest common ancestor of all the leaves. If it is
      above the to-be-finalized block, we know that there are no displaced
      leaves. This is fast because forks are short and close to the tip, so we
      can leverage the header cache.
      
      ## Alternative Approach
      
      - The problem was introduced in #3962. Reverting that PR is another
      possible strategy.
      - We could store for every fork where it begins, however sounds a bit
      more involved to me.
      
      
      fixes #4614
  7. Jun 10, 2024
    • Alexandru Gheorghe's avatar
      Remove unncessary call remove_from_peers_set (#4742) · b65313e8
      Alexandru Gheorghe authored
      ... this is superfluous because set_reserved_peers implementation
      already calls this method here:
      
      https://github.com/paritytech/polkadot-sdk/blob/cdb297b1
      
      /substrate/client/network/src/protocol_controller.rs#L571,
      so the call just ends producing this warnings whenever we manipulate the
      peers set.
      
      ```
      Trying to remove unknown reserved node 12D3KooWRCePWvHoBbz9PSkw4aogtdVqkVDhiwpcHZCqh4hdPTXC from SetId(3)
      peerset warnings (from different peers)
      ```
      
      Signed-off-by: default avatarAlexandru Gheorghe <alexandru.gheorghe@parity.io>
    • Alin Dima's avatar
      add pov-recovery unit tests and support for elastic scaling (#4733) · a3472c44
      Alin Dima authored
      - unit tests for pov-recovery
      - elastic scaling support (recovering multiple candidates in a single
      relay chain block)
      - also some small cleanups
      - also switches to candidates_pending_availability in
      `handle_empty_block_announce_data`
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/3577
      
      After https://github.com/paritytech/polkadot-sdk/pull/4097 is merged, we
      should also add a zombienet test, similar to the existing
      `0002-pov_recovery.toml` but which has a single collator using elastic
      scaling on multiple cores.
    • Alexandru Gheorghe's avatar
      approval-voting: Add no shows debug information (#4726) · 2869fd6a
      Alexandru Gheorghe authored
      
      Add some debug logs to be able to identify the validators and parachains
      that have most no-shows, this metric is valuable because it will help us
      identify validators and parachains that regularly have this problem.
      
      From the validator_index we can then query the on-chain information and
      identify the exact validator that is causing the no-shows.
      
      ---------
      
      Signed-off-by: default avatarAlexandru Gheorghe <alexandru.gheorghe@parity.io>
    • Przemek Rzad's avatar
      Revamp the Readme of the parachain template (#4713) · 497d64ef
      Przemek Rzad authored
      - Addresses
      [this](https://github.com/paritytech/polkadot-sdk/issues/3155#issuecomment-2126934939).
      - Revamps the Readme, very similar to [the minimal
      template](https://github.com/paritytech/polkadot-sdk/pull/4649).
      - Changed `polkadot-launch` to `zombienet`, with instructions how to run
      it.
      - See the [rendered
      version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/parachain-template-readme/templates/parachain/README.md).
  8. Jun 08, 2024
  9. Jun 07, 2024
  10. Jun 06, 2024
  11. Jun 05, 2024
    • Adrian Catangiu's avatar
      fix build on MacOS: bump secp256k1 and secp256k1-sys to patched versions (#4709) · 2460cddf
      Adrian Catangiu authored
      `secp256k1 v0.28.0` and `secp256k1-sys v0.9.0` were yanked because
      building them fails for `aarch64-apple-darwin` targets.
      
      Use the `secp256k1 v0.28.2` and `secp256k1-sys v0.9.2` patched versions
      that build fine on ARM chipset MacOS.
    • Oliver Tale-Yazdi's avatar
      Unify dependency aliases (#4633) · d2fd5364
      Oliver Tale-Yazdi authored
      
      Inherited workspace dependencies cannot be renamed by the crate using
      them (see [1](https://github.com/rust-lang/cargo/issues/12546),
      [2](https://stackoverflow.com/questions/76792343/can-inherited-dependencies-in-rust-be-aliased-in-the-cargo-toml-file)).
      Since we want to use inherited workspace dependencies everywhere, we
      first need to unify all aliases that we use for a dependency throughout
      the workspace.
      The umbrella crate is currently excluded from this procedure, since it
      should be able to export the crates by their original name without much
      hassle.
      
      For example: one crate may alias `parity-scale-codec` to `codec`, while
      another crate does not alias it at all. After this change, all crates
      have to use `codec` as name. The problematic combinations were:
      - conflicting aliases: most crates aliases as `A` but some use `B`.
      - missing alias: most of the crates alias a dep but some dont.
      - superfluous alias: most crates dont alias a dep but some do.
      
      The script that i used first determines whether most crates opted to
      alias a dependency or not. From that info it decides whether to use an
      alias or not. If it decided to use an alias, the most common one is used
      everywhere.
      
      To reproduce, i used
      [this](https://github.com/ggwpez/substrate-scripts/blob/master/uniform-crate-alias.py)
      python script in combination with
      [this](https://github.com/ggwpez/zepter/blob/38ad10585fe98a5a86c1d2369738bc763a77057b/renames.json)
      error output from Zepter.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    • ordian's avatar
      statement-distribution: prep for re-enabling (#4431) · 0d661eac
      ordian authored
      In preparation for launching re-enabling
      (https://github.com/paritytech/polkadot-sdk/issues/2418), we need to
      adjust the disabling strategy of statement-distribution to use the relay
      parent's state instead of the latest state (union of active leaves).
      This will also ensure no raciness of getting the latest state vs
      accepting statements from disabling validators at the cost of being more
      lenient/potentially accepting more statements from disabled validators.
      
      - [x] PRDoc
    • Oliver Tale-Yazdi's avatar
      Rococo AH: cleanup storage (#4444) · d1299683
      Oliver Tale-Yazdi authored
      
      Follow up on #4414 to clean up the old storage.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>