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
2
votes
1answer
262 views

Where can I see the code of how the UTXO set is updated in case of a fork in Bitcoin Core?

I am looking for a filename and a line, or multiple ones if necessary. My goal is to maintain an index of addresses to UTXOs.
5
votes
4answers
246 views

What technical properties does a confirmed Tx have that an unconfirmed Tx does not?

From a user perspective, each block confirmation reduces the probability that a transaction payment will be reversed. However from the perspective of the software, what happens when a transaction is ...
2
votes
2answers
7k views

How can the transaction history be checked when new addresses are generated?

When a new transaction is executed via a Bitcoin-client, the sender will have a different address than the ones used in previous transactions. I also know that all the full nodes in the Bitcoin ...
3
votes
1answer
237 views

What's the maximum possible utxo growth rate now? Can that be turned into an attack?

Now bitcoin unspent transaction output growth rate (not total size) can be, 260k utxo/day (3×60×60×24). With 8MB blocks, that's 2.8 million. Single 1 bitcoin output can be split into 1000 x 1 mBTC ...
8
votes
1answer
798 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, ...
2
votes
1answer
178 views

What are spent transactions?

Satoshi's paper says: Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. What are spent transactions?
4
votes
1answer
282 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.
1
vote
1answer
244 views

How fast is BitcoinJ for getting UTXOs(/UnspentTXOuts)?

I'm making an app where I need to be able to get unspent TX outs very quickly for addresses I do not know beforehand. Now this is supported by Bitcoins architecture in that you can have a pruned ...
1
vote
1answer
418 views

Do we need to maintain the ability to do a reorg over 100 blocks?

The protocol requires that freshly generated coins wait 100 blocks before they can be spent in order to avoid polluting bitcoin addresses with bitcoins that are "uncreated" by a reorg that invalidates ...
-1
votes
1answer
344 views

Can bloom filter be used to filter UTXO?

I am thinking about building an spv-like wallet using trusted nodes. It does not download blockchain. Instead, the wallet gets its utxo, transactions,balance data from abe. My question is, can the ...
1
vote
1answer
705 views

How to return change (utxo - inputs) to output address?

I've been learning to create bitcoin transactions for 3 weeks now, but keep paying the entire unspent_outputs - inputs as fees, even if the transacted amount was like 1/100 th of the outputs. How do I ...
7
votes
2answers
696 views

Why must UTXO be completely consumed? [duplicate]

Imagine Alice owns 10 BTC and wants to send 1 BTC to bob, with a 1 BTC miners fee. In the blockchain, the transaction is recorded as "Alice spent 10 bitcoins, 1 goes to Bob, 1 goes to the miner, and ...
1
vote
0answers
613 views

Mempool tracking

I'm trying to clear up some uncertainties around the mempool A tx comes in, its validated, and no other transactions have currently marked any of its inputs. Tx gets added to mempool. If a double ...
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 ...
1
vote
1answer
188 views

Unable To Find Transaction Outpoint

I'm working on a project that involves constructing raw transactions and signing them locally before pushing to the network. I keep getting Unable To Find Transaction Outpoint ...
7
votes
2answers
928 views

How do I uniquely identify a transaction (to protect against malleability)?

Transactions I broadcast can be malleated by anyone watching the mempool (more info here). This rules out using txid for transaction identification. How can I identify my transactions to make sure ...
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 ...
2
votes
1answer
267 views

Why is utxo time a priority for miners?

I've understood (maybe mistakenly) that once free transactions arrived to be collected into new block the miner will prioritize them by fee, then by maturity, meaning will take the transaction with ...
1
vote
2answers
311 views

Using Transaction with multiple outputs

Since the output can be spend only once, I am confused by transactions containing multiple recipients. For example, if Alice transfers 5 BTC to Bob and 5 BTC to David in the same transactions. In the ...
2
votes
1answer
372 views

How is UTXO tracked?

What is the best way to compute UTXO of any address? Do I have to traverse whole block chain each time? Is there a efficient way to compute it?
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.
0
votes
1answer
343 views

How can I find out if a transaction used a specific vout as its input?

I want to know if a certain output is spent. I am not using bitcoind, I do not have a gettxout RPC call available. How can I learn if a vout is referenced as an input somewhere in the blockchain or ...
2
votes
1answer
190 views

Can the coinbase transaction be used to spend an UTXO?

I know the coinbase transaction's input is usually just has a dummy scriptSig, but what if a miner used it to spend an UTXO? Would it be verified as an actual spend, or would the block be rejected?
3
votes
1answer
798 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 ...
1
vote
1answer
246 views

What is the easiest way to associate an utxo to a specific account?

I'm building a web application that uses bitcoind's accounts to track user balances. My dev env is currently in regtest mode. I am working on calculating the network transaction fee prior to creating ...
2
votes
1answer
174 views

How does serializing in coins.h work?

I'm talking specifically about this: /** pruned version of CTransaction: only retains metadata and unspent transaction outputs * * Serialized format: * - VARINT(nVersion) * - VARINT(nCode) * - ...
1
vote
1answer
184 views

Determine which transaction spent a Transaction Output

I will explain my question through an example on the bitcoin testnet network. I am looking at the output at index 0 of this transaction: ...
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 ...
4
votes
1answer
2k views

How can I read chainstate database?

1) What is the format of the LevelDB databases stored in the database directory? I know there are some custom blockchain parsing libraries, such as this one, but I'm wondering if I can just do a read ...
4
votes
1answer
305 views

How can one realistically model the distribution of the network's unspent transaction outputs?

I am working on a simulation to explore the usefulness of a patch for the CoinSelection behaviour of BitcoinCore. To that end, I am looking for statistics on the distribution of unspent outputs ...
2
votes
2answers
714 views

Multiple Addresses in one UTXO

The 'decoderawtransaction' RPC method of the Bitcoin-QT client gives a JSON object with an array of addresses in each UTXO. For example, when I run: decoderawtransaction "...
5
votes
1answer
643 views

BIP32 wallet sync with Bloom filters

I'm working on my SPV library and I still have a hard time figuring how to approach the BIP32 + Bloom filters combination. Here's how I currently sync an existing HD wallet (after fast catch-up): ...
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 ...
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 ...
3
votes
1answer
357 views

Extracting information from utxo for offline processing

I would like to extract as much information about the utxo set (all unspent transactions) up to a given block height, including value and scriptpubkey. This information is meant to be inserted into ...
6
votes
4answers
3k views

How to find utxo?

I might be over thinking this, but I'm trying to figure out the best way to build an unspent output pool. Should I just naively parse every block? Every input gets removed from the hash set, and every ...
4
votes
1answer
144 views

Is it possible (in some way or other) to expire a txout?

I read Contracts: Will this be possible? where part of the question related to expiring a transaction and one of the replies said that it would never be possible since it causes problems. ...
1
vote
1answer
669 views

How do miners/clients prove a transaction is valid? [duplicate]

To prove a transaction is valid, you must prove that the source address has a balance at least as much as the transaction. How does one prove this in a performant manner? The block chain of bitcoin ...
3
votes
2answers
1k views

Why the “Unspent Transaction Output Set” is called “UTXO”, not “UTOS”?

Just out of curiosity, the Wiki says UTXO means "Unspent Transaction Output", but what does each letter mean in the acronym?
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 ...
1
vote
2answers
518 views

Where does Trezor get UTXOs from?

Since UTXOs are required to spend funds, where does Trezor get the unspent outputs from? Storing them in the hardware requires you to plug it in from time to time to update the UTXO set. You could ...
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

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 ...
5
votes
3answers
1k views

Do miners have to hold all the blocks in memory?

Running a miner node, one would have to verify transactions. This includes checking all the inputs of all the transactions. Does this mean that a miner must hold all the block-chain in memory (...
30
votes
2answers
42k views

What is an “unspent output”?

What is the meaning of the term "unspent output" in the Bitcoin protocol?
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 ...