1. 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 <[email protected]>
      Co-authored-by: default avatarEgorPopelyaev <[email protected]>
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      ad862092
    • 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
      96ab6869
  2. Jun 10, 2024
  3. Jun 08, 2024
  4. Jun 07, 2024
  5. Jun 06, 2024
  6. Jun 05, 2024
  7. Jun 04, 2024
  8. Jun 03, 2024
    • Alexander Samusev's avatar
      [ci] Increase timeout for check-runtime-migration workflow (#4674) · cbe45121
      Alexander Samusev authored
      `[check-runtime-migration` now takes more than 30 minutes. Quick fix
      with increased timeout.
      cbe45121
    • Egor_P's avatar
      [ci] Delete unused flow (#4676) · 6f228e7d
      Egor_P authored
      6f228e7d
    • Bastian Köcher's avatar
    • Przemek Rzad's avatar
    • Przemek Rzad's avatar
      Revamp the Readme of the minimal template (#4649) · dfb01aaa
      Przemek Rzad authored
      - Addresses
      [this](https://github.com/paritytech/polkadot-sdk/issues/3155#issuecomment-2126934939).
      - Technical content got adopted from the existing [solochain
      readme](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain).
        - Updated some broken links there.
      - The docker instructions will work after
      https://github.com/paritytech/polkadot-sdk/pull/4637.
      - See the [rendered
      version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/minimal-template-readme/templates/minimal/README.md
      
      ).
      
      ---------
      
      Co-authored-by: default avatargupnik <[email protected]>
      dfb01aaa
    • Egor_P's avatar
      Add chain-spec-builder docker image (#4655) · f66e693a
      Egor_P authored
      This PR adds possibility to publish container images for the
      `chain-spec-builder` binary on the regular basis.
      Related to: https://github.com/paritytech/release-engineering/issues/190
      f66e693a
    • tugy's avatar
      Update Amforc bootnodes for Kusama and Polkadot (#4668) · 63f0cbf7
      tugy authored
      Tested each bootnode with `--reserved-only` `--reserved-nodes`
      
      Kusama
      ```
      polkadot --chain kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/kusama.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWKvYf6qKaAF8UUDw3KsTwjHLnvkED23yxHbH3npMe8w4G" --no-hardware-benchmarks
      polkadot --chain kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/kusama.bootnode.amforc.com/tcp/30001/p2p/12D3KooWKvYf6qKaAF8UUDw3KsTwjHLnvkED23yxHbH3npMe8w4G" --no-hardware-benchmarks
      ```
      
      Asset Hub Kusama
      ```
      ./polkadot-parachain --chain asset-hub-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/asset-hub-kusama.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWHy1CPndZYphwdVqMb295KPC6LRt17Ae3zNSr7evzeF5a" --no-hardware-benchmarks
      ./polkadot-parachain --chain asset-hub-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/asset-hub-kusama.bootnode.amforc.com/tcp/30007/p2p/12D3KooWHy1CPndZYphwdVqMb295KPC6LRt17Ae3zNSr7evzeF5a" --no-hardware-benchmarks
      ```
      
      
      Bridge Hub Kusama
      ```
      ./polkadot-parachain --chain bridge-hub-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/bridge-hub-kusama.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWNyTBwRvCz1Ey2SgC1f3MvymhiAyLEa3cL8kU5gFH3V7Z" --no-hardware-benchmarks
      ./polkadot-parachain --chain bridge-hub-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/bridge-hub-kusama.bootnode.amforc.com/tcp/30010/p2p/12D3KooWNyTBwRvCz1Ey2SgC1f3MvymhiAyLEa3cL8kU5gFH3V7Z" --no-hardware-benchmarks
      ```
      
      Coretime Kusama
      ```
      ./polkadot-parachain --chain coretime-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/coretime-kusama.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWPrgxrrumrANp6Bp2SMEwMQHPHDbPzA1HbcrakZrbFi5P" --no-hardware-benchmarks
      ./polkadot-parachain --chain coretime-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/coretime-kusama.bootnode.amforc.com/tcp/30013/p2p/12D3KooWPrgxrrumrANp6Bp2SMEwMQHPHDbPzA1HbcrakZrbFi5P" --no-hardware-benchmarks
      ```
      
      People Kusama
      ```
      ./polkadot-parachain --chain people-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/people-kusama.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWPjzgKZe5jdG6TY4gwcFq8QxyyhqsYbQo6N29pwGePWLA" --no-hardware-benchmarks
      ./polkadot-parachain --chain people-kusama --base-path /tmp/node --reserved-only --reserved-nodes "/dns/people-kusama.bootnode.amforc.com/tcp/30004/p2p/12D3KooWPjzgKZe5jdG6TY4gwcFq8QxyyhqsYbQo6N29pwGePWLA" --no-hardware-benchmarks
      ```
      
      People Westend
      ```
      ./polkadot-parachain --chain people-westend --base-path /tmp/node --reserved-only --reserved-nodes "/dns/people-westend.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWE1btdwDhNpApg8BEe2QwJxdVDtz6a6BRhgTeUh9HMhWs" --no-hardware-benchmarks
      ./polkadot-parachain --chain people-westend --base-path /tmp/node --reserved-only --reserved-nodes "/dns/people-westend.bootnode.amforc.com/tcp/30016/p2p/12D3KooWE1btdwDhNpApg8BEe2QwJxdVDtz6a6BRhgTeUh9HMhWs" --no-hardware-benchmarks
      ```
      
      Polkadot
      ```
      polkadot --chain polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/polkadot.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWT2HyZx5C6BBeLbCKhYG2SqJYuiu7sLMxGzUcQBko3BMr" --no-hardware-benchmarks
      polkadot --chain polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/polkadot.bootnode.amforc.com/tcp/30001/p2p/12D3KooWT2HyZx5C6BBeLbCKhYG2SqJYuiu7sLMxGzUcQBko3BMr" --no-hardware-benchmarks
      ```
      
      Asset Hub Polkadot
      ```
      ./polkadot-parachain --chain asset-hub-polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/asset-hub-polkadot.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWDLxPXYnSHjNwq9ibqgxuzRni5VViuGNSjNe3ueqVgqE3" --no-hardware-benchmarks
      ./polkadot-parachain --chain asset-hub-polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/asset-hub-polkadot.bootnode.amforc.com/tcp/30007/p2p/12D3KooWDLxPXYnSHjNwq9ibqgxuzRni5VViuGNSjNe3ueqVgqE3" --no-hardware-benchmarks
      ```
      
      Bridge Hub Polkadot
      ```
      ./polkadot-parachain --chain bridge-hub-polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/bridge-hub-polkadot.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWGT5E56rAHfT5dY1pMLTrpAgV72yfDtD1Y5tPCHaTsifp" --no-hardware-benchmarks
      ./polkadot-parachain --chain bridge-hub-polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/bridge-hub-polkadot.bootnode.amforc.com/tcp/30010/p2p/12D3KooWGT5E56rAHfT5dY1pMLTrpAgV72yfDtD1Y5tPCHaTsifp" --no-hardware-benchmarks
      ```
      
      Collectives Polkadot
      ```
      ./polkadot-parachain --chain collectives-polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/collectives-polkadot.bootnode.amforc.com/tcp/29999/wss/p2p/12D3KooWL6v6FHMtCP5VsiDbMHLRFiW6YBtv37BarpW3hLqnDski" --no-hardware-benchmarks
      ./polkadot-parachain --chain collectives-polkadot --base-path /tmp/node --reserved-only --reserved-nodes "/dns/collectives-polkadot.bootnode.amforc.com/tcp/30013/p2p/12D3KooWL6v6FHMtCP5VsiDbMHLRFiW6YBtv37BarpW3hLqnDski" --no-hardware-benchmarks
      ```
      63f0cbf7
    • girazoki's avatar
      make all storage items in parachain-system public (#4645) · 27a57324
      girazoki authored
      
      
      Makes all storage items in parachain-system public so that these can be
      used by other pallets &/or runtimes.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: command-bot <>
      27a57324