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

feat(benchmark): benchmarking pallets [2/4] #698

Merged
merged 13 commits into from
Jun 2, 2023

Conversation

renauter
Copy link
Collaborator

@renauter renauter commented May 17, 2023

Benchmarking pallets:

  • burning
  • dao
  • kvstore
  • validator set
  • validator
  • runtime upgrade

Solves part of

@renauter renauter changed the base branch from development to development_benchmark_extrinsics_1 May 17, 2023 02:25
@renauter renauter changed the title feat(benchmark): pallets feat(benchmark): benchmarking pallets [2/4] May 17, 2023
@renauter renauter marked this pull request as ready for review May 17, 2023 02:31
Base automatically changed from development_benchmark_extrinsics_1 to development May 22, 2023 11:36
Copy link
Contributor

@DylanVerstraete DylanVerstraete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

A thing to note and maybe think about is that weight also needs to be adjusted given the size of an input. For example if a user calls burn with a huge description, the weight should grow or shrink based on the size of the input.

But maybe we can keep this for future improvements.

@renauter
Copy link
Collaborator Author

the weight should grow or shrink based on the size of the input.

I don t see how to set an adaptive weight for a given extrinsic depending on its input size.
But maybe providing a maximized input size for the default benchmark would be the best approach to avoid "not enough weight" cases ?

@DylanVerstraete
Copy link
Contributor

I don t see how to set an adaptive weight for a given extrinsic depending on its input size. But maybe providing a maximized input size for the default benchmark would be the best approach to avoid "not enough weight" cases ?

See https://github.com/paritytech/substrate/blob/655b81cf3ce607b87a293b67d14662ed433a3863/frame/system/src/lib.rs#LL419C48-L419C55 for example

@DylanVerstraete DylanVerstraete merged commit e96dd81 into development Jun 2, 2023
@DylanVerstraete DylanVerstraete deleted the development_benchmark_extrinsics_2 branch June 2, 2023 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants