Skip to content

WIP: Make multiple OP_RETURN standard

Nicolai Skye requested to merge (removed):multiple-op-return-as-standard into dev

This change makes having multiple OP_RETURN outputs on a single transaction a "standard" transaction type. Without this change, multiple OP_RETURNs are considered non-standard and thus are typically not mined by miners.

This change has been discussed in depth here:

and a CHIP for it exists here:

This merge request is marked as "WIP" because the dev branch currently lacks a check to ensure the new standard is only applied after the May 2021 network upgrade. A separate merge request to add such a check exists here: !2452 (closed)

Once such a check exists, one line of code needs to be adjusted in this merge request in order to utilize the check. Otherwise, the changes in this merge request work as expected, and pass the unit tests.

These changes were adapted from the code that user BigBlockIfTrue contributed to the Bitcoin Cash Node project.

Merge request reports