-
Notifications
You must be signed in to change notification settings - Fork 795
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
base: master
Are you sure you want to change the base?
FRAME: Meta Transaction #6428
Conversation
substrate/frame/meta-tx/src/lib.rs
Outdated
Info = DispatchInfo, | ||
PostInfo = PostDispatchInfo, | ||
RuntimeOrigin = <Self as Config>::RuntimeOrigin, | ||
> + IsType<<Self as frame_system::Config>::RuntimeCall>; |
There was a problem hiding this comment.
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>>
>
{
...
}
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
I was more thinking of an attack than a mistake. Like if instead of tx payment there is a witness transaction extension with similar implicit and explicit, or if among all the versions allowed for the general transaction, if somehow one can be decoded both as Anyway this is unlikely, I don't think it is a blocker, and we can always require to use a special transaction extension with the implicit |
@gui1117 I will add later such extension. Thank you! |
bot bench polkadot-pallet --pallet=pallet_verify_signature |
@muharem |
bot cancel 6-d5526c41-1eee-4b9b-9655-49440b617ecd |
@muharem Command |
bot bench polkadot-pallet --pallet=pallet_verify_signature |
@muharem https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8012364 was started for your command Comment |
@muharem Command |
bot bench polkadot-pallet --pallet=pallet_verify_signature --runtime westend |
@muharem https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8013094 was started for your command Comment |
…=westend --target_dir=polkadot --pallet=pallet_verify_signature
@muharem Command |
bot bench substrate-pallet --pallet=pallet_meta_tx --features=runtime-benchmarks |
@muharem https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8021387 was started for your command Comment |
All GitHub workflows were cancelled due to failure one of the required jobs. |
…=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_meta_tx
@muharem Command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
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 thepallet_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 insubstrate/frame/meta-tx/src/tests.rs
file.RFC: #4123