Skip to content
Snippets Groups Projects
  1. Mar 06, 2025
    • Raymond Cheung's avatar
      Ensure Logs Are Captured for Assertions and Printed During Tests (#7769) · ce5f89c6
      Raymond Cheung authored
      This PR enhances **`test_log_capture`**, ensuring logs are **captured
      for assertions** and **printed to the console** during test execution.
      
      ## **Motivation**  
      
      - Partially addresses #6119 and #6125, to improves developer **tracing
      and debugging** in XCM-related tests.
      - Builds on #7594, improving **log visibility** while maintaining test
      **log capture capabilities**.
      - While writing tests for #7234, I noticed this function was missing.
      This PR adds it to streamline log handling in unit tests.
      
      ## **Changes**  
      
      - Ensures logs up to `TRACE` level are **captured** (for assertions) and
      **printed** (for visibility).
      - Refines documentation to clearly specify **when to use** each
      function.
      - **Removes ANSI escape codes** from captured logs to ensure clean,
      readable assertions.
      
      ## **When to Use?**  
      
      | Usage | Captures Logs? | Prints Logs? | Example |
      
      |----------------------------------------------|-----------------|--------------|-----------------------------------------------|
      | `init_log_capture(LevelFilter::INFO, false)` | :white_check_mark: Yes | :x: No | Capture
      logs for assertions without printing. |
      | `init_log_capture(LevelFilter::TRACE, true)` | :white_check_mark: Yes | :white_check_mark: Yes | Capture
      logs and print them in test output. |
      | `sp_tracing::init_for_tests()` | :x: No | :white_check_mark:
      
       Yes | Print logs to the
      console without capturing. |
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • PG Herveou's avatar
      [pallet-revive] eth-rpc-tester quick fixes (#7818) · cbc0faa4
      PG Herveou authored
      
      Small tweaks to the eth-rpc-tester bin
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  2. Mar 05, 2025
    • Bastian Köcher's avatar
      pallet-scheduler: Put back postponed tasks into the agenda (#7790) · 00d8eea8
      Bastian Köcher authored
      
      Right now `pallet-scheduler` is not putting back postponed tasks into
      the agenda when the early weight check is failing. This pull request
      ensures that these tasks are put back into the agenda and are not just
      "lost".
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
      Co-authored-by: default avatarAlexandre R. Baldé <alexandre.balde@parity.io>
    • Oliver Tale-Yazdi's avatar
      [AHM] Make more stuff public (#7802) · a814f557
      Oliver Tale-Yazdi authored
      
      Make some more stuff public that will be useful for AHM to reduce code
      duplication.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • Alexandru Vasile's avatar
      notifications/tests: Fix tests to avoid overflow on adding duration to instant (#7793) · 7db67f3b
      Alexandru Vasile authored
      
      The tokio instant timer produced an overflow when the `poll_tick` was
      called because the timer period was set to `u64::max`. The period is
      reduced to accommodate for the following tokio time addition:
      
      
      Source code
      [tokio/time/interval.rs](https://github.com/tokio-rs/tokio/blob/a2b12bd5799f06e912b32ac05a5ffb5cf1fe31cd/tokio/src/time/interval.rs#L478-L485):
      ```rust
              let next = if now > timeout + Duration::from_millis(5) {
                  self.missed_tick_behavior
                      .next_timeout(timeout, now, self.period)
              } else {
                  timeout
                      .checked_add(self.period)
                      .unwrap_or_else(Instant::far_future)
              };
      ```
      
      
      Detected by:
      https://github.com/paritytech/polkadot-sdk/actions/runs/13648141251/job/38150825582?pr=7790
      
      
      ```
      ──── TRY 1 STDERR:       sc-network protocol::notifications::tests::conformance::litep2p_disconnects_libp2p_substream
      thread 'protocol::notifications::tests::conformance::litep2p_disconnects_libp2p_substream' panicked at std/src/time.rs:417:33:
      overflow when adding duration to instant
      stack backtrace:
         0: rust_begin_unwind
         1: core::panicking::panic_fmt
         2: core::option::expect_failed
         3: <std::time::Instant as core::ops::arith::Add<core::time::Duration>>::add
         4: tokio::time::interval::Interval::poll_tick
         5: sc_network::protocol::notifications::tests::conformance::litep2p_disconnects_libp2p_substream::{{closure}}
         6: tokio::runtime::scheduler::current_thread::Context::enter
         7: tokio::runtime::context::scoped::Scoped<T>::set
         8: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
         9: tokio::runtime::runtime::Runtime::block_on
        10: sc_network::protocol::notifications::tests::conformance::litep2p_disconnects_libp2p_substream
        11: core::ops::function::FnOnce::call_once
      ```
      
      cc @paritytech/networking
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
    • Oliver Tale-Yazdi's avatar
      pallet revive: rpc build script should not panic (#7786) · 9100d249
      Oliver Tale-Yazdi authored
      
      This can error when you use `cargo remote` and probably also with `cargo
      vendor`.
      Still seeing two more build errors, but at least this one is fixed.
      
      Other one:
      ```pre
      error: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache
         --> substrate/frame/revive/rpc/src/receipt_provider/db.rs:123:17
          |
      123 |               let result = query!(
          |  __________________________^
      124 | |                 r#"
      125 | |                 INSERT OR REPLACE INTO transaction_hashes (transaction_hash, block_hash, transaction_index)
      126 | |                 VALUES ($1, $2, $3)
      ...   |
      130 | |                 transaction_index
      131 | |             )
      ```
      
      and (maybe Rust version related, this is 1.84.1)
      ```pre
      error[E0282]: type annotations needed
         --> substrate/frame/revive/rpc/src/receipt_provider/db.rs:102:34
          |
      102 |         let (tx_result, logs_result) = tokio::join!(delete_transaction_hashes, delete_logs);
          |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
          |
          = note: this error originates in the macro `$crate::join` which comes from the expansion of the macro `tokio::join` (in Nightly builds, run with -Z macro-backtrace for more info)
      ```
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
  3. Mar 04, 2025
  4. Mar 03, 2025
  5. Feb 28, 2025
    • Alexandru Vasile's avatar
      notifications/libp2p: Terminate the outbound notification substream on `std::io::Errors` (#7724) · 1bc6ca60
      Alexandru Vasile authored
      
      This PR handles a case where we called the `poll_next` on an outbound
      substream notification to check if the stream is closed. It is entirely
      possible that the `poll_next` would return an `io::error`, for example
      end of file.
      
      This PR ensures that we make the distinction between unexpected incoming
      data, and error originated from `poll_next`.
      
      While at it, the bulk of the PR change propagates the PeerID from the
      network behavior, through the notification handler, to the notification
      outbound stream for logging purposes.
      
      cc @paritytech/networking 
      
      Part of: https://github.com/paritytech/polkadot-sdk/issues/7722
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
    • Alexander Theißen's avatar
      pallet_revive: Change address derivation to use hashing (#7662) · 4087e2d9
      Alexander Theißen authored
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/6723
      
      ## Motivation
      
      Internal auditors recommended to not truncate Polkadot Addresses when
      deriving Ethereum addresses from it. Reasoning is that they are raw
      public keys where truncating could lead to collisions when weaknesses in
      those curves are discovered in the future. Additionally, some pallets
      generate account addresses in a way where only the suffix we were
      truncating contains any entropy. The changes in this PR act as a safe
      guard against those two points.
      
      ## Changes made
      
      We change the `to_address` function to first hash the AccountId32 and
      then use trailing 20 bytes as `AccountId20`. If the `AccountId32` ends
      with 12x 0xEE we keep our current behaviour of just truncating those
      trailing bytes.
      
      ## Security Discussion
      
      This will allow us to still recover the original `AccountId20` because
      those are constructed by just adding those 12 bytes. Please note that
      generating an ed25519 key pair where the trailing 12 bytes are 0xEE is
      theoretically possible as 96bits is not a huge search space. However,
      this cannot be used as an attack vector. It will merely allow this
      address to interact with `pallet_revive` without registering as the
      fallback account is the same as the actual address. The ultimate vanity
      address. In practice, this is not relevant since the 0xEE addresses are
      not valid public keys for sr25519 which is used almost everywhere.
      
      tl:dr: We keep truncating in case of an Ethereum address derived account
      id. This is safe as those are already derived via keccak. In every other
      case where we have to assume that the account id might be a public key.
      Therefore we first hash and then take the trailing bytes.
      
      ## Do we need a Migration for Westend
      
      No. We changed the name of the mapping. This means the runtime will not
      try to read the old data. Ethereum keys are unaffected by this change.
      We just advise people to re-register their AccountId32 in case they need
      to use it as it is a very small circle of users (just 3 addresses
      registered). This will not cause disturbance on Westend.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • Serban Iorga's avatar
      Derive `DecodeWithMemTracking` for `Block` (#7655) · c11b1f85
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/7360
      
      This PR adds `DecodeWithMemTracking` as a trait bound for `Header`,
      `Block` and `TransactionExtension` and
      derives it for all the types that implement these traits in
      `polkadot-sdk`.
  6. Feb 27, 2025
    • Utkarsh Bhardwaj's avatar
      [AHM] Poke deposits: Multisig pallet (#7700) · cc83fba1
      Utkarsh Bhardwaj authored
      
      # Description
      
      * This PR adds a new extrinsic `poke_deposit` to `pallet-multisig`. This
      extrinsic will be used to re-adjust the deposits made in the pallet to
      create a multisig operation after AHM.
      * Part of #5591 
      
      ## Review Notes
      
      * Added a new extrinsic `poke_deposit` in `pallet-multisig`.
      * Added a new event `DepositPoked` to be emitted upon a successful call
      of the extrinsic.
      * Although the immediate use of the extrinsic will be to give back some
      of the deposit after the AH-migration, the extrinsic is written such
      that it can work if the deposit decreases or increases (both).
      * The call to the extrinsic would be `free` if an actual adjustment is
      made to the deposit and `paid` otherwise.
      * Added tests to test all scenarios.
      
      ## TO-DOs
      * [x] Add Benchmark
      * [x] Run CI cmd bot to benchmark
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
    • Alexandru Vasile's avatar
      notifications/tests: Check compatiblity between litep2p and libp2p (#7484) · e3e3f481
      Alexandru Vasile authored
      
      This PR ensures compatibility in terms of expectations between the
      libp2p and litep2p network backends at the notification protocol level.
      
      The libp2p node is tested with the `Notification` behavior that contains
      the protocol controller, while litep2p is tested at the lowest level API
      (without substrate shim layers).
      
      ## Notification Behavior
      
      (I) Libp2p protocol controller will eagerly reopen a closed substream,
      even if it is the one that closed it:
      - When a node (libp2p or litep2p) closes the substream with **libp2p**,
      the **libp2p** controller will reopen the substream
      - When **libp2p** closes the substream with a node (either litep2p with
      no controller or libp2p), the **libp2p** controller will reopen the
      substream
      - However in this case, libp2p was the one closing the substream
      signaling it is no longer interested in communicating with the other
      side
      
      (II) Notifications are lost and not reported to the higher level in the
      following scenario:
      - T0: Node A opens a substream with Node B
      - T1: Node A closes the substream or the connection with Node B
      - T2: Node B sends a notification to Node A => *notification is lost*
      and never reported
      - T3: Node B detects the closed substream or connection
      
      
      ## Testing
      
      This PR effectively checks:
      - connectivity at the notification level
      - litep2p rejecting libp2p substream and keep-alive mechanism
      functionality
      - libp2p disconnecting libp2p and connection re-establishment (and all
      the other permutations)
      - idling of connections with active substreams and keep-alive mechanism
      is not enforced
      
      
      Prior work:
      - https://github.com/paritytech/polkadot-sdk/pull/7361
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
  7. Feb 26, 2025
    • Ankan's avatar
      [Nomination Pool] Make staking restrictions configurable (#7685) · f7e98b40
      Ankan authored
      
      closes https://github.com/paritytech/polkadot-sdk/issues/5742
      
      Need to be backported to stable2503 release.
      
      With the migration of staking accounts to [fungible
      currency](https://github.com/paritytech/polkadot-sdk/pull/5501), we can
      now allow pool users to stake directly and vice versa. This update
      introduces a configurable filter mechanism to determine which accounts
      can join a nomination pool.
      
      ## Example Usage  
      
      ### 1. Allow any account to join a pool  
      To permit all accounts to join a nomination pool, use the `Nothing`
      filter:
      
      ```rust
      impl pallet_nomination_pools::Config for Runtime {
          ...
          type Filter = Nothing;
      }
      ```
      
      ### 2. Restrict direct stakers from joining a pool
      
      To prevent direct stakers from joining a nomination pool, use
      `pallet_staking::AllStakers`:
      ```rust
      impl pallet_nomination_pools::Config for Runtime {
          ...
          type Filter = pallet_staking::AllStakers<Runtime>;
      }
      ```
      
      ### 3. Define a custom filter
      For more granular control, you can define a custom filter:
      ```rust
      struct MyCustomFilter<T: Config>(core::marker::PhantomData<T>);
      
      impl<T: Config> Contains<T::AccountId> for MyCustomFilter<T> {
          fn contains(account: &T::AccountId) -> bool {
              todo!("Implement custom logic. Return `false` to allow the account to join a pool.")
          }
      }
      ```
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <info@kchr.de>
    • xermicus's avatar
      [pallet-revive] allow delegate calls to non-contract accounts (#7729) · c29e72a8
      xermicus authored
      
      This PR changes the behavior of delegate calls when the callee is not a
      contract account: Instead of returning a `CodeNotFound` error, this is
      allowed and the caller observes a successful call with empty output.
      
      The change makes for example the following contract behave the same as
      on EVM:
      
      ```Solidity
      contract DelegateCall {
          function delegateToLibrary() external returns (bool) {
              address testAddress = 0x0000000000000000000000000000000000000000;
              (bool success, ) = testAddress.delegatecall(
                  abi.encodeWithSignature("test()")
              );
              return success;
          }
      }
      ```
      
      Closes https://github.com/paritytech/revive/issues/235
      
      ---------
      
      Signed-off-by: default avatarxermicus <cyrill@parity.io>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • PG Herveou's avatar
      [pallet-revive] ecrecover (#7652) · 86019edb
      PG Herveou authored
      
      Add ECrecover 0x1 precompile and remove the unstable equivalent host
      function.
      
      - depend on https://github.com/paritytech/polkadot-sdk/pull/7676
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
  8. Feb 25, 2025
    • Giuseppe Re's avatar
      Add Runtime Api version to metadata (#7607) · 3dc3a11c
      Giuseppe Re authored
      
      The runtime API implemented version is not explicitly shown in metadata,
      so here we add it to improve developer experience.
      We need to bump `frame-metadata` and `merkleized-metadata` to allow this
      new feature.
      
      This closes #7352 .
      
      _Refactor_: also changing all the occurrences of `ViewFunctionMethod` to
      just `ViewFunction` for metadata types.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • CrabGopher's avatar
      Expose extension weights (#7637) · dd005c48
      CrabGopher authored
      # Description
      Seems like SubstrateWeights that used T::DBWeights was not public unlike
      the frame_system's Call weights. PR just made those weights public
      
      ## Integration
      Instead of using `()` impl which used RockDB weights, ExtensionWeights
      can be used to to use the provided DBWeights to System config
  9. Feb 24, 2025
  10. Feb 23, 2025
    • Davide Galassi's avatar
      Bandersnatch hot fix (#7670) · 21f6f070
      Davide Galassi authored
      
      Essentially, this locks `bandersnatch_vrfs` to a specific branch of a
      repository I control. This is a temporary workaround to avoid issues
      like https://github.com/paritytech/polkadot-sdk/issues/7653 until
      https://github.com/paritytech/polkadot-sdk/pull/7669 is ready.
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/7653 
      
      @drskalman
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  11. Feb 21, 2025
  12. Feb 20, 2025
    • Utkarsh Bhardwaj's avatar
      [AHM] Poke deposits: Indices pallet (#7587) · b9b73eb2
      Utkarsh Bhardwaj authored
      
      # Description
      
      * This PR adds a new extrinsic `reconsider` to `pallet-indices`. This
      extrinsic will be used to re-adjust the deposits made in the pallet.
      * Part of #5591 
      
      ## Review Notes
      
      * Added a new extrinsic `reconsider` in `pallet-indices`.
      * Added a new event `DepositReconsidered` to be emitted upon a
      successful call of the extrinsic.
      * Although the immediate use of the extrinsic will be to give back some
      of the deposit after the AH-migration, the extrinsic is written such
      that it can work if the deposit decreases or increases (both).
      * The call to the extrinsic would be `free` if an actual adjustment is
      made to the deposit and `paid` otherwise.
      * Added tests to test all scenarios.
      * Added a benchmark to test the "worst case" (maximum compute) flow of
      the extrinsic which is when the deposit amount is updated to a new
      value.
      
      ## TO-DOs
      
      * [x] Run CI cmd bot to benchmark
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • Alexandru Vasile's avatar
      net/litep2p: Bring the latest compatibility fixes via v0.9.1 (#7640) · 42e9de7f
      Alexandru Vasile authored
      
      This PR updates litep2p to version 0.9.1. The yamux config is entirely
      removed to mirror the libp2p yamux upstream version.
      While at it, I had to bump indexmap and URL as well. 
      
      
      ## [0.9.1] - 2025-01-19
      
      This release enhances compatibility between litep2p and libp2p by using
      the latest Yamux upstream version. Additionally, it includes various
      improvements and fixes to boost the stability and performance of the
      WebSocket stream and the multistream-select protocol.
      
      ### Changed
      
      - yamux: Switch to upstream implementation while keeping the controller
      API ([#320](https://github.com/paritytech/litep2p/pull/320))
      - req-resp: Replace SubstreamSet with FuturesStream
      ([#321](https://github.com/paritytech/litep2p/pull/321))
      - cargo: Bring up to date multiple dependencies
      ([#324](https://github.com/paritytech/litep2p/pull/324))
      - build(deps): bump hickory-proto from 0.24.1 to 0.24.3
      ([#323](https://github.com/paritytech/litep2p/pull/323))
      - build(deps): bump openssl from 0.10.66 to 0.10.70
      ([#322](https://github.com/paritytech/litep2p/pull/322))
      
      ### Fixed
      
      - websocket/stream: Fix unexpected EOF on `Poll::Pending` state
      poisoning ([#327](https://github.com/paritytech/litep2p/pull/327))
      - websocket/stream: Avoid memory allocations on flushing
      ([#325](https://github.com/paritytech/litep2p/pull/325))
      - multistream-select: Enforce `io::error` instead of empty protocols
      ([#318](https://github.com/paritytech/litep2p/pull/318))
      - multistream: Do not wait for negotiation in poll_close
      ([#319](https://github.com/paritytech/litep2p/pull/319))
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
    • PG Herveou's avatar
      [pallet-revive] tracing improvements (#7614) · 9e75647c
      PG Herveou authored
      
      Various pallet-revive improvements
      
      - add check for precompiles addresses,
      So we can easily identify which one are being called and not supported
      yet
      
      - fixes debug_call for revert call
      If a call revert we still want to get the traces for that call, that
      matches geth behaviors, diff tests will be added to the test suite for
      this
      
      - fixes traces for staticcall
      The call type was not always being reported properly.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
    • Alexander Theißen's avatar
      Update to Rust stable 1.84.1 (#7625) · e2d3da61
      Alexander Theißen authored
      
      Ref https://github.com/paritytech/ci_cd/issues/1107
      
      We mainly need that so that we can finally compile the `pallet_revive`
      fixtures on stable. I did my best to keep the commits focused on one
      thing to make review easier.
      
      All the changes are needed because rustc introduced more warnings or is
      more strict about existing ones. Most of the stuff could just be fixed
      and the commits should be pretty self explanatory. However, there are a
      few this that are notable:
      
      ## `non_local_definitions `
      
      A lot of runtimes to write `impl` blocks inside functions. This makes
      sense to reduce the amount of conditional compilation. I guess I could
      have moved them into a module instead. But I think allowing it here
      makes sense to avoid the code churn.
      
      ## `unexpected_cfgs`
      
      The FRAME macros emit code that references various features like `std`,
      `runtime-benchmarks` or `try-runtime`. If a create that uses those
      macros does not have those features we get this warning. Those were
      mostly when defining a `mock` runtime. I opted for silencing the warning
      in this case rather than adding not needed features.
      
      For the benchmarking ui tests I opted for adding the `runtime-benchmark`
      feature to the `Cargo.toml`.
      
      ## Failing UI test
      
      I am bumping the `trybuild` version and regenerating the ui tests. The
      old version seems to be incompatible. This requires us to pass
      `deny_warnings` in `CARGO_ENCODED_RUSTFLAGS` as `RUSTFLAGS` is ignored
      in the new version.
      
      ## Removing toolchain file from the pallet revive fixtures
      
      This is no longer needed since the latest stable will compile them fine
      using the `RUSTC_BOOTSTRAP=1`.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    • Serban Iorga's avatar
      derive `DecodeWithMemTracking` for `RuntimeCall` (#7634) · e8d17cbe
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/7360
    • Francisco Aguirre's avatar
      Update dispatchables doc link in pallet-revive's README (#7624) · f2414398
      Francisco Aguirre authored
      Pallet-revive's README has an outdated link for dispatchables
      documentation in its README. It was giving 404. Put the up-to-date one.
  13. Feb 19, 2025
    • Jonathan Brown's avatar
      [pallet-broker] add extrinsic to remove an assignment (#7080) · bd418487
      Jonathan Brown authored
      
      # Description
      
      #6929 requests more extrinsics for "managing the network's coretime
      allocations without needing to dabble with migration+runtime upgrade or
      set/kill storage patterns"
      
      This pull request implements the remove_assignment() extrinsic.
      
      
      ## Integration
      
      Downstream projects need to benchmark the weight for the
      remove_assignment() extrinsic.
      
      ---------
      
      Co-authored-by: default avatarJonathan Brown <jbrown@acuity.network>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
    • Jonathan Brown's avatar
      [pallet-broker] add extrinsic to remove a lease (#7026) · 959d9187
      Jonathan Brown authored
      
      # Description
      
      #6929 requests more extrinsics for "managing the network's coretime
      allocations without needing to dabble with migration+runtime upgrade or
      set/kill storage patterns"
      
      This pull request implements the remove_lease() extrinsic.
      
      
      ## Integration
      
      Downstream projects need to benchmark the weight for the remove_lease()
      extrinsic.
      
      ## Review Notes
      
      Mentorship is requested to ensure this is implemented correctly.
      
      The lease is removed from state using the TaskId as a key. Is this
      sufficient. Does the extrinsic need to do anything else?
      
      ---------
      
      Co-authored-by: default avatarJonathan Brown <jbrown@acuity.network>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarDónal Murray <donalm@seadanda.dev>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
    • Serban Iorga's avatar
      Derive `DecodeWithMemTracking` for cumulus pallets and for `polkadot-sdk` runtimes (#7627) · d60afc9f
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/7360
      
      Derive `DecodeWithMemTracking` for the structures in the cumulus pallets
      and for the structures in the `polkadot-sdk` runtimes.
      
      The PR contains no functional changes and no manual implementation. Just
      deriving `DecodeWithMemTracking`.
    • Michal Kucharczyk's avatar
      `fatxpool`: event streams moved to view domain (#7545) · 8507e70f
      Michal Kucharczyk authored
      #### Overview
      
      This pull request refactors the transaction pool `graph` module by
      renaming components for better clarity. The `EventHandler` trait was
      introduced to enhance flexibility in handling transaction lifecycle
      events. Changes include renaming `graph::Listener` to
      `graph::EventDispatcher` and moving certain functionalities from `graph`
      to `view` module in order to decouple `graph` from `view`-related
      specifics.
      
      This PR does not introduce changes in the logic.
      
      #### Notes for Reviewers
      All the changes looks dense at first, but in fact following was done:
      - The `graph::Listener` was renamed to
      [`graph::EventDispatcher`](https://github.com/paritytech/polkadot-sdk/blob/515cb404/substrate/client/transaction-pool/src/graph/listener.rs#L74C12-L74C27),
      to better reflect its role in dispatching transaction-related events
      from `ValidatedPool`. The `EventDispatcher` now utilizes the `L:
      EventHandler` generic type to handle transaction status events.
      - The new
      [`EventHandler`](https://github.com/paritytech/polkadot-sdk/blob/515cb404/substrate/client/transaction-pool/src/graph/listener.rs#L34)
      trait was introduced to handle transaction lifecycle events, improving
      implementation flexibility and providing clearer role descriptions
      within the system. Introduction of this trait allowed the removal of
      `View` related entities (e.g. streams) from the `ValidatedPool`'s event
      dispatcher (previously _listener_).
      - The _dropped monitoring_ and _aggregated events_ stream
      [functionalities](https://github.com/paritytech/polkadot-sdk/blob/515cb404/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs#L157-L188)
      and [related
      types](https://github.com/paritytech/polkadot-sdk/blob/515cb404/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs#L112-L121)
      were moved from `graph::listener` to the `view` module. The
      [`ViewPoolObserver`](https://github.com/paritytech/polkadot-sdk/blob/515cb404
      
      /substrate/client/transaction-pool/src/fork_aware_txpool/view.rs#L128C19-L128C35),
      which implements `EventHandler`, now provides the implementation of
      streams feeding.
      - Fields, arguments, and variables previously named `listener` were
      renamed to `event_dispatcher` to align with their purpose and type
      naming.
      - Various structs such as `Pool` and `ValidatedPool` were updated to
      include a generic `L: EventHandler` across the codebase.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarIulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
  14. Feb 18, 2025