transparency-dev / transparency-dev/tessera

Feature: Thread-safe `ProofBuilder`

Open
#892 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
238
Forks
56
Avg merge
1d 2h
Merged PRs (30d)
35

Description

Description

The current ProofBuilder is not thread-safe. There is a demand from personality applications to build the proof after the entries have merged into the tree. If there are 500 entries being merged in a batch, the application will then create 500 ProofBuilders fetching the same tiles from the storage and doing the hashing works again and again. This becomes the performance bottleneck which slows down the write QPS.

https://github.com/transparency-dev/tessera/blob/05ff747c43888e4b42aa441f43080a560c9ae895/client/client.go#L186-L195

A thread-safe ProofBuilder is needed to generate the proofs concurrently and effectively.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at client/client.go lines 186-195 and trace how ProofBuilder instances fetch tiles and perform hashing. Determine the concurrency and shared-work requirements from the existing proof-building path. Done means proofs can be generated concurrently with a thread-safe ProofBuilder while avoiding repeated tile fetching and hashing for merged entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.