-
Notifications
You must be signed in to change notification settings - Fork 9
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
bug: legacy (type 0) transactions and high chain IDs fail signature recovery #41
Comments
Relevant 611798f#diff-e52e4ddd58b7ef887ab03c04116e676f6280b824ab7469d5d3080e5cba4f2128R45 |
My iterator in my test was added on top of a start number, which was Okay, so, it seems the limit is a 32-bit number. At least that's a clue. |
I found EIP-2294 but it doesn't appear to have been adopted. Some things apparently have limits, like Metamask at |
There's this issue: LedgerHQ/app-ethereum#283 Which seems a bit vague and reports a different error that we've been seeing. For this issue, the device isn't throwing an error, just returning what appears to be an invalid signature. Could be unrelated. |
But that was a year ago and I'm fairly certain I'm running a version after that. Found this commit (LedgerHQ/app-ethereum@8260268) implying an invalid V and the client just having to deal with it, and the following comment talking about something similar. |
Ledger Live fiddles with signatures like so: This just doesn't work for us. This one looks more like us: But there's a little bit different. Chain ID appears to be truncated in some fashion... |
Testing the upper limits of type 2 transactions and apparently the limiting factor there is the largest number that can be displayed on the device (tested on a Ledger S). This is the error thrown: Max integer appears to be what can be 15 characters long in base 10, so >>> int(0x38D7EA4C67FFF) # works fine
999999999999999
>>> int(0x38D7EA4C67FFF) + 1 # throws 0x6502 error
1000000000000000 |
type 0 transactions seem to have an issue with high chain IDs (e.g.
131277322940420
). I've tested on hardware and it works up to mumbai (80001
). Type 1 and 2 don't have the same problem.I think @moh-eulith tried to address this by updating
MockDongle
to get the tests to pass but I'm seeing issues using a chain ID like this on hardware. Probably indicative of another issue.Here's a test that will cause an invalid signature recovery on hardware:
I'm not sure if it's a limitation of the transaction type, RLP, or my implementation.
The text was updated successfully, but these errors were encountered: