facebook / akd

An implementation of an auditable key directory
Apache License 2.0
246 stars 36 forks source link

[akd] add marker proof nodes to preload caching for v2 lookup proofs #436

Closed artem-shu closed 5 months ago

artem-shu commented 5 months ago

lookup v2 performs marker proof for past markers (membership proofs) and future parkers (non-membership proofs). To keep the number of DB reads low, we currently rely on preload_nodes to BFS down from the root to all nodes who share a prefix for target labels and their immediate children. This PR should include the marker proofs (past/future versions of the same akd_label and freshness) in the BFS traversal to take greater advantage of existing caching.

ATM, there do no appear to be specific tests for cache-traversal inclusion. Rust is not my forte, so please review carefully.