Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FRAME: Meta Transaction #6428

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

FRAME: Meta Transaction #6428

wants to merge 30 commits into from

Conversation

muharem
Copy link
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
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
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

@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 25, 2024 14:35
@muharem
Copy link
Contributor Author

muharem commented Nov 25, 2024

bot help

@command-bot
Copy link

command-bot bot commented Nov 25, 2024

Here's a link to docs

@muharem
Copy link
Contributor Author

muharem commented Nov 25, 2024

bot bench substrate-pallet --pallet=pallet_meta_tx --features=runtime-benchmarks

@command-bot
Copy link

command-bot bot commented Nov 25, 2024

@muharem "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx (https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7812058) was cancelled in #6428 (comment)

@muharem
Copy link
Contributor Author

muharem commented Nov 25, 2024

bot cancel 2-557b9591-e2d4-4aa7-abf2-e446aed9e642

@command-bot
Copy link

command-bot bot commented Nov 25, 2024

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7812058 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7812058/artifacts/download.

@muharem
Copy link
Contributor Author

muharem commented Nov 25, 2024

bot bench substrate-pallet --pallet=pallet_meta_tx --features=runtime-benchmarks

@command-bot
Copy link

command-bot bot commented Nov 25, 2024

@muharem "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx (https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7812059) was cancelled in #6428 (comment)

@muharem
Copy link
Contributor Author

muharem commented Nov 25, 2024

bot cancel 3-64ab72b7-dde9-4282-82ea-c58a688d5120

@command-bot
Copy link

command-bot bot commented Nov 25, 2024

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7812059 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7812059/artifacts/download.

@muharem
Copy link
Contributor Author

muharem commented Nov 25, 2024

bot bench substrate-pallet --pallet=pallet_meta_tx --features=runtime-benchmarks

@command-bot
Copy link

command-bot bot commented Nov 25, 2024

@muharem https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7814005 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 4-1da0d189-511d-4ce7-b4de-2f4982e03d26 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot added 2 commits November 25, 2024 20:16
@command-bot
Copy link

command-bot bot commented Nov 25, 2024

@muharem Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7814005 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7814005/artifacts/download.

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/12032919102
Failed job name: test-linux-stable

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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants