transparency-dev / trillian-tessera

Go library for building tile-based transparency logs (tlogs)
Apache License 2.0
8 stars 7 forks source link

[PersonalityKit] Provide a simple sync-add wrapper #193

Open AlCutter opened 1 week ago

AlCutter commented 1 week ago

Some personalities want to delay returning from calls to their Add API until the provided entry is integrated into the tree (e.g. Sigstore does this currently).

Tessera's Add function returns as soon as an index is durably assigned to the entry, but it does not guarantee that the entry has been integrated at that point (although it should be integrated within seconds).

A simple wrapper which can be used to "decorate" Tessera's Add API could monitor the growth of the log (e.g. by watching checkpoint), and block until the observed log size is larger than the durably assigned index.

mhutchinson commented 1 week ago

Note that #182 converts the main Add() method to return futures. We should consider returning a future from this mixin if appropriate.