Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Comments

New test vector transcript format#1315

Merged
gdbelvin merged 19 commits intogoogle:masterfrom
gdbelvin:transcript
Jul 11, 2019
Merged

New test vector transcript format#1315
gdbelvin merged 19 commits intogoogle:masterfrom
gdbelvin:transcript

Conversation

@gdbelvin
Copy link
Contributor

@gdbelvin gdbelvin commented Jul 11, 2019

This PR makes the test vector file format self contained.

Previously public verification keys and the contents they were verifying were contained in separate files.

@gdbelvin gdbelvin requested review from a team and thaidn as code owners July 11, 2019 07:29
@codecov
Copy link

codecov bot commented Jul 11, 2019

Codecov Report

Merging #1315 into master will decrease coverage by 0.39%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1315     +/-   ##
=========================================
- Coverage   30.45%   30.06%   -0.4%     
=========================================
  Files          45       46      +1     
  Lines        3769     3815     +46     
=========================================
- Hits         1148     1147      -1     
- Misses       2445     2492     +47     
  Partials      176      176
Impacted Files Coverage Δ
core/testdata/io.go 0% <0%> (ø)
core/integration/client_tests.go 0% <0%> (ø) ⬆️
core/integration/monitor_tests.go 0% <0%> (ø) ⬆️
core/client/client.go 29.55% <0%> (-0.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80d34ad...18355a4. Read the comment docs.

@@ -0,0 +1,53 @@
// Copyright 2019 Google Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is transcript_go_proto a canonical name for this folder? Technically, transcript.proto can be compiled into other languages (although it's not the case here).

Copy link
Contributor Author

@gdbelvin gdbelvin Jul 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a tricky one...

  1. It's Google policy to have go proto packages end in *_go_proto
  2. When importing into Bazel, the *.pb.go files get dropped, and only the proto file remains
  3. The import script also modifies every import/path/A -> package/import/path/A/A

By putting the file in this directory, I think everything should be consistent (for go) automatically.

Alternatively, I can put the transcript.proto file on directory up, and then special case it in the import script.

@@ -0,0 +1,31 @@
{
"description": "TestMonitor",
"directory": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test, as well as TestListHistory and a couple of others, has no RPCs. Is this expected, and they are still different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected.

At the moment they are not generating RPCs because the individual tests are not generating them.
What I mean to say is that, at the moment, the RPCs are not being collected in a consistent way.
They are being synthetically synthesized rather than properly recorded with an interceptor.
This is because we are still injecting client state into the Action. When I remove that, I can properly capture all the RPCs and these files won't be empty.

@gdbelvin
Copy link
Contributor Author

Updated, PTAL

Copy link
Contributor

@pav-kv pav-kv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take another look at err := WriteTranscript comment before submitting.

@gdbelvin
Copy link
Contributor Author

Sharp eye. Thanks for that

@gdbelvin gdbelvin merged commit a9cb328 into google:master Jul 11, 2019
@gdbelvin gdbelvin deleted the transcript branch July 11, 2019 15:50
gdbelvin added a commit to gdbelvin/keytransparency that referenced this pull request Jul 15, 2019
* master:
  New test vector transcript format (google#1315)
gdbelvin added a commit to gdbelvin/keytransparency that referenced this pull request Jul 18, 2019
* master: (106 commits)
  Remove unused logVerifier (google#1324)
  Verify Revisions in StreamRevisions (google#1323)
  Pair verifier functions (google#1322)
  Split VerifyRevision into Verify{LogRoot,MapRevision (google#1318)
  Make Previous hash check optional (google#1307)
  Remove VerifySignedMapRoot from VerifierInterface (google#1320)
  Remove trailing whitespace (google#1321)
  Encapsulate Client Verifier State in test vectors (google#1316)
  Pass along err message (google#1314)
  Remove unnessesary func() (google#1319)
  New test vector transcript format (google#1315)
  Track map revision inside mutation (google#1310)
  Move verifier to its own package (google#1312)
  go generate ./... (google#1306)
  Fix proto copying in revisions and paginator tests. (google#1309)
  Fix proto copying in server_test. (google#1308)
  go mod tidy (google#1305)
  Use new TrillianMapWrite API (google#1304)
  Configurable maximum queue depth for metric reporting. (google#1303)
  Proposal to refine docker deployment (google#1302)
  ...
gdbelvin added a commit to gdbelvin/keytransparency that referenced this pull request Jul 18, 2019
* master: (95 commits)
  Remove unused logVerifier (google#1324)
  Verify Revisions in StreamRevisions (google#1323)
  Pair verifier functions (google#1322)
  Split VerifyRevision into Verify{LogRoot,MapRevision (google#1318)
  Make Previous hash check optional (google#1307)
  Remove VerifySignedMapRoot from VerifierInterface (google#1320)
  Remove trailing whitespace (google#1321)
  Encapsulate Client Verifier State in test vectors (google#1316)
  Pass along err message (google#1314)
  Remove unnessesary func() (google#1319)
  New test vector transcript format (google#1315)
  Track map revision inside mutation (google#1310)
  Move verifier to its own package (google#1312)
  go generate ./... (google#1306)
  Fix proto copying in revisions and paginator tests. (google#1309)
  Fix proto copying in server_test. (google#1308)
  go mod tidy (google#1305)
  Use new TrillianMapWrite API (google#1304)
  Configurable maximum queue depth for metric reporting. (google#1303)
  Proposal to refine docker deployment (google#1302)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants