Witness can't recover from invalid proof supplied to TOFU update
AlCutter opened this issue · 0 comments
AlCutter commented
I just got myself into a pickle - I accidentally misconfigured a witness for a compact-range based log, forgetting to set UseCompact: true
in the witness config. The feeder happily sent down the TOFU checkpoint + proof, which the witness stored in the DB, but the next attempt to update failed with:
main.go:97] Failed to feed: failed to update checkpoint: bad status response (500 Internal Server Error): "failed to update to new checkpoint: couldn't unmarshal proof: data should have trailing newline on last hash too\n"`
Eventually I figured out what I'd done wrong, and I updated the witness config, but the witness was borked for that log and the only way to recover without losing the state for the other logs being witnessed was to use the sqlite3
tool and manually delete the row corresponding to the borked log.