-
Notifications
You must be signed in to change notification settings - Fork 1.7k
eth_getTransactionReceipt throws an error when transaction is not found #10550
Comments
Was this transaction one that your node originally broadcast? |
Yes |
Can you please share the exact messages you're seeing (omitting private information if you wish)? I'm having trouble finding where that error might be emitted from. |
@joshua-mir, sorry, I mixed up two error messages I was seeing. The
Both happen in the same conditions (the node broadcast the transaction but the tx is still unmined), the only difference seems to be whether ancient block sync has finished or not. In the second case, I would expect the node to return |
If you are running a miner or authority, your node will be maintaining a pending block, which is what queries to the pending block reference - that's currently how that ambiguity plays out in parity, but if we decide to implement that rpc spec EIP I'd imagine the ambiguity should be removed. You certainly shouldn't rely on having access to the pending block as a user or developer though. The reason you are seeing the ancient block sync reference when looking for a transaction that should be in the pending block is simply because we don't know whether it's a replay of an old transaction in a block we aren't aware of intil ancient sync is complete. |
I'm seeing the same issue with a Parity node (2.5.5) NOT running as miner/authority. Please give advice if web3.js should be modified to keep polling when |
When querying
eth_getTransactionReceipt
for an unmined transaction, I would expect to get either a receipt ornull
as specified in https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionreceipt. Instead, I get an error message likeThe text was updated successfully, but these errors were encountered: