I have the reference client running with a complete transaction index.
Is it possible to get all UTXO for a certain height of the chain either via bitcoin-cli
or some other tool?
The utxo set is indexed by transaction_id + out_index
from Bitcoin Core 0.15 onwards (just by transaction_id
from 0.8 - 0.14). So in order to get all UTXOs for a certain height you need to parse the whole set and filter it by height.
There's no way of doing so with bitcoin-cli
AFAIK. You can do it by using STATUS (a tool I'm coauthor of). Feel free to ask for support if needed.
-
I took a look at it, you parse the ".bitcoin/chainstate" directory, does this contain all outputs or just the utxo at current chain height? – gdkrmr Apr 18 '18 at 21:16
-
-
-
You can work it around by re-downloading the blockchain and stop the sync process at the block height you'd like to analyze. We have a script designed for this as part of the dev brach at github.com/sr-gi/bitcoin_tools/blob/dev/bitcoin_tools/analysis/… – sr-gi Apr 19 '18 at 8:21