Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

sendSignedTransaction fails for rawTransaction with leading zeroes #1126

@matthieu-merlyn

Description

@matthieu-merlyn

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.

Metadata

Metadata

Assignees

Labels

BugAddressing a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions