Skip to content
  1. Mar 28, 2024
    • PG Herveou's avatar
      Contracts: add test builders (#3796) · 78b1cab9
      PG Herveou authored
      Cleanup tests (-2.7k lines !) using some builder patterns to build
      pallet_contracts api calls
      78b1cab9
    • Alessandro Siniscalchi's avatar
      [parachain-template] runtime API Implementations into `mod apis` (#3817) · 60846a08
      Alessandro Siniscalchi authored
      This PR significantly refactors the runtime API implementations to
      improve project structure, maintainability, and readability. Key changes
      include:
      
      1. **Enhancing Visibility**: Adjusts the visibility of
      `RUNTIME_API_VERSIONS` in `impl_runtime_apis.rs` to `pub`, making it
      accessible throughout the runtime module.
      2. **Centralizing API Implementations**: Introduces a new file,
      `apis.rs`, within the parachain template's runtime directory.
      3. **Streamlining `lib.rs`**: Updates the main runtime library file to
      reflect these structural changes. It removes redundant API
      implementations and points `VERSION` to the newly exposed
      `RUNTIME_API_VERSIONS` from `apis.rs`, simplifying the overall runtime
      configuration.
      
      ### Motivations Behind the Refactoring:
      - **Improved Project Structure**: Centralizing API implementations in
      `apis.rs` offers a clearer, more navigable project structure.
      - **Better Readability**: Streamlining `lib.rs` and reducing clutter
      enhance readability, making it easier for new contributors to understand
      the project layout and logic.
      
      ### Summary of Changes:
      - Made `RUNTIME_API_VERSIONS` public in `impl_runtime_apis.rs`.
      - Added `apis.rs` to centralize runtime API implementations.
      - Streamlined `lib.rs` to adjust to the refactored project structure.
      60846a08
    • Liam Aharon's avatar
      [prdoc] Require SemVer bump level (#3816) · 1ed44af3
      Liam Aharon authored
      A prerequisite for adding a stable branch and respecting SemVer on new
      stable releases is including SemVer bump levels in our PRDocs.
      
      Next release is scheduled for April 3rd, so it would be great to get
      this merged before then.
      
      Also added "None" as a valid bump option, to support test/benchmark
      changes and CI to ensure changed crates have an entry.
      1ed44af3
    • Tin Chung's avatar
      Deprecate scheduler traits v1 and v2 (#3718) · daf04f01
      Tin Chung authored
      
      
      This PR add `#[deprecated]` attribute to v1 and v2 of the schedule
      trait. Proposed in this issue:
      https://github.com/paritytech/polkadot-sdk/issues/3676
      
      ```rust
      #[allow(deprecated)]
      #[deprecated = "traits::schedule::v1 is deprecated. Please use v3 instead."]
      pub mod v1 {
      ...
      }
      
      #[allow(deprecated)]
      #[deprecated = "traits::schedule::v2 is deprecated. Please use v3 instead."]
      pub mod v2 {
      ...
      }
      ```
      
      polkadot address: 19nSqFQorfF2HxD3oBzWM3oCh4SaCRKWt1yvmgaPYGCo71J
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      daf04f01
  2. Mar 27, 2024
    • Bastian Köcher's avatar
      pallet-referenda: Detect incorrect pre-image length (#3850) · 5d314eb0
      Bastian Köcher authored
      There has been a case that a referenda failed because the length given
      to `submit` was incorrect. The pallet can actually check the length if
      the pre-image already exists to ensure that these kind of issues are not
      happening again.
      5d314eb0
    • Bastian Köcher's avatar
      pallet-scheduler: Unrequest call on failed lookup (#3849) · 597ea920
      Bastian Köcher authored
      When the scheduler fails to lookup a `call`, it should unrequest it,
      because it will not be required anymore.
      597ea920
    • Gonçalo Pestana's avatar
      Extrinsic to restore corrupt staking ledgers (#3706) · bbdbeb7e
      Gonçalo Pestana authored
      This PR adds a new extrinsic `Call::restore_ledger ` gated by
      `StakingAdmin` origin that restores a corrupted staking ledger. This
      extrinsic will be used to recover ledgers that were affected by the
      issue discussed in
      https://github.com/paritytech/polkadot-sdk/issues/3245.
      
      The extrinsic will re-write the storage items associated with a stash
      account provided as input parameter. The data used to reset the ledger
      can be either i) fetched on-chain or ii) partially/totally set by the
      input parameters of the call.
      
      In order to use on-chain data to restore the staking locks, we need a
      way to read the current lock in the balances pallet. This PR adds a
      `InspectLockableCurrency` trait and implements it in the pallet
      balances. An alternative would be to tightly couple staking with the
      pallet balances but that's inelegant (an example of how it would look
      like in [this
      branch](https://github.com/paritytech/polkadot-sdk/tree/gpestana/ledger-badstate-clean_tightly)).
      
      More details on the type of corruptions and corresponding fixes
      https://hackmd.io/DLb5jEYWSmmvqXC9ae4yRg?view#/
      
      We verified that the `Call::restore_ledger` does fix all current
      corrupted ledgers in Polkadot and Kusama. You can verify it here
      https://hackmd.io/v-XNrEoGRpe7APR-EZGhOA.
      
      **Changes introduced**
      - Adds `Call::restore_ledger ` extrinsic to recover a corrupted ledger;
      - Adds trait `frame_support::traits::currency::InspectLockableCurrency`
      to allow external pallets to read current locks given an account and
      lock ID;
      - Implements the `InspectLockableCurrency` in the pallet-balances.
      - Adds staking locks try-runtime checks
      (https://github.com/paritytech/polkadot-sdk/issues/3751)
      
      **Todo**
      - [x] benchmark `Call::restore_ledger`
      - [x] throughout testing of all ledger recovering cases
      - [x] consider adding the staking locks try-runtime checks to this PR
      (https://github.com/paritytech/polkadot-sdk/issues/3751)
      - [x] simulate restoring all ledgers
      (https://hackmd.io/Dsa2tvhISNSs7zcqriTaxQ?view) in Polkadot and Kusama
      using chopsticks -- https://hackmd.io/v-XNrEoGRpe7APR-EZGhOA
      
      Related to https://github.com/paritytech/polkadot-sdk/issues/3245
      Closes https://github.com/paritytech/polkadot-sdk/issues/3751
      
      ---------
      
      Co-authored-by: command-bot <>
      bbdbeb7e
    • Alexander Samusev's avatar
      [ci] Fix publish benchmarks job (#3864) · 374aefa4
      Alexander Samusev authored
      Few fixes in CI to publish benchmarks jobs.
      
      cc https://github.com/paritytech/ci_cd/issues/934
      374aefa4
    • Ermal Kaleci's avatar
      process enqueued messages on idle (#3844) · 8342947b
      Ermal Kaleci authored
      
      
      This will make it possible to use remaining weight on idle for
      processing enqueued messages.
      More context here https://github.com/paritytech/polkadot-sdk/issues/3709
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      8342947b
    • Andrei Sandu's avatar
      collation-generation + collator-protocol: collate on multiple assigned cores (#3795) · 417c54c6
      Andrei Sandu authored
      
      
      This works only for collators that implement the `collator_fn` allowing
      `collation-generation` subsystem to pull collations triggered on new
      heads.
      
      Also enables
      `request_v2::CollationFetchingResponse::CollationWithParentHeadData` for
      test adder/undying collators.
      
      TODO:
      - [x] fix tests
      - [x] new tests
      - [x] PR doc
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <[email protected]>
      417c54c6
    • Alexander Samusev's avatar
      [ci] Collect subsystem-benchmarks results and add graphs for them (#3853) · 25af0adf
      Alexander Samusev authored
      PR adds CI jobs that collect subsystem-benchmarks results and publishes
      them to gh-pages.
      
      cc https://github.com/paritytech/ci_cd/issues/934
      cc @AndreiEres
      25af0adf
    • Alexandru Vasile's avatar
      authority-discovery: Set intervals to start when authority keys changes (#3764) · 5ac32ee2
      Alexandru Vasile authored
      The authority-discovery mechanism has implemented a few exponential
      timers for:
      - publishing the authority records
      - goes from 2 seconds (when freshly booted) to 1 hour if the node is
      long-running
        - set to 1 hour after successfully publishing the authority record
      - discovering other authority records
      - goes from 2 seconds (when freshly booted) to 10 minutes if the node is
      long-running
      
      This PR resets the exponential publishing and discovery interval to
      defaults ensuring that long-running nodes:
      - will retry publishing the authority records as aggressively as freshly
      booted nodes
      - Currently, if a long-running node fails to publish the DHT record when
      the keys change (ie DhtEvent::ValuePutFailed), it will only retry after
      1 hour
      - will rediscover other authorities faster (since there is a chance that
      other authority keys changed)
      
      The subp2p-explorer has difficulties discovering the authorities when
      the authority set changes in the first few hours. This might be entirely
      due to the recursive nature of the DHT and the needed time to propagate
      the records. However, there is a small chance that the authority
      publishing failed and is only retried in 1h.
      
      Let me know if this makes sense 🙏
      
       
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <[email protected]>
      Co-authored-by: default avatarDmitry Markin <[email protected]>
      5ac32ee2
    • Francisco Aguirre's avatar
      pallet-xcm: Deprecate `execute` and `send` in favor of `execute_blob` and `send_blob` (#3749) · feee773d
      Francisco Aguirre authored
      
      
      `execute` and `send` try to decode the xcm in the parameters before
      reaching the filter line.
      The new extrinsics decode only after the filter line.
      These should be used instead of the old ones.
      
      ## TODO
      - [x] Tests
      - [x] Generate weights
      - [x] Deprecation issue ->
      https://github.com/paritytech/polkadot-sdk/issues/3771
      - [x] PRDoc
      - [x] Handle error in pallet-contracts
      
      This would make writing XCMs in PJS Apps more difficult, but here's the
      fix for that: https://github.com/polkadot-js/apps/pull/10350.
      Already deployed! https://polkadot.js.org/apps/#/utilities/xcm
      
      Supersedes https://github.com/paritytech/polkadot-sdk/pull/1798/
      
      ---------
      
      Co-authored-by: default avatarPG Herveou <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      feee773d
    • Andrei Sandu's avatar
      testnet genesis: enable approval voting v2 assignments and coalescing (#3827) · 66051adb
      Andrei Sandu authored
      
      
      This is a long due chore ...
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <[email protected]>
      Co-authored-by: default avatarordian <[email protected]>
      66051adb
    • Javier Viola's avatar
      chore: bump zombienet version (#3830) · f3944779
      Javier Viola authored
      
      
      bump version to `1.3.97` (follow up from
      https://github.com/paritytech/polkadot-sdk/pull/3805)
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      f3944779
  3. Mar 26, 2024
    • ordian's avatar
      fix regression in approval-voting introduced in #3747 (#3831) · 3fc5b826
      ordian authored
      
      
      Fixes #3826.
      
      The docs on the `candidates` field of `BlockEntry` were incorrectly
      stating that they are sorted by core index. The (incorrect) optimization
      was introduced in #3747 based on this assumption. The actual ordering is
      based on `CandidateIncluded` events ordering in the runtime. We revert
      this optimization here.
      
      - [x] verify the underlying issue
      - [x] add a regression test
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      3fc5b826
    • Derek Colley's avatar
    • Pavel Orlov's avatar
      XCM Fee Payment Runtime API (#3607) · 3c972fc1
      Pavel Orlov authored
      
      
      The PR provides API for obtaining:
      - the weight required to execute an XCM message,
      - a list of acceptable `AssetId`s for message execution payment,
      - the cost of the weight in the specified acceptable `AssetId`.
      
      It is meant to address an issue where one has to guess how much fee to
      pay for execution. Also, at the moment, a client has to guess which
      assets are acceptable for fee execution payment.
      See the related issue
      https://github.com/paritytech/polkadot-sdk/issues/690.
      With this API, a client is supposed to query the list of the supported
      asset IDs (in the XCM version format the client understands), weigh the
      XCM program the client wants to execute and convert the weight into one
      of the acceptable assets. Note that the client is supposed to know what
      program will be executed on what chains. However, having a small
      companion JS library for the pallet-xcm and xtokens should be enough to
      determine what XCM programs will be executed and where (since these
      pallets compose a known small set of programs).
      ```Rust
      pub trait XcmPaymentApi<Call>
      	where
      		Call: Codec,
      	{
      		/// Returns a list of acceptable payment assets.
      		///
      		/// # Arguments
      		///
      		/// * `xcm_version`: Version.
      		fn query_acceptable_payment_assets(xcm_version: Version) -> Result<Vec<VersionedAssetId>, Error>;
      		/// Returns a weight needed to execute a XCM.
      		///
      		/// # Arguments
      		///
      		/// * `message`: `VersionedXcm`.
      		fn query_xcm_weight(message: VersionedXcm<Call>) -> Result<Weight, Error>;
      		/// Converts a weight into a fee for the specified `AssetId`.
      		///
      		/// # Arguments
      		///
      		/// * `weight`: convertible `Weight`.
      		/// * `asset`: `VersionedAssetId`.
      		fn query_weight_to_asset_fee(weight: Weight, asset: VersionedAssetId) -> Result<u128, Error>;
      		/// Get delivery fees for sending a specific `message` to a `destination`.
      		/// These always come in a specific asset, defined by the chain.
      		///
      		/// # Arguments
      		/// * `message`: The message that'll be sent, necessary because most delivery fees are based on the
      		///   size of the message.
      		/// * `destination`: The destination to send the message to. Different destinations may use
      		///   different senders that charge different fees.
      		fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result<VersionedAssets, Error>;
      	}
      ```
      An
      [example](https://gist.github.com/PraetorP/4bc323ff85401abe253897ba990ec29d)
      of a client side code.
      
      ---------
      
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      Co-authored-by: default avatarDaniel Shiposha <[email protected]>
      3c972fc1
    • Bastian Köcher's avatar
      westend: `SignedPhase` is a constant (#3646) · 0c15d887
      Bastian Köcher authored
      
      
      In preparation for the merkleized metadata, we need to ensure that
      constants are actually constant. If we want to test the unsigned phase
      we could for example just disable signed voter. Or we add some extra
      mechanism to the pallet to disable the signed phase from time to time.
      
      ---------
      
      Co-authored-by: default avatarAnkan <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      0c15d887
    • Tsvetomir Dimitrov's avatar
      Migrate parachain swaps to Coretime (#3714) · 90234543
      Tsvetomir Dimitrov authored
      This PR notifies broker pallet for any parachain slot swaps performed on
      the relay chain. This is achieved by registering an `OnSwap` for the the
      `coretime` pallet. The hook sends XCM message to the broker chain and
      invokes a new extrinsic `swap_leases` which updates `Leases` storage
      item (which keeps the legacy parachain leases).
      
      I made two assumptions in this PR:
      1.
      [`Leases`](https://github.com/paritytech/polkadot-sdk/blob/4987d798/substrate/frame/broker/src/lib.rs#L120)
      in `broker` pallet and
      [`Leases`](https://github.com/paritytech/polkadot-sdk/blob/4987d798
      
      /polkadot/runtime/common/src/slots/mod.rs#L118)
      in `slots` pallet are in sync.
      2. `swap_leases` extrinsic from `broker` pallet can be triggered only by
      root or by the XCM message from the relay chain. If not - the extrinsic
      will generate an error and do nothing.
      
      As a side effect from the changes `OnSwap` trait is moved from
      runtime/common/traits.rs to runtime/parachains. Otherwise it is not
      accessible from `broker` pallet.
      
      Closes https://github.com/paritytech/polkadot-sdk/issues/3552
      
      TODOs:
      
      - [x] Weights
      - [x] Tests
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatareskimor <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      90234543
    • Andrei Eres's avatar
      [subsystem-benchmarks] Save results to json (#3829) · fd79b3b0
      Andrei Eres authored
      
      
      Here we add the ability to save subsystem benchmark results in JSON
      format to display them as graphs
      
      To draw graphs, CI team will use
      [github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark).
      Since we are using custom benchmarks, we need to prepare [a specific
      data
      type](https://github.com/benchmark-action/github-action-benchmark?tab=readme-ov-file#examples):
      ```
      [
          {
              "name": "CPU Load",
              "unit": "Percent",
              "value": 50
          }
      ]
      ```
      
      Then we'll get graphs like this: 
      
      ![example](https://raw.githubusercontent.com/rhysd/ss/master/github-action-benchmark/main.png)
      
      [A live page with
      graphs](https://benchmark-action.github.io/github-action-benchmark/dev/bench/)
      
      ---------
      
      Co-authored-by: default avatarordian <[email protected]>
      fd79b3b0
    • Dcompoze's avatar
      Fix spelling mistakes across the whole repository (#3808) · 002d9260
      Dcompoze authored
      **Update:** Pushed additional changes based on the review comments.
      
      **This pull request fixes various spelling mistakes in this
      repository.**
      
      Most of the changes are contained in the first **3** commits:
      
      - `Fix spelling mistakes in comments and docs`
      
      - `Fix spelling mistakes in test names`
      
      - `Fix spelling mistakes in error messages, panic messages, logs and
      tracing`
      
      Other source code spelling mistakes are separated into individual
      commits for easier reviewing:
      
      - `Fix the spelling of 'authority'`
      
      - `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'`
      
      - `Fix the spelling of 'prev_enqueud_messages'`
      
      - `Fix the spelling of 'endpoint'`
      
      - `Fix the spelling of 'children'`
      
      - `Fix the spelling of 'PenpalSiblingSovereignAccount'`
      
      - `Fix the spelling of 'PenpalSudoAccount'`
      
      - `Fix the spelling of 'insufficient'`
      
      - `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'`
      
      - `Fix the spelling of 'subtracted'`
      
      - `Fix the spelling of 'CandidatePendingAvailability'`
      
      - `Fix the spelling of 'exclusive'`
      
      - `Fix the spelling of 'until'`
      
      - `Fix the spelling of 'discriminator'`
      
      - `Fix the spelling of 'nonexistent'`
      
      - `Fix the spelling of 'subsystem'`
      
      - `Fix the spelling of 'indices'`
      
      - `Fix the spelling of 'committed'`
      
      - `Fix the spelling of 'topology'`
      
      - `Fix the spelling of 'response'`
      
      - `Fix the spelling of 'beneficiary'`
      
      - `Fix the spelling of 'formatted'`
      
      - `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'`
      
      - `Fix the spelling of 'succeeded'`
      
      - `Fix the spelling of 'reopened'`
      
      - `Fix the spelling of 'proposer'`
      
      - `Fix the spelling of 'InstantiationNonce'`
      
      - `Fix the spelling of 'depositor'`
      
      - `Fix the spelling of 'expiration'`
      
      - `Fix the spelling of 'phantom'`
      
      - `Fix the spelling of 'AggregatedKeyValue'`
      
      - `Fix the spelling of 'randomness'`
      
      - `Fix the spelling of 'defendant'`
      
      - `Fix the spelling of 'AquaticMammal'`
      
      - `Fix the spelling of 'transactions'`
      
      - `Fix the spelling of 'PassingTracingSubscriber'`
      
      - `Fix the spelling of 'TxSignaturePayload'`
      
      - `Fix the spelling of 'versioning'`
      
      - `Fix the spelling of 'descendant'`
      
      - `Fix the spelling of 'overridden'`
      
      - `Fix the spelling of 'network'`
      
      Let me know if this structure is adequate.
      
      **Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`,
      `Merkelization`, `Merkleization`, is somewhat inconsistent but I left it
      as it is.
      
      ~~**Note:** In some places the term `Receival` is used to refer to
      message reception, IMO `Reception` is the correct word here, but I left
      it as it is.~~
      
      ~~**Note:** In some places the term `Overlayed` is used instead of the
      more acceptable version `Overlaid` but I also left it as it is.~~
      
      ~~**Note:** In some places the term `Applyable` is used instead of the
      correct version `Applicable` but I also left it as it is.~~
      
      **Note:** Some usage of British vs American english e.g. `judgement` vs
      `judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc.
      are both present in different places, but I suppose that's
      understandable given the number of contributors.
      
      ~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it
      triggers errors in CI when I make changes to it, so I left it as it
      is.~~
      002d9260
    • Serban Iorga's avatar
      Update bridges subtree (#3841) · b839c995
      Serban Iorga authored
      Updating the bridges subtree hopefully just one last time in this
      formula in order to make the final migration less verbose.
      b839c995
    • Dcompoze's avatar
      Fix formatting in Cargo.toml (#3842) · ea97863c
      Dcompoze authored
      Fixes formatting for
      https://github.com/paritytech/polkadot-sdk/pull/3698
      ea97863c
  4. Mar 25, 2024
  5. Mar 24, 2024
  6. Mar 23, 2024
  7. Mar 22, 2024
    • girazoki's avatar
      [pallet-xcm] fix transport fees for remote reserve transfers (#3792) · 9a04ebbf
      girazoki authored
      Currently `transfer_assets` from pallet-xcm covers 4 main different
      transfer types:
      - `localReserve`
      - `DestinationReserve`
      - `Teleport`
      - `RemoteReserve`
      
      For the first three, the local execution and the remote message sending
      are separated, and fees are deducted in pallet-xcm itself:
      https://github.com/paritytech/polkadot-sdk/blob/3410dfb3
      
      /polkadot/xcm/pallet-xcm/src/lib.rs#L1758.
      
      For the 4th case `RemoteReserve`, pallet-xcm is still relying on the
      xcm-executor itself to send the message (through the
      `initiateReserveWithdraw` instruction). In this case, if delivery fees
      need to be charged, it is not possible to do so because the
      `jit_withdraw` mode has not being set.
      
      This PR proposes to still use the `initiateReserveWithdraw` but
      prepending a `setFeesMode { jit_withdraw: true }` to make sure delivery
      fees can be paid.
      
      A test-case is also added to present the aforementioned case
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      9a04ebbf
    • PG Herveou's avatar
      XCM remove extra QueryId types from traits (#3763) · 2f59e9ef
      PG Herveou authored
      We do not need to make these traits generic over QueryId type, we can
      just use the QueryId alias everywhere
      2f59e9ef
    • Dmitry Markin's avatar
      Make public addresses go first in authority discovery DHT records (#3757) · 9d2963c2
      Dmitry Markin authored
      Make sure explicitly set by the operator public addresses go first in
      the authority discovery DHT records.
      
      Also update `Discovery` behavior to eliminate duplicates in the returned
      addresses.
      
      This PR should improve situation with
      https://github.com/paritytech/polkadot-sdk/issues/3519.
      
      Obsoletes https://github.com/paritytech/polkadot-sdk/pull/3657.
      9d2963c2
    • Vincent Geddes's avatar
      Add a linear fee multiplier (#127) (#3790) · 22d5b80d
      Vincent Geddes authored
      
      
      Bridging fees are calculated using a static ETH/DOT exchange rate that
      can deviate significantly from the real-world exchange rate. We
      therefore need to add a safety margin to the fee so that users almost
      aways cover the cost of relaying.
      
      # FAQ
      
      > Why introduce a `multiplier` parameter instead of configuring an
      exchange rate which already has a safety factor applied?
      
      When converting from ETH to DOT, we need to _divide_ the multiplier by
      the exchange rate, and to convert from DOT to ETH we need to _multiply_
      the multiplier by the exchange rate.
      
      > Other input parameters to the fee calculation can also deviate from
      real-world values. These include substrate weights, gas prices, and so
      on. Why does the multiplier introduced here not adjust those?
      
      A single scalar multiplier won't be able to accommodate the different
      volatilities efficiently. For example, gas prices are much more volatile
      than exchange rates, and substrate weights hardly ever change.
      
      So the pricing config relating to weights and gas prices should already
      have some appropriate safety margin pre-applied.
      
      # Detailed Changes:
      
      * Added `multiplier` field to `PricingParameters`
      * Outbound-queue fee is multiplied by `multiplier`
      * This `multiplier` is synced to the Ethereum side
      * Improved Runtime API for calculating outbound-queue fees. This API
      makes it much easier to for configure parts of the system in preparation
      for launch.
      * Improve and clarify code documentation
      
      Upstreamed from https://github.com/Snowfork/polkadot-sdk/pull/127
      
      ---------
      
      Co-authored-by: default avatarClara van Staden <[email protected]>
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      22d5b80d
    • Clara van Staden's avatar
      Snowbridge Beacon header age check (#3727) · 3410dfb3
      Clara van Staden authored
      ## Bug Explanation
      Adds a check that prevents finalized headers with a gap larger than the
      sync committee period being imported, which could cause execution
      headers in the gap being unprovable. The current version of the Ethereum
      client checks that there is a header at least every sync committee, but
      it doesn't check that the headers are within a sync period of each
      other. For example:
      
      Header 100 (sync committee period 1)
      Header 9000 (sync committee period 2)
      (8900 blocks apart)
      
      These headers are in adjacent sync committees, but more than the sync
      committee period (8192 blocks) apart.
      
      The reason we need a header every 8192 slots at least, is the header is
      used to prove messages within the last 8192 blocks. If we import header
      9000, and we receive a message to be verified at header 200, the
      `block_roots` field of header 9000 won't contain the header in order to
      do the ancestry check.
      
      ## Environment
      While running in Rococo, this edge case was discovered after the relayer
      was offline for a few days. It is unlikely, but not impossible, to
      happen again and so it should be backported to polkadot-sdk 1.7.0 (so
      that
      [polkadot-fellows/runtimes](https://github.com/polkadot-fellows/runtimes)
      can be updated with the fix).
      
      Our Ethereum client has been operational on Rococo for the past few
      months, and this been the only major issue discovered so far.
      
      ### Unrelated Change
      An unrelated nit: Removes a left over file that should have been deleted
      when the `parachain` directory was removed.
      
      ---------
      
      Co-authored-by: claravanstaden <Cats 4 life!>
      3410dfb3
    • Will | Paradox | ParaNodes.io's avatar
      Adding LF's bootnodes to relay and system chains (#3514) · ea5f4e9a
      Will | Paradox | ParaNodes.io authored
      
      
      Good day,
      
      I'm seeking to add the following bootnodes for Kusama and Polkadot's
      relay and system chains. The following commands can be used to test
      connectivity. All node keys are backed up.
      
      Polkadot:
      ```
      polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/boot-polkadot.luckyfriday.io/tcp/443/wss/p2p/12D3KooWAdyiVAaeGdtBt6vn5zVetwA4z4qfm9Fi2QCSykN1wTBJ" --no-hardware-benchmarks
      ```
      
      
      Assethub-Polkadot:
      
      ```
      polkadot-parachain --chain asset-hub-polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/boot-polkadot-assethub.luckyfriday.io/tcp/443/wss/p2p/12D3KooWDR9M7CjV1xdjCRbRwkFn1E7sjMaL4oYxGyDWxuLrFc2J" --no-hardware-benchmarks
      
      ```
      
      Bridgehub-Polkadot:
      
      ```
      polkadot-parachain --chain bridge-hub-polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/boot-polkadot-bridgehub.luckyfriday.io/tcp/443/wss/p2p/12D3KooWKf3mBXHjLbwtPqv1BdbQuwbFNcQQYxASS7iQ25264AXH" --no-hardware-benchmarks
      
      ```
      Collectives-Polkadot
      
      ```
      polkadot-parachain --chain collectives-polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/boot-polkadot-collectives.luckyfriday.io/tcp/443/wss/p2p/12D3KooWCzifnPooTt4kvTnXT7FTKTymVL7xn7DURQLsS2AKpf6w" --no-hardware-benchmarks
      
      ```
      Kusama:
      
      ```
      polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/boot-kusama.luckyfriday.io/tcp/443/wss/p2p/12D3KooWS1Lu6DmK8YHSvkErpxpcXmk14vG6y4KVEFEkd9g62PP8" --no-hardware-benchmarks
      
      ```
      Assethub-Kusama:
      
      ```
      polkadot-parachain --chain asset-hub-kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/boot-kusama-assethub.luckyfriday.io/tcp/443/wss/p2p/12D3KooWSwaeFs6FNgpgh54fdoxSDAA4nJNaPE3PAcse2GRrG7b3" --no-hardware-benchmarks
      ```
      
      Bridgehub-Kusama:
      
      ```
      polkadot-parachain --chain bridge-hub-kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/boot-kusama-bridgehub.luckyfriday.io/tcp/443/wss/p2p/12D3KooWQybw6AFmAvrFfwUQnNxUpS12RovapD6oorh2mAJr4xyd" --no-hardware-benchmarks
      ```
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      ea5f4e9a
  8. Mar 21, 2024