task(runtime): benchmark WeightInfo for nine unmetered pallets (PM-21804)#1338
Draft
task(runtime): benchmark WeightInfo for nine unmetered pallets (PM-21804)#1338
Conversation
…tered pallets Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Mike Clay <mike.clay@shielded.io>
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.
Summary
Replace placeholder
WeightInfo = ()with proper benchmarked weight implementations for nine pallets in the runtime, ensuring all user-facing extrinsics have accurate compute metering.🎫 Ticket 📐 Engineering
Motivation
An AI security audit (Finding R-033) identified that nine pallets in
runtime/src/lib.rsusetype WeightInfo = (), meaning all their extrinsic weights are placeholder values. This includes user-facing pallets such aspallet_session_validator_management,pallet_federated_authority, andpallet_system_parameters.Placeholder weights do not reflect actual execution costs, so blocks may include more computation than the weight budget intends to allow. This undermines the chain's resource accounting and could be exploited for denial-of-service against validators.
Changes
Implementation (coming next):
WeightInfo = ()()with generatedWeightInfoimplementations in runtime config📌 Submission Checklist
🔱 Fork Strategy
🗹 TODO before merging