Fix MaxWeightTooLow on executing upgrade approval#2909
Conversation
The sudo-layer as_multi wrapped the finalizing call with the pinned FINALIZE_WEIGHT, which the finalizing call itself already declares plus multisig/proxy overhead — so the executing approval could never satisfy pallet_multisig's max_weight check. Estimate the finalizing call's declared weight from the live runtime and pad it 10% instead; raise the legacy JS approval literals the same way. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE MEDIUM scrutiny: account is ~4 months old, but has write access and substantial merged repository activity; no Gittensor association found; branch correctly targets main. Static review found the change narrowly scoped to correcting the outer multisig weight ceiling. The dynamically estimated weight does not alter the hash or encoding of the privileged finalizing call, and the trusted AI-review/Copilot instruction files are untouched. FindingsNo findings. ConclusionNo malicious behavior or security vulnerability was found in the diff. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor association: UNKNOWN; established high-volume contributor with repository write access. The live-runtime weight estimate correctly applies only to the outer sudo-multisig approval, preserving the byte-identical finalizing call and its hash. The 10% padding covers both weight dimensions, while the legacy deployment script receives a documented higher ceiling. No runtime code changed, so no FindingsNo findings. ConclusionThe change directly fixes the demonstrated |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Summary
as_multi) passed the pinnedFINALIZE_WEIGHTas its outermax_weight, but the wrapped finalizing call declares that same pinned weight plus multisig+proxy overhead (~65e9 ref_time / ~21k proof_size measured on v431) — so the executing approval always failed withMaxWeightTooLow.btcli upgrade signnow estimates the finalizing call's declared dispatch weight from the live runtime and pads it 10% for the outermax_weight. The finalizing call's own encoding (and hash) is unchanged.Client.estimate_weight(call, address=...)(+ sync facade twin) and raises the legacy JS approval literals to 80e9/50k.Test plan
btcli upgrade signfrom this buildMade with Cursor