Conversation
| fn recover_signer(transaction: &Transaction) -> Option<H160> { | ||
| // EIP-2 related | ||
| // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md#specification | ||
| const SECP256K1N_HALF: H256 = H256([ |
There was a problem hiding this comment.
Adding some more context:
| const SECP256K1N_HALF: H256 = H256([ | |
| /// The order of the secp256k1 curve, divided by two. | |
| /// | |
| /// Signatures that should be checked according to EIP-2 should have an S value less than or equal to this: | |
| /// | |
| /// `57896044618658097711785492504343953926418782139537452191302581570759080747168` | |
| const SECP256K1N_HALF: H256 = H256([ |
sorpaas
left a comment
There was a problem hiding this comment.
This isn't necessary. The check happens in TransactionSignature in the ethereum crate. https://github.com/rust-ethereum/ethereum/blob/master/src/transaction/legacy.rs#L103
We already make sure the signature is valid when decoding the value.
But like @RomarQ said, it would be really great to add more docs/tests on this.
|
I think the issue is the EIP-7702 implementation? It doesn't seem to be using |
|
Ah, and EIP-1559 and EIP-2930. Only the legacy transaction type is implemented correctly! |
|
I'll take over the fixes (it needs to happen on
|
|
Thank you. |
Description
Add a missing check EIP2 related check to the pallet-frontier's signature recovery.