Skip to content

Fix: Account for the call dispatch call weight#1032

Merged
NachoPal merged 12 commits into
mainfrom
nacho/fix-governance-motion-close
Mar 27, 2026
Merged

Fix: Account for the call dispatch call weight#1032
NachoPal merged 12 commits into
mainfrom
nacho/fix-governance-motion-close

Conversation

@NachoPal

@NachoPal NachoPal commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Overview

The motion_close extrinsic previously declared a constant weight that did not account for the inner call dispatched as Root when a motion is approved. Substrate can only refund weight post-dispatch, never increase it, so the inner
call's weight was never pre-charged. This adds a proposal_weight_bound parameter following the pallet_collective::close pattern, ensuring the declared weight includes the inner call's weight upfront. The extrinsic is also made DispatchClass::Operational to match the other governance extrinsics. Toolkit and upgrader are updated to pass the new parameter.

Closes: https://shielded.atlassian.net/browse/PM-22326

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Additional tests are provided (if possible)

Manual testing

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

@NachoPal NachoPal requested a review from a team as a code owner March 19, 2026 12:35
@github-actions

github-actions Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.19

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 2
MEDIUM MEDIUM 53
LOW LOW 3
INFO INFO 64
TRACE TRACE 0
TOTAL TOTAL 122
Metric Values
Files scanned placeholder 28
Files parsed placeholder 28
Files failed to scan placeholder 0
Total executed queries placeholder 647
Queries failed to execute placeholder 0
Execution time placeholder 18

@NachoPal NachoPal changed the title Fix: Account fot the call dispatch call weight Fix: Account for the call dispatch call weight Mar 19, 2026
@NachoPal

Copy link
Copy Markdown
Contributor Author

/bot rebuild-metadata

@github-actions

Copy link
Copy Markdown
Contributor

✅ Metadata rebuild complete! Changes have been committed.

@NachoPal

Copy link
Copy Markdown
Contributor Author

/bot fix-metadata-conflicts accept-incoming

@github-actions

Copy link
Copy Markdown
Contributor

✅ Metadata conflicts resolved successfully!

Strategy used: accept-incoming
Files resolved: metadata/static/midnight_metadata.scale, metadata/static/midnight_metadata_0.22.0.scale

The main branch has been merged into this PR with metadata conflicts resolved.

@NachoPal

Copy link
Copy Markdown
Contributor Author

/bot rebuild-metadata

@github-actions

Copy link
Copy Markdown
Contributor

✅ Metadata rebuild complete! Changes have been committed.

@NachoPal NachoPal added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit f0c947c Mar 27, 2026
30 checks passed
@NachoPal NachoPal deleted the nacho/fix-governance-motion-close branch March 27, 2026 15:37
@NachoPal NachoPal mentioned this pull request Apr 2, 2026
14 tasks
@gilescope gilescope added this to the node-1.0.0 milestone Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants