Skip to content

Timestamping

What a receipt contains

A receipt record (Attestation) contains:

  • hash: the 32-byte SHA-256 digest the client submitted;
  • timestamp: a time label the gateway assigns when it saves the job;
  • network_id: the network identifier;
  • sequence: the gateway's sequence number; and
  • key_epoch: which key set signed it (see key changes).

Each signer adds its own signature together with its own clock reading at signing time, signed_at. The exact signed bytes are defined in Protocol v2.

Three times, three meanings

Time Who sets it Meaning
timestamp gateway A label. Every counted signer checked it was within max_skew_secs (default 300 s) of its own clock.
signed_at (per signer) each signer That signer's clock when it signed.
signed_at_latest verifier, from counted signatures The hash existed no later than this time, if at least one counted signer is honest and its clock is right.

Why signed_at_latest is the meaningful bound: an honest signer can only sign after the hash exists, so the latest counted signer time is at or after the honest signer's time. Dishonest signers can push this bound later (making it weaker) but cannot pull it earlier. Backdating a receipt therefore needs every counted signer to collude — at least the network's minimum signature count.

A receipt says nothing about how long before that time the hash existed.

Signer clock checks

Each signer refuses to sign when:

  • the gateway's proposed timestamp is more than its max_clock_skew from its clock;
  • its wall clock jumped relative to its monotonic clock (a step of more than 1 s plus 0.1 % of elapsed time) — it then refuses for clock_recovery_secs (default 60) before recalibrating; or
  • require_clock_sync is enabled (Linux) and the kernel reports the clock as unsynchronized.

These checks catch a stepped or unsynchronized clock. They cannot catch a clock that is consistently wrong because its time source is wrong; use independent time sources for different signers.

Job lifecycle

POST /v1/attestations validates a hash, deduplicates by hash, and saves one job per hash. Workers retry signer calls with bounded backoff. The saved timestamp never changes on retry, so the job's signing window (WITNESS_JOB_SIGNING_WINDOW_SECS) must not exceed the network's max_skew_secs; the gateway refuses to start otherwise. When the window expires the job becomes terminal failed with last_error: "signing_deadline_exceeded". Resubmitting the same hash returns the original job.

Key changes

Receipts name their key_epoch. After a routine key change, old receipts stay valid with the old keys. After a key compromise, a receipt from the compromised epoch is accepted only if it is in the log at the checkpoint recorded in the key transition; its time bound is then the transition's effective_at, because the old keys' clock readings can no longer be trusted.

Non-goals

A receipt is not proof of the original content, authorship, ownership, or the time content was created. It does not prove the gateway was honest beyond the signatures and proofs a verifier checks. A hash does not hide a low-entropy or publicly guessable document.