To prevent arbitrary data storage in txouts — The Ultimate Solution



Summary:

A new address type, P2SH^2 has been defined which is similar to P2SH but instead of H(ScriptPubKey), it is H(H(ScriptPubKey)). This means that a P2SH^2 address is a hash of a P2SH address. To relay a P2SH^2, a relay rule has been made where the inner P2SH address must be included. All nodes can verify this by hashing it. If miners mine P2SH^2 addresses without relaying the P2SH and just want the fees, a block discouragement rule will be introduced where a block is discouraged if it is received without receiving the P2SH^2 pre-images for it. This change ensures that there is no non-prunable location for users to cram data into except values. Additionally, the inefficiency of cramming data into values acts as a strong deterrent in any case. The same thing could also be done for OP_RETURN PUSH value outputs used to link transactions to data. In this case, the data would be a hash outside of the transaction, and the preimage of the hash would be included.


Updated on: 2023-05-19T16:47:05.101433+00:00