UTXO instrumentation

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
I want to take a peek into the UTXO set and there doesn't appear to be any good way to do this currently. I'm thinking of modifying the software to allow me to do so. Would anyone be interested in me adding this to BU? (Unless it would be easy for someone else to add this).
 
  • Like
Reactions: solex

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
From my perspective this looks like a very useful initiative, especially with the UTXO becoming an area of focus now that larger blocks exist on Bitcoin Cash and perhaps soon on Bitcoin too.
Would this be supported via rpc?
 

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
That would be my plan. It's possible to query the UTXO size but not really any other information about it. I find it kind of odd that this information is not already available as I can think of a few applications for the information. I'm not really familiar with Bitcoin internals but I think it probably can't be much different from how I think it would be (could be wrong though).
 

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
I just got offered a $60 fee on a $450 (BTC) transaction. I think a lot of the UTXO set is unspendable.
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
Hmm. That's very high, and quite concerning. I am puzzled about how the fees on BTC remain high even though so few txns are apparently in the mempool. e.g. block 483248 with 1922 txns and 2.75 BTC in fees, is $6.65 per txn! Yet this block was mined with only 3,500 txns in the mempool (according to tradeblock which must be doing some severe filtering).

One interesting UTXO query would be what percentage of the outputs are less than the fee to spend them based upon the fee-level in recent blocks.
 

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
Hmm. The UTXO set might be a bit big to handle with a RPC call though. It could probably still be done but I'm not sure the best way.

WRT the fee, to be fair, there were 21 inputs. That's still excessive in my book though.

I kind-of don't want to get into adding too much complexity into the client code. I'd just rather return the data sets (or possibly dump to disk) and allow external software to work on it. That is definitely a metric I'd like to see though.
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
It's not just the inputs. BU had to pay $17 for a single*-input multisig a few months ago, and many of the payments we are making are well over the average fee due to larger txns with P2SH.

* I think that was the case when I looked at it, but not certain now,

Another set of useful functions would be around UTXO commitments. There is a proposal to enable this in Bitcoin Cash at the time the difficulty targeting algorithm is improved,
 

Richy_T

Well-Known Member
Dec 27, 2015
1,085
2,741
Yes. UTXO commitments will be a big thing (and would have been a more worthy target for developer time than segwit). This kind of info might be useful in moving towards that.
 

Members online