fix pallet_subtensor_swap weight info#2752
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: established opentensor contributor with repo write permission; branch fix-pallet-subtensor-swap-weight-info -> devnet-ready; no Gittensor allowlist hit found. Reviewed the prefetched PR metadata, prior Skeptic sticky, contributor signals, and the full one-line runtime diff. The PR does not modify FindingsNo findings. ConclusionNo malicious behavior or security vulnerability was found in this diff. The change is narrowly scoped to runtime weight wiring and does not add dependencies, origin changes, executable tooling, or new attack surface. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor UNKNOWN; author is an established OpenTensor contributor with repo write permission and substantial recent Subtensor history. PR body was empty/trivial; the Auditor has auto-filled it. Please review. No domain findings. The one-line runtime change switches Duplicate-work check found only broad Spec-version auto-fix was not performed: local/base FindingsNo findings. ConclusionThe PR is narrowly scoped and correctly wires the swap pallet to its generated runtime weight implementation. I found no domain issue that should block merge. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Description
This PR fixes the runtime
WeightInfowiring forpallet_subtensor_swap.The runtime previously configured
pallet_subtensor_swap::weights::DefaultWeight<Runtime>, but the generated swap pallet weights module definesSubstrateWeight<T>and the fallback()implementation, notDefaultWeight. This change updatesruntime/src/lib.rsto usepallet_subtensor_swap::weights::SubstrateWeight<Runtime>so the runtime points at the generated benchmark weight implementation.Files of interest:
runtime/src/lib.rs: updates thepallet_subtensor_swap::ConfigWeightInfoassociated type.Behavioral impact:
Migration / spec_version implications:
spec_versionalready exceeds the live devnet runtime version or needs a bump.Testing performed:
pallets/swap/src/weights.rsdefinesSubstrateWeight<T>implementingWeightInfoand does not defineDefaultWeight<T>.