Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

should synthesize empty STHs #143

Closed
pphaneuf opened this issue Sep 12, 2014 · 2 comments
Closed

should synthesize empty STHs #143

pphaneuf opened this issue Sep 12, 2014 · 2 comments

Comments

@pphaneuf
Copy link
Contributor

When the log is empty, get-sth returns this:

{
  "tree_size":0,
  "timestamp":0,
  "sha256_root_hash":"",
  "tree_head_signature":"AAAAAA=="
}

It should instead sign an empty tree (which can be done on the fly, not a big deal), and return that.

@pphaneuf
Copy link
Contributor Author

I don't like the "no STH in the database" state at all.

To solve it properly, you have to have a TreeSigner object kicking around, which we might not want to have on frontends (if we were to separate serving frontends and signers). Having them requires further distribution of the log private key, which is one of the reasons brought out for separating the frontends from the signers.

Down the line, I think I'd like it better if frontends would not start serving at all until they found some STH to serve, rather than try to synthesize a fake STH.

PR #148 starts down that road, at first by making sure that there is some valid STH locally (since the frontend and the signers are still intertwined at the moment)...

@pphaneuf
Copy link
Contributor Author

This doesn't happen anymore with PR #148 merged in, and @benlaurie agrees that it makes sense to not start serving until we have an STH (no need to synthesize them).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant