Skip to content

Commit da6c09b

Browse files
authored
[Docs] ProofBuilder doc tweaks (#751)
1 parent 2c3a6dc commit da6c09b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

client/client.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ func GetEntryBundle(ctx context.Context, f EntryBundleFetcherFunc, i, logSize ui
178178
// ProofBuilder knows how to build inclusion and consistency proofs from tiles.
179179
// Since the tiles commit only to immutable nodes, the job of building proofs is slightly
180180
// more complex as proofs can touch "ephemeral" nodes, so these need to be synthesized.
181+
// This object constructs a cache internally to make it efficient for multiple operations
182+
// at a given tree size.
181183
type ProofBuilder struct {
182184
treeSize uint64
183185
nodeCache nodeCache
@@ -196,8 +198,6 @@ func NewProofBuilder(ctx context.Context, treeSize uint64, f TileFetcherFunc) (*
196198

197199
// InclusionProof constructs an inclusion proof for the leaf at index in a tree of
198200
// the given size.
199-
// This function uses the passed-in function to retrieve tiles containing any log tree
200-
// nodes necessary to build the proof.
201201
func (pb *ProofBuilder) InclusionProof(ctx context.Context, index uint64) ([][]byte, error) {
202202
ctx, span := tracer.Start(ctx, "tessera.client.InclusionProof")
203203
defer span.End()
@@ -212,8 +212,6 @@ func (pb *ProofBuilder) InclusionProof(ctx context.Context, index uint64) ([][]b
212212
}
213213

214214
// ConsistencyProof constructs a consistency proof between the provided tree sizes.
215-
// This function uses the passed-in function to retrieve tiles containing any log tree
216-
// nodes necessary to build the proof.
217215
func (pb *ProofBuilder) ConsistencyProof(ctx context.Context, smaller, larger uint64) ([][]byte, error) {
218216
ctx, span := tracer.Start(ctx, "tessera.client.ConsistencyProof")
219217
defer span.End()

0 commit comments

Comments
 (0)