UPDB
posted on 11 Nov 2019UPDB is a universally unique authenticated key/value store.
UPDB aims to be a base PKI, object ID, and namespacing layer for the next wave of web protocols.
It can be used for:
- assigning numbers to things
- assigning things to symbols
- building signed directed graphs
Authentication (ability to update
) is hierarchal in three ways:
- objects (including addresses) can delegate authority to other objects
- objects (including addresses) can delegate authority to object references
- objects (excluding addresses) are allocated hierarchally
The underlying data structure is inspired by the merkle patricia trie used for Ethereum contract state, as well as common object-owner and registry-object patterns used in many EVM systems.
UPDB uses the Bitcoin blockchain as a transaction bus.
Lookup and authentication proofs can both be verified in native Bitcoin Script (given proof data in txin), meaning they can be used as primitives in L2.
objects
- An object “is a” 128-bit number or 160-bit address
- An object “has a” 256-bit–>256-bit key/value space
The root word is a single hash which summarizes the entire UPDB state.
It is used in every `lookup` and `verify` proof.
+--------------------------------------+
| root: 0xdb0abc... |
+---+----------------------------------+
| |
| This is a 'numbered' object. |
| +-------------------------+ |
| | 42 | |
| +---+----------+----------+ |
| | 0x0 | 0x69 | |
| | 0x1 | 0x0 | |
| | ... | 0x0 | |
| | 2^256-1 | 0x7 | |
| +----------+----------+ |
| |
| This is an 'addressed' object. |
| +-------------------------+ |
| | 1address... | |
| +---+----------+----------+ |
| | 0x0 | 0x2a | |
| | 0x1 | 2^256 | |
| | ... | 0x0 | |
| | 2^256-1 | 0x0 | |
| +----------+----------+ |
| |
| ... |
+----------------------------------+
lookup(42, 0x0)
--> (0x69, <proof>)
lookup(1address..., 0x1)
--> (2^256, <proof>)
actions
There is one action that modifies state:
update(object, keyword, value)
--> ?ERROR
There is one provable query:
lookup(object, keyword)
--> (value, proof)
The same authorization logic used for update
can be used as a general auth scheme:
verify(root, object, [sigs])
--> (bool, proof)
lookup
and verify
proofs can be verified in native bitcoin script (given proof data in txin),
meaning they can be used as primitives in L2.
forecast
The specification of UPDB can be split into three basic layers:
- The underlying data structure, a merkelized prefix tree
- The encoding of
update
operations - The authorization rules for
update
signatures
The specification is final.