<p>One way of looking at validation (in Bitcoin, and related systems) is to see the UTXO set as the primary data set a node operates on. Blocks are simply &quot;patches&quot; to the UTXO set, saying what entries can be deleted from it, and which new ones to create. Of course, blocks are more than that; they are also <em>authenticated</em> - they carry data with them to prove that said patches were legitimate.</p>
<p>Pruning is simply the practice of forgetting the patches after they've been applied. The patches can be forgotten, because they are not needed for future validation. Everything the node will need in the future is in the UTXO set.</p>
<p>In Bitcoin, the UTXO set contains entries of the form (<code>txid</code>, <code>vout_index</code>, <code>amount</code>, <code>scriptPubKey</code>). The <code>txid</code> and <code>vout_index</code> identity which transaction and which output of that transaction created the UTXO. The <code>amount</code> is the number of satoshis the UTXO is worth, and the <code>scriptPubKey</code> controls who has the ability to spend it. Transactions (and blocks) in addition also contain a <code>version</code>, a <code>locktime</code>, and transaction inputs (each with various fields, including signatures in <code>scriptSig</code> and <code>witness</code>). None of these things make it into the UTXO set precisely because they don't matter in the future; they're only relevant for determining whether the transaction/block (patch) is valid at the time it is applied.</p>
<p>What changes in Confidential Transactions? The <code>amount</code> is replaced with a Pedersen commitment, both in transactions themselves and in the UTXO set. So this is indeed kept for future validation (it's in the UTXO set, so it is not removed by pruning blocks). Transaction outputs in CT also have a <code>range_proof</code>. What about that? Its function is to guarantee that the sum of the (hidden) transaction output values does not exceed that of the UTXOs being spent. Similar to signatures, this data is only needed at validation time. Once applied, it can be forgotten. Thus, it is not included in the UTXO set, and unavailable after pruning.</p>

CC BY-SA 4.0
2021-07-01T03:35:19.073Z
Is it correct that we assume/prove the crypto does it's job and the total amount bitcoin inside the sidechain is the same but at the same time we cannot calculate/view the total sum.
Cisco Mmu
CC BY-SA 4.0
2021-07-01T04:27:07.480Z
You can see the amount going in and out, but you can't verify that against the UTXO set.
Pieter Wuille
CC BY-SA 4.0
2021-08-04T14:32:41.293Z
@pieter-wuille What do you mean by "you"? I thought the point of CTs is that an independent observer cannot see the in/out amounts
DeLorean88
CC BY-SA 4.0
2021-08-04T14:48:48.850Z
This comment was about the 2 way peg mechanism in combination with CT. You (third party full node validator) can see all amounts being transferred from/to the Bitcoin chain, but once on the sidechain under CT control, you cannot just sum up the values of the UTXOs there, or compare it with the amount that apparently entered and exited.
Pieter Wuille
CC BY-SA 4.0
2021-06-30T16:48:50.943Z
2021-06-30T16:48:50.943Z
Pieter Wuille
<p>There's no limitation on CT outputs being pruned. Their value is ambiguous (stated as a range of values), the state of being spent or not is public the same as any output.</p>

CC BY-SA 4.0
2021-06-30T15:33:29.250Z
I am very confused, if all the range proof is pruned, when i got fund from someone! how do I verify it. how does the side chain operator verified that no extra coin is minted if all those proofs in the blockchain are pruned. ? How do I verified a chain of transactions if these Pedersen commitment and range proofs are removed?
Cisco Mmu
CC BY-SA 4.0
2021-06-30T15:46:21.523Z
What is pruned is the blockchain data after verifying. The UTXO set is kept separate, with the data necessary for verification of future transactions/blocks. Pedersen commitments take the place of amounts, so those go in the UTXO set and are kept. Range proofs are only necessary to verifying the transaction they are in, and can be pruned after verification.
Pieter Wuille
CC BY-SA 4.0
2021-07-01T03:28:51.363Z
ok tq! I will read a few times to understand it
Cisco Mmu
CC BY-SA 4.0
2021-06-30T15:24:15.693Z
2021-06-30T15:24:15.693Z
Claris
<p>From a bitcoin full node, we can prune the blockchain from 350GB to 7GB (as of 30thJune2021) by storing the latest UTXO set plus maybe 120 latest block (for possible orphaning or block reorganization).
Can pruning be done for blockchain that involves confidential transactions (Liquid network) since there are range-proof and pedersen commitment?</p>

<pruning><confidential-transactions>
Can Confidential Transaction in Liquid Network Blockchain be pruned
Cisco Mmu
# Can Confidential Transaction in Liquid Network Blockchain be pruned

(Asked by: username_0 on 2021-06-30)

From a bitcoin full node, we can prune the blockchain from 350GB to 7GB (as of 30thJune2021) by storing the latest UTXO set plus maybe 120 latest block (for possible orphaning or block reorganization).
Can pruning be done for blockchain that involves confidential transactions (Liquid network) since there are range-proof and pedersen commitment?

**Tags:** pruning, confidential-transactions


---

## 2 answers

### Answer by username_1 on 2021-06-30. Score: 2

One way of looking at validation (in Bitcoin, and related systems) is to see the UTXO set as the primary data set a node operates on. Blocks are simply "patches" to the UTXO set, saying what entries can be deleted from it, and which new ones to create. Of course, blocks are more than that; they are also *authenticated* - they carry data with them to prove that said patches were legitimate.

Pruning is simply the practice of forgetting the patches after they've been applied. The patches can be forgotten, because they are not needed for future validation. Everything the node will need in the future is in the UTXO set.

In Bitcoin, the UTXO set contains entries of the form (`txid`, `vout_index`, `amount`, `scriptPubKey`). The `txid` and `vout_index` identity which transaction and which output of that transaction created the UTXO. The `amount` is the number of satoshis the UTXO is worth, and the `scriptPubKey` controls who has the ability to spend it. Transactions (and blocks) in addition also contain a `version`, a `locktime`, and transaction inputs (each with various fields, including signatures in `scriptSig` and `witness`). None of these things make it into the UTXO set precisely because they don't matter in the future; they're only relevant for determining whether the transaction/block (patch) is valid at the time it is applied.

What changes in Confidential Transactions? The `amount` is replaced with a Pedersen commitment, both in transactions themselves and in the UTXO set. So this is indeed kept for future validation (it's in the UTXO set, so it is not removed by pruning blocks). Transaction outputs in CT also have a `range_proof`. What about that? Its function is to guarantee that the sum of the (hidden) transaction output values does not exceed that of the UTXOs being spent. Similar to signatures, this data is only needed at validation time. Once applied, it can be forgotten. Thus, it is not included in the UTXO set, and unavailable after pruning.

> **Comments:**
> **username_0**: Is it correct that we assume/prove the crypto does it's job and the total amount bitcoin inside the sidechain is the same but at the same time we cannot calculate/view the total sum.  
> **username_1**: You can see the amount going in and out, but you can't verify that against the UTXO set.  
> **username_2**: @username_1-username_1 What do you mean by "you"? I thought the point of CTs is that an independent observer cannot see the in/out amounts  
> **username_1**: This comment was about the 2 way peg mechanism in combination with CT. You (third party full node validator) can see all amounts being transferred from/to the Bitcoin chain, but once on the sidechain under CT control, you cannot just sum up the values of the UTXOs there, or compare it with the amount that apparently entered and exited.  

---

### Answer by username_3 on 2021-06-30. Score: 0

There's no limitation on CT outputs being pruned. Their value is ambiguous (stated as a range of values), the state of being spent or not is public the same as any output.

> **Comments:**
> **username_0**: I am very confused, if all the range proof is pruned, when i got fund from someone! how do I verify it. how does the side chain operator verified that no extra coin is minted if all those proofs in the blockchain are pruned. ? How do I verified a chain of transactions if these Pedersen commitment and range proofs are removed?  
> **username_1**: What is pruned is the blockchain data after verifying. The UTXO set is kept separate, with the data necessary for verification of future transactions/blocks. Pedersen commitments take the place of amounts, so those go in the UTXO set and are kept. Range proofs are only necessary to verifying the transaction they are in, and can be pruned after verification.  
> **username_0**: ok tq! I will read a few times to understand it  

---

