Questions tagged [utxo]

Unspent Transaction Outputs (UTXOs) are created by transactions and allow the owner of an associated address to spend a specific amount.

Filter by
Sorted by
Tagged with
30
votes
2answers
42k views

What is an “unspent output”?

What is the meaning of the term "unspent output" in the Bitcoin protocol?
12
votes
2answers
4k views

UTXO model vs. account/balance model

I understand that Bitcoin uses unspent tx output and Ethereum account balance based. However, recently there are lots of discussions on that Bitcoin's UTXO database has become too big. Does this mean ...
26
votes
1answer
9k views

How is a wallet's balance computed?

I am wondering on how a wallet's balance is computed. Basically, from what I've read I assume that you look back at all transactions involving all the keypairs of a given wallet. Adding up all the ...
23
votes
1answer
11k views

How big is the UTXO database?

Is there a query that will return the size of the UTXO database? Specifically, the total number of unspent outputs.
12
votes
4answers
2k views

Why does Bitcoin store all transaction inputs and outputs, instead of just an “account/balance” ledger?

From what I can tell, the Ethereum blockchain just stores accounts and balances - why did the original Bitcoin developers choose the method of storing all transactions for validation instead of just ...
4
votes
1answer
725 views

a few questions about how HD wallet works

I've read through HD wallet from various resources and have got the basic understanding about it, but am still confused by a few details 1) Each non-hardened public keys (thus addresses) can receive ...
11
votes
1answer
3k views

Where is the UTXO data stored?

When a new transaction is received it is added to the memory pool (after checking for conflicts). While mining, only the transactions which are in the pool are considered. What happens to the ...
3
votes
1answer
799 views

What are the trade-offs between the different algorithms for deciding which UTXOs to spend?

When someone would like to make a transaction, their software has to choose which of their UTXOs to spend. Here are a few different ways that one might prioritize which UTXOs get spent. Oldest UTXOs ...
11
votes
4answers
3k views

Why do outputs need to be spent entirely?

I understand what change is and how it works (and it's analogous to physical money change), but what I don't understand is why this is needed in the first place. Given that this is all computer based,...
6
votes
1answer
1k views

How to index the UTXO set efficiently?

I haven't been able to find information on how to efficiently index UTXOs. Can you explain or point me to some resources? Update: Btw, I understand completely that the notion of address balance is ...
6
votes
1answer
1k views

Can the outputs of transactions with duplicate hashes be spent?

I've noticed that there are two transaction hashes that appear more than once in the blockchain. The reason for this is understandable: they sent mining rewards to the same address. These transactions ...
3
votes
2answers
2k views

How to check if an output has been spent?

Using an rpc client (e.g. bitcoin-cli), for a given transaction and index of an output of it, how can I tell if the output is currently an utxo, or if it has already been spent? In the latter case, I'...
1
vote
1answer
500 views

OP_EQUALVERIFY: non-equal data

I'm trying to push the following transaction but keep getting OP_EQUALVERIFY: non-equal data Here's the transaction ...
6
votes
2answers
7k views

How is a Transaction Output Marked as Spent?

The Bitcoin developer guide states that each output of a particular transaction can only be used as an input once in the block chain. Any subsequent reference is a forbidden double spend—an ...
5
votes
1answer
325 views

How many UTXOs have a marginal fee cost that's higher than its worth?

I define marginal fee cost as the number of bytes required to add that UTXO as an input to a TX multiplied by the satoshi/byte rate of the blocks being found. So for a normal p2pkh UTXO, this would ...
10
votes
1answer
3k views

With 100% segwit transactions, what would be the max number of transaction confirmation possible on a block?

With 100% segwit transactions, what would be the max number of transaction confirmation possible on a block? And, how many utxo can be updated by a block full of segwit transactions?
8
votes
1answer
3k views

Why is Bitcoin Core using LevelDB instead of Redis or SQLite?

Why did Core move from BDB to LevelDB? Why don't they use SQLite or move to Redis now? Is there a technical reason for this choice?
11
votes
1answer
2k views

How many unspent transaction outputs are there?

I was wondering the other day how many unspent transaction outputs there are ? If you just keep track of the unspent transaction outputs you could import private keys, know its balance and perform ...
3
votes
1answer
3k views

Do all Tx's have UTXO?

I am trying to understand how UTXO works. I came up with these charts https://statoshi.info/dashboard/db/unspent-transaction-output-set I don't understand why the 1st chart (total Tx's with unspent ...
3
votes
1answer
259 views

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

Let's say bitcoin node has 100 blocks. Then he recieve another two blocks. Now it have 102 blocks. But now he recieve block 103. And this block is from another chain and our node have to remove blocks ...
2
votes
2answers
1k views

How can a miner verify that a UTXOs is not spent elsewhere?

How does a miner verify that a UTXO is not spent somewhere else, wouldn't he have to search the entire blockchain from that UTXO and onwards to see if this was the case? Assuming any real scale this ...
8
votes
1answer
799 views

What are the main technical hurdles to implementing UTXO commitments?

Commits of the UTXO set in the block header would enable more secure lightweight clients and caps on the number of blocks that need to be downloaded and validated in the Initial Blockchain Download, ...
4
votes
3answers
1k views

How is it possible to say that a bitcoin was fully spent?

Is a simple question, but I want to understand this at the low level. Since the UTXO is a database with the yet-to-be-spent coins, how can I say that a given coin was already full spent? What would ...
4
votes
1answer
283 views

Why does Bitcoin use the input/output system?

Why don't we just use balances? The nodes would verify that balance > 0 before validating the transaction.
3
votes
1answer
35 views

What are the downsides of integrating accumulators like utreexo to bitcoind?

Inspired by the discussion in this question I wonder what would be the downsides of adding accumulators like utreexo (paper at: https://eprint.iacr.org/2019/611.pdf) to bitcoind? On the positive ...
3
votes
1answer
89 views

Do you 'own' Bitcoins purchased via an exchange?

I have been told by some that bitcoin exchanges do NOT record BTC transactions by a buyer/seller on the blockchain, but rather hold them in their own name and ledger - eg, if I buy one BTC via an ...
2
votes
1answer
381 views

utxo vs account-model [duplicate]

There are two possible models, the UTXO model and the account model. Each has advantages and disadvantages. Bitcoin chose the UTXO model. XRP and Ethereum for example use an account model. What are ...
2
votes
4answers
2k views

Why do some transactions have more than one input?

I know a normal transaction has 1 input and 2 outputs (if there is change that is the second output). But what about this scenario? Lets say I'm withdrawing bitcoin from my gemini account and want ...
2
votes
3answers
790 views

What is the best way to download a “recent” UTXO set snapshot?

I am using bitcoinj to listen for payments. I need a way to maintain the entire UTXO set in a local database. Can bitcoinj be used to download every block (I think it downloads only recent blocks ...
2
votes
1answer
423 views

State of transaction and UTXO

What I have learned is that state is an abstract thing and is maintained by the node locally and the state of the current blockchain can be reached by starting all the way from the genesis block and ...
1
vote
1answer
453 views

Specification of Transaction Inputs - Bitcoin vs Ripple

In Bitcoin, the transaction inputs (UTXOs) are specified as a tuple (transaction index, vout) since there is no notion of an account in the bitcoin system and the address (pointed to by vout) alone ...
0
votes
1answer
798 views

what happens to UTXOs when a transaction output script is satisfied?

As per my understanding from the book "Mastering bitcoin", a transaction output contains three things Amount - Bitcoin Value in Satoshis Locking-Script-Size - Locking-Script length in bytes, to ...