diff options
Diffstat (limited to 'lib/merkle.ml')
| -rw-r--r-- | lib/merkle.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/merkle.ml b/lib/merkle.ml index e3f68d9..ffa7171 100644 --- a/lib/merkle.ml +++ b/lib/merkle.ml @@ -54,6 +54,12 @@ module HashSet : S = struct let member hash tree = StringSet.mem hash tree let keys tree = StringSet.elements tree + (* TODO: Streaming/pagination for large tuple sets. Currently materializes + entire keyset into memory, which fails for relations with billions of tuples. + Replace with paginated access (keys_paginated offset limit) or lazy generator + to avoid loading all hashes upfront. Consider replacing HashSet with proper + radix-merkle tree (plebeia) for native lazy traversal. *) + let root_hash tree = if StringSet.is_empty tree then |
