Skip to main content

Block Metadata Exercise

Using the below example (from the last lesson), you will be writing your own metadata flakes.

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

Your challenge is to use the above example to complete block 3 by determing how to replace the variables in brackets (i.e [Subject 1]).

SubjectPredicateObjectTimeOperation
12345Hair ColorRed-11false
12345Hair ColorBrown-11true
12345Fav Nums101-11true
[Subject 1]sigSignature of the original JSON command[Subject 1]true
[Subject 1]tx[{ Original JSON transaction }][Subject 1]true
[Subject 1]auth3425 (auth id that issued this transaction)[Subject 1]true
[Subject 2]number[Object 1][Subject 2]true
[Subject 2]hashSHA-256 hash for block[Subject 2]true
[Subject 2]prevHashPrevious block's hash[Subject 2]true
[Subject 2]transactions[Object 2][Subject 2]true
[Subject 2]instantInstant (time) when this block was created[Subject 2]true

Note: when you're issuing a transaction, these metadata flakes are automatically generated, but it's helpful to write them yourself to understand the concept.