OP PUSH TX

Revision as of 01:10, 1 April 2022 by Brendan (talk | contribs) (Created page with "OP_PUSH_TX is a catch-all name for techniques that use ECDSA signature messages to enforce stateful conditions in Bitcoin script. The technique requires the use...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OP_PUSH_TX is a catch-all name for techniques that use ECDSA signature messages to enforce stateful conditions in Bitcoin script. The technique requires the user or process that is using the UTXO to push the message used to generate the signature onto the stack as part of the input scriptSig.

This message can be pushed as a single contiguous blob, as multiple separate elements, or as a partial set, with the remaining elements of the message set via the output's scriptPubKey.

The technique allows the process to check several elements of the transaction including (but not limited to):

  1. The parent TXID and index
  2. The number of inputs in the transaction
  3. The nSequence values of those inputs
  4. The value of the input being spent
  5. The value and script of any outputs being generated
  6. The nLocktime condition set for the transaction

In addition, the technique allows users to enforce the script into which the tokens the UTXO being spent will go, which is a crucial step in the creation of Turing complete machines. This is achieved by taking the current script (part of the message) and using it to build an image of the next script in the chain before re-inserting it into the message hash and performing an EC signature in script.

A significant shortcut has been developed that generates a signature using the keypair that corresponds to a private key of 1. In this situation, the signature is simply the hashed message with some simple byte-wise transformations performed.