Skip to content

Conversation

@n13
Copy link
Collaborator

@n13 n13 commented Feb 1, 2026

Summary

Refactored expired proposal cleanup in the multisig pallet from automatic (implicit) to explicit (opt-in).

Before: propose, approve, and cancel extrinsics automatically iterated over proposals to clean up expired ones, adding unpredictable gas costs.

After: A new cleanup_expired_proposals extrinsic allows wallets to explicitly trigger cleanup when they detect expired proposals.

Changes

  • lib.rs: Removed auto_cleanup_expired_proposals calls from propose, approve, cancel. Added new cleanup_expired_proposals extrinsic (call_index 7).
  • weights.rs: Updated weight signatures (removed e parameter from existing extrinsics, added cleanup_expired_proposals(e) function).
  • benchmarking.rs: Removed expired proposal setup from existing benchmarks, added dedicated cleanup_expired_proposals benchmark.
  • tests.rs: Updated tests to explicitly call the new cleanup extrinsic.

Benefits

  • Predictable gas costs for core operations
  • Wallets control when cleanup happens
  • Cleaner separation of concerns

Replace automatic expired proposal cleanup with explicit extrinsic.

Removes implicit cleanup from propose/approve/cancel to provide
predictable gas costs. Wallets now call cleanup_expired_proposals
when needed.
@n13
Copy link
Collaborator Author

n13 commented Feb 2, 2026

that was already done with remove_expired

@n13 n13 closed this Feb 2, 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.

2 participants