Closed jeffa5 closed 1 year ago
I think it would be much preferable to have this as constitution-first rather than going with this intermediate step but at least this shows a potential way forward.
I think we should add a comment somewhere that this is a bit of a hack, and that the nicer solution to avoid duplicate storage would be to add an iterator API to the CCF kv::Map
so that we can foreach across two maps (private and public).
Available from here
Needs to wait for a new CCF release so that we have the cose tooling
Previously the maps for kv would be either all private or all public. This makes it more dynamic, moving the option into a constitution-managed map.
Every key is kept in the private map, keys that match the public prefix will also be kept in a public map which is viewable in the ledger. By default there are no public prefixes and so everything is private.
Fixes #179
Code caveats: