turbofish-org / merk

High-performance Merkle key/value store
Apache License 2.0
226 stars 36 forks source link

Add function to return root of a proof that can later be verified via a signing scheme. #54

Open QuantumExplorer opened 3 years ago

QuantumExplorer commented 3 years ago

Using verify query on light clients would require them to be supplied with the expected root hash, in addition to the proof, keys and signature. Since the proof already contains the root_hash, and any other root hash wouldn't match for the signature, it would be optimal not to send it.

The change requested adds a new function that executes the proof and returns the root hash and the elements. That root hash can then be verified by a signature scheme.