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: generate valid signed auth signatures #1041

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

Rjected
Copy link
Contributor

@Rjected Rjected commented Jul 11, 2024

Motivation

This makes it so the auth list signature is not hard coded, although this gates the arbitrary implementation behind the k256 feature

Solution

Just generate a hash, based on the auth, and sign it

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Comment on lines +44 to +45
# for signed authorization list arbitrary
k256 = { workspace = true, optional = true }
Copy link
Member

Choose a reason for hiding this comment

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

this is fine because if if the feature is enabled on alloy-primitives this dep is already part of the dep tree

@@ -174,21 +174,21 @@ impl Deref for SignedAuthorization {
}
}

#[cfg(any(test, feature = "arbitrary"))]
#[cfg(all(any(test, feature = "arbitrary"), feature = "k256"))]
Copy link
Member

Choose a reason for hiding this comment

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

we could also make this work without the k256 feature but not useful imo

@mattsse mattsse merged commit 594a271 into alloy-rs:main Jul 12, 2024
22 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* feat: generate valid signed auth signatures

* feature gate the auth arbitrary
j75689 pushed a commit to bnb-chain/alloy that referenced this pull request Aug 1, 2024
* feat: generate valid signed auth signatures

* feature gate the auth arbitrary
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.

2 participants