-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Benchmark Parachains Runtime: Tracking Issue #3850
Comments
We are looking for help on this issue, so consider it if you are an external contributor and want to get more involved with benchmarking! |
I'd like to help, so can I take @KiChjang 's changes as a guide what's to do? Anything that I have to take care of beforehand? So I would start with |
@hirschenberger happy to have you help. I dont really have a mental model of which pallets are easier than others, so maybe take a look a them and see what you can learn. The main thing with any benchmarking is:
https://github.com/paritytech/substrate/tree/master/frame/benchmarking |
@shawntabrizi I assume I have to go through some bootstrapping process:
Is that correct? EDIT: The Dmp pallet does not contain an extrinsic but functions called by extrinsics. So we still need to benchmark these and return the determined weights to the callers? |
The HRMP is almost done, just needs to fix the inter-pallet calls (which I am not sure with which pattern we're going to manage them -- return weight? or register yourself?), and reviews. The code and benchamarks should be pretty self-explanatory. I'll be away for a week, if someone wants to finish it sooner, by my guest. |
I am wondering what we should do with inter-pallet calls, as @kianenigma alluded too. I am working on paras inherents and its rather complex to exhaust all possible code paths for cases with many inter-pallet calls and logic branches. As an example, the below code snippet is from polkadot/runtime/parachains/src/inclusion.rs Lines 718 to 749 in cc24fb8
From my current PoV it seems like the benchmarking code would be more maintainable if most inter-pallet calls where benchmarked on their own, but not sure if there are some negative ramifications I have not thought through yet. I am wondering if others think we should try and weigh these inter pallet functions on their own? And if we do want to do that, should they self-register their weights or always return them to their user? |
@hirschenberger from a quick glance I think the issue is that the test module is feature gated with |
I thought |
That macro, I would suspect all your code compiles when you do Basically what I would do is pull the functions you need for benchmarking out of the tests module and put them in the mock or their own module and then feature gate them like this: |
I would be ready for an initial review: #3889 |
Can somebody please throw an eye on #3889, the discussion seems stuck and I don't know how to get this landed. |
@shawntabrizi #3889 is merged, I think we're done here. |
This Issue will be used to track end to end benchmarking of the Parachains runtime:
https://github.com/paritytech/polkadot/tree/master/runtime/parachains
ump
pallet #3889When checking off an item, please include a PR which includes the benchmark PR.
The text was updated successfully, but these errors were encountered: