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 55 commits into
base: master
Choose a base branch
from
Open

FRAME: Meta Transaction #6428

wants to merge 55 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

Copy link
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
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
@command-bot
Copy link

command-bot bot commented Jan 14, 2025

@muharem "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=rococo --target_dir=polkadot --pallet=pallet_verify_signature (https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8012162) was cancelled in #6428 (comment)

@muharem
Copy link
Contributor Author

muharem commented Jan 14, 2025

bot cancel 6-d5526c41-1eee-4b9b-9655-49440b617ecd

@command-bot
Copy link

command-bot bot commented Jan 14, 2025

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

@muharem
Copy link
Contributor Author

muharem commented Jan 14, 2025

bot bench polkadot-pallet --pallet=pallet_verify_signature

@command-bot
Copy link

command-bot bot commented Jan 14, 2025

@muharem https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8012364 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=rococo --target_dir=polkadot --pallet=pallet_verify_signature. 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 7-1aaf0f4d-47c6-4f1e-ae90-2ebbb1e9dd75 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Jan 14, 2025

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

@muharem
Copy link
Contributor Author

muharem commented Jan 14, 2025

bot bench polkadot-pallet --pallet=pallet_verify_signature --runtime westend

@command-bot
Copy link

command-bot bot commented Jan 14, 2025

@muharem https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8013094 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=pallet_verify_signature. 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 8-c3ccaaf9-90e0-49dd-8461-58d946ee2a96 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot added 2 commits January 14, 2025 14:10
@command-bot
Copy link

command-bot bot commented Jan 14, 2025

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

@muharem
Copy link
Contributor Author

muharem commented Jan 15, 2025

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

@command-bot
Copy link

command-bot bot commented Jan 15, 2025

@muharem https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8021387 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 10-a118287c-fa66-4e7a-99aa-26c15705f4ba to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot added 2 commits January 15, 2025 03:24
…=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx
@command-bot
Copy link

command-bot bot commented Jan 15, 2025

@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/8021387 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8021387/artifacts/download.

Copy link
Contributor

@georgepisaltu georgepisaltu left a comment

Choose a reason for hiding this comment

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

Great work!

@muharem muharem self-assigned this Jan 16, 2025
@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/13616235221
Failed job name: check-runtime-migration

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: Backlog
Development

Successfully merging this pull request may close these issues.

4 participants