ColonelJ / tron-transaction-downloader

Node.js script to download all transactions for an account using TronGrid and write them to a CSV file
The Unlicense
3 stars 0 forks source link

Not all transactions are exported #3

Open bschi opened 3 years ago

bschi commented 3 years ago

The script works very well. Thanks a lot! Unfortunately not all transactions are exported. My account has 25,467 transactions. Exported are 6,864 rows in the Excel.

Can this be fixed?

ColonelJ commented 3 years ago

Hi, thanks for your report. Where did you get the number of transactions 25,467 from? (The script or e.g. Tronscan? If it was the script you should note that internal transactions are not included in the CSV.) Did you look into which transactions were missing from the CSV? Are the same ones missing if you run the script again?

bschi commented 3 years ago

Hi,

Thank you very much for the quick reply.

It is this wallet: TC85bGQQxrEBs5prnXgKZaX7RYUvjsDjRu

Tronscan shows:

Definitely missing transactions prior to November 12, 2018.

Here a transaction for example: https://tronscan.org/#/transaction/948fa617c39b5256034600b6df28eec3835919ff1526dd0db88c1d399163a01f

As a download, I would need a complete list of all transactions. Is this possible with the script?

ColonelJ commented 3 years ago

Hi, I found the problem: TronGrid sometimes says it's got to the end of the transactions when it hasn't. I put in a hack to try downloading the same page of transactions again 4 more times to be sure it is actually the end. Anyway it seems to work, I got the following output for your wallet (snipped):

...
Downloading at timestamp 1540186488000 [Mon Oct 22 2018 06:34:48 GMT+0100 (British Summer Time)]
Received end of data, requesting again to confirm
End of data not confirmed, continuing download!
Downloading at timestamp 1540142445000 [Sun Oct 21 2018 18:20:45 GMT+0100 (British Summer Time)]
Downloading at timestamp 1539150621000 [Wed Oct 10 2018 06:50:21 GMT+0100 (British Summer Time)]
Downloading at timestamp 1535633442000 [Thu Aug 30 2018 13:50:42 GMT+0100 (British Summer Time)]
Downloading at timestamp 1535001564000 [Thu Aug 23 2018 06:19:24 GMT+0100 (British Summer Time)]
Received end of data, requesting again to confirm
Downloading completed! (Got 36147 transactions)
Processing 24297 non-internal transactions
Looking up TRC10 ID 1003406...
...

The last line of the CSV is the transaction you mentioned:

948fa617c39b5256034600b6df28eec3835919ff1526dd0db88c1d399163a01f,,1531757259000 [Mon Jul 16 2018 17:07:39 GMT+0100 (British Summer Time)],TransferContract,TAUN6FwrnwwmaEqYcckffC7wYmbaS6cBiX,TC85bGQQxrEBs5prnXgKZaX7RYUvjsDjRu,29999.000000,TRX,Tronix,_

So I think that means it's working. Note that the transaction count still doesn't match Tronscan, but I think that's because Tronscan includes some transactions that aren't to/from your wallet, so the count is wrong on Tronscan (I hope). Feel free to look into that further.

By the way, I applied the same fix to my other script at https://github.com/ColonelJ/tron-transfers-downloader

bschi commented 3 years ago

Thank you very much, it works. I realized in the meantime that I had opened this report in the wrong repository. I will test this extensively in the coming days.

bschi commented 3 years ago

The script worked since I tested it. Now it is not working anymore. I have opened another issue. Could you please review? :-)

https://github.com/ColonelJ/tron-transfers-downloader/issues/5