Questions tagged [benchmarking]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
1 answer
367 views

What is the possible minimum block time?

Is there a way to determine/calculate what the minimum block time would be? If not, what could we consider before lowering the block time, and how to monitor the side effects of small block time? I ...
Burak's user avatar
  • 893
10 votes
3 answers
282 views

How to generate `WeightInfo` for pallets?

Some pallets configure this field like so : type WeightInfo = pallet_pallet_name::weights::SubstrateWeight<Runtime>; However I've seen some runtimes in which they have an extra WeightInfo module ...
Purple_Turtle's user avatar
3 votes
1 answer
149 views

Missing `successful_origin` in implementation when running runtime-benchmarks

With a fresh substrate-parachain-template I ran cargo build --features runtime-benchmarks I get error from a deep dependency in pallet_society, which doesnt seem relevant to the parachain-template's ...
Decentration's user avatar
  • 1,356
2 votes
1 answer
96 views

How to test my bench-marking functions?

I have written benchmarking functions from my pallet. How I can test these benchmarking functions please?
Syed Kamran's user avatar
5 votes
1 answer
159 views

Benchmark FRAME pallets

Hello Substrate Experts, at the moment I try to figure out how to benchmark FRAME pallets for our runtime and I have basically three points that are not 100% clear to me. Based on my understanding it'...
Janislav's user avatar
  • 319
5 votes
2 answers
152 views

Hardware: Benchmark Standard vs Ecosystem Nodes

During the last Substrate Builders Program Office Hours, the Mangata team raised awareness around some potential confusion around the Substrate Benchmarking System and how it is being applied in the ...
Bernardo Rodrigues's user avatar
3 votes
1 answer
166 views

How to mock trait in benchmarking

Can you tell me how to mock a trait in benchmarking? We have a pallet which takes NFTTrait as one of the configs. See below. #[pallet::config] pub trait Config: frame_system::Config { ...
Jerry Ren's user avatar
1 vote
2 answers
89 views

How to get the current weights of a chain for all extrinsics to verify all benchmarks has been integrated?

I have just ran benchmarks and updated all the weights of the pallets in my parachain... or have I? How can I verify that all my changes "bite"? Is there a way to check the weights of a ...
Simson's user avatar
  • 1,080
0 votes
1 answer
198 views

1010: Invalid Transaction: Transaction would exhaust the block limits

How to specify limit weight for extrinsic?
rust.dev's user avatar
  • 509
9 votes
1 answer
212 views

Single node performance

I've a couple of questions: I'm running a the node-template on a machine that has 8 cores and 64GB of RAM and its using an SSD. I have some pallets working there and I'm using the python client to ...
andresvsm's user avatar
  • 1,104
6 votes
1 answer
111 views

How do I get weight for my pallet?

I developed a pallet with one extrinsic: #[pallet::weight(0)] pub fn sum(_: OriginFor<T>, values: Vec<u64>) { // Sum up `values` } The Extrinsic accepts a vector and uses it. ...
Oliver Tale-Yazdi's user avatar
5 votes
1 answer
163 views

Unable to run election provider multiphase benchmark

I am trying to benchmark pallet_election_provider_multi_phase and after quite some time of normal running I get this error which halts the benchmark: Running Benchmark: ...
Purple_Turtle's user avatar
5 votes
2 answers
113 views

Large event payloads unsafe?

Premise Substrate will, by default, store every event in a block in a storage value Event of type Vec<EventRecord> in the system module, which involves reading & writing this full vector ...
Bedeho Mender's user avatar
5 votes
1 answer
213 views

How to weight `on_initialize`?

Is there any best practice how to count the weights in on_initialize correctly? I read through the Polkadot and Substrate on_initialize weight calculations and couldn't always figure out: When to ...
Chralt's user avatar
  • 503
4 votes
1 answer
60 views

Benchmarking generates files with possibly missing or unnecessary trait impls

After building my node (tag monthly-10-2021) with --features runtime-benchmarks and/or --all-features, I tried to run benchmarks for the pallets and then use them for WeightInfo on various pallet ...
Purple_Turtle's user avatar
3 votes
1 answer
52 views

Benchmark failing extrinsics

Is there a way to benchmark an extrinsic whose expected behavior is to trigger an error? I stumbled on a project where we have two instances of the same pallet. Instance1 will proceed normally for a ...
Benjamin Gallois's user avatar
3 votes
2 answers
52 views

How to use bounded_vec macro in benchmarking.rs

I was using substrate-node-template, and created some benchmarking functions. I was able to use bounded_vec macro in tests.rs but, can't able to use it in the benchmarking.rs file my code #![cfg(...
Mojo's user avatar
  • 95
2 votes
1 answer
121 views

How can I access the emitted runtime events inside the benchmarking.rs file?

I read in this answer that you can access everything from mock runtime in the benchmarking file by just adding #[cfg(test)] above the import use crate::mock::*; and that it is not a good idea since it ...
AKASH S M's user avatar
2 votes
2 answers
205 views

Why are events stored?

The documentation around emitting events states that events are written to storage, and then cleared next block. This has considerable costs You add extra db write/read overhead to practically every ...
Bedeho Mender's user avatar
1 vote
1 answer
80 views

Benchmarking Wasm error

I am trying to do benchmarking for my pallet,but I get the following error: Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction ...
Kazunobu Ndong's user avatar
1 vote
1 answer
128 views

Benchmarking whitelist

"Whitelist account from further DB operations." What does it actually means, and when should it be used? Looking into the examples, I see that basically every caller of the extrinsic is ...
vovacha's user avatar
  • 148
1 vote
1 answer
143 views

Do `on_finalized` and `on_initialize` impact block weight budget?

on_initialize returns a weight, but what is the effect of this weight exceeding block weight limit? Is the block valid? can extrinsic still be included? on_finalized does not return a weight, does ...
Bedeho Mender's user avatar
1 vote
1 answer
219 views

Cannot run benchmarking: "Did not find the benchmarking metadata."

I have problems with trying to benchmark my custom pallet. I tried different scenarios and received different errors: Using the same binary: I built my node with cargo build --release --features ...
pmikolajczyk41's user avatar