Difference between revisions of "Initialize New Transaction"

From Open Transactions
Jump to navigation Jump to search
(Created page with "<div style="float: right"><include iframe src="https://www.lucidchart.com/documents/embeddedchart/506ed019-070c-44d6-b5e4-994169ab0704" width="150" height="450" frameborder="0...")
 
(Sequence)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div style="float: right"><include iframe src="https://www.lucidchart.com/documents/embeddedchart/506ed019-070c-44d6-b5e4-994169ab0704" width="150" height="450" frameborder="0" scrolling="yes" /></div>
+
<div style="float: right"><include iframe src="https://www.lucidchart.com/documents/embeddedchart/506ed019-070c-44d6-b5e4-994169ab0704" width="150" height="250" frameborder="0" scrolling="yes" /></div>
  
 
==Initial Conditions==
 
==Initial Conditions==
Line 7: Line 7:
 
==Sequence==
 
==Sequence==
  
# Create a minimal transaction skeleton with a header and one change output.
+
# Create a minimal transaction skeleton with a header and no inputs or outputs.
## The change output will be the last output of the transaction, but the number of other outputs in this transaction is not yet known.
+
## We expect the transaction to have one change output, but it can not be added yet since it should appear last.
 
## The change output must be included in the skeleton for transaction size calculations.
 
## The change output must be included in the skeleton for transaction size calculations.
## The position index for the change output is nil.
 
## The first non-change output for the transaction will be placed at position index 0.
 
  
 
After creating the transaction skeleton, and after any action which alters it, the new transaction size (bytes) and minimum required transaction fee must be recalculated.
 
After creating the transaction skeleton, and after any action which alters it, the new transaction size (bytes) and minimum required transaction fee must be recalculated.
 +
 +
===Size checking===
 +
Size checking is performed by creating a copy of the transaction, adding a dummy change output, and verifying that the transaction fits within all applicable limits.
  
 
[[Category:Transaction Construction Algorithm (voting pools)|03]]
 
[[Category:Transaction Construction Algorithm (voting pools)|03]]

Latest revision as of 11:01, 4 November 2014

Initial Conditions

  • There are no pending transactions in the process of being constructed, either because this is the first transaction of the algorithm or because a previous pending transaction has been moved to the finished transaction list.

Sequence

  1. Create a minimal transaction skeleton with a header and no inputs or outputs.
    1. We expect the transaction to have one change output, but it can not be added yet since it should appear last.
    2. The change output must be included in the skeleton for transaction size calculations.

After creating the transaction skeleton, and after any action which alters it, the new transaction size (bytes) and minimum required transaction fee must be recalculated.

Size checking

Size checking is performed by creating a copy of the transaction, adding a dummy change output, and verifying that the transaction fits within all applicable limits.