---
library: "bootstrap"
slug: "TimeWarpLog"
name: "TimeWarpLog"
ref: "TimeWarpLog#755f"
hash: "sema:TimeWarpLog#mh:SHA-256:755f480a60517d8e99807da674019db06ab0b7b2edabcc806d833947da4446e4"
type: "Primitives"
layer: "Infrastructure"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/TimeWarpLog"
---

# TimeWarpLog

Handling relativistic event ordering

Infrastructure · Primitives

## Mechanism

Events are not ordered by wall-clock time but by 'causal cones'. An [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) accepts an event from the 'past' if it doesn't contradict its current causal cone. The log's append position is driven by a [MonotonicCounter](https://semahash.org/vocabularies/bootstrap/patterns/MonotonicCounter.md) so that once an event is admitted to a cone, no earlier-sequenced event can supersede it. Allows for massive latency tolerance. Utilizes [WorldReversible](https://semahash.org/vocabularies/bootstrap/patterns/WorldReversible.md), [CausalBarrier](https://semahash.org/vocabularies/bootstrap/patterns/CausalBarrier.md).

## Invariants

- Immutability: past entries cannot be modified.
- Indexability within retention: Seek(T) returns deterministic [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md)(T) for any T inside `retention_window`.
- Causal consistency: events are accepted only if they do not contradict the current causal cone.

## Parameters

- granularity: type=Duration, range=[1ms, 1min], description=Resolution of time travel
- index_strategy: type=Enum, range={Time, Causal, Hybrid}, description=How to organize history
- retention_window: type=Duration, range=[1h, 30d], description=How far back to retain

## Preconditions

- Storage supports append-only writes

## Postconditions

- [System](https://semahash.org/vocabularies/bootstrap/patterns/System.md) state matches T_target

## Failure modes

- User confusion about 'when' things happened.

## Caution

Causal cone is only as trustworthy as the identities signing events. Unsigned or weakly-authenticated events can rewrite perceived history.

## Where this came from

—

## Builds on

- [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) (references)
- [WorldReversible](https://semahash.org/vocabularies/bootstrap/patterns/WorldReversible.md) (references)
- [CausalBarrier](https://semahash.org/vocabularies/bootstrap/patterns/CausalBarrier.md) (references)
- [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) (references)
- [System](https://semahash.org/vocabularies/bootstrap/patterns/System.md) (references)
- [MonotonicCounter](https://semahash.org/vocabularies/bootstrap/patterns/MonotonicCounter.md) (references)

## Used by

- [Compensate](https://semahash.org/vocabularies/bootstrap/patterns/Compensate.md) (references)
- [DocumentedOverride](https://semahash.org/vocabularies/bootstrap/patterns/DocumentedOverride.md) (composes_with)
- [LazyConsensus](https://semahash.org/vocabularies/bootstrap/patterns/LazyConsensus.md) (references)
- [TraceBelief](https://semahash.org/vocabularies/bootstrap/patterns/TraceBelief.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: TimeWarpLog#755f
- Hash: sema:TimeWarpLog#mh:SHA-256:755f480a60517d8e99807da674019db06ab0b7b2edabcc806d833947da4446e4

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/TimeWarpLog
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/TimeWarpLog.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
