question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: unable to decode 831061 transactions

See original GitHub issue

Hi, I’m using bitcoind v0.18.0 and I have the node up2date.

When I run the btcposbal2csv.py, it process up to transaction #58027800 before die with the error “unable to decode 831061 transactions”.

(btcbal) [bitcoin@btcd btcposbal2csv]$ python btcposbal2csv.py /home/bitcoin/.bitcoin/chainstate/ addrs2.txt
reading chainstate database
inmem
 parsed transactions: 58027800
unable to decode 831061 transactions
totaling 24371245714994 satoshi
writen to addrs2.txt

I have enough RAM (the process does not die with an out of memory error). At the moment of the unexpected exit, is just using around 6gb of memory.

Do anyone have any idea of what can I check? Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
graymausercommented, Jul 21, 2019

Hi @komodin I’ve investigated a little and it looks that about 58 milion transactions is valid. When you run the bitcoin-cli with gettxoutsetinfo

you get something like this:

{
"height": 586378,
"bestblock": "0000000000000000001b8d1d8dcd720da68c61f53105b33ec7b04bbb0363e8c6",                                        "transactions": 33810842,
"txouts": 59089178,
"bogosize": 4447148006,
...
"disk_size": 3599864481,
"total_amount": 17829554.82325440
}

You want to look at the txouts entry which lists number of transaction outputs (i.e. spendable bitcoins) in the UTXO set.

And you can see that is is about the same number as what you are seeing in the tool output.

Now why the blockchain shows about 80 mil transactions … I don’t know.

There is a library which does lot of stuff related to bitcoin and also can return the addresses with unspent output see https://github.com/citp/BlockSci/issues/264. It appears that is can handle segwit transactions out of the box, so it might be interesting to compare…

Regarding the issue, I conclude that the scripts sees all the transaction outputs defined in the UTXO set - which should be complete set of unspent transaction outputs in the blockchain.

1reaction
graymausercommented, Jul 4, 2019

Hi @komodin this script processes only the UTXO transaction set -> These are the unspent transaction outputs - not all transaction (ie. https://www.blockchain.com/charts/utxo-count).

However, if you have up to date utxo set then there is some problem, because the total number of transactions should be about 80M now.

I’ll investigate when I have more time, however, this can be related to segwit or something like that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TX decode failed. Make sure the tx has at least one input ...
I'm using bitcoinlib for python to create a transaction and send it but I'm getting the following error ...
Read more >
Diff - platform/frameworks/base.git - Google Git
+ // State 6 is the error state; an error has been detected + // in the input and no future input can...
Read more >
Synthetic steganography - Purdue e-Pubs
6.2 Generating and Decoding StegoDoku Puzzles . ... 7.3 Experimental results for the detection error rate of ... Transactions [55].
Read more >
Automated Malware Analysis Report for ACH ... - Joe Sandbox
Exclude process from analysis (whitelisted): conhost.exe, dllhost.exe; Report size getting too big, too many NtDeviceIoControlFile calls ...
Read more >
Dynamic Information with IBM InfoSphere Data Replication CDC
InfoSphere CDC must reconstruct the source transactions with the data read ... Replication does not encounter an error and continues. When an.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found