Skip to content
  1. Apr 23, 2024
    • joe petrowski's avatar
      Fix Stuck Collator Funds (#4229) · eda5e5c3
      joe petrowski authored
      
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/4206
      
      In #1340 one of the storage types was changed from `Candidates` to
      `CandidateList`. Since the actual key includes the hash of this value,
      all of the candidates stored here are (a) "missing" and (b) unable to
      unreserve their candidacy bond.
      
      This migration kills the storage values and refunds the deposit held for
      each candidate.
      
      ---------
      
      Signed-off-by: default avatargeorgepisaltu <[email protected]>
      Co-authored-by: default avatargeorgepisaltu <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatargeorgepisaltu <[email protected]>
      eda5e5c3
    • Branislav Kontur's avatar
      Ensure outbound XCMs are decodable with limits + add `EnsureDecodableXcm`... · 118cd6f9
      Branislav Kontur authored
      Ensure outbound XCMs are decodable with limits + add `EnsureDecodableXcm` router (for testing purposes) (#4186)
      
      This PR:
      - adds `EnsureDecodableXcm` (testing) router that attempts to *encode*
      and *decode* passed XCM `message` to ensure that the receiving side will
      be able to decode, at least with the same XCM version.
      - fixes `pallet_xcm` / `pallet_xcm_benchmarks` assets data generation
      
      Relates to investigation of
      https://substrate.stackexchange.com/questions/11288 and missing fix
      https://github.com/paritytech/polkadot-sdk/pull/2129 which did not get
      into the fellows 1.1.X release.
      
      ## Questions/TODOs
      
      - [x] fix XCM benchmarks, which produces undecodable data - new router
      catched at least two cases
        - `BoundedVec exceeds its limit`
        - `Fungible asset of zero amount is not allowed`  
      - [x] do we need to add `sort` to the `prepend_with` as we did for
      reanchor [here](https://github.com/paritytech/polkadot-sdk/pull/2129)?
      @serban300 (**created separate/follow-up PR**:
      https://github.com/paritytech/polkadot-sdk/pull/4235)
      - [x] We added decoding check to `XcmpQueue` -> `validate_xcm_nesting`,
      why not to added to the `ParentAsUmp` or `ChildParachainRouter`?
      @franciscoaguirre
      
       (**created separate/follow-up PR**:
      https://github.com/paritytech/polkadot-sdk/pull/4236)
      - [ ] `SendController::send_blob` replace `VersionedXcm::<()>::decode(`
      with `VersionedXcm::<()>::decode_with_depth_limit(MAX_XCM_DECODE_DEPTH,
      data)` ?
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      118cd6f9
    • sfuhfds's avatar
      chore: fix some typos (#4253) · 5f2e66f5
      sfuhfds authored
      5f2e66f5
    • AlexWang's avatar
      Add OnFinality polkadot bootnode (#4247) · f7c1e0cf
      AlexWang authored
      This is for adding onfinality polkadot bootnode. Please correct me if
      this is not the right place for adding a new bootnode
      f7c1e0cf
    • Bastian Köcher's avatar
      parachains_coretime: Expose `MaxXCMTransactWeight` (#4189) · ac4f421f
      Bastian Köcher authored
      
      
      This should be configured on the runtime level and not somewhere inside
      the pallet.
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      ac4f421f
    • Branislav Kontur's avatar
      Add `validate_xcm_nesting` to the `ParentAsUmp` and `ChildParachainRouter` (#4236) · 7f1646eb
      Branislav Kontur authored
      This PR:
      - moves `validate_xcm_nesting` from `XcmpQueue` into the `VersionedXcm`
      - adds `validate_xcm_nesting` to the `ParentAsUmp`
      - adds `validate_xcm_nesting` to the `ChildParachainRouter`
      
      
      Based on discussion
      [here](https://github.com/paritytech/polkadot-sdk/pull/4186#discussion_r1571344270)
      and/or
      [here](https://github.com/paritytech/polkadot-sdk/pull/4186#discussion_r1572076666)
      and/or [here]()
      
      ## Question/TODO
      
      - [x] To the
      [comment](https://github.com/paritytech/polkadot-sdk/pull/4186#discussion_r1572072295)
      - Why was `validate_xcm_nesting` added just to the `XcmpQueue` router
      and nowhere else? What kind of problem `MAX_XCM_DECODE_DEPTH` is
      solving? (see
      [comment](https://github.com/paritytech/polkadot-sdk/pull/4236#discussion_r1574605191))
      7f1646eb
    • Alexandru Gheorghe's avatar
      Add metric for time spent waiting in the execution queue (#4250) · 157294b0
      Alexandru Gheorghe authored
      
      
      Add a metric to be able to understand the time jobs are waiting in the
      execution queue waiting for an available worker.
      https://github.com/paritytech/polkadot-sdk/issues/4126
      
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      157294b0
  2. Apr 22, 2024
  3. Apr 20, 2024
    • thiolliere's avatar
      Fix case in type in macro generation (#4223) · f3c3ebb6
      thiolliere authored
      Generated type is not camel case this generate some warnings from IDE
      
      label should be R0
      f3c3ebb6
    • Ankan's avatar
      Allow privileged virtual bond in Staking pallet (#3889) · e504c41a
      Ankan authored
      This is the first PR in preparation for
      https://github.com/paritytech/polkadot-sdk/issues/454.
      
      ## Follow ups:
      - https://github.com/paritytech/polkadot-sdk/pull/3904.
      - https://github.com/paritytech/polkadot-sdk/pull/3905.
      
      Overall changes are documented here (lot more visual 😍):
      https://hackmd.io/@ak0n/454-np-governance
      
      [Maybe followup](https://github.com/paritytech/polkadot-sdk/issues/4217)
      with migration of storage item `VirtualStakers` as a bool or enum in
      `Ledger`.
      
      ## Context
      We want to achieve a way for a user (`Delegator`) to delegate their
      funds to another account (`Agent`). Delegate implies the funds are
      locked in delegator account itself. Agent can act on behalf of delegator
      to stake directly on Staking pallet.
      
      The delegation feature is added to Staking via another pallet
      `delegated-staking` worked on
      [here](https://github.com/paritytech/polkadot-sdk/pull/3904).
      
      ## Introduces:
      ### StakingUnchecked Trait
      As the name implies, this trait allows unchecked (non-locked) mutation
      of staking ledger. These apis are only meant to be used by other pallets
      in the runtime and should not be exposed directly to user code path.
      Also related: https://github.com/paritytech/polkadot-sdk/issues/3888.
      
      ### Virtual Bond
      Allows other pallets to stake via staking pallet while managing the
      locks on these accounts themselves. Introduces another storage
      `VirtualStakers` that whitelist these accounts.
      
      We also restrict virtual stakers to set reward account as themselves.
      Since the account has no locks, we cannot support compounding of
      rewards. Conservatively, we require them to set a separate account
      different from the staker. Since these are code managed, it should be
      easy for another pallet to redistribute reward and rebond them.
      
      ### Slashes
      Since there is no actual lock maintained by staking-pallet for virtual
      stakers, this pallet does not apply any slashes. It is then important
      for pallets managing virtual stakers to listen to slashing events and
      apply necessary slashes.
      e504c41a
  4. Apr 19, 2024
  5. Apr 18, 2024
  6. Apr 17, 2024
    • Muharem Ismailov's avatar
      Asset Conversion: Pool Touch Call (#3251) · 305d311d
      Muharem Ismailov authored
      Introduce `touch` call designed to address operational prerequisites
      before providing liquidity to a pool.
      
      This function ensures that essential requirements, such as the presence
      of the pool's accounts, are fulfilled. It is particularly beneficial in
      scenarios where a pool creator removes the pool's accounts without
      providing liquidity.
      
      ---------
      
      Co-authored-by: command-bot <>
      305d311d
    • PG Herveou's avatar
      Contracts: Refactor test builder (#4158) · aa78fe21
      PG Herveou authored
      - Moved `substrate/frame/contracts/src/tests/builder.rs` into a pub
      test_utils module, so we can use that in the
      `pallet-contracts-mock-network` tests
      - Refactor xcm tests to use XCM builders, and simplify the use case for
      xcm-send
      aa78fe21
    • Oliver Tale-Yazdi's avatar
      Fix nostd build of several crates (#4060) · 7a2c9d4a
      Oliver Tale-Yazdi authored
      
      
      Preparation for https://github.com/paritytech/polkadot-sdk/pull/3935
      
      Changes:
      - Add some `default-features = false` for the case that a crate and that
      dependency both support nostd builds.
      - Shuffle files around of some benchmarking-only crates. These
      conditionally disabled the `cfg_attr` for nostd and pulled in libstd.
      Example [here](https://github.com/ggwpez/zepter/pull/95). The actual
      logic is moved into a `inner.rs` to preserve nostd capability of the
      crate in case the benchmarking feature is disabled.
      - Add some `use sp_std::vec` where needed.
      - Remove some `optional = true` in cases where it was not optional.
      - Removed one superfluous `cfg_attr(not(feature = "std"), no_std..`.
      
      All in all this should be logical no-op.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      7a2c9d4a