Add a tlog-policy parser - #269
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #269 +/- ##
==========================================
- Coverage 82.57% 79.66% -2.91%
==========================================
Files 5 9 +4
Lines 241 890 +649
==========================================
+ Hits 199 709 +510
- Misses 30 99 +69
- Partials 12 82 +70 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c3b8c21 to
d94901d
Compare
mhutchinson
left a comment
There was a problem hiding this comment.
Looks good to me, but I'd like to have @AlCutter approve too.
| // log <vkey> [<url>] | ||
| type Log struct { | ||
| // Verifier verifies this log's checkpoint signatures. Its Name() is the | ||
| // key name from the vkey, which per the spec MUST correspond to the |
There was a problem hiding this comment.
FWIW, tlog-checkpoint says "The log’s key name in its signature line SHOULD match the origin line".
While mostly it'd be cool if everyone treated that as a MUST, MTC unfortunately doesn't. I think it's okay, in that Satisfied will still works even if Verify doesn't, so mostly just flagging it for thoughts rather than requesting any particular changes.
There was a problem hiding this comment.
This comes from https://c2sp.org/tlog-policy#defining-a-log: "name MUST correspond to the log's origin line".
It's tricky because - as far as tlog-policy is concerned, I think (?) this must hold true (for at least Verify) to be able to function.
But yeah, tlog-checkpoint clearly differs on this point, presumably to allow flexibility in how checkpoints are verified.
I think this probably nets out as: usecases in which the key name in the signature does NOT match the origin line should not use tlog-policy (at least not with log lines specified - remember they are optional). And if/when there are well-specified mechanisms for identifying the origin signatures in the checkpoint, we should update tlog-policy to include those (if at all possible).
WDYT?
There was a problem hiding this comment.
Yeah, that seems reasonable.
There was a problem hiding this comment.
cc @rgdd @niels-moller who might be interested in this discussion
A new `TLogPolicy` type exposing `Marshal`/`Unmarshal` functions, and `Satisfied`/`Verified` for checking quorum satisfaction / verifying checkpoints.
f254a43 to
88b1154
Compare
No description provided.