Skip to content

Difference in return value for 'r' parameter in getTransactionBy... #2372

@tjayrush

Description

@tjayrush

This curl command:

curl --location --request POST 'http://archive02.archivenode.io:8545' --header 'Content-Type: application/json' --data-raw '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x785b221ec95c66579d5ae14eebe16284a769e948359615d580f02e646e93f1d5", "0x25"],"id":1 }'

returns different values in the r key from both TurboGeth and Parity.

Nethermind returns:

    ....
   "r": "0x0acdf839bdcb6653da60900f739076a00ecbe0059fa046933348e9b68a62a222",
    ....

(64 characters and a leading zero)

Both TurboGeth and Parity return

    ....
   "r": "0xacdf839bdcb6653da60900f739076a00ecbe0059fa046933348e9b68a62a222",
    ....

(63 characters, no leading zero)

As bytes, these two values are identical. As strings, when returned from RPC, they differ.

Note, My guess is this happens with any transaction whose r has a leading zero, so not just this example.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions