Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frame-benchmarking: Use correct components for pallet instances #6435

Merged
merged 10 commits into from
Nov 13, 2024

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Nov 11, 2024

When using multiple instances of the same pallet, each instance was executed with the components of all instances. While actually each instance should only be executed with the components generated for the particular instance. The problem here was that in the runtime only the pallet-name was used to determine if a certain pallet should be benchmarked. When using instances, the pallet name is the same for both of these instances. The solution is to also take the instance name into account.

The fix requires to change the Benchmark runtime api to also take the instance. The node side is written in a backwards compatible way to also support runtimes which do not yet support the instance parameter.

When using multiple instances of the same pallet, each instance was executed with the components of
all instances. While actually each instance should only be executed with the components generated
for the particular instance. The problem here was that in the runtime only the pallet-name was used to determine
if a certain pallet should be benchmarked. When using instances, the pallet name is the same for both of these
instances. The solution is to also take the instance name into account.

The fix requires to change the `Benchmark` runtime api to also take the `instance`. The node side is written in a backwards
compatible way to also support runtimes which do not yet support the `instance` parameter.
@bkchr bkchr added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Nov 11, 2024
@bkchr bkchr requested a review from a team as a code owner November 11, 2024 07:32
@bkchr
Copy link
Member Author

bkchr commented Nov 11, 2024

/cmd prdoc --audience runtime_dev --bump major

prdoc/pr_6435.prdoc Outdated Show resolved Hide resolved
Co-authored-by: Adrian Catangiu <[email protected]>
@bkchr bkchr enabled auto-merge November 11, 2024 09:37
@bkchr bkchr added this pull request to the merge queue Nov 13, 2024
Merged via the queue into master with commit ac2546b Nov 13, 2024
193 of 197 checks passed
@bkchr bkchr deleted the bkchr-benchmarking-instance branch November 13, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants