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
31
votes
2answers
45k views

What is an “unspent output”?

What is the meaning of the term "unspent output" in the Bitcoin protocol?
15
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
11k 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 ...
7
votes
1answer
554 views

Why is there no such thing as a redirected, forged, or fake transaction?

In the past, we had numerous questions about "fake" or "forged" transactions. Such transactions could supposedly be created even without holding any bitcoins, yet would end up in the mempool or even ...
14
votes
6answers
4k views

Why is there “Change” in Bitcoins?

I have read about a change address and wondered why there even is the concept of change? Let's say I received 1 BTC from some person A and I want to send 0.4 BTC to another person B, afterwards. From ...
25
votes
1answer
12k 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 ...
5
votes
1answer
1k 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 ...
7
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
1k 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,...
0
votes
1answer
158 views

Comparing UTXO transactions with Accounts transactions

I have seen few websites that compare number of transactions and fees between Bitcoin and Ethereum. Examples: https://www.flippening.watch/ and https://cryptofees.info/ What does the high number of ...
13
votes
1answer
4k 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 ...
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 ...
7
votes
2answers
3k 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'...
8
votes
1answer
2k 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 ...
1
vote
1answer
571 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 ...
3
votes
2answers
5k views

What does “Uneconomical UTXO requested” mean?

I'm using the btc.com wallet and I want send 0.001 btc to another address but I'm facing this error: Uneconomical UTXO requested [type: 1 (limit 6831), txOut.val: 5897, required: 98140] What does it ...
1
vote
1answer
390 views

How would you create child pay for parent in bitcoind-cli

I have unconfirmed transactions in my bitcoind wallet. Some of the are mine and some are incoming third party transactions. I want to speed up their confirmation by creating CHPFP transaction - ...
12
votes
1answer
4k 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?
5
votes
1answer
419 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 ...
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 ...
9
votes
1answer
5k 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?
6
votes
2answers
1k views

How to find all UTXOs?

It is known, that UTXOs stored in chainstate database. But how to get them in simple txt view? Not ballances, but each UTXO.
4
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
411 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 ...
1
vote
1answer
238 views

How does Bitcoin protect against doublespends?

I am trying to understand the blockchain and I have read a bunch of these explanations, but they all don't address some of the questions I am still wondering about. So first I'll explain what I know, ...
1
vote
3answers
215 views

Best way to find list of UTXO related to xpub

Apparently the way to find a list of UTXO related to an xpub is to derive all addresses from the master private key and query a node with each and every one of them. It is possible to generate ...
8
votes
1answer
976 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
1answer
333 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.
4
votes
3answers
2k 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
115 views

What does the index of an UTXO stand for?

For example, here is the output of an API I hit with one of my testnet UTXOs. What is the meaning of the index field in this context ? "utxo":[ { "block_id":1899516, ...
3
votes
1answer
104 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
530 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 ...
2
votes
1answer
90 views

How is the UTXOs of each partially-spent TxIn determined?

My current understanding of a transaction is as follows: a transaction (Tx) can have multiple inputs (which are previous unspent transactions = UTXOs), let's call them the TxIn a Tx can have multiple ...
2
votes
3answers
1k 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
4answers
3k 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
1answer
485 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 ...
1
vote
1answer
116 views

Spending UTXO from same block

Block 546 is the first time a (actually two) transaction spends the UTXO of a transaction from the same block. Is the order important? (The transaction that generates the UTXO has to appear before in ...
1
vote
1answer
72 views

Why are UTXO locks stored in memory only?

Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list is always cleared (by virtue of process exit) when a node stops or fails. https://bitcoincore.org/en/...
1
vote
1answer
622 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
40 views

What were some discussed and current potential issues with pre-forked Bitcoin coins from August 2017 that have never moved since then?

I was speaking to a friend that mentioned that there were issues with pre-forked Bitcoin coins from Aug 2017 that never moved. He wouldn't tell me exactly what the potential issue was, but what were ...
0
votes
1answer
2k 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 ...
0
votes
1answer
668 views

How to quickly get the balance of any bitcoin address? (with no third-party API)

As some people have mentioned (eg. here), the only way to get the balance of an address in bitcoin core was to import it as a watch-only address and rescan the blockchain. Starting with bitcoin core ...