Blocks
As you might have suspected, the points in time in a flake are not actually dates, they look a little more like this:
Subject | Predicate | Object | Time | Operation |
---|---|---|---|---|
12345 | Hair Color | Red | -9 | true |
12345 | Birthday | 1/30/85 | -9 | true |
12345 | Fav Nums | 7 | -10 | true |
12345 | Full Name | Jane Doe | -10 | true |
12345 | Fav Nums | 28 | -10 | true |
12345 | Hair Color | Red | -11 | false |
12345 | Hair Color | Brown | -11 | true |
12345 | Fav Nums | 101 | -11 | true |
Transactions that are submitted to the ledger by the same request are atomic. They either all succeed or all fail. That group of transactions is considered a block. Block start with 1, and increase by 1 with each block.
Within each block, individual transactions are given a time, t
. t
is a more granular notion of time than a block. The order of the t
s within a block is the order in which transactions were processed by Fluree.
t
is a negative integer, which decreases by one for every transaction. As we see above, there are multiple t
s for every block:
Block 2: -9, -10 Block 3: -11
Information like hashes, which t
s belong to which block, and what clock time is associated with each block is stored in additional metadata flakes. This is something we'll discuss in a later lesson.
Challenge:
The below two flakes are part of the same block, block 4.
Subject | Predicate | Object | Time | Operation |
---|---|---|---|---|
12345 | Eye Color | Green | -12 | true |
12345 | FavNums | 0 | -13 | true |