Use ParityDb weights by default#2708
Conversation
| type BlockHashCount = BlockHashCount; | ||
| // The weight of database operations that the runtime can invoke. | ||
| type DbWeight = RocksDbWeight; | ||
| type DbWeight = ParityDbWeight; |
There was a problem hiding this comment.
[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.