Skip to content
  1. Apr 25, 2024
    • s0me0ne-unkn0wn's avatar
      Do not re-prepare PVFs if not needed (#4211) · c26cf3f6
      s0me0ne-unkn0wn authored
      Currently, PVFs are re-prepared if any execution environment parameter
      changes. As we've recently seen on Kusama and Polkadot, that may lead to
      a severe finality lag because every validator has to re-prepare every
      PVF. That cannot be avoided altogether; however, we could cease
      re-preparing PVFs when a change in the execution environment can't lead
      to a change in the artifact itself. For example, it's clear that
      changing the execution timeout cannot affect the artifact.
      
      In this PR, I'm introducing a separate hash for the subset of execution
      environment parameters that changes only if a preparation-related
      parameter changes. It introduces some minor code duplication, but
      without that, the scope of changes would be much bigger.
      
      TODO:
      - [x] Add a test to ensure the artifact is not re-prepared if
      non-preparation-related parameter is changed
      - [x] Add a test to ensure the artifact is re-prepared if a
      preparation-related parameter is changed
      - [x] Add comments, warnings, and, possibly, a test to ensure a new
      parameter ever added to the executor environment parameters will be
      evaluated by the author of changes with respect to its artifact
      preparation impact and added to the new hash preimage if needed.
      
      Closes #4132
      c26cf3f6
    • Alexandru Gheorghe's avatar
      Fix polkadot parachains not producing blocks until next session (#4269) · 239a23d9
      Alexandru Gheorghe authored
      
      
      ... a few sessions too late :(, this already happened on polkadot, so as
      of now there are no known relay-chains without async backing enabled in
      runtime, but let's fix it in case someone else wants to repeat our
      steps.
      
      Fixes: https://github.com/paritytech/polkadot-sdk/issues/4226
      
      ---------
      
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      239a23d9
    • Oliver Tale-Yazdi's avatar
      [XCM] Treat recursion limit error as transient in the MQ (#4202) · 07704178
      Oliver Tale-Yazdi authored
      
      
      Changes:
      - Add new error variant `ProcessMessageError::StackLimitReached` and
      treat XCM error `ExceedsStackLimit` as such.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      07704178
    • PG Herveou's avatar
      Contracts: Stabilize XCM host fns (#4213) · b801d001
      PG Herveou authored
      See 
      https://github.com/paritytech/ink/pull/1912
      https://github.com/paritytech/ink-docs/pull/338
      b801d001
    • Svyatoslav Nikolsky's avatar
      Bridge: added free headers submission support to the substrate-relay (#4157) · 7e68b2b8
      Svyatoslav Nikolsky authored
      
      
      Original PR:
      https://github.com/paritytech/parity-bridges-common/pull/2884. Since
      chain-specific code lives in the `parity-bridges-common` repo, some
      parts of original PR will require another PR
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      7e68b2b8
    • Svyatoslav Nikolsky's avatar
      Bridge: make some headers submissions free (#4102) · a633e954
      Svyatoslav Nikolsky authored
      
      
      supersedes https://github.com/paritytech/parity-bridges-common/pull/2873
      
      Draft because of couple of TODOs:
      - [x] fix remaining TODOs;
      - [x] double check that all changes from
      https://github.com/paritytech/parity-bridges-common/pull/2873 are
      correctly ported;
      - [x] create a separate PR (on top of that one or a follow up?) for
      https://github.com/paritytech/polkadot-sdk/tree/sv-try-new-bridge-fees;
      - [x] fix compilation issues (haven't checked, but there should be
      many).
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      a633e954
  2. Apr 24, 2024
    • Francisco Aguirre's avatar
      Revert `execute_blob` and `send_blob` (#4266) · 4f3d43a0
      Francisco Aguirre authored
      Revert "pallet-xcm: Deprecate `execute` and `send` in favor of
      `execute_blob` and `send_blob` (#3749)"
      
      This reverts commit feee773d
      
      .
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      Co-authored-by: default avatarJavier Bullrich <[email protected]>
      4f3d43a0
    • Javyer's avatar
      Updated review-bot to obtain number from event (#4271) · d29c3636
      Javyer authored
      It seems that `review-trigger` is not uploading the artifact that is
      used by `review-bot`, so I changed the PR-Number to be obtained by the
      previous event that triggered this action.
      
      I also took the liberty to replace `tibdex/github-app-token` for
      `actions/create-github-app-token` which is GitHub's official app.
      d29c3636
    • Branislav Kontur's avatar
      `AllowHrmpNotificationsFromRelayChain` barrier for HRMP notifications from the relaychain (#4156) · ac473cfa
      Branislav Kontur authored
      This PR:
      - introduces `AllowHrmpNotificationsFromRelayChain` barrier for allowing
      HRMP notifications just from the relay chain (to fulfill safety
      assumptions -
      [see](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/src/v4/mod.rs#L532))
      - sets it up for all testnet SP parachains
      
      Continuation of: https://github.com/paritytech/polkadot-sdk/pull/3696
      ac473cfa
    • Serban Iorga's avatar
      [BEEFY] Return valid signatures when verifying commitment (#4259) · 8dc0b337
      Serban Iorga authored
      Trying to split parts of the
      https://github.com/paritytech/polkadot-sdk/pull/1903 into smaller PRs
      
      For https://github.com/paritytech/polkadot-sdk/pull/1903 it would help
      if `verify_with_validator_set()` returned the list of valid
      authority-signatures pairs, since after the verification we need to send
      them in the equivocation proof.
      8dc0b337
    • Alexander Kalankhodzhaev's avatar
      Remove unnecessary cloning (#4263) · c594b10a
      Alexander Kalankhodzhaev authored
      Seems like Externalities already [return a
      vector](https://github.com/paritytech/polkadot-sdk/blob/ffbce2a8
      
      /substrate/primitives/externalities/src/lib.rs#L86),
      so calling `to_vec` on a vector just results in an unneeded copying.
      
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      c594b10a
    • Adrian Catangiu's avatar
      pallet-xcm::transfer_assets_using_type() supports custom actions on destination (#4260) · e0584a15
      Adrian Catangiu authored
      
      
      Change `transfer_assets_using_type()` to not assume `DepositAssets` as
      the intended use of the assets on the destination.
      
      Instead provides the caller with the ability to specify custom XCM that
      be executed on `dest` chain as the last step of the transfer, thus
      allowing custom usecases for the transferred assets. E.g. some are
      used/swapped/etc there, while some are sent further to yet another
      chain.
      
      Note: this is a follow-up on
      https://github.com/paritytech/polkadot-sdk/pull/3695, bringing in an API
      change for `transfer_assets_using_type()`. This is ok as the previous
      version has not been yet released. Thus, its first release will include
      the new API proposed by this PR.
      
      This allows usecases such as:
      https://forum.polkadot.network/t/managing-sas-on-multiple-reserve-chains-for-same-asset/7538/4
      
      BTW: all this pallet-xcm asset transfers code will be massively reduced
      once we have https://github.com/paritytech/xcm-format/pull/54
      
      ---------
      
      Signed-off-by: default avatarAdrian Catangiu <[email protected]>
      e0584a15
    • Alexandru Gheorghe's avatar
      Plumbing to increase pvf workers configuration based on chain id (#4252) · 9a0049d0
      Alexandru Gheorghe authored
      
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/4126 we want
      to safely increase the execute_workers_max_num gradually from chain to
      chain and assess if there are any negative impacts.
      
      This PR performs the necessary plumbing to be able to increase it based
      on the chain id, it increase the number of execution workers from 2 to 4
      on test network but lives kusama and polkadot unchanged until we gather
      more data.
      
      ---------
      
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      9a0049d0
    • gupnik's avatar
      Adds ability to trigger tasks via unsigned transactions (#4075) · 0a56d071
      gupnik authored
      
      
      This PR updates the `validate_unsigned` hook for `frame_system` to allow
      valid tasks to be submitted as unsigned transactions. It also updates
      the task example to be able to submit such transactions via an off-chain
      worker.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      0a56d071
  3. Apr 23, 2024
  4. Apr 22, 2024
  5. 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
  6. Apr 19, 2024