OP_CC: A simple introspection opcode to enable cheaper consolidations

@reardencode: I think you’re correct in the sense that OP_CCV supports consolidations with the following input parameters:

  • mode: CCV_MODE_CHECK_OUTPUT
  • taptree: -1 (current input taptree merkle root)
  • pk: -1 (current input internal key)
  • index: 0 (first output)
  • data: empty

The problem is that the consolidation transaction can only roll value forward into the same contract. To pay a third party (new SPK), you need a second transaction spending the consolidated output.