Skip to content

Dispatch guard#2467

Merged
sam0x17 merged 9 commits intodevnet-readyfrom
dispatch-guard
Feb 26, 2026
Merged

Dispatch guard#2467
sam0x17 merged 9 commits intodevnet-readyfrom
dispatch-guard

Conversation

@l0r1s
Copy link
Collaborator

@l0r1s l0r1s commented Feb 26, 2026

Add EVM context and DispatchGuard support

Companion PR to the polkadot-sdk-otf DispatchGuard addition

Update frontier rev

Update PSDK rev

Changes

  • subtensor-runtime-common: Added evm_context module with an IN_EVM environmental flag, exposed via is_in_evm() and with_evm_context(). Uses using_once so nested precompile dispatches don't stack.
  • subtensor-precompiles: Wrapped call.dispatch(origin) in with_evm_context() inside try_dispatch_runtime_call, so dispatch guards can distinguish EVM-originated calls.
  • Runtime: Set type DispatchGuard = () (no-op for now) in frame_system::Config.

@l0r1s l0r1s added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Feb 26, 2026
@sam0x17 sam0x17 merged commit 7c711a4 into devnet-ready Feb 26, 2026
175 of 196 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants