This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add Weightless benchmark bailing
#12829
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
bkchr
approved these changes
Dec 2, 2022
| let bounty_id = BountyCount::<T, I>::get() - 1; | ||
| let approve_origin = T::ApproveOrigin::successful_origin(); | ||
| let approve_origin = | ||
| T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably change all benchmarking code to use try_successful_origin and remove successful_origin?
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes eventually… this was an oversight when originally writing them.
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
ghost
approved these changes
Dec 2, 2022
Member
Author
|
bot merge |
|
Error: "Check reviews" status is not passing for paritytech/polkadot#6328 |
Member
Author
|
@coderobe this should set the weights for many of the (child)-bounty calls to zero for the Polkadot and Rococo runtime. |
ltfschoen
pushed a commit
to ltfschoen/substrate
that referenced
this pull request
Feb 22, 2023
* Calls can be 'Weightless' Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix (child)-bounties benches Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Just use one dummy value Signed-off-by: Oliver Tale-Yazdi <[email protected]> * 🤦 Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]>
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
* Calls can be 'Weightless' Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix (child)-bounties benches Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Just use one dummy value Signed-off-by: Oliver Tale-Yazdi <[email protected]> * 🤦 Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]>
4 tasks
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.
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The (child)-bounties benchmark require
SpendOriginas dispatch origin. SinceSpendOriginis configured toNeverEnsureOriginin Polkadot, it is impossible to make these Calls since no origin instance can be created.This MR fixes this by:
Weightlessearly return option for benchmarks whose weight will be annotated with 0. It is not completly zero since users still pay theExtrinsicBaseWeightand a length-based fee.bountiesandchild-bountiesbenches.This is a better solution than #11562 since there would be a lot of ifs needed otherwise.
TODO:
These are not actually companions but needed to make the CI green:
Polkadot companion: paritytech/polkadot#6328
Cumulus companion: paritytech/cumulus#1940