-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add support for update benchmarks #50
Comments
Anyone can do this using the standard hardware. It should be documented here prominently what the standard hardware is. Then people also verify that the posted weights are in the same ball park, aka correct.
Use the latest version and add a comment into the pull request about the version to make this process reproducible.
Manually. Fellowship doesn't has any infrastructure and depends on contributors to run the benchmarks. The fellowship members approving the pull request are then required to reproduce the weights to ensure that they are correct. |
We will need a tool to compare the weights. I am not going to review all the numbers and check if all of them are close enough. I already mentioned this in another issue, we should have the benchmark output a csv or json file so that we can easily process those numbers. |
Would it be interesting to explore if someone (some-company or some chain-collective) would sponsor some infrastructure for this? |
@ggwpez already has a tool for this! He can share this. I was also not expecting for you to do this manually :D
This is the same trust level as trusting the guy that opens the PR. But yeah, theoretically it would work. However, this increases then the maintenance burden etc. Even in Parity all this stuff isn't working smoothly all the time. Having just one script that you can run on a machine sounds fine for me right now. |
most of the devs won’t have access to a standard hardware machine locally so we will also need some guides on setting up one cloud providers |
We have already this: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot |
I believe this is the tool: https://github.com/ggwpez/substrate-weight-compare |
Nice. Now we just need to have everything documented in a single place. |
Yes indeed. For example to get a diff on the ref-time component: subweight compare commits --path-pattern "*/**/weights/*.rs" --method asymptotic --ignore-errors 1183e6b06108bf053c08e26c4c50fc644f572c7a 5312070b39a7529828c6b764f9c4f3ced206cfc3 --threshold 30 --unit time And for the PoV size there is
There is also a web version, but i need to re-setup the server and add the runtimes repo. But it is possible to self-host as described in the readme. Currently we have no trivial way to re-generate the weights. Sure there is the wiki description for the reference hardware and then anyone can run it, but its not straight forward, since the chain specs need to be generated and the node compiled first. |
@bkontur FWIW I'm using this branch to do benchmarks locally. So something like:
UPD: forgot to add thatyou need to use smth like |
…ss (#127) Closes #50 - Adds the `chain-spec-generator` from #78 and #81, updated to work with `master`. - Adds detailed instructions to the `README.md` for generating weights for fellowship runtimes I am currently generating weights and will add them in a seperate PR when they are ready. TODO - [x] Add step for checking weight outputs using https://github.com/ggwpez/substrate-weight-compare in readme - [ ] Fix encointer chain spec defaults, or open new issue for it ### Why not use the `polkadot-sdk` generic chain-spec-builder? The genesis state configs generated by this CLI are unusable for benchmarking, due to poor defaults. We need better defaults for our pallet genesis state before we can use this CLI. See also paritytech/polkadot-sdk#2713. --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Javier Viola <[email protected]> Co-authored-by: NachoPal <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
Problem
The
polkadot-sdk
repository has a short-benchmarks pipeline that helps verify the correctness of benchmarks. Inpolkadot-fellows
repository, we currently lack a similar pipeline for benchmark verification. Additionally, there is no existing "bench bot" to automatically regenerate weight files forpolkadot-fellows
runtimes. To maintain the integrity of our benchmarks and ensure the accuracy of weight files, we need to address these issues.Proposed solution 1 - add pipeline
This pipeline will be responsible for running benchmarks and verifying their correctness on every PR.
Proposed solution 1 - regeneration
Since there is no existing "bench bot" for automatic regeneration of weight files for runtimes, we can implement a manual process or script.
Unresolved questions
binary
version to use? Benchmark commands are insidepolkadot
orpolkadot-parachain
binary)cc: @ggwpez
The text was updated successfully, but these errors were encountered: