0

I am inspecting a strange case. I am monitoring Ropsten network for my project and writing all transactions to database to search them though in much more convenient way. Every couple of minutes I schedule a worker that checks database for records with pending status and try to retriever transaction receipts from block chain. I noticed that there were some old transactions but without transaction receipt at all. Searching for transaction hash on ropsten.etherscan.io gave no results. Here is an example

> var Web3 = require('web3');
> var web3 = new Web3("ws://127.0.0.1:858");
> web3.eth.getTransaction('0xa47ae1f88626e0534382a980aa96db212225abd7570817aecac1f30276ed431e').then(console.log);
{ blockHash: null,
  blockNumber: null,
  chainId: '0x3',
  condition: null,
  creates: null,
  from: '0x01592cE6b6dcd5D5fe9933d7b6a6786A79274CD3',
  gas: 121000,
  gasPrice: '4000000000',
  hash: '0xa47ae1f88626e0534382a980aa96db212225abd7570817aecac1f30276ed431e',
  input: '0x',
  nonce: 53,
  publicKey: '0x772bac5a49059e6648ab2dfd0d4349ba84c9a3d3d9cd84abf67e4966eebc02145638a8e6d5fd9798072d2bdd27fd2a360192d3587a7e2cb62c193124a65cf413',
  r: '0x9ed44eb37c1da71d600afee3c9a1283ed0d259dfe7c1ee00e9a16fd0e2678bed',
  raw: '0xf86b3584ee6b28008301d8a89412fa13c638b4b6ceb1ac1c8d072530abd5a18fbc872386f26fc100008029a09ed44eb37c1da71d600afee3c9a1283ed0d259dfe7c1ee00e9a16fd0e2678beda059f1788c8e38373abf4ea0b6ca4ad5c3014dcca29c17657c195405422c8a6913',
  s: '0x59f1788c8e38373abf4ea0b6ca4ad5c3014dcca29c17657c195405422c8a6913',
  standardV: '0x0',
  to: '0x12FA13C638b4b6Ceb1aC1C8d072530AbD5A18FbC',
  transactionIndex: null,
  v: '0x29',
  value: '10000000000000000' }
> web3.eth.getTransactionReceipt('0xa47ae1f88626e0534382a980aa96db212225abd7570817aecac1f30276ed431e').then(console.log);
null

This transaction arrived to my local DB at 2:30 AM my local time and I stared my investigation at 10am. By the time I started my investigation it was pending for 7 hours at least. Also Etherscan shows pending transaction on their webpage if transaction is yet to be mined, in case of this transaction Etherscan seems to be unaware of it. Here is what etherscan shows

https://ropsten.etherscan.io/tx/0xa47ae1f88626e0534382a980aa96db212225abd7570817aecac1f30276ed431e

AS you can see from transaction data it has correct amount of gas and gas price: 121k for 4MGwei. Can someone explain this behavior?

UPDATE

The explanation for this behavior is answered here: Are pending transactions "dropped" and "reinstated"?

  • The transactions show to be pending. What's wrong here? – Prashant Prabhakar Singh Nov 15 '17 at 9:52
  • on etherscan it says "Sorry, We are unable to locate the Transaction entry" – Max Nov 15 '17 at 10:23
  • It seems to be related to how EVM process transactions. I believe the answer is here - ethereum.stackexchange.com/questions/18736/… It might be that this transaction was dropped from pool. But the how can one know that? – Max Nov 15 '17 at 10:27
  • Yes. The same happened to you. the transaction was dropped from pool and last time I visited the link probably the transaction was in the pool (As I could see the transaction was pending on etherscan and the sorry page was not displayed). The comment is being too long so I am posting an answer for this. – Prashant Prabhakar Singh Nov 15 '17 at 10:45
  • No, it is was not my transactions. I was checking it since I want to know when it is safe to assume that transaction was dropped from pool – Max Nov 15 '17 at 10:50
1

web3.eth.getTransactionReceipt

works only for successfully mined transactions. At time of writing, the

0xa47ae1f88626e0534382a980aa96db212225abd7570817aecac1f30276ed431e

you mentioned is still pending (a.k.a. not mined yet) and therefore cannot be inspected with the command above.

  • Wrong. This transaction arrived to my local DB at 2:30 AM my local time and I stared my investigation at 10am. By the time I started my investigation it was pending for 7 hours at least. Also Etherscan shows pending transaction on their webpage, in case of this transaction Etherscan seems to be unaware of it. – Max Nov 15 '17 at 10:01
  • 2
    Wrong. It might have "arrived to your database" to be "investigated", but it is not included into a block yet. Might be because of the low gas price of 4Gwei. – Nikita Fuchs Nov 15 '17 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.