Login to reply
Replies (6)
Yes. "We don't care" doesn't mean "bytes not read" on validation. The bytes don't magically disappear. They are pruned post script read.
Can you show me what lines of code read the OP_RETURN data?
This actually took we quite a while because the serialization, Output definitions, and where it is added to the output stream is like 4 different files.
SERIALIZE_METHODS is a macro that writes both nValue and scriptPubKey(including the OP_RETURN and all its data push to the transaction output stream.

GitHub
bitcoin/src/primitives/transaction.h at 919e6d01e93a57d991ed456bc67c43605583ada8 · bitcoin/bitcoin
Bitcoin Core integration/staging tree. Contribute to bitcoin/bitcoin development by creating an account on GitHub.
Need to unpack that macro more
Just think logically, if the data is retrievable later (the whole point of saving the arbitrary data in the first place) it has to be saved somewhere and passed to the next node.
Yes, for the purposes of creating and parsing UTXOs the OP_RETURN data is not needed but, it is still read and written to memory.
Right be what are you deserializing as indicatea
the intent.
There is already case law on this.