Skip to content

Witness can't recover from invalid proof supplied to TOFU update #532

@AlCutter

Description

@AlCutter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions