Open fryorcraken opened 1 year ago
@richard-ramos @rymnc except if sled-db magically store information in the local storage, and even so, it is most likely more efficient to pass on our persistence by storing data in json format in the browser's local storage.
@richard-ramos @rymnc except if sled-db magically store information in the local storage, and even so, it is most likely more efficient to pass on our persistence by storing data in json format in the browser's local storage.
not too sure about where the sled db will be stored in wasm land, but what we can do is add 2 fns to the rln-wasm api, import
and export
, which accepts a json blob and returns one respectively. This way, on initialisation of the rln object, you can "import" the json blob into the new sled db instance, and before shutting down, "export" it to localStorage?
Summary
Merkle tree, valid roots and last sync blocks are necessary to generate and validate proof. This information is retrieved from the blockchain.
Accessing the blockchain represent several challenges:
Proposed solution
Cache the information locally (local storage?). The information is publicly available on the blockchain and does not need to be protected.
Note