• BigBlockIfTrue's avatar
    Tachyon: Allow multiple OP_RETURN outputs in a transaction · 58ee973d
    BigBlockIfTrue authored
    After the Tachyon upgrade, a standard transaction can now use any number
    of data carrier outputs, as long as the total script size of these
    outputs does not exceed the pre-existing limit of 223 bytes. The number
    223 remains user-configurable (`-datacarriersize=<n>`).
    
    Cumulative size of OP_RETURN outputs is counted in a
    `CScript::size_type` (currently `uint32_t`) and checked only once at the
    end (for optimal performance for standard transactions). Because of the
    consensus and standardness transaction size limits, there is no risk of
    overflow. The new per-transaction size check makes the old per-output
    size check redundant, also before the upgrade, and hence the latter has
    been removed.
    
    Specification effort:
    https://bitcoincashresearch.org/t/multiple-op-returns-this-time-for-real/315
    
    Includes tests:
    
    * Unit test for both pre-upgrade and post-upgrade standardness logic.
    * Functional test for activation, based on the OP_RETURN limit increase
    in the...
    58ee973d
policy.cpp 5.84 KB