-
Notifications
You must be signed in to change notification settings - Fork 1.2k
FRAME: Meta Transaction #6428
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
Merged
Merged
FRAME: Meta Transaction #6428
Changes from 16 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
e0f8b55
init impl
muharem fee605e
preamble
muharem 75fd3ee
benchmarks
muharem 1c7b1b4
fox cargo features
muharem 3d9a9e2
integrate meta-tx pallet into runtimes
muharem 2a95be7
remove preamble
muharem dd2afa6
update doc
muharem a44b9cc
runtime origin config
muharem 4e65e60
tests
muharem 4f8b3cf
weights
muharem 89698ea
fixes
muharem 1543cec
Merge remote-tracking branch 'origin/master' into muharem-meta-tx
muharem 08f3928
prdoc
muharem 44eff95
weightinfo
muharem 867cbcb
propogate features
muharem d7dc7ae
Merge branch 'master' into muharem-meta-tx
shawntabrizi 1249eed
Merge remote-tracking branch 'origin/master' into muharem-meta-tx
muharem b9ae6fa
use verify signature pallet, add ext version, update docs
muharem 21744f6
undo fmt
muharem 27acefb
update prdoc
muharem d25b7a3
toml fmt fix
muharem 4c53277
fixe
muharem 1f839f1
fix
muharem 532edd2
remove unstable
muharem d4e7911
remove unstable
muharem f91835f
fix
muharem 17db627
fix docs
muharem 51e4046
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
1cc1ec9
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
0ea2924
Merge branch 'master' into muharem-meta-tx
muharem 488440b
Merge branch 'master' into muharem-meta-tx
muharem 4c6f5ef
Apply suggestions from code review
muharem 9591d57
fmt
muharem b093542
Merge remote-tracking branch 'origin/master' into muharem-meta-tx
muharem 85c1512
taplo fmt
muharem eae9d94
fix
muharem b54e16f
drop associate types, use bounds
muharem 7bb2175
Merge remote-tracking branch 'origin/master' into muharem-meta-tx
muharem 295165a
meta tx marker
muharem 57c55c1
include verify signature pallet into westend
muharem 8106b06
include features
muharem e0462d7
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
5f7bcb5
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
010ba1f
weights
muharem 246710a
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
4b3bcba
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
84c2533
Merge branch 'master' into muharem-meta-tx
muharem 6b62a04
Merge branch 'master' into muharem-meta-tx
muharem 8c09d62
Merge branch 'master' into muharem-meta-tx
muharem 9345d69
Merge remote-tracking branch 'origin/master' into muharem-meta-tx
muharem 12095db
derive DecodeWithMemTracking
muharem 0da517d
fix
muharem 3a7e9ae
fix
muharem 1b465ab
Merge remote-tracking branch 'origin/master' into muharem-meta-tx
muharem efc1f81
Merge branch 'master' into muharem-meta-tx
muharem 296ba06
Merge branch 'master' into muharem-meta-tx
muharem de225c7
Merge branch 'master' into muharem-meta-tx
muharem c53c820
Merge branch 'master' into muharem-meta-tx
muharem c54e68f
Merge branch 'master' into muharem-meta-tx
muharem fc161a7
Merge branch 'master' into muharem-meta-tx
muharem efbd28a
Merge branch 'master' into muharem-meta-tx
muharem b00b3fc
fix toml fmt
muharem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Copyright (C) Parity Technologies (UK) Ltd. | ||
| // This file is part of Polkadot. | ||
|
|
||
| // Polkadot is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
|
|
||
| // Polkadot is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
|
|
||
| // You should have received a copy of the GNU General Public License | ||
| // along with Polkadot. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| //! Autogenerated weights for `pallet_meta_tx` | ||
| //! | ||
| //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 | ||
| //! DATE: 2024-11-08, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` | ||
| //! WORST CASE MAP SIZE: `1000000` | ||
| //! HOSTNAME: `cob`, CPU: `<UNKNOWN>` | ||
| //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024 | ||
|
|
||
| // Executed Command: | ||
| // ./target/debug/polkadot | ||
| // benchmark | ||
| // pallet | ||
| // --chain=westend-dev | ||
| // --steps=50 | ||
| // --repeat=2 | ||
| // --pallet=pallet-meta-tx | ||
| // --extrinsic=* | ||
| // --wasm-execution=compiled | ||
| // --heap-pages=4096 | ||
| // --output=./polkadot/runtime/westend/src/weights/ | ||
|
|
||
| #![cfg_attr(rustfmt, rustfmt_skip)] | ||
| #![allow(unused_parens)] | ||
| #![allow(unused_imports)] | ||
| #![allow(missing_docs)] | ||
|
|
||
| use frame_support::{traits::Get, weights::Weight}; | ||
| use core::marker::PhantomData; | ||
|
|
||
| /// Weight functions for `pallet_meta_tx`. | ||
| pub struct WeightInfo<T>(PhantomData<T>); | ||
| impl<T: frame_system::Config> pallet_meta_tx::WeightInfo for WeightInfo<T> { | ||
| fn bare_dispatch() -> Weight { | ||
| // Proof Size summary in bytes: | ||
| // Measured: `0` | ||
| // Estimated: `0` | ||
| // Minimum execution time: 138_000_000 picoseconds. | ||
| Weight::from_parts(140_000_000, 0) | ||
| .saturating_add(Weight::from_parts(0, 0)) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
| # See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
|
||
| title: "FRAME: Meta Transaction" | ||
|
|
||
| doc: | ||
| - audience: Runtime Dev | ||
| description: | | ||
| Introduces the meta-tx pallet that implements Meta Transactions. | ||
|
|
||
| The meta transaction follows a layout similar to that of a regular transaction and can | ||
| leverage the same extensions that implement the `TransactionExtension` trait. Once signed and | ||
| shared by the signer, it can be relayed by a relayer. The relayer then submits a regular | ||
| transaction with the `meta-tx::dispatch` call, passing the signed meta transaction as an | ||
| argument. | ||
|
|
||
| To see an example, refer to the `sign_and_execute_meta_tx` test case within the pallet. | ||
|
|
||
| crates: | ||
| - name: pallet-meta-tx | ||
| bump: major | ||
| - name: westend-runtime | ||
| bump: major | ||
| - name: kitchensink-runtime | ||
| bump: major | ||
| - name: polkadot-sdk | ||
| bump: major |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| [package] | ||
| name = "pallet-meta-tx" | ||
| description = "Dispatch Meta Transaction" | ||
| license = "Apache-2.0" | ||
| version = "0.1.0" | ||
| edition.workspace = true | ||
| authors.workspace = true | ||
| homepage.workspace = true | ||
| repository.workspace = true | ||
|
|
||
| [lints] | ||
| workspace = true | ||
|
|
||
| [dependencies] | ||
| codec = { workspace = true, features = ["max-encoded-len"] } | ||
| docify = { workspace = true } | ||
| scale-info = { workspace = true, features = ["derive"] } | ||
| serde = { features = ["derive"], optional = true, workspace = true } | ||
|
|
||
| frame-benchmarking = { workspace = true, optional = true } | ||
| frame-support = { workspace = true } | ||
| frame-system = { workspace = true } | ||
| sp-core = { workspace = true } | ||
| sp-runtime = { workspace = true } | ||
| sp-std = { workspace = true } | ||
| sp-io = { workspace = true} | ||
|
|
||
| [dev-dependencies] | ||
| pallet-balances = { workspace = true, default-features = true } | ||
| pallet-transaction-payment = { workspace = true, default-features = true } | ||
| sp-keyring = { workspace = true, default-features = true } | ||
| sp-keystore ={ workspace = true, default-features = true } | ||
|
|
||
| [features] | ||
| default = ["std"] | ||
| std = [ | ||
| "codec/std", | ||
| "frame-benchmarking?/std", | ||
| "frame-support/std", | ||
| "frame-system/std", | ||
| "scale-info/std", | ||
| "serde", | ||
| "sp-core/std", | ||
| "sp-runtime/std", | ||
| "sp-std/std", | ||
| "sp-io/std", | ||
| ] | ||
| runtime-benchmarks = [ | ||
| "frame-benchmarking/runtime-benchmarks", | ||
| "frame-support/runtime-benchmarks", | ||
| "frame-system/runtime-benchmarks", | ||
| "sp-runtime/runtime-benchmarks", | ||
| ] | ||
| try-runtime = [ | ||
| "frame-support/try-runtime", | ||
| "frame-system/try-runtime", | ||
| "sp-runtime/try-runtime", | ||
| "pallet-balances/try-runtime", | ||
| "pallet-transaction-payment/try-runtime", | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.