Anchored keys

Rather than dealing with just keys, we introduce the notion of an anchored key, which is a pair consisting of an origin specifier and a key, i.e.

type AnchoredKey = (Origin, Key)
type Key = String

An origin is a triple consisting of a numeric identifier called the origin ID, a string called the origin name (omitted in the backend) and another numeric identifier called the gadget ID, which identifies the means by which the value corresponding to a given key is produced.

The origin ID is defined to be 0 for 'no origin' and 1 for 'self origin', otherwise it is the content ID1 of the POD to which it refers. The origin name is not cryptographically significant and is merely a convenience for the frontend.

The gadget ID takes on the values in the following table:

Gadget IDMeaning
0no gadget
1SignedPOD gadget: The key-value pair was produced in the construction of a SignedPOD.
2MainPOD gadget: The key-value pair was produced in the construction of a MainPOD.

For example, a gadget ID of 1 implies that the key-value pair in question was produced in the process of constructing a SignedPOD.

1

TODO Refer to this when it is documented.