Skip to main content
37 votes
Accepted

The Bitcoin.it wiki says addresses do not carry balances...but all info suggests otherwise

The wiki is correct, it is a technicality. Bitcoin "balances" are actually just unspent transaction outputs (UTXOs, from previous transactions) which you have the ability to spend. In most cases, that ...
meshcollider's user avatar
  • 11.8k
16 votes

The Bitcoin.it wiki says addresses do not carry balances...but all info suggests otherwise

Bitcoin addresses do not actually exist on the Bitcoin network. They are an abstraction for humans to be able to easily send money to each other. What Bitcoin actually uses are transaction outputs. A ...
Ava Chow's user avatar
  • 70.5k
8 votes
Accepted

Why is the witness data fee discounted by a factor of four?

A transaction input means that the previous output it is spending can be removed from the expensive UTXO set. To incentivize making txin's (and hence reducing the UTXO size), Segregated witness ...
morsecoder's user avatar
  • 14.2k
8 votes

Do UTXO's ever get consolidated to avoid complexitity?

When you pay someone using a number of utxo's to fund your payment, the output being created is a new single utxo with the total amount of all those input (minus change and fees). Effectively, you ...
arubi's user avatar
  • 1,864
7 votes

How bitcoin nodes update UTXO set when their latests blocks are replaced?

Bitcoin Core since v0.8 maintains "undo files" that contain the information necessary to undo the effect of a block on the UTXO set. In a way you can see blocks as authenticated patches to be applied ...
Pieter Wuille's user avatar
7 votes

How are funds verified?

How does a miner verify that the funds are available and not already spent without iterating through the entire Blockchain? Full nodes do iterate through the entire blockchain, but only once. As they ...
chytrik's user avatar
  • 18.3k
7 votes

How many useable UTXOs are possible with BTC inside them?

There are currently already about 84.3M UTXOs. The consensus rules don't restrict the UTXO set size except that the UTXO set growth is delimited by the available blockspace. The smallest output type ...
Murch's user avatar
  • 75.4k
7 votes
Accepted

Is it possible to identify UTXOs signed by HD wallets?

Almost every wallet today uses HD key derivation. You'd need to go back to software from 2016 or earlier to find any that don't. So I'd say your question is moot. That said, there certainly are ...
Pieter Wuille's user avatar
7 votes
Accepted

Mismatch between utxo increase and total utxos

The utxo_increase and utxo_size_inc fields of getblockstats does not exclude provably unspendable outputs. However provably unspendable outputs will not be added to the UTXO set, so gettxoutsetinfo ...
Ava Chow's user avatar
  • 70.5k
6 votes

Why is the witness data fee discounted by a factor of four?

Witnesses do not need to be stored once they have been verified and can be discarded. This effectively reduces the size of the UTXO. The discount is supposed to account for the reduced storage ...
cdecker's user avatar
  • 9,508
6 votes
Accepted

How much blockspace would it take to spend the complete UTXO set?

TL;DR: Spending the whole UTXO set would take the blockspace of about 11 500 blocks. What follows is some very rough napkin math that is almost certainly off by a few percent points. I've roughly ...
Murch's user avatar
  • 75.4k
6 votes
Accepted

What is the size limit on the UTXO set, if any?

There is no such limit. Growth of the UTXO set is somewhat regulated by the fact that creating UTXOs takes up blockchain space, which may cost fees to use. But there are no size limits as such.
Pieter Wuille's user avatar
5 votes
Accepted

Do UTXO's ever get consolidated to avoid complexitity?

Yes, they do. You're right, generally, the size of UTXO Set has been growing over the years. E.g. in May 2014 it was 11 million, in May 2015 it was 19 million, May 2016 it was 38 million, in May 2017 ...
Murch's user avatar
  • 75.4k
5 votes

Why is the witness data fee discounted by a factor of four?

Because Txouts are about 1/4th the size of TxIns, since signatures are that much bigger than a simple hash. This means that in the old situation it was cheaper to split coins (increasing UTXO set ...
Jannes's user avatar
  • 6,344
5 votes
Accepted

Why Full Node stores whole blockchain instead of only the UTXO set?

You are right, and it seems this answer is outdated. The concept of a UTXO set is more recent than Bitcoin itself. The original software kept a database with information on every transaction output ...
Pieter Wuille's user avatar
5 votes
Accepted

When the UTXO in the cache is full, what strategy is used to replace one UTXO with another in the cache?

The UTXO set cache is not a fixed size and the limit isn't a hard limit. New entries can be added to the cache without regards for the maximum cache size. In fact, the cache object itself doesn't even ...
Ava Chow's user avatar
  • 70.5k
4 votes

Has UTXO selection methods changed since activation of Segwit?

Segwit corrects this incentive mismatch. Segwit only improves the ratio, but outputs are still cheaper than inputs even with segwit. As sr-gi mentioned in his answer, the Branch and Bound algorithm ...
Murch's user avatar
  • 75.4k
4 votes

Has UTXO selection methods changed since activation of Segwit?

Bitcoin Core's client has recently applied changes to their coin selection algorithms based on Murch's Master's thesis.
sr_gi's user avatar
  • 3,220
4 votes

When exactly an entry is removed or added to the UTXO's set in the Bitcoin core?

When exactly an entry is added to the set of unspent transactions outputs? When exactly an entry is removed from the set of unspent transactions outputs? The answer to these questions is that ...
Pieter Wuille's user avatar
4 votes
Accepted

Why is the blockchain called Distributed Public "Ledger" and not "Journal"?

You're right. The Bitcoin blockchain is not a ledger, but rather the network's transaction journal. It's actually the UTXO set that is the ledger of all Bitcoin balances. (UTXO - Unspent Transactions ...
Murch's user avatar
  • 75.4k
4 votes

What prevents a malicious user creating a new transaction using signatures of an old mined transaction if the inputs have the exact same balance?

The transaction ID and output index of the second 1 BTC that was sent to A's address will be different from the first 1 BTC that was sent there. Since transactions refer to inputs by their txid and ...
Raghav Sood's user avatar
4 votes
Accepted

Other database besides UTXO?

Once spent, the wallet removes the UTXO from its cache of unspent transactions. The transaction is not removed from the general database (the blockchain or block index). Full nodes running with ...
Jose Fonseca's user avatar
4 votes

Is there a flag or specific message in a bitcoin pcap to show us our bitcoin transaction is confirmed or not?

A transaction is confirmed when it is included in a block, so you will need to watch for a message that alerts your node (or whatever software you are using to watch the P2P gossip traffic) to a new ...
chytrik's user avatar
  • 18.3k
4 votes
Accepted

Is the UTXO set size important for non-mining full nodes?

The main motivation cited is reducing block orphaning Where do you see this being cited? AFAIK, the motivation is to reduce the resources required to run a full node which has nothing to do with ...
Ava Chow's user avatar
  • 70.5k
4 votes
Accepted

Does the chainstate leveldb only contain "addresses" for P2PKH and P2SH?

Yes, Bitcoin Core does do some compression of standard output scripts in order to store the minimal amount of data needed. Anyway, would I be correct in assuming that you could only get an address ...
Ava Chow's user avatar
  • 70.5k
4 votes

How to count the provably unspendable UTXO in the blockchain?

When you say "transactions", I assume you mean "transaction output". It is literally not possible to have a transaction output that is larger than the transaction size limit. ...
Ava Chow's user avatar
  • 70.5k
4 votes

Connecting A Wallet To A Pruned Node

You can't ask for UTXOs from arbitrary nodes on the networks, because there is no way to verify that information. You need to ask for blocks. And a pruned node cannot provide those.
Pieter Wuille's user avatar
4 votes
Accepted

Does an uneconomical output need to be kept in the UTXO set?

Bitcoin Core removes provably unspendable outputs from the UTXO set, since by definition we know they will never be used to verify new transactions. One could, in theory, do the same for UTXOs that ...
stickies-v's user avatar
4 votes
Accepted

Does bitcoin core scantxoutset include mempool transactions?

As of 24.0 the only complete way (to my knowledge) of achieving this is by using a watchonly wallet along with the listunspent / listsinceblock commands. Importing the descriptor in a watchonly wallet ...
Antoine Poinsot's user avatar
4 votes
Accepted

Why zero amount transaction outputs are kept in Bitcoin Core chainstate database?

Are there any ways such an input can really useful? It's not a question of usefulness, but necessity. It is legal to spend such outputs in the Bitcoin consensus rules. If these outputs were not added ...
Pieter Wuille's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible