Summary
Add end-to-end test coverage for the new deferred dispatch flow in pallet-whitelist,
once paritytech/polkadot-sdk#11336 is merged.
Background
RFC #11199 proposes extending pallet-whitelist so that a whitelisted call can be
scheduled to dispatch after a delay, rather than executed immediately by
DispatchWhitelistedOrigin. The implementation in #11336 adds:
- A deferred-dispatch storage entry keyed by
call_hash.
- A permissionless executor path: any account may trigger the deferred call once
its delay has elapsed (event: DeferredDispatchExecuted { call_hash, who }).
- Permissionless removal of expired/cancelled deferred dispatches.
- Runtime wiring in
asset-hub-westend (governance/mod.rs) as the first integration target.
- Benchmarks for the new extrinsics.
Unit tests exist in the pallet, but we need runtime-level e2e tests.
Scope
E2E tests should cover, at minimum:
Blocked by
Summary
Add end-to-end test coverage for the new deferred dispatch flow in
pallet-whitelist,once paritytech/polkadot-sdk#11336 is merged.
Background
RFC #11199 proposes extending
pallet-whitelistso that a whitelisted call can bescheduled to dispatch after a delay, rather than executed immediately by
DispatchWhitelistedOrigin. The implementation in #11336 adds:call_hash.its delay has elapsed (event:
DeferredDispatchExecuted { call_hash, who }).asset-hub-westend(governance/mod.rs) as the first integration target.Unit tests exist in the pallet, but we need runtime-level e2e tests.
Scope
E2E tests should cover, at minimum:
DispatchWhitelistedOriginschedules a deferred dispatch;after the delay, a permissionless account executes it; assert
DeferredDispatchExecuted { call_hash, who }is emitted with the executor's account.Root(matcheslib.rs:228); a whitelisted call requiringSignedorigin shouldsurface
BadOriginend-to-end, and the test should pin this behavior so any futurechange is intentional.
for removal; storage is cleared and weight is refunded as expected.
DispatchWhitelistedOrigincan create adeferred dispatch; other origins fail.
UnavailablePreImage; restoring the preimage allows execution.Blocked by
pallet-whitelist: Deferred Dispatch paritytech/polkadot-sdk#11336