Skip to content

Commit c8a3666

Browse files
authored
[VIndex] Improve docs on returning leaves (#62)
This is particularly important in CT where the leaves require some modification to match the expected preimage.
1 parent dbc9337 commit c8a3666

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vindex/map.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ type InputLog interface {
6969
// Parse unmarshals and verifies a checkpoint obtained from GetCheckpoint.
7070
Parse(checkpoint []byte) (*log.Checkpoint, error)
7171
// Leaves returns all the leaves in the range [start, end), outputting them via
72-
// the returned iterator.
72+
// the returned iterator. The yielded bytes MUST be the leaf preimages,
73+
// i.e. hashing these values should return the leaf hashes used to construct the
74+
// Merkle tree.
7375
Leaves(ctx context.Context, start, end uint64) iter.Seq2[[]byte, error]
7476
}
7577

0 commit comments

Comments
 (0)