You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of Proof allows to prove the inclusion of leaves only within the boundaries which were used during proof creation. In case we need a smaller proof for the same row, we have to traverse the tree and collect subtree roots again. But in fact, having proof and leafHashes are enough to recompute the new proof in place, without tree traversing.
Having a row that contains 8 shares(leaves), where the first 6 shares have the same namespace.ID:
Proof for this row will be:
Proof {
start = 0
end = 6
nodes = [][]byte {subtreeRoot([s6;s7]}
}
At some point we need the proof for [s2;s4), so instead of traversing the tree and getting proof for these indexes, we can recompute using existing proof.
If we'll take a look at this picture, to prove [s2;s4), we would need Node0_2(we can compute it by hashing s0 and s1), Node4_6(we can compute it by hashing s4 and s5) and Node6_8(already have it in proof.nodes).
This feature will be very helpful for blob service v0.1(cc @nashqueue), where we can have multiple blobs per namespace within the row, but the final indexes for the proof we can have only after fetching and verifying shares.
The text was updated successfully, but these errors were encountered:
The current implementation of
Proof
allows to prove the inclusion of leaves only within the boundaries which were used during proof creation. In case we need a smaller proof for the same row, we have to traverse the tree and collect subtree roots again. But in fact, having proof and leafHashes are enough to recompute the new proof in place, without tree traversing.Having a row that contains 8 shares(leaves), where the first 6 shares have the same namespace.ID:
At some point we need the proof for
[s2;s4)
, so instead of traversing the tree and getting proof for these indexes, we can recompute using existing proof.If we'll take a look at this picture, to prove [s2;s4), we would need
Node0_2
(we can compute it by hashings0
ands1
),Node4_6
(we can compute it by hashing s4 and s5) andNode6_8
(already have it in proof.nodes).This feature will be very helpful for blob service v0.1(cc @nashqueue), where we can have multiple blobs per namespace within the row, but the final indexes for the proof we can have only after fetching and verifying shares.
The text was updated successfully, but these errors were encountered: