Upgrade Trillian to v1.5.0
Trillian v1.5.0 has been released, and we never updated to 1.4.0 which was released in September. Some structures changed format and so will require a little bit of adapting in pkg/db, see compile errors.
Some more info:
- Update trillian version to latest
- go get github.com/google/trillian@latest
- go test internal/db/*
- bunch of errors due to changed grpc data structures and/or endpoints
- Trillian API .proto files, generated code in same repo:
- Update mock in internal/mocks, adding a cheat-sheet below for mock generation.
It would probably be a good idea to first add back the unit tests for AddLeaf that are currently in comments before upgrading. It was never refactored after ln5 changed so that we can return 202 unless we know we have sequenced+replicated an entry.
(And we'd be even happier if we also got unti tests for add sequenced leaves. At minimum to accept MR -> current unit tests pass, and integration test passes.)
mock generation:
# Mock an interface
# - destination is the path to where we want to store our mock
# - package is the package that this file will be stored in
# - next is the path where an interface lives
# - finally comes the interface(s) that we want to mock (Doer,Doer2)
mockgen -destination=mocks/mock_doer.go -package=mocks github.com/sgreben/testing-with-gomock/doer Doer
Edited by Rasmus Dahlberg