-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: use alloy Signature type #10758
base: main
Are you sure you want to change the base?
Conversation
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.
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.
cool!
@klkvr could you please take a closer look here
@@ -1083,14 +1112,14 @@ impl TransactionSigned { | |||
return Some(from) | |||
} | |||
let signature_hash = self.signature_hash(); | |||
self.signature.recover_signer(signature_hash) | |||
recover_signer(&self.signature, signature_hash) |
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.
should we use signature.recover
here? @mattsse
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.
lgtm overall
unfortunately we're losing some safety for parity encoding with alloy signature, so would like us to make sure we handle all cases correctly
@@ -1304,7 +1329,7 @@ impl TransactionSigned { | |||
|
|||
let tx_length = header.payload_length + header.length(); | |||
let hash = keccak256(&original_encoding[..tx_length]); | |||
Ok((transaction, hash, signature)) | |||
Ok((transaction, hash, signature.with_parity_bool())) |
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.
hmm, why do we need .with_parity_bool
here?
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.
You're right, this was incorrect.
can you open an issue to add the safety methods from reth in alloy in that case pls? |
do you mean something like though looks like we're missing checks there too, will create an issue |
do you need help finishing this @leruaa ? some other issues depend on this pr |
I'll try to find some time today :) |
cool, once ready I can do a new alloy patch so we have the parity checks |
Closes #10750