Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(ctx context.Context, origin string, verifier note.Verifier, f Fetcher, N uint, bundleHasher func([]byte) ([][]byte, error)) error
Check performs an integrity check against a log via the provided fetcher, using the provided bundleHasher to parse and convert entries from the log's entry bundles into leaf hashes.
The leaf hashes are used to: 1. re-construct the root hash of the log, and compare it against the value in the log's checkpoint 2. re-construct the internal tiles of the log, and compare them against the log's tile resources.
The checking will use the provided N parameter to control the number of concurrent workers undertaking this process.
Types ¶
type Fetcher ¶
type Fetcher interface { ReadCheckpoint(ctx context.Context) ([]byte, error) ReadTile(ctx context.Context, l, i uint64, p uint8) ([]byte, error) ReadEntryBundle(ctx context.Context, i uint64, p uint8) ([]byte, error) }
Fetcher describes a struct which knows how to retrieve tlog-tiles artifacts from a log.
Click to show internal directories.
Click to hide internal directories.