This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
sendSignedTransaction fails for rawTransaction with leading zeroes #1126
Labels
Bug
Addressing a bug
Comments
I don't think it is rawTransaction A looks invalid to me. web3 and myetherwallet don't want to broadcast it. Difference between A and B is the signature at the end. Leading zeroes as described. Changing sender or receiver address is bypassing it for me. I have a list of transactions and can mix sender and receiver without changing the final outcome. |
Mine happens like so:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version: 1.0.0-beta.23
When the result of web3.eth.accounts.signTransaction contains a signature with an R or S value starting with leading zeroes and the rawTransaction is then passed to web3.eth.sendSignedTransaction, this returns
(node:66148) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Error: Returned error: rlp: non-canonical integer (leading zero bytes) for *big.Int, decoding into (types.Transaction)(types.txdata).S
Bypassed this in my test application (private chain) by adding 1 Wei to my tx value and resigning the tx until the signature no longer contains leading zeroes, which fixes the issue for now but obviously is not a desirable solution.
The text was updated successfully, but these errors were encountered: