Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WithCheckpointVerifier to tessera.StorageOptions for parsing checkpoints #83

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

roger2hk
Copy link
Contributor

@roger2hk roger2hk commented Jul 24, 2024

#21

@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 32.67%. Comparing base (46ec9c2) to head (0201b00).
Report is 7 commits behind head on main.

Files Patch % Lines
cmd/example-mysql/main.go 0.00% 7 Missing ⚠️
log.go 0.00% 7 Missing ⚠️
cmd/example-gcp/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
- Coverage   35.80%   32.67%   -3.13%     
==========================================
  Files          16       18       +2     
  Lines        1363     1469     +106     
==========================================
- Hits          488      480       -8     
- Misses        801      917     +116     
+ Partials       74       72       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@roger2hk roger2hk force-pushed the mysql-parse-checkpoint branch 4 times, most recently from 0847da1 to 9408476 Compare July 24, 2024 09:29
@roger2hk roger2hk marked this pull request as ready for review July 24, 2024 09:30
Copy link
Collaborator

@AlCutter AlCutter left a comment

Choose a reason for hiding this comment

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

Just a thought, would it make sense to roll this into the existing WithCheckpointSigner() option?

The existing storage implementations don't need a verifier since they store state internally and just "render" checkpoint from that so never need to verify it, but if there will be other patterns where this isn't case (POSIX too, presumably?) then it'd probably make sense to pop signer & verifier in the same option; it'll avoid bugs where someone passes a signer but not a verifier, and then they only find out when their binary crashes when it tries to integrate.

@roger2hk roger2hk force-pushed the mysql-parse-checkpoint branch 3 times, most recently from 83d2852 to dff5805 Compare July 24, 2024 12:40
@roger2hk
Copy link
Contributor Author

Just a thought, would it make sense to roll this into the existing WithCheckpointSigner() option?

The existing storage implementations don't need a verifier since they store state internally and just "render" checkpoint from that so never need to verify it, but if there will be other patterns where this isn't case (POSIX too, presumably?) then it'd probably make sense to pop signer & verifier in the same option; it'll avoid bugs where someone passes a signer but not a verifier, and then they only find out when their binary crashes when it tries to integrate.

Good point. I have refactored the WithCheckpointSigner to WithCheckpointSignerVerifier.

@roger2hk roger2hk merged commit 35f9635 into transparency-dev:main Jul 24, 2024
4 checks passed
@roger2hk roger2hk deleted the mysql-parse-checkpoint branch July 24, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants