Skip to content

Restore the full logical clock from durable replay history #1669

Closed

Description

@hmzakhalid

Audit reference: I25

What can go wrong

After restart, the hybrid logical clock could resume from an old snapshot and assign timestamps earlier than events already durable in the post-snapshot log.

When it happens

The gap occurs when a snapshot is stale but later events are replayed before the node returns to live mode.

What changed

Clock recovery now considers both snapshot state and the maximum complete packed timestamp in replayed history.

Why the change works

The first new event is ordered after every durable event, including logical-counter ties within the same physical time.

Checks

Physical/logical time, overflow, restart, and stale-snapshot backlog tests pass.

Activity

  1. added
    bugSomething isn't working
    ciphernodeRelated to the ciphernode package
    on Jul 11, 2026
  2. hmzakhalid commented on Jul 13, 2026

    @hmzakhalid
    CollaboratorAuthor

    Fixed in a6fb687da6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingciphernodeRelated to the ciphernode package

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions