<blockquote>
<p><strong>What is arbitrary witness data and unspent transaction output? [...] I'm confused what they mean by UTXO</strong></p>
</blockquote>
<h3>Arbitrary</h3>
<p>Arbitrary means what you think it does - <em>&quot;the data can be anything you choose&quot;</em>. It has to be packaged in an acceptable way and there are limits on size. Part of a Bitcoin transaction input is an unlocking script, these scripts are created by the transaction creator who is spending money. There are various ways they can insert extra data into scripts that have no effect on script execution.</p>
<h3>Witness Data</h3>
<p>An improvement to Bitcoin called Segwit allowed some parts of transactions to be separated (segregated) into a new part called a transaction witness. This allowed the block size in Bitcoin to be increased without affecting older software and prepared for other improvements. The witness data can include scripts and those scripts can contain arbitrary data chosen by the transaction creator. This includes data that has no effect on the Bitcoin transaction itself, other than increasing its size. Some people use this to embed foreign data into the Bitcoin blockchain. This is controversial.</p>
<h3>UTXO</h3>
<p>Bitcoin transactions have inputs and outputs, inputs are references to outputs of earlier transactions. Inputs are thus spending older outputs.   An unspent transaction output is abbreviated UTXO.</p>
<p>These UTXOs represent units of spendable money, like coins. When you spend a UTXO it becomes a spent TXO and is no longer an unspent TXO. So every transaction effectively destroys the UTXOs in its inputs and creates new UTXOs in its outputs. The total value of outputs cannot exceed total value of inputs. Bitcoin nodes keep track of the set of all UTXOs so that they cant be spent twice.</p>

CC BY-SA 4.0
2024-01-08T01:32:57.983Z
Thank you that makes a lot of sense. I still don't properly understand what this sentence means: *"That data is arbitrary because it is not a function of the UTXO (unspent transaction output) set. So bitcoin nodes don’t need to store it."* I just don't understand where the arbitrary data is then stored.
hana
CC BY-SA 4.0
2024-01-08T14:33:01.403Z
The arbitrary data is stored inside an unlocking script for an input, as a series of data-push opcodes (pushing data onto a data-stack) that can never be executed because they are inside an `if false { ... } endif` statement. So these unexecuted pushes never alter the stack and never affect the end-result of the script. A script which evaluates to true means the transaction succeeds and UTXOs are consumed and created. So to normal nodes, script effect is identical to a normal/standard script which lacks the `if false { ... } endif`. The embedded data can't affect the result & so not UTXOs.
RedGrittyBrick
CC BY-SA 4.0
2024-01-08T14:37:30.177Z
If it isn't obvious, think of `if false {...} endif` as `if (2+2 == 5) { ... } endif`
RedGrittyBrick
CC BY-SA 4.0
2024-01-03T10:02:48.330Z
2024-01-04T14:53:53.420Z
2024-01-04T14:53:53.420Z
RedGrittyBrick
<p>I'm learning about bitcoin, and I keep seeing arbitrary witness data and I'm confused what it really means. Like what do they mean about arbitrary, does that just mean the data can be anything you choose? I also saw this sentence somewhere: &quot;It is arbitrary because it’s not a function of unspent transaction output.&quot; And I'm confused what they mean by UTXO? I'm still a beginner so any help would be appreciated!</p>

CC BY-SA 4.0
2024-01-07T14:48:12.553Z
Where did you see this mentioned? It's hard to answer properly without more details. Regarding "UTXO" a simple search on this site would give you https://bitcoin.stackexchange.com/questions/4301/what-is-an-unspent-output.
Antoine Poinsot
<segregated-witness><utxo>
What is arbitrary witness data and unspent transaction output?
Mark
# What is arbitrary witness data and unspent transaction output?

(Asked by: username_0 on 2024-01-03)

I'm learning about bitcoin, and I keep seeing arbitrary witness data and I'm confused what it really means. Like what do they mean about arbitrary, does that just mean the data can be anything you choose? I also saw this sentence somewhere: "It is arbitrary because it’s not a function of unspent transaction output." And I'm confused what they mean by UTXO? I'm still a beginner so any help would be appreciated!

**Tags:** segregated-witness, utxo

> **Comments:**
> **username_1**: Where did you see this mentioned? It's hard to answer properly without more details. Regarding "UTXO" a simple search on this site would give you https://bitcoin.stackexchange.com/questions/4301/what-is-an-unspent-output.  

---

## 1 answers

### Answer by username_2 on 2024-01-03. Score: 2

> **What is arbitrary witness data and unspent transaction output? [...] I'm confused what they mean by UTXO**

### Arbitrary

Arbitrary means what you think it does - *"the data can be anything you choose"*. It has to be packaged in an acceptable way and there are limits on size. Part of a Bitcoin transaction input is an unlocking script, these scripts are created by the transaction creator who is spending money. There are various ways they can insert extra data into scripts that have no effect on script execution.

### Witness Data

An improvement to Bitcoin called Segwit allowed some parts of transactions to be separated (segregated) into a new part called a transaction witness. This allowed the block size in Bitcoin to be increased without affecting older software and prepared for other improvements. The witness data can include scripts and those scripts can contain arbitrary data chosen by the transaction creator. This includes data that has no effect on the Bitcoin transaction itself, other than increasing its size. Some people use this to embed foreign data into the Bitcoin blockchain. This is controversial.

### UTXO

Bitcoin transactions have inputs and outputs, inputs are references to outputs of earlier transactions. Inputs are thus spending older outputs. An unspent transaction output is abbreviated UTXO.

These UTXOs represent units of spendable money, like coins. When you spend a UTXO it becomes a spent TXO and is no longer an unspent TXO. So every transaction effectively destroys the UTXOs in its inputs and creates new UTXOs in its outputs. The total value of outputs cannot exceed total value of inputs. Bitcoin nodes keep track of the set of all UTXOs so that they cant be spent twice.

> **Comments:**
> **username_3**: Thank you that makes a lot of sense. I still don't properly understand what this sentence means: *"That data is arbitrary because it is not a function of the UTXO (unspent transaction output) set. So bitcoin nodes don’t need to store it."* I just don't understand where the arbitrary data is then stored.  
> **username_2**: The arbitrary data is stored inside an unlocking script for an input, as a series of data-push opcodes (pushing data onto a data-stack) that can never be executed because they are inside an `if false { ... } endif` statement. So these unexecuted pushes never alter the stack and never affect the end-result of the script. A script which evaluates to true means the transaction succeeds and UTXOs are consumed and created. So to normal nodes, script effect is identical to a normal/standard script which lacks the `if false { ... } endif`. The embedded data can't affect the result & so not UTXOs.  
> **username_2**: If it isn't obvious, think of `if false {...} endif` as `if (2+2 == 5) { ... } endif`  

---

