Skip to content

Consistency check keeps failing when starting from an empty Rekor log #698

@fghanmi

Description

@fghanmi

Description

We're encountering an issue when starting rekor-monitor against a fresh Rekor instance with an empty log.

Steps to Reproduce

  1. Start with a fresh Rekor server (empty log).
  2. Run the monitor:
./rekor_monitor --file=checkpoint_log.txt --once=false --url=https://<rekor-server-url>

# output:
error running consistency check: failed to verify previous checkpoint: failed to verify log consistency: consistency proofs can not be computed starting from an empty log
  1. Push a single item to the Rekor log.
  2. Re-run the monitor:
./rekor_monitor --file=checkpoint_log.txt --once=false --url=https://<rekor-server-url>

# output again:
error running consistency check: failed to verify previous checkpoint: failed to verify log consistency: consistency proofs can not be computed starting from an empty log

Expected Behavior
I am wondering if the expected behavior is as follows:
Once a single entry is present, rekor-monitor should recognize it as a valid checkpoint and produce output similar to:

Root hash consistency verified - Current Size: 1 Root Hash: 385adfc2cb022834e1b9208e4da6f3820715794edd74c19acb5f1c2518e0106a - Previous Size: 1 Root Hash: 385adfc2cb022834e1b9208e4da6f3820715794edd74c19acb5f1c2518e0106a

In this case, it appears the tool currently doesn't handle the transition from an empty log (size 0) to size 1 gracefully.

Version

latest

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