wnfs-wg / rs-wnfs

Rust implementation of the WebNative FileSystem (WNFS) specification
https://github.com/wnfs-wg
Apache License 2.0
144 stars 23 forks source link

Wasm bindings: Expose working with `ForestProofs` #293

Open matheus23 opened 1 year ago

matheus23 commented 1 year ago

The ForestProofs data structure currently has no equivalent piece in wnfs-wasm.

We can't expose it 1:1 as we do in rust, since we can't do traits in bindings. My suggestion would be a wnfs-wasm PrivateForest struct that keeps track of whether to generate proofs or not, as well as exposing a function for retrieving all proofs so far & clearing them. Verification may not be needed for now, since that's mostly going to happen on the server side. More important for the future when we do p2p write gossiping.

expede commented 1 year ago

Say more! I'm guessing that this is as a solution to the problem with multiple RSA accumulator parents in one update?

matheus23 commented 1 year ago

Say more about what specifically?

Yeah ForestProofs is the data structure that keeps all of the cryptographic accumulator proofs for forest labels and the mapping between the label and which base ("access level"/access path/parents) they're proven against.

walkah commented 1 year ago

Need to confirm with server / oddsdk is this is required