pull down to refresh
10 sats \ 0 replies \ @Murch 9h \ parent \ on: Quick questions about OP_RETURN? Quick answers here. bitcoin
The UTXO set represents all spendable balances of Bitcoin users on the network. Every full node must retain the entire UTXO set.
The blockchain represents the entire transaction journal of the UTXO set. The blockchain is used by new nodes to work out the current UTXO set and converge on the shared state of the network. The network as a whole needs to retain the blockchain, but individual nodes may prune most of the blockchain data after IBD.
Each node maintains its own mempool to keep track of unconfirmed transactions. Nodes use the mempool to reconstruct the full block from compact block announcements, to build block templates for mining, to estimate feerates, and to announce unconfirmed transactions to their peers. Optimally, nodes retain all unconfirmed transactions in their mempools that are expected to appear in blocks to front-load transaction validation to speed up block validation and relay.
Both OP_RETURN outputs and witness data are only relevant to transaction validation and need to be retained for a full copy of the blockchain. Neither of the two is retained in the UTXO set. Data payloads in OP_RETURN outputs and witness stacks are cheap to validate as they both appear in unexecuted sections of scripts. Either will be pruned by pruned nodes when the node moves sufficiently far past the block containing the transaction.