tangle-network / relayer

🕸️ The Webb Relayer Network
https://webb-tools.github.io/relayer/
Apache License 2.0
22 stars 13 forks source link

[TASK] Add method for querying a relayer's merkle tree for a merkle path proof #516

Open drewstone opened 1 year ago

drewstone commented 1 year ago

Overview

In an ideal world where a relayer can be trusted (wink wink SGX), it would be a huge performance improvement to be able to get a user's merkle path for a record/note commitment from the node storing all the leaves. This would eliminate the need for the client to download and cache all leaves locally, since they can just query this relayer for their proofs.

Description

Extend the leaf caching relayer with an API that fetches the Merkle path for a given leaf / set of leaves.

Acceptance Criteria

drewstone commented 1 year ago

The eventual goal is to run part of this inside SGX. We can also consider adding a method for doing the entire proof generation in the relayer as well, which we will also only consider in a trusted environment like SGX.