Purpose

This document describes design of a simple key-value storage that can be integrated in the Dynamic Protocol State.

Design

Requirements

Ideally we would like to implement a generic key-value store that can work with any data and have an API for querying and updating the data.

Initial version

It’s a big effort to implement a generic key-value store with properties that we have outlined in previous section. In the initial implementation we will have a slightly simpler variant, which is still protected by consensus agreement and allows updates via smart contract, but has limited flexibility w.r.t. storing data. Specifically, for the initial implementation we will use a fixed structure with pre-determined keys whose values can be updated, without ability to add or remove keys.

Specifically we will implement the following:

This is a good starting point which allows us to confirm that everything works. In future revisions, we will have the option to extend the design with a more sophisticated storage system (if desired).

High-level design