Oversize Transaction

From Open Transactions
Revision as of 14:43, 22 October 2014 by Justusranvier (talk | contribs)
Jump to navigation Jump to search

An oversize transaction may occur while attempting to add inputs to satisfy an output which has been added to a transaction as part of the Add Next Output step.

Even with the worst case of high m and/or n values, inputs will never be large enough that a transaction can be oversized while attempting to add the first input to a transaction.

Oversize transactions will have one change output, at least one non-change output, and many inputs.

If an oversize has two or more non-change outputs, then Add Next Output was successful for the previous output. In this case, the transaction was valid before attempting to add the current output, so the current output should be removed from the current transaction and moved to the next one.

Otherwise, the transaction has become too large while adding its first non-change output. This can happen due to a series of small inputs, or a large output, or a combination of the two. In this case the outBailment can not be satisfied with a single transaction and must be split across multiple transactions.

Initial Conditions

  • The Add Next Output procedure has created a transaction that exceeds size limits, in one of the following circumstances:
    • Immediately upon adding an output to the transaction
      • The transaction contains other outputs which were added successfully. All inputs currently in the transaction are required to satisfy the previous output(s) before the output that failed.
    • After adding the first input to the transaction to satisfy an output
      • The transaction contains other outputs which were added successfully. All inputs currently in the transaction are required to satisfy the previous output(s) before the output that failed.
    • After having added at least one input to the transaction to satisfy an output without causing an oversize condition.
      • At least one of the inputs in this transaction are only required to satisfy the current output, not any previous outputs (if any exist).

Procedure

  1. Count the number of non-change outputs in the transaction.
  2. If the number exceeds one, follow the Rollback Last Output procedure.
  3. If the number is one, follow the Split Output procedure.