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
Benchmark's successful origin api update #13146
Merged
muharem
merged 15 commits into
master
from
muharem-try-successful-origin-unimplemented-by-default
Feb 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cbe6311
try successful origin unimplemented by default
muharem f7b8aa3
error as a default impl for try_successful_origin
muharem 325232f
remove successful_origin func of EnsureOrigin trait
muharem d1ffeed
default impl -> unimplemented!()
muharem 441c24f
update EnsureOriginWithArg
muharem b32b3a7
fix EnsureOriginWithArg
muharem 92841c0
prefix unused arg with underscore
muharem 3795be3
use try_successful_origin instead successful_origin, map err to Weigh…
muharem 9afc56a
fix tests
muharem a1c2d28
Merge remote-tracking branch 'origin/master' into muharem-try-success…
muharem 3e46afd
remove default impl
muharem ecb6cae
unwrap for indirect origin dep
muharem 41316a4
replace unwrap by expect with a message
muharem 815c850
Merge remote-tracking branch 'origin/master' into muharem-try-success…
muharem de5f764
Merge remote-tracking branch 'origin/master' into muharem-try-success…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
unwrap for indirect origin dep
- Loading branch information
commit ecb6caec3ad524742c0df45b3ac9a5c6da0fd66f
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
So the benchmark now requires there to be a valid
PromoteOrigin?I guess for some basic origins its fine, but for the optional origins we should abort as
Weighlesssince otherwise we would force the chain developer to specify an origin although they dont want.Uh oh!
There was an error while loading. Please reload this page.
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, I see the point.
Both options has pros/cons.
Aborting with
Weighlesshere will set weight to 0 for many extrinsics (ex. remove_member) which do not require thePromoteOriginitself. Which will be wrong, if for example a developer wants temporary disable a promotion only.Probably a better solution will be to not make a benchmark depend on other (not its direct origin guard) origins.
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.
Ah right, this is in a helper function. Yea just wanted to point it out in general, not a big problem.
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.
But can we then have an expect with a proper description of the error?
Uh oh!
There was an error while loading. Please reload this page.
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.
@bkchr done! for this PR and companions