google / google/trillian

Refactor logs operation

Open
#1,640 4 comments 1 reaction 0 assignees View on GitHub
cleanup
Dominant language
Go
Stars
3.7k
Forks
465
Avg merge
2d 16h
Merged PRs (30d)
5

Description

`LogOperation` and its co-types are poorly designed:
- [ ] They are meant to be stateless, but in reality there are caches in various places like `SequencerManager` (see the list below). We should rather make an explicit per-tree cache that can be extended (e.g. with compact ranges cached between sequencing runs as in #1598).
- [ ] Interfaces and method signatures are redundant. For example, `log.NewSequencer` takes a `Signer` created from a `Tree`, but then the same `Tree` is passed into `sequencer.IntegrateBatch` when in fact there is only one `Tree` that can be accepted.
- [ ] `log_operation_manager.go` is meant to be agnostic of sequencing, but it contains a bunch of sequencing-related metrics. It is likely that `LogOperation` abstraction is YAGNI.
- [ ] TODO: Keep listing changes.

The list of things we cache:
- Log names (in `OperationManager`).
- Signers (in `SequencerManager`).
- Masterships (in `OperationManager`).
- Compact ranges (not yet).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.