Rollback Last Output

From Open Transactions
Revision as of 14:41, 22 October 2014 by Justusranvier (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This procedure is used if a transaction has exceeded the size limit, and can be brought back under the limit by removing the most-recently added output and the inputs needed to support it from the transaction

The removed inputs and outputs will be added to the beginning of a new transaction.

This procedure will remove one more input than is required to bring the transaction below size limits, and then add exactly one more. This will always result in a valid transaction because the only way to reach this procedure is by having successfully completed at least one Add Next Output cycle for the current transaction prior to adding an output or input that pushes the transaction over the size limit.

Initial Conditions

  • An oversize transaction contains one or more outputs and their supporting inputs which do not exceed transaction size limits, and one output which does not.
  • The number of inputs which are solely dedicated to satisfying the most recently-added output (not required for previous outputs) may be zero or more.


  1. Remove the most-recently added output from the transaction and return it to the output stack.
    • This will cause the output to be the first one added to the next transaction.
  2. Remove the most-recently added input from the transaction and return it to the input stack.
  3. If the sum of input values exceeds the sum of output values by an amount greater than the required transaction fee:
    • Continue removing inputs one at a time until the sum of the input values falls below the needed output + transaction fee value.
  4. Add the next input from the stack to the transaction.
  5. Perform the Finalize Transaction procedure.
  6. Initialize a new transaction.