Skip to content

Disable renew calls on demand#545

Open
RafalMirowski1 wants to merge 16 commits into
mainfrom
disable-renew-calls-on-demand
Open

Disable renew calls on demand#545
RafalMirowski1 wants to merge 16 commits into
mainfrom
disable-renew-calls-on-demand

Conversation

@RafalMirowski1
Copy link
Copy Markdown
Contributor

#542

⏺ Disable renew calls on demand via pallet-tx-pause

Integrates pallet-tx-pause into both bulletin-westend and bulletin-paseo runtimes as a dynamic kill-switch scoped to the renew family of pallet-bulletin-transaction-storage.

What this enables

  • Halt renewals without a runtime upgrade. Root can call
    txPause.pause(("TransactionStorage", "renew")) and the call is rejected at dispatch with frame_system::Error::CallFiltered
  • Per-call granularity. Each of renew, renew_content_hash, enable_auto_renew, disable_auto_renew can be paused independently.
  • Reversible. txPause.unpause(...) flips it back.
  • inverted whitelist (bulletin_pallets_common::TxPauseWhitelist<Runtime, TransactionStorage>) makes only the four renew calls pausable; any attempt to pause anything else returns pallet_tx_pause::Error::Unpausable.

What stays unaffected

  • apply_block_inherents is an inherent and bypasses BaseCallFilter — already-enabled auto-renewals keep flowing through the inherent while the manual + management extrinsics are paused.
  • sudo(renew) uses dispatch_bypass_filter, so root can still trigger renews while the pause is active.

@RafalMirowski1 RafalMirowski1 changed the title Disable renew calls on demand [WIP] Disable renew calls on demand May 19, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 19, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​pallet-tx-pause@​28.0.010010093100100

View full report

@RafalMirowski1 RafalMirowski1 changed the title [WIP] Disable renew calls on demand Disable renew calls on demand May 21, 2026
Comment thread pallets/common/src/lib.rs Outdated
let is_renew_call = name.0.as_slice() == StoragePallet::name().as_bytes() &&
matches!(
name.1.as_slice(),
b"renew" | b"force_renew" | b"enable_auto_renew" | b"disable_auto_renew"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not nice and it is error prone, doesnt pallet_tx_pause support better filtering?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, is this better 3339e27 ?

@bkontur bkontur requested a review from ggwpez May 22, 2026 10:34
@bkontur
Copy link
Copy Markdown
Collaborator

bkontur commented May 22, 2026

@ggwpez if you have some time, could you please also check this usage of tx-pallet?

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