Skip to content
  1. May 15, 2024
    • Alex Wang's avatar
      Add OnFinality kusama bootnode (#4458) · f2b367ee
      Alex Wang authored
      This is for adding onfinality polkadot bootnode. Please correct me if
      this is not the right place for adding a new bootnode
      f2b367ee
    • Ankan's avatar
      Introduces: Delegated Staking Pallet (#3904) · 4d47b443
      Ankan authored
      This is the second PR in preparation for
      https://github.com/paritytech/polkadot-sdk/issues/454.
      
      ## Also see
      - **Precursor** https://github.com/paritytech/polkadot-sdk/pull/3889.
      - **Follow up** https://github.com/paritytech/polkadot-sdk/pull/3905.
      
      Overall changes are documented here (lot more visual 😍):
      https://hackmd.io/@ak0n/454-np-governance
      
      
      
      ## Changes
      ### Delegation Interface
      Provides delegation primitives for staking. 
      
      Introduces two new roles:
      - Agent: These are accounts who receive delegation from other accounts
      (delegators) and stakes on behalf of them. The funds are held in
      delegator accounts.
      - Delegator: Accounts who delegate their funds to an agent authorising
      them to use it for staking.
      
      Supports
      - A way for delegators to add or withdraw delegation to an agent.
      - A way for an agent to slash a delegator during a slashing event.
      
      ### Pallet Delegated Staking
      - Implements `DelegationInterface`.
      - Lazy slashing: Any slashes to an Agent is posted in a ledger but not
      immediately slashed. The agent can call
      `DelegationInterface::delegator_slash` to slash the member and clear the
      corresponding slash from its ledger.
      - Consumes `StakingInterface` to provide `CoreStaking` features. In
      reality, this will be `pallet-staking`.
      - Ensures bookkeeping for agent and delegator are correct but leaves the
      management of reward and slash logic upto the consumer of this pallet.
      - While it does not expose any calls yet, it is written with the intent
      of exposing these primitives via extrinsics.
      
      ## TODO
      - [x] Improve unit tests in the pallet.
      - [x] Separate slash reward perbill for rewarding the slash reporters?
      - [x] Review if we should add more events.
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarGonçalo Pestana <[email protected]>
      Co-authored-by: default avatargeorgepisaltu <[email protected]>
      4d47b443
    • drewstone's avatar
      Update BABE README.md (#4138) · e6d934c9
      drewstone authored
      
      
      Link was dead
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      e6d934c9
    • Javier Viola's avatar
      chore: update zombienet version (#4463) · 3fcdada3
      Javier Viola authored
      Add small fixes, reorg debug definition and add more verbose debug logs
      in k8s logs reading.
      Thx!
      3fcdada3
    • RadiumBlock's avatar
      Please consider adding RadiumBlock bootnodes for Westend People and Westend Coretime (#3936) · 005e3a77
      RadiumBlock authored
      
      
      Please add RadiumBlock bootnodes to the spec files for Westend Coretime
      and Westend People
      
      ---------
      
      Co-authored-by: default avatarDónal Murray <[email protected]>
      005e3a77
    • Alexandru Gheorghe's avatar
      Bump fatality crate to 0.1.1 (#4464) · 494f1231
      Alexandru Gheorghe authored
      
      
      ... to get rid of the macro debug logs like this from build output
      ```
      [/home/alexggh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fatality-proc-macro-0.1.0/src/types.rs:171:23] input = TokenStream [
          Literal {
              kind: Str,
              symbol: "Error while accessing runtime information",
              suffix: None,
              span: #0 bytes(6943..6986),
          },
      ]
      ```
      
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      494f1231
    • shamil-gadelshin's avatar
      Change forks pruning algorithm. (#3962) · 9c69bb98
      shamil-gadelshin authored
      This PR changes the fork calculation and pruning algorithm to enable
      future block header pruning. It's required because the previous
      algorithm relied on the block header persistence. It follows the
      [related
      discussion](https://github.com/paritytech/polkadot-sdk/issues/1570
      
      )
      
      The previous code contained this comment describing the situation:
      ```
      	/// Note a block height finalized, displacing all leaves with number less than the finalized
      	/// block's.
      	///
      	/// Although it would be more technically correct to also prune out leaves at the
      	/// same number as the finalized block, but with different hashes, the current behavior
      	/// is simpler and our assumptions about how finalization works means that those leaves
      	/// will be pruned soon afterwards anyway.
      	pub fn finalize_height(&mut self, number: N) -> FinalizationOutcome<H, N> {
      ```
      
      The previous algorithm relied on the existing block headers to prune
      forks later and to enable block header pruning we need to clear all
      obsolete forks right after the block finalization to not depend on the
      related block headers in the future.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      9c69bb98
  2. May 14, 2024
  3. May 13, 2024
  4. May 12, 2024
  5. May 10, 2024
  6. May 09, 2024
    • Niklas Adolfsson's avatar
      rpc: add option to `whitelist ips` in rate limiting (#3701) · d37719da
      Niklas Adolfsson authored
      This PR adds two new CLI options to disable rate limiting for certain ip
      addresses and whether to trust "proxy header".
      After going back in forth I decided to use ip addr instead host because
      we don't want rely on the host header which can be spoofed but another
      solution is to resolve the ip addr from the socket to host name.
      
      Example:
      
      ```bash
      $ polkadot --rpc-rate-limit 10 --rpc-rate-limit-whitelisted-ips 127.0.0.1/8 --rpc-rate-limit-trust-proxy-headers
      ```
      
      The ip addr is read from the HTTP proxy headers `Forwarded`,
      `X-Forwarded-For` `X-Real-IP` if `--rpc-rate-limit-trust-proxy-headers`
      is enabled if that is not enabled or the headers are not found then the
      ip address is read from the socket.
      
      //cc @BulatSaif can you test this and give some feedback on it?
      d37719da
  7. May 08, 2024
    • Lulu's avatar
      Add semver CI check (#4279) · 6fdb522d
      Lulu authored
      
      
      This checks changed files against API surface changes against what the
      prdoc says.
      
      It will error if the detected semver change is greater than the one
      listed in the prdoc. It will also error if any crates were touched but
      not mentioned in the prdoc.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      6fdb522d
    • gupnik's avatar
    • Svyatoslav Nikolsky's avatar
      Bridge: check bridge GRANDPA pallet call limits from signed extension (#4385) · 17b56fae
      Svyatoslav Nikolsky authored
      silent, because it'll be deployed with the
      https://github.com/paritytech/polkadot-sdk/pull/4102, where this code
      has been introduced
      
      I've planned originally to avoid doing that check in the runtime code,
      because it **may be** checked offchain. But actually, the check is quite
      cheap and we could do that onchain too.
      17b56fae
    • Dino Pačandi's avatar
      [pallet-balances] `burn_allow_death` extrinsic (#3964) · c3e57c1b
      Dino Pačandi authored
      Adds an additional extrinsic call to the `pallet-balances` to _burn_
      tokens.
      Depending on the `keep_alive` flag, the call might or might not reap the
      account.
      
      Required modification of the _fungible's_ `Mutate` trait, `burn_from`
      function to allow the `Preservation` argument.
      
      **TODO**
      - [x] run benchmarks & update weights
      - [x] make sure prdoc is required & properly formatted
      
      Related issue: https://github.com/paritytech/polkadot-sdk/issues/3943
      
      
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: command-bot <>
      c3e57c1b
    • Francisco Aguirre's avatar
      XcmDryRunApi - Dry-running extrinsics to get their XCM effects (#3872) · 7213e363
      Francisco Aguirre authored
      # Context
      
      Estimating fees for XCM execution and sending has been an area with bad
      UX.
      The addition of the
      [XcmPaymentApi](https://github.com/paritytech/polkadot-sdk/pull/3607
      
      )
      exposed the necessary components to be able to estimate XCM fees
      correctly, however, that was not the full story.
      The `XcmPaymentApi` works for estimating fees only if you know the
      specific XCM you want to execute or send.
      This is necessary but most UIs want to estimate the fees for extrinsics,
      they don't necessarily know the XCM program that's executed by them.
      
      # Main addition
      
      A new runtime API is introduced, the `XcmDryRunApi`, that given an
      extrinsic, or an XCM program, returns its effects:
      - Execution result
      - Local XCM (in the case of an extrinsic)
      - Forwarded XCMs
      - List of events
      
      This API can be used on its own for dry-running purposes, for
      double-checking or testing, but it mainly shines when used in
      conjunction with the `XcmPaymentApi`.
      UIs can use these two APIs to estimate transfers.
      
      # How it works
      
      New tests are added to exemplify how to incorporate both APIs.
      There's a mock test just to make sure everything works under
      `xcm-fee-payment-runtime-api`.
      There's a real-world test using Westend and AssetHubWestend under
      `cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs`.
      Added both a test for a simple teleport between chains and a reserve
      transfer asset between two parachains going through a reserve.
      
      The steps to follow:
      - Use `XcmDryRunApi::dry_run_extrinsic` to get local XCM program and
      forwarded messages
      - For each forwarded message
      - Use `XcmPaymentApi::query_delivery_fee` LOCALLY to get the delivery
      fees
      - Use `XcmPaymentApi::query_xcm_weight` ON THE DESTINATION to get the
      remote execution weight
      - (optional) Use `XcmPaymentApi::query_acceptable_payment_assets` ON THE
      DESTINATION to know on which assets the execution fees can be paid
      - Use `XcmPaymentApi::query_weight_to_asset_fee` ON THE DESTINATION to
      convert weight to the actual remote execution fees
      - Use `XcmDryRunApi::dry_run_xcm` ON THE DESTINATION to know if a new
      message will be forwarded, if so, continue
      
      # Dear reviewer
      
      The changes in this PR are grouped as follows, and in order of
      importance:
      - Addition of new runtime API
      - Definition, mock and simple tests:
      polkadot/xcm/xcm-fee-payment-runtime-api/*
      - Implemented on Westend, Asset Hub Westend and Penpal, will implement
      on every runtime in a following PR
      - Addition of a new config item to the XCM executor for recording xcms
      about to be executed
        - Definition: polkadot/xcm/xcm-executor/*
        - Implementation: polkadot/xcm/pallet-xcm/*
      - had to update all runtime xcm_config.rs files with `type XcmRecorder =
      XcmPallet;`
      - Addition of a new trait for inspecting the messages in queues
        - Definition: polkadot/xcm/xcm-builder/src/routing.rs
        - Implemented it on all routers:
          - ChildParachainRouter: polkadot/runtime/common/src/xcm_sender.rs
      - ParentAsUmp: cumulus/primitives/utility/src/lib.rs (piggybacked on
      implementation in cumulus/pallets/parachain-system/src/lib.rs)
          - XcmpQueue: cumulus/pallets/xcmp-queue/src/lib.rs
          - Bridge: bridges/modules/xcm-bridge-hub-router/src/lib.rs
      - More complicated and useful tests:
      -
      cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs
      
      ## Next steps
      
      With this PR, Westend, AssetHubWestend, Rococo and AssetHubRococo have
      the new API.
      UIs can test on these runtimes to create better experiences around
      cross-chain operations.
      
      Next:
      - Add XcmDryRunApi to all system parachains
      - Integrate xcm fee estimation in all emulated tests
      - Get this on the fellowship runtimes
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      7213e363
  8. May 07, 2024