Replies (6)

JackTheMimic's avatar
JackTheMimic 2 months ago
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.
JackTheMimic's avatar
JackTheMimic 2 months ago
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.
JackTheMimic's avatar
JackTheMimic 2 months ago
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.