Skip to content

FRAME: Meta Transaction#6428

Merged
muharem merged 62 commits intomasterfrom
muharem-meta-tx
Mar 17, 2025
Merged

FRAME: Meta Transaction#6428
muharem merged 62 commits intomasterfrom
muharem-meta-tx

Conversation

@muharem
Copy link
Copy Markdown
Contributor

@muharem muharem commented Nov 10, 2024

Meta transactions implementation.

The meta transaction follows a layout similar to that of a regular transaction and can leverage the same extensions implementing the TransactionExtension trait. Once signed and shared by the signer, the relayer may submit a regular transaction with the pallet_meta_tx::dispatch call, passing the signed meta transaction as an argument.

To see an example, refer to the mock setup and the sign_and_execute_meta_tx test case in substrate/frame/meta-tx/src/tests.rs file.

RFC: #4123

@muharem muharem marked this pull request as ready for review November 10, 2024 18:43
@muharem muharem requested a review from a team as a code owner November 10, 2024 18:43
@muharem muharem added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Nov 11, 2024
Info = DispatchInfo,
PostInfo = PostDispatchInfo,
RuntimeOrigin = <Self as Config>::RuntimeOrigin,
> + IsType<<Self as frame_system::Config>::RuntimeCall>;
Copy link
Copy Markdown
Contributor

@gui1117 gui1117 Nov 14, 2024

Choose a reason for hiding this comment

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

I think we no longer need to copy types like this. We can get rid of RuntimeCall and RuntimeOrigin associated types here and directly bound the frame system config supertrait:

pub trait Config: frame_system::Config<
    RuntimeCall: Parameter
			+ GetDispatchInfo
			+ Dispatchable<
				Info = DispatchInfo,
				PostInfo = PostDispatchInfo,
				RuntimeOrigin = <Self as Config>::RuntimeOrigin,
			>,
    RuntimeOrigin: AsTransactionAuthorizedOrigin
			+ From<SystemOrigin<Self::AccountId>>
>
{
...
}

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.

these types of bounds are unstable, CI jobs failing, I left them unchanged for now

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should be stable since June :-/ https://blog.rust-lang.org/2024/06/13/Rust-1.79.0.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was there a particular CI jobs failing? I will try to fix it.

For now it seems somewhat green: #6817

@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 25, 2024 14:35
@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/13616235221
Failed job name: check-runtime-migration

@muharem muharem enabled auto-merge March 15, 2025 11:29
@muharem muharem added this pull request to the merge queue Mar 17, 2025
Merged via the queue into master with commit d1cf73a Mar 17, 2025
237 of 243 checks passed
@muharem muharem deleted the muharem-meta-tx branch March 17, 2025 16:24
ordian added a commit that referenced this pull request Mar 19, 2025
* master: (58 commits)
  Upgrade link-checker cache to v4 (#7874)
  Updating readmes (#7950)
  Cumulus: Remove some old scripts (#7946)
  pallet-bounties: allow bounties to never expire (#7723)
  run frame-omni-bencher overhead command in CI for all runtimes in the runtime matrix (#7459)
  Update README.md for Cumulus (#7930)
  FRAME: Meta Transaction (#6428)
  Follow up for: Use the umbrella crate for the parachain template #5993 (#7464)
  Add an extra_constant to pallet-treasury (#7918)
  Bump the ci_dependencies group across 1 directory with 4 updates (#7855)
  remove compromised action (#7934)
  Fixing token-economics dead link (#5302)
  [pallet-revive] Fix pallet-revive-fixtures build.rs (#7928)
  cumulus: fix pov exporter format (#7923)
  sp-api: Support `mut` in `impl_runtime_apis!` (#7924)
  Remove clones from block seal function (#7917)
  [pallet-revive] precompiles 2->9 (#7810)
  Use non-native token to benchmark xcm on asset hub (#7893)
  [CI] bump timeout wait for build in zombienet workflows. (#7871)
  taplo: split long array line to multiline array (#7905)
  ...
alindima pushed a commit that referenced this pull request Apr 8, 2025
Meta transactions implementation.

The meta transaction follows a layout similar to that of a regular
transaction and can leverage the same extensions implementing the
`TransactionExtension` trait. Once signed and shared by the signer, the
relayer may submit a regular transaction with the
`pallet_meta_tx::dispatch` call, passing the signed meta transaction as
an argument.

To see an example, refer to the mock setup and the
`sign_and_execute_meta_tx` test case in
`substrate/frame/meta-tx/src/tests.rs` file.

RFC: #4123

---------

Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: Guillaume Thiolliere <[email protected]>
@redzsina redzsina moved this from Backlog to Scheduled in Security Audit (PRs) - SRLabs Nov 27, 2025
@rachsrl rachsrl moved this from Scheduled to In progress in Security Audit (PRs) - SRLabs Dec 15, 2025
@rachsrl rachsrl moved this from In progress to Audited in Security Audit (PRs) - SRLabs Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T1-FRAME This PR/Issue is related to core FRAME, the framework.

Projects

Status: Audited

Development

Successfully merging this pull request may close these issues.

8 participants