diff --git a/grovedb/src/operations/proof/mod.rs b/grovedb/src/operations/proof/mod.rs index 306b02d8..88243d59 100644 --- a/grovedb/src/operations/proof/mod.rs +++ b/grovedb/src/operations/proof/mod.rs @@ -15,6 +15,17 @@ use crate::operations::proof::util::{element_hex_to_ascii, hex_to_ascii}; #[derive(Debug, Clone, Copy, Encode, Decode)] pub struct ProveOptions { + /// This tells the proof system to decrease the available limit of the query + /// by 1 in the case of empty subtrees. Generally this should be set to + /// true. The case where this could be set to false is if there is a + /// known structure where we know that there are only a few empty + /// subtrees. + /// + /// !!! Warning !!! Be very careful: + /// If this is set to `false` then you must be sure that the sub queries do + /// not match many trees, Otherwise you could crash the system as the + /// proof system goes through millions of subtrees and eventually runs + /// out of memory pub decrease_limit_on_empty_sub_query_result: bool, } diff --git a/merk/src/proofs/query/verify.rs b/merk/src/proofs/query/verify.rs index 2e1727f4..e1d56511 100644 --- a/merk/src/proofs/query/verify.rs +++ b/merk/src/proofs/query/verify.rs @@ -44,8 +44,13 @@ pub fn verify(bytes: &[u8], expected_hash: MerkHash) -> CostResult { #[derive(Copy, Clone, Debug)] pub struct VerifyOptions { + /// When set to true, this will give back absence proofs for any query items + /// that are keys. This means QueryItem::Key(), and not the ranges. pub absence_proofs_for_non_existing_searched_keys: bool, + /// Verifies that we have all the data. Todo: verify that this works + /// properly pub verify_proof_succinctness: bool, + /// Should return empty trees in the result? pub include_empty_trees_in_result: bool, }