public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: ZmnSCPxj <ZmnSCPxj@protonmail•com>
To: John Light <bitcoin-dev@lightco•in>
Cc: bitcoin-dev@lists•linuxfoundation.org
Subject: Re: [bitcoin-dev] Pull-req to remove the arbitrary limits on OP_Return outputs
Date: Tue, 08 Aug 2023 01:34:56 +0000	[thread overview]
Message-ID: <zRqaOKsqiX1ahuSJJzxYK0GrEBxg8BV2u6W6hdFljbYr_2-nwJTVY05atvdLEBl5gmdEBPynxr-QcT2BcPzf2jsX6sM0hP9oPy-8XRgpl3o=@protonmail.com> (raw)
In-Reply-To: <00feb0f1-ec5a-4fc2-8bff-5acf8616e458@app.fastmail.com>

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


  reply	other threads:[~2023-08-08  1:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 20:35 John Light
2023-08-08  1:34 ` ZmnSCPxj [this message]
2023-08-09 13:06 ` Murch
  -- strict thread matches above, loose matches on Subject: below --
2023-08-03 11:42 Peter Todd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='zRqaOKsqiX1ahuSJJzxYK0GrEBxg8BV2u6W6hdFljbYr_2-nwJTVY05atvdLEBl5gmdEBPynxr-QcT2BcPzf2jsX6sM0hP9oPy-8XRgpl3o=@protonmail.com' \
    --to=zmnscpxj@protonmail$(echo .)com \
    --cc=bitcoin-dev@lightco$(echo .)in \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox