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

Review witness handling of empty log states #265

Closed
2 tasks done
mhutchinson opened this issue Sep 18, 2024 · 0 comments · Fixed by #266
Closed
2 tasks done

Review witness handling of empty log states #265

mhutchinson opened this issue Sep 18, 2024 · 0 comments · Fixed by #266
Assignees

Comments

@mhutchinson
Copy link
Contributor

mhutchinson commented Sep 18, 2024

The checkpoint for an empty log (size 0) is a known special case. Consistency proofs from this size don't make sense because the empty hash is not actually a prefix. In essence, anyone that takes a Checkpoint of size 0 must TOFU the next tree size they receive for this log.

transparency-dev/merkle#140 makes a change to make this more explicit. It's likely that when this witness library is updated to pull in that change that witnesses that see a log first at size 0 will fail to verify consistency, based on my reading of the code.

TODO:

  • add tests for this case
  • support ratcheting forward from tree size 0 checkpoints

Note that this really is an edge case as witnesses are very unlikely to see a log starting in the empty state. By the time logs are added to a witness network, they have always had contents, and this is likely to continue. That said, having a case where the witness can fail to progress for a log is not good and should be fixed.

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 a pull request may close this issue.

1 participant