Skip to content
  1. May 16, 2024
    • Clara van Staden's avatar
      Snowbridge - Ethereum Client - Reject finalized updates without a sync... · 943eb46e
      Clara van Staden authored
      Snowbridge - Ethereum Client - Reject finalized updates without a sync committee in next store period (#4478)
      
      While syncing Ethereum consensus updates to the Snowbridge Ethereum
      light client, the syncing process stalled due to error
      `InvalidSyncCommitteeUpdate` when importing the next sync committee for
      period `1087`.
      
      This bug manifested specifically because our light client checkpoint is
      a few weeks old (submitted to governance weeks ago) and had to catchup
      until a recent block. Since then, we have done thorough testing of the
      catchup sync process.
      
      ### Symptoms
      - Import next sync committee for period `1086` (essentially period
      `1087`). Light client store period = `1086`.
      - Import header in period `1087`. Light client store period = `1087`.
      The current and next sync committee is not updated, and is now in an
      outdated state. (current sync committee = `1086` and current sync
      committee = `1087`, where it should be current sync committee = `1087`
      and current sync committee = `None`)
      - Import next sync committee for period `1087` (essentially period
      `1088`) fails because the expected next sync committee's roots don't
      match.
      
      ### Bug
      The bug here is that the current and next sync committee's didn't
      handover when an update in the next period was received.
      
      ### Fix
      There are two possible fixes here:
      1. Correctly handover sync committees when a header in the next period
      is received.
      2. Reject updates in the next period until the next sync committee
      period is known.
      
      We opted for solution 2, which is more conservative and requires less
      changes.
      
      ### Polkadot-sdk versions
      This fix should be backported in polkadot-sdk versions 1.7 and up.
      
      Snowfork PR: https://github.com/Snowfork/polkadot-sdk/pull/145
      
      
      
      ---------
      
      Co-authored-by: default avatarVincent Geddes <[email protected]>
      943eb46e
    • polka.dom's avatar
      Remove pallet::getter usage from the democracy pallet (#4472) · 04f88f5b
      polka.dom authored
      As per #3326, removes usage of the pallet::getter macro from the
      democracy pallet. The syntax `StorageItem::<T, I>::get()` should be used
      instead.
      
      cc @muraca
      04f88f5b
    • Dmitry Markin's avatar
      Demote per-peer validation slots warning to debug (#4480) · 8d293970
      Dmitry Markin authored
      Demote `Ignored block announcement because all validation slots for this
      peer are occupied.` message to debug level.
      
      This is mostly an indicator of somebody spamming the node or (more
      likely) some node actively keeping up with the network but not
      recognizing it's in a major sync mode, so sending zillions of block
      announcements (have seen this on Versi).
      
      This warning shouldn't be considered an error by the end user, so let's
      make it debug.
      
      Ref. https://github.com/paritytech/polkadot-sdk/issues/1929.
      8d293970
    • Svyatoslav Nikolsky's avatar
      Bridge: drop subscriptions when they are no longer required (#4481) · 453bb18c
      Svyatoslav Nikolsky authored
      The bridge relay is **not** using `tokio`, while `jsonrpsee` does. To
      make it work together, we are spawning a separate tokio task for every
      jsonrpsee subscription, which holds a subscription reference. It looks
      like we are not stopping those tasks when we no longer need it and when
      there are more than `1024` active subscriptions, `jsonrpsee` stops
      opening new subscriptions. This PR adds an `cancel` signal that is sent
      to the background task when we no longer need a subscription.
      453bb18c
    • Alexandru Vasile's avatar
      network/discovery: Add to DHT only peers that support genesis-based protocol (#3833) · 3399bc09
      Alexandru Vasile authored
      This PR adds to the DHT only the peers that support the genesis/fork/kad
      protocol.
      Before this PR, any peer that supported the legacy `/kad/[id]` protocol
      was added to the DHT.
      
      This is the first step in removing the support for the legacy kad
      protocols.
      
      While I have adjusted unit tests to validate the appropriate behavior,
      this still needs proper testing in our stack.
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/504
      
      .
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      3399bc09
    • Oliver Tale-Yazdi's avatar
      [Runtime] Bound XCMP queue (#3952) · 4adfa37d
      Oliver Tale-Yazdi authored
      Re-applying #2302 after increasing the `MaxPageSize`.  
      
      Remove `without_storage_info` from the XCMP queue pallet. Part of
      https://github.com/paritytech/polkadot-sdk/issues/323
      
      Changes:
      - Limit the number of messages and signals a HRMP channel can have at
      most.
      - Limit the number of HRML channels.
      
      A No-OP migration is put in place to ensure that all `BoundedVec`s still
      decode and not truncate after upgrade. The storage version is thereby
      bumped to 5 to have our tooling remind us to deploy that migration.
      
      ## Integration
      
      If you see this error in your try-runtime-cli:  
      ```pre
      Max message size for channel is too large. This means that the V5 migration can be front-run and an
      attacker could place a large message just right before the migration to make other messages un-decodable.
      Please either increase `MaxPageSize` or decrease the `max_message_size` for this channel. Channel max:
      102400, MaxPageSize: 65535
      ```
      
      Then increase the `MaxPageSize` of the `cumulus_pallet_xcmp_queue` to
      something like this:
      ```rust
      type MaxPageSize = ConstU32<{ 103 * 1024 }>;
      ```
      
      There is currently no easy way for on-chain governance to adjust the
      HRMP max message size of all channels, but it could be done:
      https://github.com/paritytech/polkadot-sdk/issues/3145
      
      .
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      4adfa37d
    • polka.dom's avatar
      Remove pallet::getter usage from the bounties and child-bounties pallets (#4392) · 6487ac1e
      polka.dom authored
      
      
      As per #3326, removes pallet::getter usage from the bounties and
      child-bounties pallets. The syntax `StorageItem::<T, I>::get()` should
      be used instead.
      
      Changes to one pallet involved changes in the other, so I figured it'd
      be best to combine these two.
      
      cc @muraca
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      6487ac1e
    • Oliver Tale-Yazdi's avatar
      Deprecate `dmp-queue` pallet (#4475) · 76230a15
      Oliver Tale-Yazdi authored
      `cumulus-pallet-dmp-queue` is not needed anymore since
      https://github.com/paritytech/polkadot-sdk/pull/1246.
      
      The only logic that remains in the pallet is a lazy migration in the
      [`on_idle`](https://github.com/paritytech/polkadot-sdk/blob/8d62c13b2541920c37fb9d9ca733fcce91e96573/cumulus/pallets/dmp-queue/src/lib.rs#L158
      
      )
      hook.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      76230a15
    • Alexander Samusev's avatar
    • Francisco Aguirre's avatar
      XCM Cookbook (#2633) · 289f5bbf
      Francisco Aguirre authored
      # Context
      
      XCM docs are currently an md book hosted with github pages:
      https://paritytech.github.io/xcm-docs/
      
      .
      While that's fine, it's not in line with the work being done in the
      polkadot-sdk docs.
      
      # Main addition
      
      This PR aims to fix that by bringing the docs back to this repo.
      This does not have all the information currently present in the mdbook
      xcm-docs but aims to be a good chunk of it and fully replace it over
      time.
      
      I also added the sections `guides` and `cookbook` which will be very
      useful for users wanting to get into XCM.
      For now I only added one example to the cookbook, but have ideas for
      guides and more examples.
      Having this docs be in rust docs is very useful for the cookbook.
      
      # TODO
      
      - [x] Use `FungibleAdapter`
      - [x] Improve and relocate mock message queue
      - [x] Fix license issue. Why does docs/sdk/ not have this problem? (Just
      added the licenses)
      
      # Next steps
      
      - More examples in the cookbook
      - End-to-end XCM guide with zombienet testing
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      289f5bbf
  2. May 15, 2024
  3. May 14, 2024
  4. May 13, 2024
  5. May 12, 2024