馃攳
Bitcoin Q&A: Unspent Transaction Output (UTXO) - YouTube
Channel: aantonop
[0]
"Where are UTXOs stored?"
[5]
What are UTXOs? They are unspent transaction outputs.
[11]
They are in the blockchain.
Every transaction has outputs.
[15]
If you have a copy of the blockchain, the
transaction outputs are in that database.
[21]
They are not in an easy-to-find index.
They are just in the transactions.
[32]
If you know the transaction ID, you can
look up a transaction and find the outputs.
[39]
Those outputs are in the blockchain,
but not a neatly defined way.
[45]
If you create a transaction index and add a
watch address, your Bitcoin Core node software...
[57]
create an index for all of the UTXO by script,
corresponding to addresses you are watching.
[70]
At any moment in time, you can look up
by address, and find, specific UTXOs.
[77]
In that case, you have the same database,
but it is indexed as UTXOs by script pub key.
[87]
You will be able to quickly look up all
UTXO belonging to a specific address.
[93]
Bitcoin Core only does that for specific
addresses that you tell it to watch.
[99]
It does not build that index for everything.
[101]
UTXOs are stored in the blockchain,
without being fully indexed.
[107]
They are only indexed when you tell the Bitcoin Core
[node software] to watch specific addresses.
[114]
If you are building a block explorer, such as the
infrastructure for Blockchain.info, Blockstream.info,
[123]
or BlockCypher.com, one of these block
explorer websites that allow you to search...
[130]
for the balances of addresses, they are building a
fully indexed database of all UTXOs and addresses.
[139]
They will keep it updated all the time, which [requires]
a very [large] amount of disk space to store.
[146]
That is a much more complex database.
They do not that because the need information.
[151]
It can be [found] by re-scanning that database.
They will store a fully indexed UTXO set,
[158]
by a number of different indices so
they can look up [data points] very quickly,
[163]
and present them on your screen.
[166]
That is custom software which they built
to do this. Your wallet doesn't do this.
[171]
The UTXO is stored when it is needed,
for the purposes that it is needed.
[178]
"Could you explain what bitcoin dust is,
why it is bad, and how it can be avoided?"
[186]
"In the long run, in the extreme scenarios,
could it damage bitcoin owners or the network itself?"
[193]
Dust is amounts of bitcoin that
have become part of the UTXO set,
[205]
but are no longer [economically feasible] to spend,
[208]
because the cost in transaction fees
exceeds the value of the bitcoin itself.
[216]
For example, if I create a transaction and the
change [payment] is a couple thousand satoshis,
[232]
the cost to spend that chunk of bitcoin
may be more than that in fees.
[242]
Or I will end up paying a significant percentage in fees.
[246]
Therefore, in practice, it is unspendable.
[251]
Here is the key point: "in practice, unspendable"
[may only apply to] bitcoin at the current price,
[258]
and the fee [pressure] today.
That doesn't mean it will be unspendable forever.
[264]
It may become spendable in the future
as the price of bitcoin goes up...
[270]
and the relative percentage of fees goes down.
[275]
Again, [the dust UTXO] will become
valuable enough to spend at a lower fee.
[281]
So the definition of bitcoin dust itself changes.
[285]
There is a specific definition [in Bitcoin Core],
which I believe is anything under 546 satoshis.
[294]
There is a minimum amount below
which you can't create transactions, UTXOs.
[303]
That is to prevent the creation of ridiculously [small]
amounts of dust in the beginning of Bitcoin's [history].
[310]
[At one time], you could create a one-satoshi output.
Effectively, at any price of bitcoin or any fee level,
[319]
that is dust and you can't do anything with that.
It will just sit there, unspendable, and take up memory...
[326]
and disk space on the Bitcoin blockchain, in order
to keep track of an amount that can't be spent.
[333]
It is like the loose change you find in your couch.
If you were to carry that around in your pocket,
[339]
it will just make a hole and ruin your pants.
[344]
You won't be able to buy anything with it
because it is such a tiny amount.
[351]
Does it damage Bitcoin?
Not really, it just sits around doing nothing.
[356]
Depending on the level of dust, if it is true dust,
amounts so tiny that you can't spend them...
[364]
on the Bitcoin network today or ever,
then it will just sit around forever.
[369]
However, if it is just marginally dust at the current fee
level and bitcoin price, it may be spendable in the future.
[380]
Then it is pretty harmless. This is about how is
your wallet is configured to handle these amounts.
[387]
Preferably, your wallet will be intelligent enough to
avoid creating amounts that are too small to spend.
[399]
It [should] certainly avoid the absolute dust limit in the
protocol, [and] avoid creating any UTXO that isn't useful.
[413]
This is about [using] a wallet with
good coin [and fee] management.
[419]
It is harmless, but it can be a nuisance.
[422]
"Will the crypto dust in the mempool ever need to be
cleaned up, due to high RAM requirements for nodes,
[429]
as time goes on and more transactions create dust?"
[435]
Not necessarily. Dust is a problem,
but it is not a problem for the mempool.
[441]
Dust is a problem for the UTXO set.
These are two different things.
[445]
The mempool is the list of currently outstanding
transactions waiting to be confirmed in a block.
[456]
The UTXO set is a collection
of all bitcoin that can be spent.
[466]
All the little chunks [of different sizes] in the
[circulating supply] of 17 million bitcoin mined so far.
[474]
They are transaction outputs and have not
been spent. That database accumulates dust.
[482]
If [people] create lots of tiny fragments
of bitcoin, then the database [will grow].
[489]
Imagine this: almost 17 million bitcoin have been
mined so far. If [each] bitcoin was one UTXO chunk,
[501]
then there would be 17 million chunks to keep track of.
[505]
But they are not.
[Many] are smaller amounts, smaller chunks.
[510]
I believe that there are more than a hundred million unspent transaction outputs,
[517]
the minimal units of Bitcoin.
[521]
Among those are hundreds of thousands of dust
[outputs], given the current fees and network capacity.
[533]
They cannot be cost-effectively spent because the
transaction fee would be more than the amount.
[542]
Cleaning up that dust is not easy.
[544]
You must consider that, in the future,
the value of the dust might be higher.
[552]
There may be circumstances where there is capacity to
spend that dust, in a way that makes economic sense.
[561]
We don't really need to clean up dust now.
It might happen in the future.
[566]
It is not a problem for the mempool,
but it is a problem for indexing the full UTXO set.
[573]
It does impose a resource burden
on nodes keeping that UTXO set.
[581]
If they keep it in memory, it is a RAM problem.
If they keep it on disk, then it is a disk [space] problem.
[587]
"What [should] you do when you have
all of your UTXOs in a single address?"
[597]
Basically, all your coins in a single address.
[601]
"Over time, I have accumulated some bitcoin,
but against all advice, my UTXO are in a single address."
[609]
"I understand this is bad for privacy, but I also
understand it will be less secure once I spend."
[614]
"[Spending means] the public key behind the
double hash of the address [will be] revealed."
[622]
"The key pair [could be] more vulnerable to
future attack possibilities." Tim is talking about...
[629]
the rather remote possibility of a successful
quantum computing attack in the future.
[636]
Address reuse makes you more vulnerable [to that].
Not reusing addresses makes you more resilient.
[643]
If your public key is revealed when you spend
and you keep using the same address,
[650]
if there is a quantum computing attack
one day that is big enough [to crack ECDSA],
[656]
it would be a problem.
[658]
[For now], it is a remote possibility,
for the foreseeable future.
[661]
But the privacy implications [of address reuse]
are worth considering in this situation.
[667]
If you have all UTXO, your coins, in one address, that
means every time you make a payment to someone,
[673]
the person you just paid can look up where that payment
came from and know how much [bitcoin] you have.
[684]
It is all in that address.
From a privacy perspective, that is terrible.
[689]
What can you do to get out of the situation, be more
private and secure? Well, one of the things you can do...
[701]
Construct transactions that send payments
to other address in your own wallet [or another wallet],
[710]
amounts that are not obviously
just transfers between wallets.
[716]
Perhaps [you could] make them look like
payments to merchants and things like that.
[720]
If you spread the crypto you have in that address
enough, across many different different addresses,
[730]
managed by [software and] hardware wallets...
Tim mentioned that he has a hardware wallet.
[734]
You will also need to spread some
of the change to different address.
[745]
This will make it a bit more private for you.
[749]
There are other techniques,
which I can't [broadly] recommend.
[752]
It depends on whether they are legal in your jurisdiction.
[757]
But you can use various coin mixing tools like CoinJoin
on Join Market in order to maintain better privacy.
[776]
You will need to look up whether that is
something you can do, in your jurisdiction.
[783]
Follow-up question: "I would be very interested to hear
how to consolidate UTXOs while maintaining privacy."
[795]
The answer is, you can consolidate them
into bigger UTXOs, bigger amounts,
[803]
but spread across multiple addresses
to still maintain some privacy.
[808]
You don't want a lot of tiny UTXOs that
are difficult or cost a lot [of fee] to spend.
[814]
If network fees go up again,
that UTXO becomes unspendable.
[822]
So you should look for opportunities,
when [average] transaction fees are very low,
[826]
during times when the network is being under-utilized,
to consolidate small-value UTXOs into larger UTXOs.
[836]
You should not consolidate into one address.
Consolidate into multiple addresses.
[842]
Pay them out to different addresses,
with different amounts, to break it up a bit.
[860]
But it won't be perfect. If you want to do it properly,
you will need to use some kind of CoinJoin tool.
Most Recent Videos:
You can go back to the homepage right here: Homepage





