-
Notifications
You must be signed in to change notification settings - Fork 316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Runtime behavior changes without a spec_version bump
This changes frame_system::Config::DbWeight, so runtime behavior and weight accounting differ from the base runtime, but the diff does not update Version.spec_version (currently still 414 in runtime/src/lib.rs). Substrate uses runtime versions to decide whether native runtime execution is compatible with on-chain Wasm; shipping changed native runtime logic under the same spec version risks nodes treating different runtime code as equivalent. Bump spec_version in this PR alongside the DbWeight change.
🛡️ AI Review — Skeptic (security review)VERDICT: VULNERABLE LOW scrutiny: established write-permission contributor on parity-db-weights -> devnet-ready; no Gittensor allowlist hit found in the trusted local data. No Findings
ConclusionThe PR changes runtime behavior but does not bump # 🔍 AI Review — Auditor (domain review) has not yet run on this PR. |
🔄 AI review updated — Skeptic: VULNERABLE
Summary
DbWeightfromRocksDbWeighttoParityDbWeight.ParityDbWeightfor fallbackWeightInfo for ()implementations.Rationale
The node now defaults to ParityDB, but the runtime still used RocksDB database weights when resolving pallet weights through
T::DbWeight. This made runtime DB read/write accounting inconsistent with the configured backend.Most production pallet weights already delegate DB read/write costs through
T::DbWeight; updating the runtime fixes that path. The generated fallback implementations inpallets/*/src/weights.rsstill hardcodedRocksDbWeight, so those were updated as well, along with the shared benchmark template to keep future generated weights aligned.