ZmnSCPxj [ARCHIVE] on Nostr: š
Original date posted:2023-08-07 šļø Summary of this message: The question is ...
š
Original date posted:2023-08-07
šļø Summary of this message: The question is about whether there are tools available for full node operators to prune `OP_RETURN` data from their nodes. The answer explains that `OP_RETURN` outputs are already pruned and discusses the concept of pruning in the context of the UTXO database.
š Original message:
Good morning John Light,
> 2. Documentation about OP_RETURN says that OP_RETURN outputs are "provably-prunable".[2] A question I had about this was, are there any tools available that a full node operator could use to prune this data from their nodes?
As I understand it, `OP_RETURN` outputs are already pruned, in the sense that they are never put in the UTXO database in the first place.
Indeed, as I understand it, "pruning" in this context is about removing (or not inserting at all, in the case of `OP_RETURN`) from the UTXO database.
UTXO database is best to keep small to reduce lookups of UTXOs being spent, as that impacts speed of validation.
Archival nodes still retain the raw `OP_RETURN` data as part of the raw block data, as it is necessary to prove that those transactions are (1) valid transactions and (2) part of (i.e. in the Merkle tree of) a valid block on the block header chain.
Block-pruning nodes also still retain this data, as they can at least serve recent blocks with the same requirement of proving that transactions containing `OP_RETURN` are valid transactions in a valid block on the block header chain.
If you want to prove that a block is valid, you need to present even `OP_RETURN` data, as you need to be able to show the actual transaction containing it, so that the verifier can see that the transaction is correctly formatted and its txid matches the supposed location in the Merkle tree.
Block relay requires that the node relaying a block prove that that block is indeed valid, thus you need to retain the `OP_RETURN` data.
Thus, in this context "pruning" refers to not keeping `OP_RETURN` TXOs in the UTXO database.
Regards,
ZmnSCPxj
Published at
2023-08-08 13:54:11Event JSON
{
"id": "97d9ded780592937392da1bddd3ed591fc5e27af38302f8d3625e46036d063f9",
"pubkey": "4505072744a9d3e490af9262bfe38e6ee5338a77177b565b6b37730b63a7b861",
"created_at": 1691502851,
"kind": 1,
"tags": [
[
"e",
"44921983c1528fb9634a706635d283e97ae3ba5ad2863f78e5d881712ad31987",
"",
"root"
],
[
"e",
"b60d807bd39dc13111112b51f7bf939abdbcbb53062d39add44c8e8321a2e07f",
"",
"reply"
],
[
"p",
"1421b7657e4db9951c0868dd606979829960dd04d41c735bf1c16b906290e5aa"
]
],
"content": "š
Original date posted:2023-08-07\nšļø Summary of this message: The question is about whether there are tools available for full node operators to prune `OP_RETURN` data from their nodes. The answer explains that `OP_RETURN` outputs are already pruned and discusses the concept of pruning in the context of the UTXO database.\nš Original message:\nGood morning John Light,\n\n\u003e 2. Documentation about OP_RETURN says that OP_RETURN outputs are \"provably-prunable\".[2] A question I had about this was, are there any tools available that a full node operator could use to prune this data from their nodes?\n\nAs I understand it, `OP_RETURN` outputs are already pruned, in the sense that they are never put in the UTXO database in the first place.\nIndeed, as I understand it, \"pruning\" in this context is about removing (or not inserting at all, in the case of `OP_RETURN`) from the UTXO database.\nUTXO database is best to keep small to reduce lookups of UTXOs being spent, as that impacts speed of validation.\n\nArchival nodes still retain the raw `OP_RETURN` data as part of the raw block data, as it is necessary to prove that those transactions are (1) valid transactions and (2) part of (i.e. in the Merkle tree of) a valid block on the block header chain.\nBlock-pruning nodes also still retain this data, as they can at least serve recent blocks with the same requirement of proving that transactions containing `OP_RETURN` are valid transactions in a valid block on the block header chain.\n\nIf you want to prove that a block is valid, you need to present even `OP_RETURN` data, as you need to be able to show the actual transaction containing it, so that the verifier can see that the transaction is correctly formatted and its txid matches the supposed location in the Merkle tree.\nBlock relay requires that the node relaying a block prove that that block is indeed valid, thus you need to retain the `OP_RETURN` data.\nThus, in this context \"pruning\" refers to not keeping `OP_RETURN` TXOs in the UTXO database.\n\nRegards,\nZmnSCPxj",
"sig": "d68994b501a7695078788835534ce485084dfa10d2cc193396212b3fe92063640a1459230785024ccb83e310982b9523f4ac889cfbbbf938477ab34cf5f7506e"
}