-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Benchmark Overhead
lacks support for pre-runtime digests
#12142
Comments
cc @ggwpez |
Okay then why is that pre-runtime digest not in there? Should the Nimbus consensus not add it? We can just push it onto the list of digests for sure, but I dont know if that is the right way of doing it: // utils/frame/benchmarking-cli/src/extrinsic/bench.rs
pub fn bench_block(&self) -> Result<Stats> {
let (block, _) = self.build_block(None)?;
// NEW
let (mut head, exts) = block.deconstruct();
head.digest_mut().logs.push(<YOUR DIGEST>);
let block = Block::new(head, exts);
let record = self.measure_block(&block)?;
Stats::new(&record)
} |
Nimbus injects the digest in its which is injected into |
I can give your suggestion a shot to see if that is a viable solution. A good starting point would be to hack up If this works, would it make sense to add an additional field to |
@notlesh but the seal digest is a post runtime digest. Why do you need this for |
With paritytech/polkadot-sdk#63 I would get that we need the seal :D |
A potential (and quite trivial) fix: #12159. Note that I tested a similar concept against moonbeam and substrate Also note (and maybe this is relevant to your question, @bkchr ) that I could not push the digest items after |
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
Benchmark Overhead
supportsinherents
but notpre-runtime digests
. Here is some additional context, copied from my substate stack echange Q:Our runtime uses an inherent which itself requires a pre-runtime digest to be present. I don't believe this is supported; from what I can tell, the benchmarking only handles the inherents provided by the implementation:
https://github.com/paritytech/substrate/blob/master/utils/frame/benchmarking-cli/src/extrinsic/bench.rs#L130
Specifically, we use
author-inherent
fromNimbus
: https://github.com/PureStake/nimbus/blob/0e5702105941baba0e08b343ceaa217192191b73/pallets/author-inherent/src/lib.rsWhich follows this workflow:
on_initialize()
must be called with a certainpre_runtime_digest
present. This is copied into a storage item.kickoff_authorship_validation
inherent must then be called, which then expects this storage item to be present.benchmark overhead
is triggering a failure in this inherent because on_initialize failed to find the injected digest into pallet storage.Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: