sr-gi/bitcoin_tools

Sum of all utxo's is greater then current supply

GE0L0GIST opened this issue · 5 comments

Problem is that if you dump utxo set with unspent amounts and sum unspent amounts up it appears that currently it is around 20.600.000 BTC. But according to Glassnode and other blockchain parsing companies it should be around 19.200.000 BTC. I have tried to dump utxo's at different block heights, but bitcoin_tools is constantly giving me higher values.

It would be nice to understand what is cousing this increase in unspent amounts.

EDIT:
I can see that if I dump utxo for 01.03.2009 then majority of utxo have 59 btc balance. But it should be 50, same as block reward.

sr-gi commented

Hi @GE0L0GIST,

I haven't used, nor maintained, this library for year. I'll try to find some time to look into what may be going on, but I make no promises.

For what you mention in your edited message, it may be the case that same of the parsing is wrong, not sure if anything changes since the last update or some of the later patches included an error.

Thank you sr-gi, sorry that disturbing you. Also I converted code to python 3.10, so maybe I made a mistake somewhere. Trying to find what is wrong...

sr-gi commented

Oh, you're not disturbing at all. I'm just focusing on other projects atm.

Just to be clear, is the error on this version of the repo or do you only see it happening on your Python 3 port?

I was not able to install Plyvel library for Python 2, that is why I ported it to Python 3. So I don't know if this version of the repo works correctly or not.

By the way I found problem in my port and corrected it. So now total amount of unspent coins is correct.

Thank you for your responsiveness!

sr-gi commented

Glad to hear. lmk if something else pops up.