Skip to content

Commit

Permalink
Clarify that transactions in a group are evaluated, and must be valid…
Browse files Browse the repository at this point in the history
…, individually
  • Loading branch information
algoradam committed Sep 25, 2019
1 parent d4f6ffd commit 7d32d61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ the transactions have nonzero "Group", compute the _TxGroup hash_ as follows:
- Take the hash of each transaction in the group but with its "Group" field omitted.
- Hash this ordered list of hashes -- more precisely, hash the canonical msgpack encoding of a struct with a field "txlist" containing the list of hashes, using "TG" as domain separation prefix.

If the TxGroup hash of any transaction group in a block does not match the "Group" field of the transactions in that group (and that "Group" field is nonzero), then the block is invalid.
If the TxGroup hash of any transaction group in a block does not match the "Group" field of the transactions in that group (and that "Group" field is nonzero), then the block is invalid. Additionally, if a block contains a transaction group of more than $G_{max}$ transactions, the block is invalid.

Additionally, if a block contains a transaction group of more than $G_{max}$ transactions, the block is invalid.
Beyond this check, each transaction in a group is evaluated separately and must be valid on its own, as described below in the [Validity and State Changes][Validity and State Changes] section. For example, a group containing a zero-fee transaction and a very-high-fee transaction would be rejected because the first transaction has fee less than $f_{\min}$, even if the average transaction fee of the group were above $f_{\min}$. As another example, an account with balance 50 could not spend 100 in transaction A and afterward receive 500 in transaction B, even if transactions A and B are in the same group, because transaction A would leave the account with a negative balance.

Validity and State Changes
--------------------------
Expand Down

0 comments on commit 7d32d61

Please sign in to comment.