chainqueue

Blockchain transaction queue control
Info | Log | Files | Refs | LICENSE

state.texi (3770B)


      1 @node chainqueue-states
      2 @section State transitions
      3 
      4 Queued transactions are controlled using a combination of state bits, enumerated to human-readable labels.
      5 
      6 Some of these bits may only be set if certain bits have previously been set.
      7 
      8 Certain combinations of bits constitute @emph{semantic} states, intended for human consumption.
      9 
     10 
     11 @subsection State bits
     12 
     13 @table @code
     14 @item QUEUED
     15 Transaction is ready to send to network. 
     16 @item RESERVED
     17 Transaction is assigned to a process which will send it to the network.
     18 @item IN_NETWORK
     19 The transaction has been sent to the network.
     20 @item DEFERRED
     21 A transaction send could not be completed, and should be retried later.
     22 @item GAS_ISSUES
     23 The transaction sender does not have sufficient network token balance to send the transaction.
     24 @item LOCAL_ERROR
     25 The transaction request could not be sent, e.g. because the node was unavailable.
     26 @item NODE_ERROR
     27 The network gateway node rejected the transaction. (will always be a FINAL state).
     28 @item NETWORK_ERROR
     29 The network rejected the state change requested by the transaction (will always be a FINAL state).
     30 @item UNKNOWN_ERROR
     31 Any other error (will always be a FINAL state).
     32 @item FINAL
     33 The transaction request will not be processed further.
     34 @item OBSOLETE
     35 The transaction request has been superseded by a different transaction, e.g. an identical replacement transaction with a higher fee.
     36 @item MANUAL
     37 The state of the transaction request has been manipulated manually.
     38 @end table
     39 
     40 @subsection State bit transitions
     41 
     42 When the @strong{FINAL} bit is set, no further state changes may be made.
     43 
     44 @multitable .25. 75
     45 @headitem bit
     46 @tab precondition
     47 @item QUEUED
     48 @tab @emph{none} | DEFERRED | GAS_ISSUES
     49 @item RESERVED
     50 @tab QUEUED
     51 @item IN_NETWORK
     52 @tab RESERVED
     53 @item GAS_ISSUES
     54 @tab @emph{none}
     55 @item DEFERRED
     56 @tab RESERVED
     57 @end multitable
     58 
     59 
     60 @subsection State semantics
     61 
     62 @subsubsection Clean states
     63 
     64 @multitable .25 .50 .25
     65 @headitem state
     66 @tab description
     67 @tab bits set
     68 @item PENDING
     69 @tab The state of the transaction when it first enters the queue.
     70 @tab (none)
     71 @item READYSEND
     72 @tab Transaction is ready to send to network
     73 @tab QUEUED
     74 @item RESERVED
     75 @tab Transaction is assigned to a process which will send it to the network.
     76 @tab QUEUED, RESERVED
     77 @item SENT
     78 @tab Transaction has been sent to the network
     79 @tab IN_NETWORK
     80 @item SUCCESS
     81 @tab The transaction has successfully changed the network state.
     82 @tab IN_NETWORK, FINAL
     83 @item REVERTED
     84 @tab The transaction was included by the network, but failed to change the network state.
     85 @tab IN_NETWORK, NETWORK_ERROR, FINAL
     86 @end multitable
     87 
     88 
     89 @subsubsection Exception states
     90 
     91 @multitable .25 .50 .25
     92 @headitem state
     93 @tab description
     94 @tab bits set
     95 @item GAS_ISSUES
     96 @tab The transaction sender does not have sufficient network token balance to send the transaction.
     97 @tab GAS_ISSUES
     98 @item RETRY
     99 @tab Transaction should be retried after a grace period
    100 @tab QUEUED, DEFERRED
    101 @item SENDFAIL
    102 @tab The transaction request could not be sent, e.g. because the node was unavailable.
    103 @tab DEFERRED, LOCAL_ERROR
    104 @item REJECTED
    105 @tab The transaction was rejected by the node. 
    106 @tab NODE_ERROR, FINAL
    107 @end multitable
    108 
    109 
    110 @subsubsection Replacement states
    111 
    112 @multitable .25 .50 .25
    113 @headitem state
    114 @tab description
    115 @tab bits set
    116 @item OBSOLETED
    117 @tab A attempt has been made to replace the transaction. 
    118 @tab OBSOLETE[, IN_NETWORK]
    119 @item CANCELLED
    120 @tab A different replacement transaction has been confirmed by the network.
    121 @tab OBSOLETE, FINAL[, IN_NETWORK]
    122 @item OVERRIDDEN
    123 @tab The transaction has been cancelled by an explicit command.
    124 @tab OBSOLETE, FINAL, MANUAL[, IN_NETWORK]
    125 @end multitable
    126 
    127 
    128 @subsection State log
    129 
    130 State transisitons can optionally be logged. This provides a list of date to state bitfield values for every change for every transaction.