Block Metadata
Block metadata is stored, like all other information in Fluree, in the form of flakes. A block's hash, the previous block's hash, the signature for a transaction, and more is stored in metadata flakes that are automatically generated for every block.
Every block has one _block
subject. This set of flakes is always processed last and has the lowest t
.
In our example from the previous lesson, the below flakes from block 2 should have 3 additional subjects with ids -9, -10, and -11.
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 |
-9 and -10 correspond to the t
s of the flakes, and are _tx
subjects. -11 does not correspond to the t
of the flakes below, rather it is the id for a _block
subject. (There are additional meta-data flakes that are added, below is just a sample). You can issue the query { "select": ["*"], "from": -9 }
to see metadata subjects, just like you can look up all other subjects (some meta-data flakes are not searchable, but are recorded in the actual block files).
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 |
-9 | sig | Signature of the original JSON command | -9 | true |
-9 | tx | [{ Original JSON transaction }] | -9 | true |
-9 | auth | 3425 (auth id that issued this transaction) | -9 | true |
-10 | sig | Signature of the original JSON command | -10 | true |
-10 | tx | [{ Original JSON transaction }] | -10 | true |
-10 | auth | 3425 (auth id that issued this transaction) | -10 | true |
-11 | number | 2 (this is the block number) | -11 | true |
-11 | hash | SHA-256 hash for block | -11 | true |
-11 | prevHash | Previous block's hash | -11 | true |
-11 | transactions | [ -9, -10 ] (reference to the transactions in this block) | -11 | true |
-11 | instant | Instant (time) when this block was created | -11 | true |