-
Notifications
You must be signed in to change notification settings - Fork 768
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
Switch ValidateUnsigned
over to SignedExtension
#365
Comments
UnsignedValidator
UnsignedValidator
over to SignedExtension
UnsignedValidator
over to SignedExtension
ValidateUnsigned
over to SignedExtension
Isn't that a duplicate of paritytech/substrate#3419 ? |
Related, but no. Doing this PR should be done anyhow, leaving |
Right. I've been thinking about this lately a bit though, and I feel that having every pallet expose it's own So to address points from the original description:
|
I have been working on this issue and implemented some things:
Some others are:
Here is some of the code (haven't pushed the whitelist macro yet): https://github.com/erasmospunk/substrate/tree/issue_4419_solution Due to the pull request paritytech/substrate#4998, all the unsigned (and inherents) transactions are processed by the If I could help finishing this issue, let me know. |
@erasmospunk have you seen: paritytech/substrate#5006 ? My main critique regarding having every pallet have it's own We could consider doing a single signed extension that groups all the "Validators", i.e.: // Instead of Vec we should probably just use tuple, to make it less dynamic.
struct Validators(Vec<Box<dyn SignedExtension<AdditionalData=()>>);
impl SignedExtension for Validators {
...
} That way you can simply add a new extension, but without changing the |
@tomusdrw yes, I saw it few days ago (forgot to subscribe this issue and missed it). I did something similar in the very beginning with the difference that you reuse The I'm not sure how to solve the ugly |
looking at this discussion and paritytech/substrate#5006 (comment) I'm wondering why not removing unsigned (non-inherent) extrinsic altogether ? Any unsigned transaction can already be replaced by a signed extrinsic with signed extension and Then we can just deprecate all unsigned transaction related logic or remove it. The main con of deprecating/removing unsigned logic is that maybe some extrinsic will have useless signature just for the sake of it being signed. |
@thiolliere there are still at least two reasons which make unsigned extrinsics interesting.
|
ah indeed these are good reasons, maybe we could still have a specific public account which none are not checked but seems to be a trickier implementation than our current implementation (or maybe another info in DispathcInfo) |
Needs documentation and clear directions |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
* update * fix tests * fast test * ethapp tests working * eth erc20 working * fix eth erc20 * done * no p * np P
* extracting sub clients * fmt + lost docs * revert enum BridgeInstance * apply suggestions from review * explicite debug impl * remove unused imports from Millau * fix typo * fix instance + API name * Update relays/ethereum/src/ethereum_sync_loop.rs Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> * separate crates for millau and rialto client * cargo fmt * fix * fmt * remove no_std support * fix compilation again * Update relays/substrate-client/Cargo.toml * Update relay clients to Substrate 2.0 Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> Co-authored-by: Hernando Castano <castano.ha@gmail.com>
Currently to validate an unsigned transaction we require to implement
ValidateUnsigned
and need to register the unsigned validation inconstruct_runtime!
. We should remove all this functionality. The validation of an unsigned transaction should be done by a signed extension. By default, signed extension should deny any unsigned transaction. Only if there is aSignedExtension
that validates an unsigned transaction and approves it, we should approve it to the calling context.As validating an unsigned transaction is in most cases always a very similar operation, we should provide an extendable
SignedExtension
that can be used by any module to validate its unsigned transactions.SignedExtension
to validate unsigned transactions.ValidateUnsigned
and all the related functionality and move all the code over toSignedExtension
.SignedExtension
for validating unsigned transactions.All 3 points should be do-able in separate prs. Mentoring and help can be provided by @bkchr
The text was updated successfully, but these errors were encountered: