fix: remove volunteering and required BSP components from benchmarks#714
Open
fix: remove volunteering and required BSP components from benchmarks#714
Conversation
Remove BSP volunteer count (`v`) and replication target (`r`) parameters from 4 weight functions where benchmark regression analysis found them statistically insignificant: - `msp_respond_storage_requests_multiple_buckets(n, m, l, v, r)` → `(n, m, l)` - `bsp_confirm_storing(n, v, r)` → `(n)` - `delete_files_bucket(n, v, r)` → `(n)` - `delete_files_bsp(n, v, r)` → `(n)` These parameters had no effect on the generated weight formulas because `StorageRequestBsps` is a `BoundedBTreeMap` whose PoV cost is always charged at `MaxEncodedLen` regardless of actual entries, and none of the extrinsic paths iterate over individual BSPs with per-BSP storage reads/writes — they only perform whole-map operations (`get`, `set`, `remove`). This also removes the per-file-key `StorageRequests::get()` reads from 3 weight annotations (`msp_respond_storage_requests_multiple_buckets`, `bsp_confirm_storing`, `delete_files`) that existed solely to extract the unused `v`/`r` values, eliminating dead computation from fee estimation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Re-ran benchmarks for the 4 extrinsics whose `v`/`r` parameters were removed, using `frame-omni-bencher` with --steps 50 --repeat 20. Updated weight function bodies to match the new benchmark output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update benchmark comments to explicitly state both weight dimensions are unaffected, rather than the vague "no impact on weight".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ght-params # Conflicts: # bun.lock
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removing recently introduced benchmark parameters which take into account the current number of required and volunteered BSPs for a given storage request.
Reason for this, is they have no statistical impact on the weight function. With this removed, the weight functions for the extrinsics become much simpler.