Skip to content

Non-replay protected transactions cause JSON-RPC endpoints to crash #845

@m-Peter

Description

@m-Peter

It was reported that the following JSON-RPC call:

curl -sX POST http://xxxx:8545/ -H 'Content-Type: application/json' -d '{
"method": "eth_getBlockByNumber",
"params": ["0xEC7D3", true],
"jsonrpc": "2.0",
"id": 2
}' | jq

caused the respective endpoint to crash:

{
  "jsonrpc": "2.0",
  "id": 2,
  "error": {
    "code": -32603,
    "message": "method handler crashed"
  }
}

Upon investigation, I found out that the root cause of this, was a contract deployment that used a pre-signed transaction: https://evm.flowscan.io/tx/0x07471adfe8f4ec553c1199f495be97fc8be8e0626ae307281c22534460184ed1 . This transaction didn't specify a chain ID, so that it could be used across EVM chains.

Due to the Geth changes for Pectra, a chain ID of 0 is no longer valid. And for such legacy transactions, the HomesteadSigner has to be used instead. See https://github.com/ethereum/go-ethereum/blob/v1.16.1/core/types/transaction_signing.go#L379-L382 for more info.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions