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

feat(msa): add support for unwrapped bytes #2169

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

enddynayn
Copy link
Collaborator

Add support to verify signatures against unwrapped bytes.
This allows for verification of signatures not using PolkadotUi.

#2134

@enddynayn enddynayn force-pushed the feat/support-unwrapped-signatures-2134 branch 2 times, most recently from 98d1bbf to d37edb3 Compare September 30, 2024 17:08
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
pallets/handles/src/lib.rs 90.39% <100.00%> (-0.05%) ⬇️
pallets/msa/src/lib.rs 88.44% <100.00%> (+0.05%) ⬆️
pallets/passkey/src/lib.rs 96.66% <100.00%> (-0.04%) ⬇️
pallets/stateful-storage/src/lib.rs 79.90% <100.00%> (+0.04%) ⬆️

pallets/msa/src/lib.rs Outdated Show resolved Hide resolved
@enddynayn enddynayn force-pushed the feat/support-unwrapped-signatures-2134 branch 2 times, most recently from 6a15f27 to 93820aa Compare October 2, 2024 17:09
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Oct 2, 2024
@enddynayn enddynayn force-pushed the feat/support-unwrapped-signatures-2134 branch from 4daa4d3 to b4ec867 Compare October 2, 2024 18:33
@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Oct 2, 2024
@enddynayn enddynayn force-pushed the feat/support-unwrapped-signatures-2134 branch from b4ec867 to 57d132a Compare October 3, 2024 14:23
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Oct 3, 2024
@enddynayn enddynayn force-pushed the feat/support-unwrapped-signatures-2134 branch from 7f67383 to 93293f7 Compare October 3, 2024 15:33
@enddynayn enddynayn marked this pull request as ready for review October 3, 2024 15:35
@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Oct 3, 2024
Copy link
Collaborator

@wilwade wilwade left a comment

Choose a reason for hiding this comment

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

Looks good to me.

  • Reviewed code
  • Pulled and tested locally
  • Verified no additional .verify calls (outside of VerifiablePasskeySignature)

Comment on lines +8 to +13
if verify_signature(&payload) {
return true;
}

let wrapped_payload = wrap_binary_data(payload);
verify_signature(&wrapped_payload)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I would prefer if we check the wrapped one first as a minor optimization due to most of our signatures are being wrapped.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nit: I would prefer if we check the wrapped one first as a minor optimization due to most of our signatures are being wrapped.

#2169 (comment)

Copy link
Collaborator

@JoeCap08055 JoeCap08055 left a comment

Choose a reason for hiding this comment

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

One additional (non-blocking) comment.
Looks great!

Add support to verify signatures against unwrapped bytes.
This allows for verification of signatures not using
PolkadotUi.

issue-2134
@enddynayn enddynayn force-pushed the feat/support-unwrapped-signatures-2134 branch from 93293f7 to f4f5d39 Compare October 3, 2024 19:32
@github-actions github-actions bot removed the metadata-changed Metadata has changed since the latest full release label Oct 3, 2024
@enddynayn enddynayn enabled auto-merge (squash) October 3, 2024 19:42
@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Oct 3, 2024
@enddynayn enddynayn merged commit ba31a73 into main Oct 3, 2024
27 checks passed
@enddynayn enddynayn deleted the feat/support-unwrapped-signatures-2134 branch October 3, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metadata-changed Metadata has changed since the latest full release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants