Skip to content

Properly report transaction index overflow when appropriate #1011

@joshuacolvin0

Description

@joshuacolvin0

To reproduce:

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x33adf26b042f9c0287a5701422b6a4aa5b5840db65f43028548f63fbd37ef57a","0x2"],"id":1}' https://kovan4.arbitrum.io/rpc
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"got *evm.BlockInfo but expected TxResult"}}

the error message should say "transaction index overflow"
here is the proof that transaction from block 1836 is also included in block 1837:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x33adf26b042f9c0287a5701422b6a4aa5b5840db65f43028548f63fbd37ef57a","0x0"],"id":1}' https://kovan4.arbitrum.io/rpc
{"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x33adf26b042f9c0287a5701422b6a4aa5b5840db65f43028548f63fbd37ef57a","blockNumber":"0x72d","from":"0x96ebb7eba9ce2db94bc065db82c8f12d87724c7b","gas":"0x5208","gasPrice":"0x0","hash":"0x9e4f5cc60e02add451ba120deba634c48b625d15cc759e83432aa3427672c4c0","input":"0x","nonce":"0x3","to":"0x24ae64a45d86ef76a8a2eda3d296b0c2cbfc3086","transactionIndex":"0x0","value":"0x2e90edd000","v":"0x1836a950a8154","r":"0x33aba79190219ae2c9aaf11757ccd0ad87945cd3072316046c21ea6de79aabf1","s":"0x19d3410ddd12be3c831a4dbc6d26399f2161098768e13ca6aa8e686f23684237","l1SequenceNumber":"0x75e","parentRequestId":"0x43d1ba462914271dabe4a30a5e82244199a980a4a6585a9edb0b2bab577d5bac","indexInParent":"0x0","arbType":"0x3","arbSubType":"0x4","l1BlockNumber":"0x16e8039"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions