[BUG] eth_getTransactionByBlockNumberAndIndex The specified block height and index cannot obtain transaction information
Seid version
Chain ID chain_id : 1329
Describe the bug Request data through an rpc interface
#!/bin/bash
RPC_URL="https://evm-rpc.sei-apis.com"
BLOCK_NUMBER=136337023
TRANSACTION_INDEX=3
BLOCK_NUMBER_HEX="0x$(printf %x $BLOCK_NUMBER)"
TRANSACTION_INDEX_HEX="0x$(printf %x $TRANSACTION_INDEX)"
echo "BLOCK_NUMBER_HEX: $BLOCK_NUMBER_HEX, TRANSACTION_INDEX_HEX: $TRANSACTION_INDEX_HEX"
# 1. w3.eth.get_block_receipts(BLOCK_NUMBER)
GET_BLOCK_RECEIPTS_RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockReceipts\",\"params\":[\"$BLOCK_NUMBER_HEX\"],\"id\":1}" "$RPC_URL")
echo "eth_getBlockReceipts Response: $GET_BLOCK_RECEIPTS_RESPONSE"
# 2. w3.eth.get_transaction_by_block(BLOCK_NUMBER, TRANSACTION_INDEX)
GET_TRANSACTION_BY_BLOCK_RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\"params\":[\"$BLOCK_NUMBER_HEX\", \"$TRANSACTION_INDEX_HEX\"],\"id\":1}" "$RPC_URL")
echo "eth_getTransactionByBlockNumberAndIndex Response: $GET_TRANSACTION_BY_BLOCK_RESPONSE"
# eth_getTransactionByBlockNumberAndIndex
# Response: {"jsonrpc":"2.0","id":1,"result":null}
To Reproduce
- Specify block height and transaction index
- BLOCK_NUMBER_HEX: 0x820567f, TRANSACTION_INDEX_HEX: 0x3
- eth_getTransactionByBlockNumberAndIndex
- Response: {"jsonrpc":"2.0","id":1,"result":null}
Expected behavior Get the transaction information correctly
Screenshots
Additional context
Title : Inconsistent transactionIndex between eth_getBlockReceipts and eth_getTransactionByBlockNumberAndIndex
Description : We've identified a data inconsistency in transaction indexing when using different JSON-RPC methods on Sei Network
- Via eth_getBlockReceipts (block receipts response):
{
"transactionHash": "0x2d934f14a93abafc8f894fd48dbc9a88f31c4a193aa2247f46225df878305510",
"transactionIndex": "0x3" // Index 3
}
- Via eth_getTransactionByBlockNumberAndIndex (direct transaction query):
{
"hash": "0x2d934f14a93abafc8f894fd48dbc9a88f31c4a193aa2247f46225df878305510",
"input": "0x",
"nonce": "0x145",
"to": "0x863221244596659ae10c4383021b4da3ace907c1",
"transactionIndex": "0x9" // Index 9
}
Impact: This discrepancy breaks the fundamental assumption that a transaction's index should be immutable and consistent across all block-related queries. This may cause errors in:
- Block explorers
- DApps relying on transaction ordering
- Indexing services
Expected Behavior: Both methods should return identical transactionIndex values for the same transaction hash.
Additional Context:
- Observed in block: 136337023
- Potential root cause: Suspect block processing logic inconsistency between transaction execution context and post-block indexing.
Please try to recheck this on atlantic-2 testnet. The logIndex was not being set correctly. Historical data will not be fixed retroactively however.
Thank you for opening this issue and taking the time to share your thoughts. We’d love to keep moving this forward, but we need a bit more information from you. Please add any additional details within the next 2 day(s) so we can continue collaborating on a solution together. If we don’t hear back, the issue will close automatically — but you’re always welcome to reopen it when you’re ready.
We’re closing this issue for now as we haven’t received additional input. Please know that your effort is appreciated — and when you’re ready to revisit this, we’ll be here to pick it up again. Thank you for contributing and helping us improve Sei.