Skip to main content

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.

SubjectPredicateObjectTimeOperation
12345Hair ColorRed-9true
12345Birthday1/30/85-9true
12345Fav Nums7-10true
12345Full NameJane Doe-10true
12345Fav Nums28-10true

-9 and -10 correspond to the ts 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).

SubjectPredicateObjectTimeOperation
12345Hair ColorRed-9true
12345Birthday1/30/85-9true
12345Fav Nums7-10true
12345Full NameJane Doe-10true
12345Fav Nums28-10true
-9sigSignature of the original JSON command-9true
-9tx[{ Original JSON transaction }]-9true
-9auth3425 (auth id that issued this transaction)-9true
-10sigSignature of the original JSON command-10true
-10tx[{ Original JSON transaction }]-10true
-10auth3425 (auth id that issued this transaction)-10true
-11number2 (this is the block number)-11true
-11hashSHA-256 hash for block-11true
-11prevHashPrevious block's hash-11true
-11transactions[ -9, -10 ] (reference to the transactions in this block)-11true
-11instantInstant (time) when this block was created-11true