Skip to content

fix: remove volunteering and required BSP components from benchmarks#714

Open
snowmead wants to merge 7 commits intomainfrom
fix/remove-unused-weight-params
Open

fix: remove volunteering and required BSP components from benchmarks#714
snowmead wants to merge 7 commits intomainfrom
fix/remove-unused-weight-params

Conversation

@snowmead
Copy link
Copy Markdown
Contributor

@snowmead snowmead commented Mar 23, 2026

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.


Open with Devin

snowmead and others added 4 commits March 19, 2026 09:40
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".
@snowmead snowmead added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D2-noauditneeded🙈 PR doesn't need to be audited not-breaking Does not need to be mentioned in breaking changes labels Mar 23, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

snowmead and others added 3 commits April 7, 2026 08:27
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D2-noauditneeded🙈 PR doesn't need to be audited not-breaking Does not need to be mentioned in breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant