From 9a7a34df164b53d55c5d42afd253c1c466af47fd Mon Sep 17 00:00:00 2001 From: Derek Leung Date: Tue, 24 Sep 2019 11:53:10 -0400 Subject: [PATCH 1/5] Introduce transaction execution locks. --- dev/html/ledger.html | 4 +++- dev/ledger.md | 9 ++++++++- dev/pdf/ledger.pdf | Bin 326310 -> 327162 bytes 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dev/html/ledger.html b/dev/html/ledger.html index 5b0ceb9..4c4dd8c 100644 --- a/dev/html/ledger.html +++ b/dev/html/ledger.html @@ -170,6 +170,7 @@

Transactions

  • The sender \(I\), which is an address which identifies the account that authorized the transaction.

  • The fee \(f\), which is a 64-bit integer that specifies the processing fee the sender pays to execute the transaction.

  • The first round \(r_1\) and last round \(r_2\) for which the transaction may be executed.

  • +
  • The lock \(x\), which is an optional 32-bit integer specifying mutual exclusion . If \(x \neq 0\) (i.e., \(x\) is set) and this transaction is confirmed, then this transaction prevents another transaction with the lock set to the same value from being confirmed until \(r_2\) is confirmed.

  • The genesis identifier \({\mathrm{GenesisID}}\) of the ledger for which this transaction is valid. The \({\mathrm{GenesisID}}\) is optional.

  • The genesis hash \({\mathrm{GenesisHash}}\) of the ledger for which this transaction is valid. The \({\mathrm{GenesisHash}}\) is required.

  • The note \(N\), a sequence of bytes with length at most \(N_{\max}\) which contains arbitrary data.

  • @@ -217,7 +218,7 @@

    Transaction Sequences, Sets, and T \{{\mathrm{Hash}}({\mathrm{Tx}}) | {\mathrm{Tx}}\in {\mathrm{TxSeq}}_r\}.\] The transaction tail is part of the ledger state but is distinct from the account state and is not committed to in the block.

    Validity and State Changes

    The new account state which results from applying a block is the account state which results from applying each transaction in that block, in sequence. For a block to be valid, each transaction in its transaction sequence must be valid at the block's round \(r\) and for the block's genesis identifier \({\mathrm{GenesisID}}_B\).

    -

    For a transaction \[{\mathrm{Tx}}= ({\mathrm{GenesisID}}, {\mathrm{TxType}}, r_1, r_2, I, I', I_0, f, a, N, {\mathrm{pk}}, {\mathrm{nonpart}})\] to be valid at the intermediate state \(\rho\) in round \(r\) for the genesis identifier \({\mathrm{GenesisID}}_B\), the following conditions must all hold:

    +

    For a transaction \[{\mathrm{Tx}}= ({\mathrm{GenesisID}}, {\mathrm{TxType}}, r_1, r_2, I, I', I_0, f, a, x, N, {\mathrm{pk}}, {\mathrm{nonpart}})\] to be valid at the intermediate state \(\rho\) in round \(r\) for the genesis identifier \({\mathrm{GenesisID}}_B\), the following conditions must all hold: