Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
hinting_dbs.cpp
Go to the documentation of this file.
2
3#include <cstdint>
4#include <optional>
5#include <span>
6#include <stdexcept>
7#include <string>
8#include <vector>
9
15
16namespace bb::avm2::simulation {
17
18// HintingContractsDB starts.
20{
22 // If we don't find the instance hint, this is not a catastrophic failure. The inner db should handle it, and
23 // here we simply don't store any hint:
24 if (instance.has_value()) {
28 .address = address,
29 .salt = instance->salt,
30 .deployer = instance->deployer,
31 .current_contract_class_id = instance->current_contract_class_id,
32 .original_contract_class_id = instance->original_contract_class_id,
33 .initialization_hash = instance->initialization_hash,
34 .public_keys =
35 PublicKeysHint{ .master_nullifier_public_key = instance->public_keys.nullifier_key,
36 .master_incoming_viewing_public_key = instance->public_keys.incoming_viewing_key,
37 .master_outgoing_viewing_public_key = instance->public_keys.outgoing_viewing_key,
38 .master_tagging_public_key = instance->public_keys.tagging_key }
39
40 };
41 }
42
43 return instance;
44}
45
47{
49 // If we don't find the instance hint, this is not a catastrophic failure. The inner db should handle it, and
50 // here we simply don't store any hint:
51 if (klass.has_value()) {
55 .class_id = class_id,
56 .artifact_hash = klass->artifact_hash,
57 .private_functions_root = klass->private_functions_root,
58 // TODO(fcarreiro): find out why moving things here breaks things
59 .packed_bytecode = klass->packed_bytecode,
60 };
61 }
62
63 return klass;
64}
65
67{
69 if (commitment.has_value()) {
72 .class_id = class_id,
73 .commitment = commitment.value() };
74 }
75
76 return commitment;
77}
78
80 const FunctionSelector& selector) const
81{
83 if (name.has_value()) {
84 GetDebugFunctionNameKey key = { address, selector };
86 DebugFunctionNameHint{ .address = address, .selector = selector, .name = name.value() };
87 }
88
89 return name;
90}
91
92void HintingContractsDB::add_contracts(const ContractDeploymentData& contract_deployment_data)
93{
94 // Adding contracts does not require any hints
95 db.add_contracts(contract_deployment_data);
96}
97
99{
100 uint32_t old_checkpoint_id = get_checkpoint_id();
101 // Update underlying db:
103 // Update this db:
105 // Store hint:
107 .action_counter = checkpoint_action_counter,
108 .old_checkpoint_id = old_checkpoint_id,
109 .new_checkpoint_id = get_checkpoint_id(),
110 };
111
112 // Update this db:
114}
115
117{
118 uint32_t old_checkpoint_id = get_checkpoint_id();
119 // Update underlying db:
121 // Update this db:
122 checkpoint_stack.pop();
123 // Store hint:
125 .action_counter = checkpoint_action_counter,
126 .old_checkpoint_id = old_checkpoint_id,
127 .new_checkpoint_id = get_checkpoint_id(),
128 };
129
130 // Update this db:
132}
133
135{
136 uint32_t old_checkpoint_id = get_checkpoint_id();
137 // Update underlying db:
139 // Update this db:
140 checkpoint_stack.pop();
141 // Store hint:
143 .action_counter = checkpoint_action_counter,
144 .old_checkpoint_id = old_checkpoint_id,
145 .new_checkpoint_id = get_checkpoint_id(),
146 };
147
148 // Update this db:
150}
151
153{
154 return checkpoint_stack.top();
155}
156
158{
159 std::ranges::transform(contract_hints.contract_instances,
161 [](const auto& mapped_contract_instance) { return mapped_contract_instance.second; });
162
163 std::ranges::transform(contract_hints.contract_classes,
165 [](const auto& mapped_contract_class) { return mapped_contract_class.second; });
166
167 std::ranges::transform(contract_hints.bytecode_commitments,
169 [](const auto& mapped_bytecode_commitment) { return mapped_bytecode_commitment.second; });
170
171 std::ranges::transform(contract_hints.debug_function_names,
173 [](const auto& mapped_debug_function_name) { return mapped_debug_function_name.second; });
174
175 std::ranges::transform(
178 [](const auto& mapped_create_checkpoint_hint) { return mapped_create_checkpoint_hint.second; });
179
180 std::ranges::transform(
183 [](const auto& mapped_commit_checkpoint_hint) { return mapped_commit_checkpoint_hint.second; });
184
185 std::ranges::transform(
188 [](const auto& mapped_revert_checkpoint_hint) { return mapped_revert_checkpoint_hint.second; });
189}
190
191// Hinting MerkleDB starts.
193{
194 auto roots = db.get_tree_roots();
195 return get_tree_info_helper(tree_id, roots);
196}
197
199{
200 AppendOnlyTreeSnapshot tree_info = get_tree_info(tree_id);
201 SiblingPath path = db.get_sibling_path(tree_id, leaf_index);
202 GetSiblingPathKey key = { tree_info, tree_id, leaf_index };
204 GetSiblingPathHint{ .hint_key = tree_info, .tree_id = tree_id, .index = leaf_index, .path = path };
205
206 return path;
207}
208
210{
211 AppendOnlyTreeSnapshot tree_info = get_tree_info(tree_id);
213 GetPreviousValueIndexKey key = { tree_info, tree_id, value };
215 .hint_key = tree_info,
216 .tree_id = tree_id,
217 .value = value,
218 .index = resp.index,
219 .already_present = resp.is_already_present,
220 };
221
222 // Note: We may need a sibling path hint so must collect it in case - see comments in public_db_sources.ts
223 get_sibling_path(tree_id, resp.index);
224
226 // Note: We may need a GetLeafPreimageHint for the nullifier tree when calling nullifier_exists, so collect it
227 // in case. NB: The PureMerkleDB does not perform this, but the nullifier check gadget requires a leaf preimage.
228 // Ts gathers the hint: (state_manager -> checkNullifierExists() -> doMerkleOperations -> public_db_sources ->
229 // checkNullifierExists())
231 } else if ((tree_id == world_state::MerkleTreeId::PUBLIC_DATA_TREE) && (!resp.is_already_present)) {
232 // Note: We may need a GetLeafPreimageHint for the public data tree when calling storage_read, so collect it in
233 // case. NB: The PureMerkleDB does not perform this if !is_already_present, but MerkleDB and ts perform it
234 // unconditionally. Ts gathers the hint: (public_db_sources -> storageRead())
236 }
237 return resp;
238}
239
241{
242 AppendOnlyTreeSnapshot tree_info = get_tree_info(tree_id);
243 FF value = db.get_leaf_value(tree_id, leaf_index);
244 GetLeafValueKey key = { tree_info, tree_id, leaf_index };
246 GetLeafValueHint{ .hint_key = tree_info, .tree_id = tree_id, .index = leaf_index, .value = value };
247 // Note: We may need a sibling path hint so must collect it in case - see comments in public_db_sources.ts
248 get_sibling_path(tree_id, leaf_index);
249 return value;
250}
251
253{
256
257 GetLeafPreimageKey key = { tree_info, leaf_index };
259 .hint_key = tree_info, .index = leaf_index, .leaf_preimage = preimage
260 };
261 // Note: We may need a sibling path hint so must collect it in case - see comments in public_db_sources.ts
263 return preimage;
264}
265
267{
270 GetLeafPreimageKey key = { tree_info, leaf_index };
272 .hint_key = tree_info, .index = leaf_index, .leaf_preimage = preimage
273 };
274 // Note: We may need a sibling path hint so must collect it in case - see comments in public_db_sources.ts
276 return preimage;
277}
278
280 const PublicDataLeafValue& leaf_value)
281{
284 // The underlying db should update its state post insertion:
286
288 SequentialInsertHint<PublicDataLeafValue> sequential_insert_hint = {
289 .hint_key = tree_info,
291 .leaf = leaf_value,
292 .low_leaves_witness_data = result.low_leaf_witness_data.back(),
293 .insertion_witness_data = result.insertion_witness_data.back(),
294 .state_after = state_after
295 };
297
298 return result;
299}
300
302 const NullifierLeafValue& leaf_value)
303{
306 // The underlying db should update its state post insertion:
307 auto state_after = db.get_tree_roots().nullifier_tree;
308
310 SequentialInsertHint<NullifierLeafValue> sequential_insert_hint = {
311 .hint_key = tree_info,
313 .leaf = leaf_value,
314 .low_leaves_witness_data = result.low_leaf_witness_data.back(),
315 .insertion_witness_data = result.insertion_witness_data.back(),
316 .state_after = state_after
317 };
319
320 return result;
321}
322
324{
325 uint32_t old_checkpoint_id = db.get_checkpoint_id();
326 // Update underlying db:
328
329 // Store hint:
331 .action_counter = checkpoint_action_counter,
332 .old_checkpoint_id = old_checkpoint_id,
333 .new_checkpoint_id = db.get_checkpoint_id(),
334 };
335
336 // Update this db:
338}
339
341{
342 uint32_t old_checkpoint_id = db.get_checkpoint_id();
343 // Update underlying db:
345 // Store hint:
347 .action_counter = checkpoint_action_counter,
348 .old_checkpoint_id = old_checkpoint_id,
349 .new_checkpoint_id = db.get_checkpoint_id(),
350 };
351
352 // Update this db:
354}
355
357{
358 TreeSnapshots state_before = db.get_tree_roots();
359 uint32_t old_checkpoint_id = db.get_checkpoint_id();
360 // Update underlying db:
362 TreeSnapshots state_after = db.get_tree_roots();
363 // Store hint:
365 .action_counter = checkpoint_action_counter,
366 .old_checkpoint_id = old_checkpoint_id,
367 .new_checkpoint_id = db.get_checkpoint_id(),
368 .state_before = state_before,
369 .state_after = state_after,
370 };
371
372 // Update this db:
374}
375
376void HintingRawDB::pad_tree(world_state::MerkleTreeId tree_id, size_t num_leaves)
377{
378 // Padding the tree does not require any hints:
379 db.pad_tree(tree_id, num_leaves);
380}
381
383{
384 AppendOnlyTreeSnapshot tree_info = get_tree_info(tree_id);
385 // Update underlying db:
386 std::vector<AppendLeafResult> results = db.append_leaves(tree_id, leaves);
387
388 // Use results to collect hints:
389 for (uint32_t i = 0; i < leaves.size(); i++) {
390 FF root_after = i == leaves.size() - 1 ? get_tree_info(tree_id).root : results[i + 1].root;
391 // Iterate tree_info to the be state after adding this leaf:
392 tree_info = appendLeafInternal(tree_info, results[i].path, root_after, tree_id, leaves[i]);
393 }
394
395 return results;
396}
397
399 const SiblingPath& path,
400 const FF& root_after,
402 const FF& leaf)
403{
404 // TODO(MW): Taken from raw_data_dbs:
405 // We need to process each leaf individually because we need the sibling path after insertion, to be able to
406 // constraint the insertion.
407 // TODO(https://github.com/AztecProtocol/aztec-packages/issues/13380): This can be changed if the world state
408 // appendLeaves returns the sibling paths.
409 AppendLeavesHintKey append_key = { state_before, tree_id, { leaf } };
410 AppendOnlyTreeSnapshot state_after = { .root = root_after,
411 .next_available_leaf_index = state_before.next_available_leaf_index + 1 };
413 .hint_key = state_before, .state_after = state_after, .tree_id = tree_id, .leaves = { leaf }
414 };
415 // TODO(MW): Storing sibling path hint manually using the result since a get_sibling_path() call here will use the
416 // /current/ db.get_tree_info() (post full append_leaves), which may not match that at result.root. We may not care
417 // about this (see comment in PureRawMerkleDB::append_leaves())
418 GetSiblingPathKey path_key = { state_after, tree_id, state_before.next_available_leaf_index };
420 .hint_key = state_after, .tree_id = tree_id, .index = state_before.next_available_leaf_index, .path = path
421 };
422 return state_after;
423}
424
426{
427 std::ranges::transform(
430 [](const auto& mapped_get_sibling_path_hint) { return mapped_get_sibling_path_hint.second; });
431
432 std::ranges::transform(
435 [](const auto& mapped_get_previous_value_index_hint) { return mapped_get_previous_value_index_hint.second; });
436
437 std::ranges::transform(
440 [](const auto& mapped_get_leaf_preimage_hint) { return mapped_get_leaf_preimage_hint.second; });
441
442 std::ranges::transform(
445 [](const auto& mapped_get_leaf_preimage_hint) { return mapped_get_leaf_preimage_hint.second; });
446
447 std::ranges::transform(merkle_hints.get_leaf_value_hints,
449 [](const auto& mapped_get_leaf_value_hint) { return mapped_get_leaf_value_hint.second; });
450
451 std::ranges::transform(
454 [](const auto& mapped_sequential_insert_hint) { return mapped_sequential_insert_hint.second; });
455
456 std::ranges::transform(
459 [](const auto& mapped_sequential_insert_hint) { return mapped_sequential_insert_hint.second; });
460
461 std::ranges::transform(merkle_hints.append_leaves_hints,
463 [](const auto& mapped_append_leaves_hint) { return mapped_append_leaves_hint.second; });
464
465 std::ranges::transform(
468 [](const auto& mapped_create_checkpoint_hint) { return mapped_create_checkpoint_hint.second; });
469
470 std::ranges::transform(
473 [](const auto& mapped_commit_checkpoint_hint) { return mapped_commit_checkpoint_hint.second; });
474
475 std::ranges::transform(
478 [](const auto& mapped_revert_checkpoint_hint) { return mapped_revert_checkpoint_hint.second; });
479}
480
481} // namespace bb::avm2::simulation
std::shared_ptr< Napi::ThreadSafeFunction > instance
virtual void add_contracts(const ContractDeploymentData &contract_deployment_data)=0
virtual std::optional< FF > get_bytecode_commitment(const ContractClassId &class_id) const =0
virtual std::optional< std::string > get_debug_function_name(const AztecAddress &address, const FunctionSelector &selector) const =0
virtual std::optional< ContractInstance > get_contract_instance(const AztecAddress &address) const =0
virtual std::optional< ContractClass > get_contract_class(const ContractClassId &class_id) const =0
std::optional< std::string > get_debug_function_name(const AztecAddress &address, const FunctionSelector &selector) const override
std::optional< ContractClass > get_contract_class(const ContractClassId &class_id) const override
std::optional< FF > get_bytecode_commitment(const ContractClassId &class_id) const override
void add_contracts(const ContractDeploymentData &contract_deployment_data) override
void dump_hints(ExecutionHints &hints)
std::optional< ContractInstance > get_contract_instance(const AztecAddress &address) const override
AppendOnlyTreeSnapshot appendLeafInternal(const AppendOnlyTreeSnapshot &state_before, const SiblingPath &path, const FF &root_after, MerkleTreeId tree_id, const FF &leaf)
void dump_hints(ExecutionHints &hints)
SequentialInsertionResult< NullifierLeafValue > insert_indexed_leaves_nullifier_tree(const NullifierLeafValue &leaf_value) override
IndexedLeaf< NullifierLeafValue > get_leaf_preimage_nullifier_tree(index_t leaf_index) const override
SiblingPath get_sibling_path(MerkleTreeId tree_id, index_t leaf_index) const override
std::vector< AppendLeafResult > append_leaves(MerkleTreeId tree_id, std::span< const FF > leaves) override
GetLowIndexedLeafResponse get_low_indexed_leaf(MerkleTreeId tree_id, const FF &value) const override
LowLevelMerkleDBInterface & db
FF get_leaf_value(MerkleTreeId tree_id, index_t leaf_index) const override
IndexedLeaf< PublicDataLeafValue > get_leaf_preimage_public_data_tree(index_t leaf_index) const override
SequentialInsertionResult< PublicDataLeafValue > insert_indexed_leaves_public_data_tree(const PublicDataLeafValue &leaf_value) override
AppendOnlyTreeSnapshot get_tree_info(MerkleTreeId tree_id) const
void pad_tree(MerkleTreeId tree_id, size_t num_leaves) override
virtual IndexedLeaf< PublicDataLeafValue > get_leaf_preimage_public_data_tree(index_t leaf_index) const =0
virtual std::vector< AppendLeafResult > append_leaves(MerkleTreeId tree_id, std::span< const FF > leaves)=0
virtual TreeSnapshots get_tree_roots() const =0
virtual void pad_tree(MerkleTreeId tree_id, size_t num_leaves)=0
virtual IndexedLeaf< NullifierLeafValue > get_leaf_preimage_nullifier_tree(index_t leaf_index) const =0
virtual SequentialInsertionResult< NullifierLeafValue > insert_indexed_leaves_nullifier_tree(const NullifierLeafValue &leaf_value)=0
virtual GetLowIndexedLeafResponse get_low_indexed_leaf(MerkleTreeId tree_id, const FF &value) const =0
virtual SiblingPath get_sibling_path(MerkleTreeId tree_id, index_t leaf_index) const =0
virtual uint32_t get_checkpoint_id() const =0
virtual SequentialInsertionResult< PublicDataLeafValue > insert_indexed_leaves_public_data_tree(const PublicDataLeafValue &leaf_value)=0
virtual FF get_leaf_value(MerkleTreeId tree_id, index_t leaf_index) const =0
auto & get_tree_info_helper(world_state::MerkleTreeId tree_id, auto &tree_roots)
Definition db_types.hpp:71
::bb::crypto::merkle_tree::fr_sibling_path SiblingPath
Definition db.hpp:36
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, index_t > GetSiblingPathKey
Definition db_types.hpp:15
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, index_t > GetLeafValueKey
Definition db_types.hpp:18
std::tuple< uint32_t, ContractClassId > GetBytecodeCommitmentKey
Definition db_types.hpp:24
std::tuple< AztecAddress, FunctionSelector > GetDebugFunctionNameKey
Definition db_types.hpp:25
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, NullifierLeafValue > SequentialInsertHintNullifierTreeKey
Definition db_types.hpp:20
std::tuple< AppendOnlyTreeSnapshot, index_t > GetLeafPreimageKey
Definition db_types.hpp:17
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, PublicDataLeafValue > SequentialInsertHintPublicDataTreeKey
Definition db_types.hpp:19
std::tuple< uint32_t, AztecAddress > GetContractInstanceKey
Definition db_types.hpp:22
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, FF > GetPreviousValueIndexKey
Definition db_types.hpp:16
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, std::vector< FF > > AppendLeavesHintKey
Definition db_types.hpp:21
::bb::crypto::merkle_tree::index_t index_t
Definition db.hpp:37
std::tuple< uint32_t, ContractClassId > GetContractClassKey
Definition db_types.hpp:23
FF ContractClassId
FF FunctionSelector
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
AppendOnlyTreeSnapshot hint_key
Definition avm_io.hpp:258
std::vector< SequentialInsertHint< crypto::merkle_tree::NullifierLeafValue > > sequential_insert_hints_nullifier_tree
Definition avm_io.hpp:382
std::vector< GetSiblingPathHint > get_sibling_path_hints
Definition avm_io.hpp:373
std::vector< DebugFunctionNameHint > debug_function_names
Definition avm_io.hpp:367
std::vector< ContractDBCreateCheckpointHint > contract_db_create_checkpoint_hints
Definition avm_io.hpp:368
std::vector< ContractDBCommitCheckpointHint > contract_db_commit_checkpoint_hints
Definition avm_io.hpp:369
std::vector< CommitCheckpointHint > commit_checkpoint_hints
Definition avm_io.hpp:385
std::vector< SequentialInsertHint< crypto::merkle_tree::PublicDataLeafValue > > sequential_insert_hints_public_data_tree
Definition avm_io.hpp:381
std::vector< RevertCheckpointHint > revert_checkpoint_hints
Definition avm_io.hpp:386
std::vector< ContractDBRevertCheckpointHint > contract_db_revert_checkpoint_hints
Definition avm_io.hpp:370
std::vector< GetPreviousValueIndexHint > get_previous_value_index_hints
Definition avm_io.hpp:374
std::vector< GetLeafPreimageHint< crypto::merkle_tree::IndexedLeaf< crypto::merkle_tree::PublicDataLeafValue > > > get_leaf_preimage_hints_public_data_tree
Definition avm_io.hpp:376
std::vector< GetLeafPreimageHint< crypto::merkle_tree::IndexedLeaf< crypto::merkle_tree::NullifierLeafValue > > > get_leaf_preimage_hints_nullifier_tree
Definition avm_io.hpp:378
std::vector< CreateCheckpointHint > create_checkpoint_hints
Definition avm_io.hpp:384
std::vector< GetLeafValueHint > get_leaf_value_hints
Definition avm_io.hpp:379
std::vector< AppendLeavesHint > append_leaves_hints
Definition avm_io.hpp:383
std::vector< ContractInstanceHint > contract_instances
Definition avm_io.hpp:364
std::vector< ContractClassHint > contract_classes
Definition avm_io.hpp:365
std::vector< BytecodeCommitmentHint > bytecode_commitments
Definition avm_io.hpp:366
AppendOnlyTreeSnapshot hint_key
Definition avm_io.hpp:215
AppendOnlyTreeSnapshot hint_key
Definition avm_io.hpp:227
AppendOnlyTreeSnapshot hint_key
Definition avm_io.hpp:201
AppendOnlyTreeSnapshot hint_key
Definition avm_io.hpp:188
AffinePoint master_nullifier_public_key
Definition avm_io.hpp:117
AppendOnlyTreeSnapshot hint_key
Definition avm_io.hpp:240
AppendOnlyTreeSnapshot public_data_tree
AppendOnlyTreeSnapshot nullifier_tree
unordered_flat_map< GetContractClassKey, ContractClassHint > contract_classes
Definition db_types.hpp:30
unordered_flat_map< uint32_t, ContractDBRevertCheckpointHint > revert_checkpoint_hints
Definition db_types.hpp:35
unordered_flat_map< uint32_t, ContractDBCreateCheckpointHint > create_checkpoint_hints
Definition db_types.hpp:33
unordered_flat_map< uint32_t, ContractDBCommitCheckpointHint > commit_checkpoint_hints
Definition db_types.hpp:34
unordered_flat_map< GetDebugFunctionNameKey, DebugFunctionNameHint > debug_function_names
Definition db_types.hpp:32
unordered_flat_map< GetContractInstanceKey, ContractInstanceHint > contract_instances
Definition db_types.hpp:29
unordered_flat_map< GetBytecodeCommitmentKey, BytecodeCommitmentHint > bytecode_commitments
Definition db_types.hpp:31
unordered_flat_map< uint32_t, CreateCheckpointHint > create_checkpoint_hints
Definition db_types.hpp:54
unordered_flat_map< uint32_t, CommitCheckpointHint > commit_checkpoint_hints
Definition db_types.hpp:55
unordered_flat_map< uint32_t, RevertCheckpointHint > revert_checkpoint_hints
Definition db_types.hpp:56
unordered_flat_map< AppendLeavesHintKey, AppendLeavesHint > append_leaves_hints
Definition db_types.hpp:53
unordered_flat_map< SequentialInsertHintPublicDataTreeKey, SequentialInsertHint< PublicDataLeafValue > > sequential_insert_hints_public_data_tree
Definition db_types.hpp:50
unordered_flat_map< GetLeafPreimageKey, GetLeafPreimageHint< PublicDataTreeLeafPreimage > > get_leaf_preimage_hints_public_data_tree
Definition db_types.hpp:44
unordered_flat_map< SequentialInsertHintNullifierTreeKey, SequentialInsertHint< NullifierLeafValue > > sequential_insert_hints_nullifier_tree
Definition db_types.hpp:52
unordered_flat_map< GetSiblingPathKey, GetSiblingPathHint > get_sibling_path_hints
Definition db_types.hpp:41
unordered_flat_map< GetLeafPreimageKey, GetLeafPreimageHint< NullifierTreeLeafPreimage > > get_leaf_preimage_hints_nullifier_tree
Definition db_types.hpp:46
unordered_flat_map< GetLeafValueKey, GetLeafValueHint > get_leaf_value_hints
Definition db_types.hpp:47
unordered_flat_map< GetPreviousValueIndexKey, GetPreviousValueIndexHint > get_previous_value_index_hints
Definition db_types.hpp:42
std::vector< crypto::merkle_tree::LeafUpdateWitnessData< LeafValueType > > low_leaf_witness_data
std::vector< crypto::merkle_tree::LeafUpdateWitnessData< LeafValueType > > insertion_witness_data