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

passkey: nonce check #2039

Merged
merged 9 commits into from
Jun 27, 2024
Merged

passkey: nonce check #2039

merged 9 commits into from
Jun 27, 2024

Conversation

aramikm
Copy link
Collaborator

@aramikm aramikm commented Jun 22, 2024

Goal

The goal of this PR is to verify that the nonce is correct for the account_id and increase the nonce. And to restrict the transactions that can be called inside a passkey

Closes #2030

Checklist

  • Chain spec updated
  • Tests added
  • Benchmarks added
  • Weights updated

Copy link

codecov bot commented Jun 22, 2024

Codecov Report

Attention: Patch coverage is 98.07692% with 1 line in your changes missing coverage. Please review.

Files Coverage Δ
pallets/passkey/src/lib.rs 85.36% <98.07%> (+16.13%) ⬆️

... and 1 file with indirect coverage changes

@aramikm aramikm marked this pull request as ready for review June 24, 2024 22:39
@aramikm aramikm requested a review from wilwade as a code owner June 24, 2024 22:39
Copy link
Contributor

@saraswatpuneet saraswatpuneet 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! We can try running benchmarks on this PR to test, if not already done. Otherwise looks good me.

I would wait for others to approve so we get more 👀

impl<T: Config> ValidateUnsigned for Pallet<T> {
impl<T: Config> ValidateUnsigned for Pallet<T>
where
<T as frame_system::Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice!

benchmarks! {
proxy {
let caller: T::AccountId = whitelisted_caller();
where_clause { where <T as frame_system::Config>::RuntimeCall: Dispatchable<Info = DispatchInfo> }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@enddynayn This one liner missing was the main issue

Copy link
Contributor

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

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

Amazing work!

Copy link
Collaborator

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

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

Fantastic! 💯

Copy link
Collaborator

@mattheworris mattheworris left a comment

Choose a reason for hiding this comment

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

  • Read through changes
    Nice work!
    🚢 it!

@aramikm aramikm merged commit acefb8e into main Jun 27, 2024
28 checks passed
@aramikm aramikm deleted the implement_nonce_check branch June 27, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: PassKey - Nonce check validation
5 participants