Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Optimize offchain worker memory usage a bit. #11454

Merged
merged 10 commits into from
May 24, 2022

Conversation

kianenigma
Copy link
Contributor

This PR improves the offchain worker miners' memory usage with two different tricks:

  • reading the snapshot with pre-allocation. We should actually make sure all storage items are read like this.
  • using pre-allocation with filter_map, as it by default starts expanding from 0.

Also adds some logs here and there. The log that I added as warning for large allocations will probably be triggered by many nodes, and we should move it to debug. Nonetheless super useful for debugging.

@kianenigma kianenigma added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels May 18, 2022
@kianenigma kianenigma added this to the v0.9.23 milestone May 18, 2022
fn read_snapshot_with_preallocate() -> Result<RoundSnapshot<T>, Error<T>> {
use codec::MaxEncodedLen;
let snap = Self::snapshot_metadata().ok_or(Error::<T>::MissingSnapshot)?;
let voters_size = snap.voters as usize * <VoterOf<T>>::max_encoded_len();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can probably be simplified to simply RoundSnapshot::max_encoded_len

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, I wonder if what I did here can be applied to all storage items that are MaxEncodedLen?

Comment on lines 417 to 425
if order.size() + HEADER_SIZE > 8 * 1024 * 1024 {
log::warn!(
target: LOG_TARGET,
"large allocation of {} detected, after allocation, total_size = {}, bumper = {}.",
order.size() + HEADER_SIZE,
self.total_size,
self.bumper,
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think this will definitely be spammy so it shouldn't stay as a warn.

This reminds me though, it'd probably be useful to add some sort of logging capability so that a log of every allocation from within the runtime could be dumped into a file; something like my Bytehound, but for the runtime instead of the native code. (Obviously totally out of scope of this PR though.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 1514 to 1532
fn read_snapshot_with_preallocate() -> Result<RoundSnapshot<T>, Error<T>> {
use codec::MaxEncodedLen;
let snap = Self::snapshot_metadata().ok_or(Error::<T>::MissingSnapshot)?;
let voters_size = snap.voters as usize * <VoterOf<T>>::max_encoded_len();
let targets_size = snap.targets as usize * T::AccountId::max_encoded_len();

// we want to decode two vecs, which need two u32s at most for their size.
let initial_capacity = voters_size + targets_size + 4 + 4;
let mut buffer = Vec::<u8>::with_capacity(initial_capacity);

// fill this whole buffer, and decode into it.
buffer.resize(buffer.capacity(), 0);
let _leftover = sp_io::storage::read(&<Snapshot<T>>::hashed_key(), &mut buffer, 0)
.ok_or(Error::<T>::MissingSnapshot)?;

// buffer should have not re-allocated
debug_assert!(buffer.capacity() == initial_capacity);
<RoundSnapshot<T> as codec::Decode>::decode(&mut &*buffer).map_err(|_| Error::<T>::Codec)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... so you manually calculate how much the scale-encoded value is supposed to take, preallocate a buffer, fetch it into that buffer and then decode it. Can you explain why is this necessary? How is this different than calling Snapshot::get()?

AFAIK this should already be done on the FFI boundary automatically, unless I'm missing something here? (And if I'm missing something then it'd be better to fix this on the FFI boundary so that it's fixed everywhere instead of manually fixing in on a case-by-case basis like here.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the FFI should also allocate buffer only to the actual size it has in the storage. Meaning it should even take less memory than you are calculating here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can provide some proof using the log that I added in the allocator, but I am pretty sure I consume less memory this way than calling Snapshot::get().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can provide some proof using the log that I added in the allocator, but I am pretty sure I consume less memory this way than calling Snapshot::get().

This is how get works right now AFAIK:

  1. The host function to grab the value from storage gets triggered.
  2. The host reads the value from the storage into a host-side Vec.
  3. The host calls into the runtime's allocator and directly allocates a new chunk of memory accessible within the runtime.
  4. The host copies the data from the host-side Vec into the chunk of memory allocated at step (3).
  5. The host packs the pointer to that chunk of runtime memory along with its size into a single u64 value and returns that from the host function. (This is zero-cost as primitive types like u64 are natively supported by the FFI.)
  6. The runtime grabs that u64 value, unpacks it into a (ptr, size) pair and does a Vec::from_raw_parts to create a Vec<u8>.
  7. The runtime calls Decode::decode on that Vec<u8>.

So as you can see this shouldn't consume any extra memory since the host essentially directly allocates the runtime-side Vec into which it copies the data. It always allocates only the exact amount of bytes necessary, and directly copies the data without any extra resizes.

So either this code doesn't actually do anything different, or it does and the FFI layer doesn't work exactly as we think it does (in which case we should fix it).

So yeah, it'd be nice if you could double check that this actually does anything different.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koute your description reads exactly on how the implementation is/should be.

Cargo.lock Outdated
@@ -29,30 +29,30 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"

[[package]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a tons of updated deps here; is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, should be reverted later.

Comment on lines 1514 to 1532
fn read_snapshot_with_preallocate() -> Result<RoundSnapshot<T>, Error<T>> {
use codec::MaxEncodedLen;
let snap = Self::snapshot_metadata().ok_or(Error::<T>::MissingSnapshot)?;
let voters_size = snap.voters as usize * <VoterOf<T>>::max_encoded_len();
let targets_size = snap.targets as usize * T::AccountId::max_encoded_len();

// we want to decode two vecs, which need two u32s at most for their size.
let initial_capacity = voters_size + targets_size + 4 + 4;
let mut buffer = Vec::<u8>::with_capacity(initial_capacity);

// fill this whole buffer, and decode into it.
buffer.resize(buffer.capacity(), 0);
let _leftover = sp_io::storage::read(&<Snapshot<T>>::hashed_key(), &mut buffer, 0)
.ok_or(Error::<T>::MissingSnapshot)?;

// buffer should have not re-allocated
debug_assert!(buffer.capacity() == initial_capacity);
<RoundSnapshot<T> as codec::Decode>::decode(&mut &*buffer).map_err(|_| Error::<T>::Codec)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the FFI should also allocate buffer only to the actual size it has in the storage. Meaning it should even take less memory than you are calculating here.

frame/election-provider-multi-phase/src/lib.rs Outdated Show resolved Hide resolved
@kianenigma
Copy link
Contributor Author

kianenigma commented May 19, 2022

Running my little experiment with this branch:

2022-05-19 14:12:10.938  INFO main try-runtime::cli: found matching spec name: "westend"
2022-05-19 14:12:10.938  INFO main try-runtime::cli: found matching spec version: 9220
2022-05-19 14:12:10.940 DEBUG main runtime::election-provider: [#10800100] 🗳  clearing offchain call cache storage.
2022-05-19 14:12:10.940 DEBUG main runtime::election-provider: [#10800100] 🗳  miner attempting to compute an unsigned solution.
2022-05-19 14:12:10.940  WARN main wasm-heap: large allocation of 16777224 detected, after allocation, total_size = 16778304, bumper = 18124688.
2022-05-19 14:12:10.959  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 18875464, bumper = 20221848.
2022-05-19 14:12:10.963 DEBUG main runtime::election-provider: [#10800100] 🗳  read-snapshot
2022-05-19 14:12:10.963 DEBUG main runtime::election-provider: 🗳 solving..
2022-05-19 14:12:10.963  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 15818776, bumper = 33941216.
2022-05-19 14:12:10.983  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 42954800, bumper = 66279064.
2022-05-19 14:12:11.001  WARN main wasm-heap: large allocation of 4194312 detected, after allocation, total_size = 58683440, bumper = 87316128.
2022-05-19 14:12:11.316  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 50321280, bumper = 116527248.
2022-05-19 14:12:11.334 DEBUG main runtime::election-provider: 🗳 preparing..
2022-05-19 14:13:49.711 DEBUG main runtime::election-provider: 🗳 from 22459 assignments, truncating to 22500 for weight, removing 0
2022-05-19 14:13:49.714 DEBUG main runtime::election-provider: 🗳 from 22459 assignments, truncating to 22459 for length, removing 0
2022-05-19 14:13:49.715  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 21197440, bumper = 132023000.
2022-05-19 14:13:49.731  WARN main wasm-heap: large allocation of 16777224 detected, after allocation, total_size = 17303176, bumper = 132662496.
2022-05-19 14:13:49.750  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 19400336, bumper = 132662496.
2022-05-19 14:13:49.760  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 20132008, bumper = 132662496.
2022-05-19 14:13:49.781 DEBUG main runtime::election-provider: [#10800100] 🗳  mined a solution with score ElectionScore { minimal_stake: 9147861911183591, sum_stake: 1036571369123177645, sum_stake_squared: 78873931281358629983315541364254441 } and size 79683
2022-05-19 14:13:49.781 DEBUG main runtime::election-provider: [#10800100] 🗳  saving a call to the offchain storage.
2022-05-19 14:13:49.782 DEBUG main runtime::election-provider: [#10800100] 🗳  miner submitting a solution as an unsigned transaction
2022-05-19 14:13:49.782 DEBUG main runtime::election-provider: [#10800100] 🗳  initial offchain thread output: Ok(())
2022-05-19 14:13:49.788  INFO main try-runtime::cli: OffchainWorkerApi_offchain_worker executed without errors.

But when I change the snapshot reads to normal get:

2022-05-19 14:21:58.476  INFO main try-runtime::cli: found matching spec name: "westend"
2022-05-19 14:21:58.476  INFO main try-runtime::cli: found matching spec version: 9220
2022-05-19 14:21:58.478 DEBUG main runtime::election-provider: [#10800100] 🗳  clearing offchain call cache storage.
2022-05-19 14:21:58.478 DEBUG main runtime::election-provider: [#10800100] 🗳  miner attempting to compute an unsigned solution.
2022-05-19 14:21:58.495  WARN main wasm-heap: large allocation of 16777224 detected, after allocation, total_size = 16778304, bumper = 18124688.
2022-05-19 14:21:58.499  WARN main wasm-heap: large allocation of 16777224 detected, after allocation, total_size = 33555528, bumper = 34901912.
2022-05-19 14:21:58.504  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 18875464, bumper = 36999072.
2022-05-19 14:21:58.508 DEBUG main runtime::election-provider: [#10800100] 🗳  read-snapshot
2022-05-19 14:21:58.508 DEBUG main runtime::election-provider: 🗳 solving..
2022-05-19 14:21:58.508  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 15818776, bumper = 50718440.
2022-05-19 14:21:58.530  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 42954800, bumper = 83056288.
2022-05-19 14:21:58.548  WARN main wasm-heap: large allocation of 4194312 detected, after allocation, total_size = 58683440, bumper = 104093352.
2022-05-19 14:21:58.867  WARN main wasm-heap: large allocation of 2097160 detected, after allocation, total_size = 50321280, bumper = 133304472.
2022-05-19 14:21:58.869 ERROR main wasm-heap: running out of space with current bumper 135593448, mem size 135593984

====================

Version: 0.9.22-unknown

   0: sp_panic_handler::set::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
   4: rust_begin_unwind
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
   5: core::panicking::panic_fmt
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
   6: core::result::unwrap_failed
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/result.rs:1749:5
   7: tracing::span::Span::in_scope
   8: sp_io::allocator::ExtAllocatorMallocVersion1::call
   9: <sc_executor_wasmtime::imports::Registry as sp_wasm_interface::HostFunctionRegistry>::with_function_context
  10: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  11: <F as wasmtime::func::IntoFunc<T,(wasmtime::func::Caller<T>,A1),R>>::into_func::wasm_to_host_shim
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: wasmtime_runtime::traphandlers::catch_traps::call_closure
  26: wasmtime_setjmp
  27: wasmtime_runtime::traphandlers::catch_traps
  28: wasmtime::func::invoke_wasm_and_catch_traps
  29: wasmtime::func::typed::TypedFunc<Params,Results>::call
  30: sc_executor_wasmtime::instance_wrapper::EntryPoint::call
  31: sc_executor_wasmtime::runtime::perform_call
  32: <sc_executor_wasmtime::runtime::WasmtimeInstance as sc_executor_common::wasm_runtime::WasmInstance>::call
  33: sc_executor_common::wasm_runtime::WasmInstance::call_export
  34: std::panicking::try
  35: std::thread::local::LocalKey<T>::with
  36: sc_executor::native_executor::WasmExecutor<H>::with_instance::{{closure}}
  37: sc_executor::wasm_runtime::RuntimeCache::with_instance
  38: <sc_executor::native_executor::NativeElseWasmExecutor<D> as sp_core::traits::CodeExecutor>::call
  39: sp_state_machine::execution::StateMachine<B,H,Exec>::execute_aux
  40: sp_state_machine::execution::StateMachine<B,H,Exec>::execute
  41: try_runtime_cli::state_machine_call
  42: try_runtime_cli::TryRuntimeCmd::run::{{closure}}
  43: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
  44: sc_cli::runner::main::{{closure}}::{{closure}}::{{closure}}
  45: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
  46: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  47: std::thread::local::LocalKey<T>::with
  48: tokio::park::thread::CachedParkThread::block_on
  49: tokio::runtime::thread_pool::ThreadPool::block_on
  50: sc_cli::runner::Runner<C>::async_run
  51: polkadot_cli::command::run
  52: polkadot::main
  53: std::sys_common::backtrace::__rust_begin_short_backtrace
  54: std::rt::lang_start::{{closure}}
  55: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48
      std::panicking::try::do_call
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20
  56: main
  57: __libc_start_main
             at /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
  58: _start


Thread 'main' panicked at 'Failed to allocate memory: "Allocator ran out of space"', /home/kianenigma/remote-builds/substrate-2/primitives/io/src/lib.rs:1295

This is a bug. Please report it at:

	https://github.com/paritytech/polkadot/issues/new

Error:
   0: Invalid input: failed to execute 'OffchainWorkerApi_offchain_worker': Execution aborted due to trap: host code panicked while being called by the runtime: Failed to allocate memory: "Allocator ran out of space"
      WASM backtrace:

          0: 0x4cccd - <unknown>!sp_io::allocator::extern_host_function_impls::malloc::hce113be5b61b76cb
          1: 0x9cc51 - <unknown>!alloc::raw_vec::finish_grow::h0c5a820d3aa10288
          2: 0xa01a8 - <unknown>!alloc::raw_vec::RawVec<T,A>::reserve::do_reserve_and_handle::h19447a926ea50b39
          3: 0x33d326 - <unknown>!alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter::hbbb5cecc397415ab
          4: 0x2ff91a - <unknown>!sp_npos_elections::Voter<AccountId>::into_assignment::h859a008cdc55d740
          5: 0x33c816 - <unknown>!alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter::hb9eb52706b774c12
          6: 0x40c406 - <unknown>!sp_npos_elections::phragmen::seq_phragmen::h0b7eb3795cf826f9
          7: 0x1f3c3c - <unknown>!pallet_election_provider_multi_phase::unsigned::Miner<T>::mine_solution_with_snapshot::h7a65656a7c45a916
          8: 0x28ffda - <unknown>!pallet_election_provider_multi_phase::unsigned::<impl pallet_election_provider_multi_phase::pallet::Pallet<T>>::mine_checked_call::h481954b7cddf8140
          9: 0x28ee90 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::misc::OffchainWorker<BlockNumber>>::offchain_worker::h556e571cbb708d48
         10: 0x1b9cfb - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::misc::OffchainWorker<BlockNumber>>::offchain_worker::h83d2a9cc767f7155
         11: 0x255083 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::offchain_worker::h636642bc6c2cb42c
         12: 0x273fe2 - <unknown>!OffchainWorkerApi_offchain_worker
   0:

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 3 frames hidden ⋮
   4: polkadot::main::h2f40ca92dfa5eb02
      at <unknown source file>:<unknown line>
   5: std::sys_common::backtrace::__rust_begin_short_backtrace::h3c2668e5a17fe866
      at <unknown source file>:<unknown line>
   6: std::rt::lang_start::{{closure}}::hb86f23c22b95eb7a
      at <unknown source file>:<unknown line>
   7: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb7014f43484a8b4e
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259
   8: std::panicking::try::do_call::h7bc9dc436daeb8c7
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492
   9: std::panicking::try::h653d68a27ff5f175
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456
  10: std::panic::catch_unwind::h9d739f9f59895e68
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137
  11: std::rt::lang_start_internal::{{closure}}::hf006f2bc7ce22bbe
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128
  12: std::panicking::try::do_call::hfb39d6df61a2e69f
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492
  13: std::panicking::try::h13e2d225134958ac
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456
  14: std::panic::catch_unwind::h3bd49b5a5dfb1a50
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137
  15: std::rt::lang_start_internal::h2ba92edce36c035e
      at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128
  16: main<unknown>
      at <unknown source file>:<unknown line>
  17: __libc_start_main<unknown>
      at /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308
  18: _start<unknown>
      at <unknown source file>:<unknown line>

The main thing that I pointed down and tried to eliminate here was the duplicate 16777224 allocation, which certainly is happening in ::get.

That being said, I am myself still a bit suspicious of what I have done here, and I agree that I don't get how this is an improvement.

@koute
Copy link
Contributor

koute commented May 19, 2022

Okay, this definitely shouldn't happen.

As we privately discussed with @kianenigma I'll take a closer look at this.

@bkchr
Copy link
Member

bkchr commented May 19, 2022

Fuck. I know what the problem is storage::get is returning a Option<Vec<u8>> and Option<T> is passed using Codec. Meaning we need to decode it first... So, this is the reason we see this allocation twice.

@koute
Copy link
Contributor

koute commented May 20, 2022

Fuck. I know what the problem is storage::get is returning a Option<Vec<u8>> and Option<T> is passed using Codec. Meaning we need to decode it first... So, this is the reason we see this allocation twice.

So what options do we have here?

  1. Add a new host function to fetch the size of the value from storage, preallocate the Vec on the runtime's side and then use Storage::read to read it. (Similar to what's done in this PR.)
  2. Add a new host function which will return the pointer to the Vec through a &mut *mut u8.
  3. Improve the allocator so that this is not a problem.
  4. Special-case when a host function returns an Option<Vec<u8>> so that there's only one allocation (not sure if that can be transparently done on the scale codec's side due to overlapping trait impls, I'd have to check; if not one possibility would be to export fn decode_option_vec_u8(...) -> Option<Vec<u8>> from the scale codec crate and then special-case that in the procedural macro for the sp-io interfaces or something like that)

Anything else I'm missing? Thoughts? I'd probably prefer to go either for 3 or 4.

@kianenigma
Copy link
Contributor Author

Add a new host function to fetch the size of the value from storage, preallocate the Vec on the runtime's side and then use Storage::read to read it. (Similar to what's done in this PR.)

For types that have a max_encoded_len, we can just use that. As you see in my case, I am hacking around this: by using another storage item that has the exact count of items and multiplying that by the max encoded length of each item.

Not sure about the storage types that don't have max encoded length. I simply would have not been able to do this hack if I couldn't predict the size of the encoded buffer that's needed to keep this.


Option 4 seems more reasonable to me as well.

@koute
Copy link
Contributor

koute commented May 20, 2022

I agree that 4 seems the most reasonable option. I'd really rather avoid adding new host functions if they're not strictly necessary, and while number 3 would be nice that would be a significantly riskier/bigger/substantial change that could have other consequences.

Unless someone has a better idea I'll try to prototype the 4th solution and we'll see how hacky it'll be.

@bkchr
Copy link
Member

bkchr commented May 20, 2022

Fuck. I know what the problem is storage::get is returning a Option<Vec<u8>> and Option<T> is passed using Codec. Meaning we need to decode it first... So, this is the reason we see this allocation twice.

So what options do we have here?

1. Add a new host function to fetch the size of the value from storage, preallocate the `Vec` on the runtime's side and then use `Storage::read` to read it. (Similar to what's done in this PR.)

2. Add a new host function which will return the pointer to the `Vec` through a `&mut *mut u8`.

3. Improve the allocator so that this is not a problem.

4. Special-case when a host function returns an `Option<Vec<u8>>` so that there's only one allocation (not sure if that can be transparently done on the scale codec's side due to overlapping trait impls, I'd have to check; if not one possibility would be to export `fn decode_option_vec_u8(...) -> Option<Vec<u8>>` from the scale codec crate and then special-case that in the procedural macro for the `sp-io` interfaces or something like that)

Anything else I'm missing? Thoughts? I'd probably prefer to go either for 3 or 4.

I also thought about this. I came up with two solutions:

  1. Start using Bytes. We could return Option<Bytes> and then have some optimized implementation in SCALE that just uses a "sub bytes" of the given "input bytes". So, we decode Some and then just instead of copying the data into a new type, we just use a reference to the original input bytes.
  2. Similar to your 4. Make it possible to "specialize" the get function. Instead of first decoding the inner buffer, it should directly decode the type.

@koute
Copy link
Contributor

koute commented May 20, 2022

Start using Bytes. We could return Option<Bytes> and then have some optimized implementation in SCALE that just uses a "sub bytes" of the given "input bytes". So, we decode Some and then just instead of copying the data into a new type, we just use a reference to the original input bytes.

You mean Bytes from the bytes crate?

Hmm... yeah, in theory that could work. To avoid an allocation the input to the Decode trait would also have to be Bytes, so we'd probably have to add something like fn as_bytes_mut(&mut self) -> Option<&mut Bytes> to the Input trait (since it can be anything) and then for the Decode impl for Bytes in decode we'd either return a Bytes subslice if as_bytes_mut returns Some (so it's being decoded from a Bytes) or just create a freshly allocated Bytes if as_bytes_mut returns None (so it's being decoded from an Input which is not a Bytes instance).

@bkchr
Copy link
Member

bkchr commented May 20, 2022

You mean Bytes from the bytes crate?

Yes

@koute
Copy link
Contributor

koute commented May 20, 2022

Okay, I have a fix working based on @bkchr 's idea to do this with Bytes; @kianenigma 's repro doesn't crash with it anymore while still using Snapshot::get as normal.

I still need to write some tests to make sure this doesn't regress and run some benchmarks to see how it affects performance. I'll put up PRs early next week.

@bkchr
Copy link
Member

bkchr commented May 20, 2022

Sounds good @koute. This should speedup any storage access. Currently we require per storage access one extra call to allocate to allocate this intermediate buffer. With your patch we should not require this anymore, I like this :)

@kianenigma
Copy link
Contributor Author

I am gonna reduce this PR to the other minor fix for flat_map, and then we can merge it then.

})
.collect::<Vec<(AccountId, P)>>();
// most likely, the size of the staked assignment and normal assignments will be the same,
// so we pre-allocate it to prevent a sudden 2x allocation. `filter_map` starts with a size
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the context about filter map makes less sense if you dont know the diff.

Comment on lines +1110 to +1111
voters.clone(),
targets.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those clones necessary? Can't we change the prepare_election_result_with_snapshot to take &[T] instead of a Vec<T> for those? It doesn't seem to actually need those owned from what I can see?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the production code prepare_election_result_with_snapshot is the last place that we use these values so IMO it is cleaner to consume everything. Clones are only needed in tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay, that's fine then.

@kianenigma
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit a001cbb into master May 24, 2022
@paritytech-processbot paritytech-processbot bot deleted the kiz-ocw-memo-opt branch May 24, 2022 06:23
godcodehunter pushed a commit to sensoriumxr/substrate that referenced this pull request Jun 22, 2022
* add missing events to elections fallback

* Merged

* add some logs and stuff

* undo a bunch of things

* undo lock file

* remove unused err

* fix build
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
* add missing events to elections fallback

* Merged

* add some logs and stuff

* undo a bunch of things

* undo lock file

* remove unused err

* fix build
en added a commit to octopus-network/substrate that referenced this pull request Oct 5, 2022
* generate_storage_alias: Rewrite as proc macro attribute (#11387)

* generate_storage_alias: Rewrite as proc macro attribute

This rewrites the `generate_storage_alias!` declarative macro as proc-macro attribute. While doing
this the name is changed to `storage_alias`. The prefix can now also be the name of a pallet. This
makes storage aliases work in migrations for all kind of chains and not just for the ones that use
predefined prefixes.

* Fix compilation and FMT

* Moare fixes

* :facepalm:

* ......

* Rework the syntax and support instancing

* FMT

* Prefix variants with `Storage`

* Make it compile

* Fix where clause on rust stable

* Prune some duplicated dependencies in the dep graph (#11433)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* contracts: Get rid of `#[pallet::without_storage_info]` (#11414)

* Implement `MaxEncodeLen` for pallet-contracts storage

* Remove redundant debug println

* Move code len check to PrefabWasmModule::from_code

* Return a successful response on repeated small block request (#11429)

* [ci] Adjust job order in pipeline test stage with Gitlab DAG (#11442)

* [Do Not Merge] Test gitlab DAG in pipeline

* add jobs for pipeline cancel

* add check-tracing to cancel-pipeline

* Allow to set the max supply for collection (#11441)

* Allow to set the max supply for collection

* Update error

* Add weights info

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Update frame/uniques/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* disable check-dependent-cumulus (#11450)

* trie: Optimize `keys` function (#11457)

* trie: Optimize `keys` function

Instead of iterating the entire state and collecting all keys that match the given prefix, we can
directly use the optimized prefix iterator.

* Add a test

* add GHA support to dependabot (#11448)

* add GHA support to dependabot

* fix formatting

* add labels

* add label

* contracts: Add `set_code` root dispatchable (#11451)

* Add `set_code` dispatchable

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Parity Bot <admin@parity.io>

* Switch to pooling copy-on-write instantiation strategy for WASM (#11232)

* Switch to pooling copy-on-write instantiation strategy for WASM

* Fix benchmark compilation

* Fix `cargo fmt`

* Fix compilation of another benchmark I've missed

* Cleanups according to review comments

* Move `max_memory_size` to `Semantics`

* Set `memory_guaranteed_dense_image_size` to `max_memory_size`

* Rename `wasm_instantiation_strategy` to `wasmtime_instantiation_strategy`

* Update the doc-comments regarding the instantiation strategy

* Extend the integration tests to test every instantiation strategy

* Don't drop the temporary directory until the runtime is dropped in benchmarks

* Don't drop the temporary directory until the runtime is dropped in tests

* Make fields of `EraRewardPoints` public (#11422)

* add missing events to elections fallback (#11436)

* add missing events to elections fallback

* Update frame/election-provider-multi-phase/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update frame/election-provider-multi-phase/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* add test

* fix

* fmt

* Update frame/support/src/storage/types/nmap.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Fix renaming artifacts (#11455)

* Add Score to Bags List (#11357)

* Add Score to Bags List

* fix ordering

* make compile

* in progress migration

* make migration compile

* remove old check

* remove runtime specific migration

* fix warning

* Apply suggestions from code review

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* improve migration

* fix

* fix merge

* fmt

* Update migrations.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Stabilize ecdsa_ functions (#11486)

* Bump actions/checkout from 2 to 3 (#11463)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump gaurav-nelson/github-action-markdown-link-check from 1.0.9 to 1.0.14 (#11464)

* Bump gaurav-nelson/github-action-markdown-link-check

Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.9 to 1.0.14.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](https://github.com/gaurav-nelson/github-action-markdown-link-check/compare/7481451f70251762f149d69596e3e276ebf2b236...58f84fd654812d0d8da4e4d4a559eda087daf8ce)

---
updated-dependencies:
- dependency-name: gaurav-nelson/github-action-markdown-link-check
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update .github/workflows/md-link-check.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>

* RPC: Mark storage methods as `blocking`  (#11459)

* client/api: Make `storage_keys` blocking

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* client/api: Ensure `state_*` RPC methods are blocking

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* client/rpc: Ensure `childstate_*` RPC methods are blocking

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* client/rpc: `ChainApi` make RPC methods sync

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Remove unused async-traits

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* client/rpc-api: Make chain RPC methods blocking

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update client/rpc/src/state/state_full.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Add `blocking` to `state_getKeysPaged` RPC call

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Fix build and warning

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Remove `async_trait` tidyup

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* InMemoryBackend: Make it generic over the key hasher (#11488)

* InMemoryBackend: Make it generic over the key hasher

* Update primitives/state-machine/src/in_memory_backend.rs

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* Update primitives/state-machine/src/in_memory_backend.rs

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* FMT

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* Unify rpc api and implementation name (#11469)

* Unify rpc api and implementation name

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* MauanlSeal ==> ManualSealRpc

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove extra Rpc naming in the structs

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Update doc

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* fix merge

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* rpc servers CLI: add `--max--subscriptions--per--connection` + fix a few bugs (#11461)

* cli: fix RPC CLI nits

* remove needless lines

* cargo fmt

* Update client/service/src/lib.rs

Co-authored-by: James Wilson <james@jsdw.me>

Co-authored-by: James Wilson <james@jsdw.me>

* Make `--dev` listen by default on `/ip4/0.0.0.0/tcp/30333` (#11492)

If `--validator` is passed we also listen on this address and as `--dev` is a shortcut for multiple
CLI args, including `--validator`, we should make it consistent.

* Fix State Trie Migration Benchmarks (#11502)

* enable signed migrations in benchmarks

* T instead of Test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove 'mut'

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use API for pr-custom-review (#11487)

* use API for pr-custom-review

* bump action tag

* temporary: disable draft skip

* temporary: use staging

* try it with the prod instance

* revert draft skip

* Introduce #[pallet::call_index] attribute to dispatchables (#11381)

* Introduce #[pallet::call_index] attribute to dispatchables

* cargo fmt

* Add more docs and prevent duplicates of call indices

* Add UI test for conflicting call indices

* cargo fmt

Co-authored-by: parity-processbot <>

* Create Script to Run All Benchmarks (#11493)

* Create run_all_benchmarks.sh

* Update run_all_benchmarks.sh

* Update run_all_benchmarks.sh

* Review fixes

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update scripts/run_all_benchmarks.sh

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* typo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* add default for $1

* Typo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update run_all_benchmarks.sh

* new weights on benchmarking machine

* prefer `--chain=dev`

* fix compile

* fix command

* fmt

* dont use square brackets

* Extend doc

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove +nightly

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add error file an run execute everything optimistically

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Adjust maximum memory pages hard limit for the pooling instantiation strategy (#11482)

* Run `sc-executor-wasmtime` unit tests for all instantiation strategies

* Adjust maximum memory pages hard limit for the pooling instantiation strategy

* Optimize offchain worker memory usage a bit.  (#11454)

* add missing events to elections fallback

* Merged

* add some logs and stuff

* undo a bunch of things

* undo lock file

* remove unused err

* fix build

* add rule to the ci job (#11511)

* Contracts pallet: removal on idle (#11202)

* on_initialize -> on_idle

* use remaining_weight info

* no weight_limit for on_idle

* call on_idle in tests

* attempt to fix tests

* run on_initiaize when queue full

* add on_idle to weight info

* add on_idle weight info to on_idle hook

* add basic test for on_initialize with full queue

* disbale check for all keys gone in full queue, full block test

* queue_deth as usize, add comment

* comment was removed by accident

* Update frame/contracts/src/lib.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* cargo +nightly fmt

* update lazy_removal_does_no_run_on_full_queue_and_full_block

* remove changes in weights.rs

* weights on_idle -> on_process_deletion_queue_batch

* use block number for on_idle

* use BlockNumber for on_initialize

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Update frame/contracts/src/lib.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* remove outcommented code

* add check that queue still full for test

* cargo fmt

* cargo +nightly fmt

* Update frame/contracts/src/benchmarking/mod.rs

Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>

* fix weights.rs

* add lazy_removal_does_no_run_on_low_remaining_weight test

* Apply suggestions from code review

Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>

* Fix Babe revert when last finalized block is a leaf (#11500)

* Fix Babe revert when a leaf is the last finalized block

Without this fix the last finalized block weight data is wrongly removed
on revert scenario where the last finalized block is a leaf.

* Remove redundant check

* Added test to exercise the fix

* Rename test

* Give variables better names

* Document benchmarking CLI (#11246)

* Decrese default repeats

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add benchmarking READMEs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update docs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update docs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update README

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Review fixes

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

Co-authored-by: parity-processbot <>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Introduce `WeightToFee` trait instead of `WeightToFeePolynomial` and make `WeightToFeePolynomial` implement it instead (#11415)

* Introduce `WeightToFee` trait instead of `WeightToFeePolynomial` and make `WeightToFeePolynomial` implement it instead

* Rename `WeightToFee::calc()` to `WeightToFee::wight_to_fee()`

* Fix typo

* Fix node lookup on fork-tree after a warp-sync (#11476)

* Fix node lookup on fork-tree after a warp-sync

After a warp-sync, the error condition was triggered by the absence
of the parent node of the first imported block.

The previous lookup implementation was traversing the tree using a
recursive **post-order** DFS, this technique doesn't trigger the issue.

In the last iterative implementation we were using a BFS instead.

* Added internal doc warning

* Small optimization

* Specify post-order DFS in the comment

* Test for the fork-tree post-order DFS traversal requirement (#11521)

* Test for the fork-tree post-order DFS traversal requirement

* Fixed typo

* Storage Layer for All FRAME Extrinsics (#11431)

* add new trait

* implement DispatchableWithStorageLayer

* at least one transactional

* all dispatch is at least transactional

* storage_layer api

* add test

* storage layer tests

* deprecate transactional tag

* i guess no reason to deprecate

* remove transactional from batch_all

* update tests

* extend trait

* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* fix copy paste name

* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Create run_all_benchmarks.sh

* uncomment build

* update number of steps and repeats

* add skip build

* Update run_all_benchmarks.sh

* Update run_all_benchmarks.sh

* new benchmarks

* Update frame/support/src/traits/dispatch.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/support/src/traits/dispatch.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/support/test/tests/storage_layers.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/support/test/tests/storage_layers.rs

* weights

* Update dispatch.rs

* doc link

* decl_macro support

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* CI: github no longer checks whitelisted actions this way (#11507)

* CI: github no longer checks whitelisted actions this way

* CI: actually this one is needed and no one knows it's related to a Markdown Link Check

* Fork-Tree import requires post-order DFS traversal (#11531)

* Fork-tree insert requires post-order dfs traversal

* Add dedicated test for methods requireing post-order traversal

* Fixed pruning docs (#11519)

* fix broken links (#11536)

* Safe and sane multi-item storage removal (#11490)

* Fix overlay prefix removal result

* Second part of the overlay prefix removal fix.

* Report only items deleted from storage in clear_prefix

* Fix kill_prefix

* Formatting

* Remove unused code

* Fixes

* Fixes

* Introduce clear_prefix host function v3

* Formatting

* Use v2 for now

* Fixes

* Formatting

* Docs

* Child prefix removal should also hide v3 for now

* Fixes

* Fixes

* Formatting

* Fixes

* apply_to_keys_whle takes start_at

* apply_to_keys_whle takes start_at

* apply_to_keys_whle takes start_at

* Cursor API; force limits

* Use unsafe deprecated functions

* Formatting

* Fixes

* Grumbles

* Fixes

* Docs

* Some nitpicks :see_no_evil:

* Update primitives/externalities/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Formatting

* Fixes

* cargo fmt

* Fixes

* Update primitives/io/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Formatting

* Fixes

Co-authored-by: Bastian Köcher <info@kchr.de>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Use `loops` rather than `backend` for compatibility. (#11542)

* Use `loops` rather than `backend` for compatibility.

* Move over other converters

* sp-core: impl serde for some offchain types (#11512)

* sp-core: impl serde for some offchain types

* Update primitives/core/src/offchain/mod.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* remove serde impls from OpaqueNetworkState/OpaqueMultiaddr

* derive default

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Several tweaks needed for Governance 2.0 (#11124)

* Add stepped curve for referenda

* Treasury SpendOrigin

* Add tests

* Better Origin Or-gating

* Reciprocal curve

* Tests for reciprical and rounding in PerThings

* Tweaks and new quad curve

* Const derivation of reciprocal curve parameters

* Remove some unneeded code

* Actually useful linear curve

* Fixes

* Provisional curves

* Rejig 'turnout' as 'support'

* Use TypedGet

* Fixes

* Enable curve's ceil to be configured

* Formatting

* Fixes

* Fixes

* Fixes

* Remove EnsureOneOf

* Fixes

* Fixes

* Fixes

* Formatting

* Fixes

* Update frame/support/src/traits/dispatch.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Grumbles

* Formatting

* Fixes

* APIs of VoteTally should include class

* Fixes

* Fix overlay prefix removal result

* Second part of the overlay prefix removal fix.

* Formatting

* Fixes

* Add some tests and make clear rounding algo

* Fixes

* Formatting

* Revert questionable fix

* Introduce test for kill_prefix

* Fixes

* Formatting

* Fixes

* Fix possible overflow

* Docs

* Add benchmark test

* Formatting

* Update frame/referenda/src/types.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Docs

* Fixes

* Use latest API in tests

* Formatting

* Whitespace

* Use latest API in tests

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* change impl FnOnce() to generic type + trait bound (#11534)

* change impl FnOnce() to generic type + trait bound

with_transaction() function can not be used with explicit generic arguments because of this issue: https://github.com/rust-lang/rust/issues/83701

* make the same changes elsewhere

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Introduce `rusty-cachier` (#11462)

* Introduce `rusty-cachier`

* Return LF at the end of file

* Use `entrypoint` to `unshare(1)` into a new mount namespace

* Use `rusty-cachier`-provided absolute path for `CARGO_TARGET_DIR` everywhere

* Debug single `build-rustdoc` job

* CI: debug

* CI: debug

* CI: debug

* `unshare(1)` is no longer needed

* CI: remove debug

* Revert "Debug single `build-rustdoc` job"

* Formatiing

* Update scripts/ci/gitlab/pipeline/build.yml

Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>

* Clean up `#[transactional]` (#11546)

* Deprecate #[transactional] attribute

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove #[transactional] from nomination pools

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Review fix

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Fix NOOP test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Suppress warnings

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Add `rusty-cachier notify` job (#11554)

* Add `rusty-cachier notify` job

* Add comments

* Fix CI after `rusty-cachier` introduction (#11556)

* Fix CI after `rusty-cachier` introduction

* Replace anchor with `extends`

* Introduce `EnsureOrigin::try_successul_origin` (#11558)

* Introduce `EnsureOrigin::try_successul_origin`

* Formatting

* Fixes

* Add Morph

* Fixes

* Formatting

* Sync: Improve major sync detection (#11547)

* Sync: Improve major sync detection

When we still have a full import queue, we should still report that we are in major sync mode,
otherwise validators may will already start producing blocks.

* Use median

* Review comments

* Fix clippy on master (#11559)

* Fix link in node-template README (#11529)

The lorri repository has moved from https://github.com/target/lorri to
https://github.com/nix-community/lorri.

* Fix minor typos (#11550)

* Fix minor typos

* FMT

Co-authored-by: Bastian Köcher <info@kchr.de>

* Short circuit Treasury::Spend benchmark for NeverEnsureOrigin (#11562)

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: parity-processbot <>

* Do not require Ord for pallet_offences::Config::IdentificationTuple (#11563)

* Ranked Collective pallet (#11548)

* Ranked Collective pallet

* Fixes

* benchmarks

* Weights

* Allow class voting in rank
Use bare ayes for calculating support.
Allow only promotion/demotion by one rank only.
Allow removal of member with rank zero only.
Use new Tally API

* Index by rank, still O(1).

* Custom vote weights

* Formatting

* Update frame/ranked-collective/src/lib.rs

* Broken :(

* origin guard; cleanup uses new API

* Formatting

* Promote/demote by rank

* Formatting

* Use new API

* Remove code in another PR

* Remove code in another PR

* Formatting

* Remove code in another PR

* Docs

* Docs

* Bump

* Fixes

* Formatting

* Fixes

* Introduce set function into storage maps (#11564)

* Introduce `SubmitOrigin` to Referenda pallet config (#11567)

* Don't limit `test-linux-stable-int` job output (#11560)

* Fix all warnings when building for wasm (#11569)

* Fix all warnings when building for wasm

Besides that it also enables warnings as errors for wasm builds in the CI.

* FMT

* Make clippy happy

* Helper macro for `Morph` impls (#11570)

* Helper macro for Morph impls

* No need to deprecate for now

* Improved macro

* Doc tests

* Grumbles

* `rusty-cachier` pipeline impovements and fixes (#11572)

* CI: fix `build-subkey-macos` build job (#11573)

* CI: fix `build-subkey-macos` build job

* CI: use full path for the `CARGO_TARGET_DIR` default value

* aura: export change_authorities and initialize_authorities (#11468)

* aura: export change_authorities and initialize_authorities

* add docs

* fix docs

* Reduce call size of Referenda pallet (#11578)

* Reduce call size of Referenda pallet

* Fixes

* Fixes

* Fixes

* Docs

* reactivate check-dependent-cumulus (#11506)

* re-enable check-dependent-cumulus

* temporary: use handle-extra-dependencies

* temporary: trim CI

* CI: include build stage

* CI: include test stage

* CI: include test stage

* Revert "temporary: trim CI"

This reverts commit dcf4ae8d842bc445a065c7ccdc3b6a603034faa4.

* CI: fix weird revert

* Revert "temporary: use handle-extra-dependencies"

This reverts commit bc0dc0f21f10284a23f66fdd8509ca6df89f2586.

* CI undebug

Co-authored-by: TriplEight <denis.pisarev@parity.io>

* wasm-builder: Rerun the build if the generated file changed (#11582)

* [ci] use cargo nextest instead cargo test in test-linux-stable (#11576)

* [DO NOT MERGE] Experimenting with nextest

* enable jobs

* enable stages

* add comment

* create test-frame-support job

* Expose ValidatedTransaction from transaction pool (#11588)

This is required to make a tx pool wrapper for some custom transaction validation, specificially
required to make a wrapper around the `LocalTransactionPool` implementation (https://github.com/subspace/subspace/blob/f54881a9b5/crates/subspace-service/src/pool.rs#L232-L269).

Related: https://github.com/paritytech/substrate/discussions/11520

* Tracable defensive errors (#11532)

* Tracable defensive errors

* small fixes

* fix

* refactored

* switched to defensive_ok_or

* Remove unnecessary type annotations and conversions

* cargo fmt

* Fixes

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Remove `#[pallet::without_storage_info]` for pallet-remark (#11590)

* Add host info to weight templates (#11583)

* Add host info to weight templates

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Parity Bot <admin@parity.io>

* Expose Benchmarking Component Ranges (#11545)

* Add component ranges to benchmarking

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Adding component ranges to templates

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* tweak script to reduce diff

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_identity --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/identity/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* make era public (#11575)

* MEL for Ranked Collective (#11602)

* Fix one-by-off in `BoundedSlice::try_from` (#11600)

* Remove a max supply record on collection's destruction (#11593)

* Remove a max supply record on collection's destruction

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Parity Bot <admin@parity.io>

* Implement more IntoIter traits for bounded types (#11616)

* Remove `without_storage_info` for membership pallet (#11591)

* Improve docs on `--keep-blocks` CLI parameter and related data structures (#11611)

* Improve docs on `--keep-blocks` CLI parameter and related data structures

* Update client/db/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Improve inspection and generation of node keys (#11525)

* Improve inspection and generation of node keys

* Lock stdout before write

* Fix typo

* Fix offset

* Remove useless code

* Set inspect-node-key 'network' option as obsolete

* Better transaction pool error (#11629)

* Better transaction pool error

* Do not use `Debug` when printing errors

* Use BoundedVec in aura pallet (#11617)

* Use BoundedVec in aura pallet

* cargo fmt

* pallet alliance (#11112)

* Add pallet-alliance

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Update multihash/cid and format

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove useless deps

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Add pallet-alliance into node runtime

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix has_identity

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Add TooMantBlacklist Error

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Add TooLongWebsiteUrlLength Error

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Add remove_announcement

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Derive pallet_identity::Config and Fix test/benchmarking

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Add part weight for call of pallet-alliance

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove pallet_identity Config trait

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix propose arguments

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Some nits

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* cargo fmt

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix benchmarking of add_blacklist/remove_blacklist

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Some nits

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Add benchmarking for init_members

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Add benchmarking for propose/vote/veto

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix benchmarking

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove some useless

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* fix some compile issue

* more fix

* all checks

* refactor

* refactor event

* refactor

* cleanup

* cleanup

* fix benchmarking

* fix warning

* fmt

* fix benchmarks

* with storage info

* fmt

* add new config

* fix benchmarks

* fix

* fmt

* Apply suggestions from code review

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* improvements

* fix

* update docs

* rename events, errors, and functions

* make kicking events clearer

* fix

* fix tests

* fix tests

* fix runtime

* fix build

* remove unneeded change

* remove Candidate role from Alliance

* fmt grumbles

* update lock

* update recursion limit

* benchmarks

* convert-try

* benchmark assertions

* fmt ,

* cargo lock

* Update frame/alliance/src/benchmarking.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* add docs to public interfaces

* Apply suggestions from code review

Co-authored-by: Squirrel <gilescope@gmail.com>

* fix build (node)

* review

* use EitherOfDiverse

* update cargo toml

* make all dispatch class Normal

* change blacklist to unscrupulous

* formatting

* fmt oops

* rename benchmarking unscrupulous account creator

Co-authored-by: koushiro <koushiro.cqx@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: joepetrowski <joe@parity.io>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Squirrel <gilescope@gmail.com>

* Add fixed u64 (#11555)

Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove storage `MaxValues` limits (#11643)

* Remove limits

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove more

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Added an event for cancel_proposal (#11620)

* Added an event for cancel_proposal

* test

* pallet-grandpa: Improve/Clarify docs of `note_stalled` (#11623)

* Bump crossbeam-utils from 0.8.5 to 0.8.8 (#11605)

Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.5 to 0.8.8.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.5...crossbeam-utils-0.8.8)

---
updated-dependencies:
- dependency-name: crossbeam-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix pallet_uniques docs link (#11651)

* MEL bound `state-trie-migration` (#11639)

* MEL bound state-trie-migration

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* wip

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use sp_std

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* Add doc

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Set MaxKeyLen default to 512

Just to be sure that it will work. There is also no real penalty
from over-estimating it.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add more doc

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Clippy

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix assert_err_with_weight macro

Looks like I'm the only one using it anyway...

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix tests that use env macro

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* Move bounded type definitions to sp-runtime (#11645)

* Move bounded type definitions to sp-runtime

* cargo fmt

* Fix compile error

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Move TryCollect to sp-runtime

* Write some docs

* Import missing types

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Implement MaxEncodedLen on pallet-beefy (#11584)

* Implement MaxEncodedLen on pallet-beefy

* Return Result in intialize_authorities

* Update docs

* Log error when authorities list gets truncated

* Update frame/beefy/src/lib.rs

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* cargo fmt

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* Implement PartialOrd and Ord on BoundedSlice and WeakBoundedVec (#11655)

* Implement PartialOrd and Ord on BoundedSlice and WeakBoundedVec

* More implementations of PartialEq and PartialOrd

* cargo fmt

* Fixes

* Allow nomination pools to chill + fix dismantle scenario (#11426)

* make pool roles optional

* undo lock file changes?

* add migration

* add the ability for pools to chill themselves

* boilerplate of tests

* somewhat stable, but I think I found another bug as well

* Fix it all

* Add more more sophisticated test + capture one more bug.

* Update frame/staking/src/lib.rs

* reduce the diff a little bit

* add some test for the slashing bug

* cleanup

* fix lock file?

* Fix

* fmt

* Update frame/nomination-pools/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/nomination-pools/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/nomination-pools/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update frame/nomination-pools/src/mock.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix build

* fix some fishy tests..

* add one last integrity check for MinCreateBond

* remove bad assertion -- needs to be dealt with later

* nits

* fix tests and add benchmarks for chill

* remove stuff

* fix benchmarks

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* remove defensive

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Parity Bot <admin@parity.io>

* Properly implement Debug on bounded types (#11659)

* remove flaky rpc subscription tests (#11653)

* Add `TypeInfo` (#11599)

* wasm-builder: Fix constant re-running of `build.rs` scripts. (#11624)

Recently we added the wasm binaries to the `rerun-if-changed` list. The problem with that is that
they have a later mtime than the `invoked.timestamp` file and this file's mtime is used to determine
if the `build.rs` script needs to be re-run. The solution to this is that we copy the mtime of this
`invoked.timestamp` file and add it to the wasm binaries. Then cargo/rustc doesn't constantly wants
to rerun the `build.rs` script.

* Increment subkey version to 2.0.2 (#11656)

* Increment subkey version to 2.0.2

* Update Cargo.lock

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Implement `Deref` for `BoundedSlice` (#11660)

* Impl Deref for BoundedSlice

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update primitives/runtime/src/bounded/bounded_vec.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* grandpa: fix creation of justification with equivocating precommits in commit (#11302)

* grandpa: fix creation of justification ancestry

we would reject commits that have precommits targeting blocks lower than the
commit target. when there is an equivocation (or if it the commit is not
minimal) it is possible to have such precommits and we should assume that they
are the round base.

* grandpa: bump to 0.16.0

* grandpa: add test for justification with equivocation

* grandpa: fix failing test

* Make it possible to disable RocksDB completely (#11537)

* Make it possible to disable RocksDB completely

* Make ParityDB non-optional

* Address review comments

* rpc servers: update jsonrpsee to fix host filtering + WS server-side pings  (#11661)

* bump jsonrpsee to fix #11480

In addition it adds WebSocket server-side pings which is configured to
send out pings periodically every 30 seconds.

* use released crates.io version

* Update Cargo.toml

* Include the chain specs instead of trying to open them by path (#11625)

This makes it possible to run the tests manually, without them expecting to be run in a special
folder etc.

* Remove `without_storage_info` from pallet `transaction-storage` (#11668)

* Introduce BoundedVec

* Fix typos

* Add comments to the bounds

* Remove migration

* Improve bound value access syntax

* combine iteratons and tolerance in sp-npos-elections API (#11498)

* Initial implementation of mms

* Some more attempts at `mms`

* Functioning `MMS` algorithm implementation.
Adding some tests too

* More tests and typos fixed.

* Adding fuzzer for `mms`
(but could not test it on Mac M1)

* Missing imports

* Fixing rustdoc

* More accurate implementation of `mms`

* Removing the fuzzer `mms` implementation

* Implementing `NposSolver` for `MMS`
had to add the `Clone` trait, maybe I could see if I can get rid of it.

* Fixing rust docs by adding () to resolve ambiguity

* Amending `unwrap` to `expect`
removing unneeded `Clone` trait

* Removing redundant `mms3.rs`

* Implementing `BalancingConfig` and rustdoc changes

* Implementing `weight` for `MMS`

* Implementing `weight` for `MMS`

* Fixing post merge

* Initial implementation of mms

* Some more attempts at `mms`

* Functioning `MMS` algorithm implementation.
Adding some tests too

* More tests and typos fixed.

* Adding fuzzer for `mms`
(but could not test it on Mac M1)

* Missing imports

* Fixing rustdoc

* More accurate implementation of `mms`

* Removing the fuzzer `mms` implementation

* Implementing `NposSolver` for `MMS`
had to add the `Clone` trait, maybe I could see if I can get rid of it.

* Amending `unwrap` to `expect`
removing unneeded `Clone` trait

* Fixing rust docs by adding () to resolve ambiguity

* Removing redundant `mms3.rs`

* Implementing `BalancingConfig` and rustdoc changes

* Implementing `weight` for `MMS`

* Implementing `weight` for `MMS`

* Fixing post merge

* Removing left over from rebase

* Fixing tests

* Removing unneeded import

* Removing unneeded functions

* Removing useless imports

Co-authored-by: kianenigma <kian@parity.io>

* Add Event to Pallet Transaction Payment (#11618)

* add Event to Pallet Transaction Payment

* Fix tests in Pallet Balance

* Fix tests in Pallet Balance/Executive/Asset-tx-payment.

* Fix

* fmt

* Fix

* Fix

* Update Cargo.lock

* Fix tests in executor

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* update the name of the event and fmt.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Remove `without_storage_info` for the authorship pallet (#11610)

* Remove `without_storage_info` for the authorship pallet

* Tweak impl bounds style

* Use `defensive_proof` instead of `expect`

* MEL: Origin, Referenda, ConvictionVoting (#11631)

* Referenda & CV pallets ready

* Fix build

* Add mel_bound for Voting and Casting types

* Add mel_bound on Tally

* Add mel_bound on another Tally

* Add mel_bound for pallet_collective::RawOrigin

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Remove multiply_by_rational  (#11598)

* Removed multiply_by_rational
Replaced with multiply_by_rational_with_rounding

* fixes

* Test Fixes

* nightly fmt

* Test Fix

* Fixed fuzzer.

* Upgrade to libp2p 0.45.1 (#11682)

* Upgrade to libp2p 0.45.1

* Limit max_negotiating_inbound_streams to 512

* Upgrade prost-build to 0.10

* Set max_negotiating_inbound_streams to 2048

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Fix authority discovery protobuf

* Fix comments in authority-discovery schema

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Add a comment about transport initialization

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* chore: reducing codec times (#11688)

* chore: reduce uxt encode times (#11698)

* chore: reduce uxt encode times

* fmt

* Simplified code using existing APIs (#11702)

Signed-off-by: Emison Lu <lzh1633856298@gmail.com>

* `storage-alias`: Check that prefix is not an underscore (#11704)

Besides that it also adds some UI tests.

* Bump twox-hash from 1.6.2 to 1.6.3 (#11423)

Bumps [twox-hash](https://github.com/shepmaster/twox-hash) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/shepmaster/twox-hash/releases)
- [Commits](https://github.com/shepmaster/twox-hash/compare/v1.6.2...v1.6.3)

---
updated-dependencies:
- dependency-name: twox-hash
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update syn and fix compilation (#11707)

* Update syn and fix compilation

* Bump pin-project

* check-dependent-cumulus should only be executed for PRs (#11693)

the script executed by check-dependent-cumulus only works for PRs, as shown in https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1630771#L87, which comes from https://github.com/paritytech/pipeline-scripts/blob/3ad10ddc0d985ef5326974a1143229c6429befab/check_dependent_project.sh#L443

* Pump the gossip engine while waiting for the BEEFY runtime pallet (memory leak fix) (#11694)

* Pump the gossip engine while waiting for the BEEFY runtime pallet

This fixes a memory leak when the BEEFY gadget is turned on, but
the runtime doesn't actually use BEEFY.

* Implement `FusedFuture` for `GossipEngine`

* Fuse futures outside of loops

* Implement Serialize/Deserialize on WeakBoundedVec (#11713)

* Implement Serialize/Deserialize on WeakBoundedVec

* cargo fmt

* Warn when there are too many elements while deserializing WeakBoundedVec

* More robust grandpa revert procedure (#11719)

* More robust revert procedure

Return an error if revert is called in a node that is not actively
running grandpa, i.e. grandpa genesis data has not been initialized.
Previous implementation was just firing an `unreachable!` code exception.

Furthermore we skip revert hassle if there is nothing to revert.

* Nit

* Fix typo in weights.rs (#11724)

overriden -> overridden

* WrapperOpaque: Use `decode_all` to decode from the `Vec<u8>` (#11726)

This ensures that there isn't any extra data attached that isn't used.

* Respect cargo offline env variable in wasm builder (#11735)

* Support offline env variable in wasm builder

* Clean up

* Improve checks

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update crate docs

* Add docs to `lib.rs` and introduce helper method `offline_build`

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* contracts: Reduce size of deletion queue depth (#11696)

* contracts: Reduce size of deletion queue depth

* Remove unused import

* Put `rusty-cachier` before PR merge into `master` for `cargo-check-benches` job (#11737)

* epochs: don't use gap when there's at least one genesis epoch imported (#11725)

* epochs: don't use gap when there's at least one genesis epoch imported

* epochs: add test for genesis gap fix

* pallet-beefy-mmr: add API for BEEFY Authority Sets (#11406)

* pallet-beefy: add Config::OnNewValidatorSet type

Add a hook to pallet-beefy for doing specific work when
BEEFY validator set changes.

For example, this can be used by pallet-beefy-mmr to cache
a lightweight MMR root over validators and make it available
to light clients.

* pallet-beefy-mmr: implement OnNewValidatorSet

Implement pallet-beefy::OnNewValidatorSet to be notified of BEEFY
validator set changes. Use the notifications to compute and cache
a light weight 'BEEFY authority set' which is an MMR root over
BEEFY validator set plus some extra info.

Previously, pallet-beefy-mmr was interogating pallet-beefy about
validator set id on every block to find out when it needs to recompute
the authority set.
By using the event-driven approach in this commit, we also save one
extra state interogation per block.

* pallet-beefy-mmr: add new authority_set() API

Expose current and next BEEFY authority sets through runtime API.
These can be directly used by light clients to avoid having them
compute them themselves based on BEEFY validator sets.

Signed-off-by: acatangiu <adrian@parity.io>

* rename BeefyMmr exposed runtime api

* make pallet-tips & pallet-bounties instantiable (#11473)

* make pallet-tips & pallet-bounties instantiable

* update test

* add default instance

* update

* cargo fmt

* update

* update

* update

* update

* fix merge

* fix tests

* bounties benchmarking instantiable

* fix benchmarks

* make tips benchmarks instantible

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* [contracts] Implement transparent hashing for contract storage (#11501)

* save

* builds and old tests pass

save:  temporary value dropped while borrowed

save: finally builds

test updated but still fails

* type names enhanced

* VarSizedKey bounded to new Config param

* improved wasm runtime updated funcs

* unstable-interface tests fixed

* benchmarks fixed

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* fixes on feedback

* fixes on feedback applied + make it build

* benchmarks build but fail (old)

* "Original code too large"

* seal_clear_storage bench fixed (code size workaround hack removal tbd)

* bench_seal_clear_storage pass

* bench_seal_take_storage ... ok

* added new seal_set_storage + updated benchmarks

* added new seal_get_storage + updated benchmarks

* added new seal_contains_storage + updated benchmarks

* added tests for _transparent exec functions

* wasm test for clear_storage

* wasm test for take_storage

* wasm test for new set_storage

* wasm test for new get_storage

* wasm test for new contains_storage

* CI fix

* ci fix

* ci fix

* ci fix

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* fixes according to the review feedback

* tests & benchmarks fixed

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* refactoring

* fix to runtime api

* ci fix

* ctx.get_storage() factored out

* ctx.contains_storage() factored out

* number of batches reduced for transparent hashing storage benchmarks

* contracts RPC & pallet::get_storage to use transparent hashing

* node and rpc updated to use get_storage with VarSizedKey

* refactored (more concize)

* refactored contains_storage (DRYed)

* refactored contains_storage (DRYed)

* fix rpc

* fmt fix

* more fixes in rpc

* rollback `Pallet:get_storage` to Vec<u8> and rpc and node parts related to it

* added `KeyDecodingFailed` error

* Revert weird "fmt fix"

This reverts commit c582cfff4b5cb2c9929fd5e3b45519bb24aeb657.

* node-executor basic test update

* fix node-executor basic test

* benchmarks fix

* more benchmarks fix

* FixedSizedKey is hidden from pub, VarSizedKey is exported as StorageKey

* ci fix

* set_storage benchmark fix

* ci fix

* ci fix

* comments improved

* new error code to rpc: KEY_DECODING_FAILED

* Put `rusty-cachier` before PR merge into `master` for `cargo-check-benches` job

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* minor optimization

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>
Co-authored-by: command-bot <>

* Explain why `rusty-cachier` is put first (#11740)

* Bump `wasmtime` to 0.38.0 and `zstd` to 0.11.2 (#11720)

* Bump `wasmtime` to 0.37.0 and `zstd` to 0.11.2

* Bump `wasmtime` to 0.38.0

* Avoid a duplicate block request when syncing from a fork (#11094)

* Separate queueing blocks for import from removal

* Add regression tests

* Remove unnecessary log

* Clear queued blocks when processed

* Move check out of match block

* Track queued block ranges

* Update client/network/sync/src/blocks.rs

* Update client/network/sync/src/blocks.rs

* Update client/network/sync/src/blocks.rs

* Update client/network/sync/src/blocks.rs

* FMT

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <info@kchr.de>

* Democracy.fast_track not allowed with zero voting period (#11666)

* Democracy.fast_track not allowed with zero voting period

* revert static parameter alter line

* ensure voting period greater zero

* update doc for fast_track

* unit test: instant fast track to the next block referendum is backed

* fix typos in comments

* Prevent unsoundness in environments with broken `madvise(MADV_DONTNEED)` (#11722)

* Prevend unsoundness in environments with broken `madvise(MADV_DONTNEED)`

* Add the `std` feature to `rustix` dependency

Apparently not having this breaks compilation on non-nightly toolchains.

* Autodetect the page size when checking whether `madvise` works

* Only make sure that the madvice check doesn't return `Err`

* Refund weight in `system::fillBlock` (#11754)

* fix

* pushed

* node: fix fee multiplier test

Co-authored-by: André Silva <andrerfosilva@gmail.com>

* nomination-pools fix (#11748)

* Nomination pool fix

* fmt

* [ci] Remove polkadot-companion-labels GHA (#11774)

* [contracts] Fixed the bug with transfer value for delegate call (#11771)

* Fixed the bug with transfer value.

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Moved check into `initial_transfer`

* Fmt

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Fix clearing queued blocks in the sync module (#11763)

* pallet-mmr: handle forks without collisions in offchain storage (#11594)

* pallet-mmr: fix some typos

* pallet-mmr: make the MMR resilient to chain forks

* pallet-mmr: get hash for block that added node

* beefy-mmr: add debug logging

* add explanatory comment

* account for block offset of pallet activation

* add support for finding all nodes added by leaf

* minor improvements

* add helper to return all nodes added to mmr with a leaf append

* simplify leaf_node_index_to_leaf_index

summing the (shifted) differences in peak positions adds up to the (shifted) final position, so
don't need to fold over positions.

* dead fish: this also doesn't work

The idea was to keep a rolling window of `(parent_hash, pos)` leaf
entries in the offchain db, with the window matching the one
that provides `block_num -> block_hash` mappings in `frame_system`.

Once a leaf exits the window it would be "canonicalized" by switching
its offchain db key from `(parent_hash, pos)` to simple `pos`.

This doesn't work however because there's no way to get leaf contents
from offchain db while in runtime context.. so no way to get+clear+set
leaf to change its key in offchain db.

Ideas:
1. move the "canonicalization" logic to offchain worker
2. enhance IndexingApi with "offchain::move(old_key, new_key)"
   This is weird, but correct, deterministic and safe AFAICT, so
   it could be exposed to runtime.

* simplify rightmost_leaf_node_index_from_pos

* minor fix

* move leaf canonicalization to offchain worker

* move storage related code to storage.rs

* on offchain reads use canonic key for old leaves

* fix offchain worker write using canon key

* fix pallet-mmr tests

* add documentation and fix logging

* add offchain mmr canonicalization test

* test canon + generate + verify

* fix pallet-beefy-mmr tests

* implement review suggestions

* improve test

* pallet-mmr: add offchain pruning of forks

* pallet-mmr: improve offchain pruning

Instead of keeping pruning map as single blob in offchain db,
keep individual parent-hash lists with block-num identifier as part
of the offchain key.

Signed-off-by: acatangiu <adrian@parity.io>

* pallet-mmr: improve MMRStore<OffchainStorage>::get()

Do the math and retrieve node using correct (canon or non-canon)
offchain db key, instead of blindly looking in both canon and non-canon
offchain db locations for each node.

Still fallback on looking at both if for any reason it's not where
expected.

Signed-off-by: acatangiu <adrian@parity.io>

* pallet-mmr: storage: improve logs

* fix tests: correctly persist overlay

runtime indexing API works on overlay, whereas offchain context
bypasses overlay, so for loops > canon-window, canon would fail.

* pallet-mmr: fix numeric typo in test

* add comment around LeafData requirements

Signed-off-by: acatangiu <adrian@parity.io>

Co-authored-by: Robert Hambrock <roberthambrock@gmail.com>

* expose grandpa BeforeBestBlockBy voting rule (#11798)

* Un-deprecate Transactional Macro (#11807)

* un-deprecate transactional macro

* add transactional back to nomination pools

* sync: Fixed clearing subsequent ranges (#11815)

* sync: Fixed clearing subsequent ranges

* Warp sync fix

* Better documentation

* CLI flag to configure tx ban duration (#11786)

* add tx-ban-seconds

* fix

* trigger CI

* trigger CI

* remove test print

* Update client/cli/src/params/transaction_pool_params.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Upgrade libp2p to 0.46.1 (#11787)

* Update libp2p to 0.46.0

* Update libp2p to 0.46.1

* Fix telemetry initialization

* Fix tests

* prep council election pallet for being dissolved (#11790)

* prep council election pallet for being dissolved + make it temporarily bounded

* fix tests

* fix

* Update frame/elections-phragmen/src/lib.rs

* fix bench?

* Network sync refactoring (part 4) (#11412)

* Remove direct dependency of `sc-network` on `sc-network-light`

* Move `WarpSyncProvider` trait and surrounding data structures into `sc-network-common`

* Move `WarpSyncProvider` trait and surrounding data structures into `sc-network-common`

* Create `sync` module in `sc-network-common`, create `ChainSync` trait there (not used yet), move a bunch of associated data structures from `sc-network-sync`

* Switch from concrete implementation to `ChainSync` trait from `sc-network-common`

* Introduce `OpaqueStateRequest`/`OpaqueStateResponse` to remove generics from `StateSync` trait

* Introduce `OpaqueBlockRequest`/`OpaqueBlockResponse`, make `scheme` module of `sc-network-sync` private

* Surface `sc-network-sync` into `sc-service` and make `sc-network` not depend on it anymore

* Remove now unnecessary dependency from `sc-network`

* Replace crate links with just text since dependencies are gone now

* Remove `warp_sync` re-export from `sc-network-common`

* Update copyright in network-related files

* Address review comments about documentation

* Apply review suggestion

* Rename `extra_requests` module to `metrics`

Co-authored-by: Bastian Köcher <info@kchr.de>

* Fix off by one error in proportional slashing (#11782)

* Fix proportional slashing logic

* Update frame/nomination-pools/test-staking/src/lib.rs

Co-authored-by: David <dvdplm@gmail.com>

* Update frame/staking/src/lib.rs

Co-authored-by: David <dvdplm@gmail.com>

* Update frame/staking/src/lib.rs

Co-authored-by: David <dvdplm@gmail.com>

* Update frame/staking/src/lib.rs

Co-authored-by: David <dvdplm@gmail.com>

* fmt

* Update frame/nomination-pools/test-staking/src/lib.rs

* clean

* fix

* last fixes

* doc

Co-authored-by: David <dvdplm@gmail.com>

* Buy&Sell methods for Uniques (#11398)

* Allow to set item's price

* Clean the state when we transfer/burn an item or destroy a collection

* Allow to buy an item

* Remove redundant checks

* Improve events

* Cover with tests

* Add comments

* Apply suggestions

* Fmt

* Improvements for price validation

* Improve validation

* Update to use the new terminology

* Remove multi-assets support

* Chore

* Weights + benchmarking

* Shield against human error

* Test when we pass the higher item's price

* fmt fix

* Chore

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Remove is_frozen check when setting the price

* Try to fix benchmarking

* Fix benchmarking

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet…
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* add missing events to elections fallback

* Merged

* add some logs and stuff

* undo a bunch of things

* undo lock file

* remove unused err

* fix build
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants