-
Notifications
You must be signed in to change notification settings - Fork 19
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
passkey: reorder validation and some docs #2071
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
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.
nit and lgtm
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.
A few nits, nothing blocking.
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.
nice! 👍
Because the Polkadot SDK currently lacks support for P256 signatures, we had to use an unsigned | ||
extrinsic to allow this custom verification before dispatching transactions. To achieve this, we | ||
added P256 signature verification within the `ValidateUnsigned` trait implementation for the pallet. |
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.
@shannonwells I'm still not happy with this. Any idea how we might make this better?
# Goal There was a misunderstanding before that we thought if the fee was deducted from account in pre_dispatch and after that any failure happens inside pre_dispatch, only post_dispatch would be able to refund that amount but that was not a correct assumption and the caller of pre_dispatch is going to reverse all storage changes in it does not return with Ok. based on `/// Changes made to storage *WILL* be persisted if the call returns `Ok`.` Knowing this, we could put the signature check as the final validation since it is the heaviest one. Related to #2071
Goal
The goal of this PR is to re order the validations to be as close as possible to the signed extension order considering the customizations that we did such as not having post_dispatch implemented.
Related to #2032