RCasatta / blocks_iterator

Iterate over bitcoin blocks
MIT License
51 stars 5 forks source link

Dump UTXO set binary #51

Closed RCasatta closed 1 year ago

RCasatta commented 2 years ago

After https://github.com/RCasatta/blocks_iterator/commit/86da242ba8ac34c079e6002ae6ad6f59b70b9012 the database contains data to compute the UTXO set at the height of the last run.

Create a binary bin/utxo_set.rs dumping the utxo set in a format like

Vec<(OutPoint, TxOut)>

plus height and a hash matching the one returned from bitcoin-cli gettxoutsetinfo

RCasatta commented 2 years ago

utxo set consensus encoding should be in a separate crate so that libraries could use only that (also BlockExtra should probably be there)

RCasatta commented 2 years ago

muhash https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-May/014337.html

python impl https://github.com/fjahr/bitcoin/blob/36ec9801a4edb9663ef9ce9ad298233766b903e8/test/functional/test_framework/muhash.py

https://github.com/bitcoin/bitcoin/pull/18000

RCasatta commented 1 year ago

bitcoin-cli dumptxoutset already does this, won't implement