CI fmt · clippy -D warnings · test 1000 seeds × 3 scenarios 3000 / 3000 runs PASS 0 failing seeds 158 tests native 13 re-run under wasm32-wasip1 wasm32-unknown-unknown compiled 6 golden vectors 6 export-pack fixtures 4 specs · 5 ADRs evidence pack 515 bytes tamper → exit 1 vigil-verify links only vigil-core

append-only incident ledger · no server · no consensus · no trusted clock

A meeting is
the proof of time.

An append-only incident ledger that can defend when a record was created, with no server, no consensus, and no trusted clock.

Two nodes meet offline and co-sign each other’s current chain head. That signature is an upper bound — the record existed no later than the meeting; it never proves the record did not exist earlier. Where no meeting covers a record, the answer is unwitnessed, and the window stays open. spec/02 §5.2, §8.1

Offline systems record whatever the device clock said, and a device clock is a settable field. Vigilarch replaces the clock with contact. README · opening

README · measured results · one command, clean checkout

Numbers, and where each one came from.

1000 seeds per scenario Every (scenario, seed) pair drives the real ledger once.README · measured results
3 scenarios, each run once per seed minimal, equivocation, sealing-ablation.README · measured results
3000 of 3000 runs passed The runner asserts pass + fail equals the seed count before printing anything.README · measured results
0 failing seeds Individual failing seeds are kept, not just a counter, and named on exit.README · measured results
158 tests, cargo test --workspace Summed across every target in the workspace.counted from the suite
13 of them re-run under wasm32-wasip1 The vector assertions, re-run under wasmtime in CI. A native-only run cannot see an encoding divergence.ci.yml · job wasm
6 golden vectors, hand-written first CI regenerates them and fails on any byte diff.tests/vectors.rs · const VECTORS
6 export-pack fixtures, three of them tampered Honest, earliest-held, fork-witness, and T1–T3.testdata/packs/*.vgl
4 / 5 specifications / decision records Written before or with the code they describe; a spec change needs an ADR.spec/ · docs/adr/
515 bytes in the exported evidence pack The minimal object set the claim follows from — honest.vgl.README · demo transcript, step 3

cargo run -p vigil-sim --release -- --scale-up --seeds 1000. The runner also prints in 7.274s, a monotonic diagnostic to catch an algorithmic regression; it varies run to run and is not a benchmark. Witness-latency distribution, attestation-graph density and key-attribution accuracy are not measured yet and will not be filled in with estimates.

the problem · sourced, and deliberately without statistics

Four things go wrong when the network is usually down.

Vigilarch starts from the premise that the partition is the normal state, not the failure state. Each problem below is one this repository names in a specification or an invariant. There are no field numbers here because there is no field: this is a public repository with a self-contained demo, not a product.

Capture loss

A record written on a device with no connection has nothing outside itself vouching for it. If it is lost, altered or simply never syncs, nothing anywhere contradicts the new version.

README · opening  ·  spec/04 §2.3

Weak time evidence

Offline systems record whatever the device clock said, and a device clock is a settable field. Vigilarch treats it as attacker-controlled input: no wall-clock read may enter the ledger at all, and hlc is a merge hint, never evidence.

invariant I4  ·  clippy.toml

Epistemic dishonesty

A gap in the record looks identical to a quiet shift. A system that interpolates across it, or reports a confident best estimate, has invented evidence. Vigilarch answers unwitnessed and shows the width of what it cannot account for.

invariant I5  ·  spec/02 §8.3

Cross-site isolation

Two sites that never meet each other cannot order their records against one another, and in wire version 1 a courier between them does not close that gap either. The honest output is incomparable — which is what this repository reports, and says so as an open item rather than a solved one.

spec/04 §5.2  ·  ADR-0003 Part 2

spec/04 §2.1 · the mechanism, in brief

Eight stages, and none of them is a clock.

Hover or focus a stage to light it and its neighbours. Where a stage has a live value under it, that value came back from the ledger running in this browser a moment ago — the same run the card at the top of the page printed.

  1. 01

    Observe

    A note is written on a device that may never have been online.

  2. 02

    Hash

    Deterministic CBOR, then BLAKE3. The identifier is the content.

  3. 03

    Sign

    Ed25519, domain-separated. A signature does not verify over the bare id.

    "vigilarch/1/sig" || 0x00 || idsrc/sign.rs — a constant, not a computed value
  4. 04

    Append

    seq and prev come from the store, not from the writer.

  5. 05

    Meet

    Two nodes come into contact. Nothing about wall-clock time is exchanged.

  6. 06

    Attest

    Each signs a statement about the other’s head: subject, seq, head.

  7. 07

    Entangle

    Observations and attestations become one DAG of causal-past edges.

  8. 08

    Verify

    bracket() returns sealed or unwitnessed — never a guess in between.

  1. 01

    Append

    Every node keeps a hash-linked chain of its own observations: entry n carries prev = the content address of entry n−1, and seq = n. A node cannot insert into its own past without either breaking a prev link or publishing two entries at one seq — both detectable.

    spec/01 §6.1, §6.6

  2. 02

    Meet

    When two nodes meet, each signs an attestation about the other’s current chain head: “I, the witness, saw the subject present head H at seq s.” The attestation says nothing in wall-clock terms. Each node embeds the attestation naming it as subject into its own next entry, via acks.

    spec/01 §6.5 · spec/02 §3.4

  3. 03

    Seal

    Attestations and observations form a DAG whose edges all mean “the tail is in the causal past of the head.” A record is sealed when an attestation by a witness other than its author provably follows it. Otherwise it is unwitnessed, and the window is left open rather than guessed at.

    spec/02 §4.2, §5.2

  4. 04

    Verify

    vigil-verify takes the evidence pack and the organisation’s public key, re-parses every object, rebuilds the chain and the DAG, and recomputes every bracket from scratch. It links only vigil-core — a second implementation written from the spec, not a call back into the code that built the pack. No database, no network, no node.

    spec/03 §5 · ADR-0005

spec/02 §3–§5 · spec/03 §5  ·  diagram

Evidence emerges from contact between independent histories.

No node here is the source of truth. Each device holds only its own chain; the ordering facts appear where two of those chains touch. Hover or focus any box to light its path.

trust boundary Device A own key · own chain Device B own key · own chain Device C a third, same shape meeting Local ledger append-only seq · prev · signature Attestation DAG causal-past edges pure function of the held set bracket() sealed | unwitnessed LU vigil- verify independent evidence pack 515 bytes

The diagram scrolls sideways on a narrow screen, and every box in it is repeated in words below.

Device A

Holds one Ed25519 key and the append-only chain of its own observations, and nothing else. It has no authority any other node lacks — a hub, where an organisation runs one, is a convenience peer.invariant I1 · spec/02 §3

Device B

The same shape as A, and the reason A can be bracketed at all: a witness must be a key other than the author, so a record can never seal itself.spec/02 §5.1

Device C — drawn dashed

A third node of the same shape. It is dashed because the in-browser demo instantiates two; drawing a third solid box would imply a running topology this page does not have. A node that has met nobody since genesis is not detectable, and the correct output for it is a wide unwitnessed window — not an alarm.spec/04 §2.3

The meeting

Contact between two devices. Each signs an attestation about the other’s current chain head — subject, seq, head — and nothing in wall-clock terms is exchanged. This is the only event in the system that creates time evidence.spec/01 §6.5 · spec/02 §3.4

Local ledger

Per-key hash chains behind a Store trait, with an in-memory backend always available so the ledger stays compilable to wasm32-unknown-unknown. Entry n commits to entry n−1; a chain reports as Verified, Incomplete or Violated, and the middle case is never upgraded to either neighbour.invariant I2 · spec/01 §6.6

Attestation DAG

Observations and attestations as vertices; every edge means “the tail is in the causal past of the head.” The graph is a pure function of the held set — the same objects in any ingest order give the identical DAG.spec/02 §4.2, §5.6

bracket()

Returns the upper bound U, the lower bound L, the witness depth and the unwitnessed window. Where the DAG does not establish an ordering the bound is None and the window is open on that side — never an interpolation. Adding a valid attestation may narrow a bracket; it may never widen one.spec/02 §5.5, §5.6

vigil-verify

Takes the evidence pack and the organisation’s public key, re-parses every object, rebuilds the chain and the DAG, and recomputes every bracket. It links only vigil-core — not vigil-ledger, not even as a dev-dependency — so it is a second implementation written from the specification rather than a call back into the code that produced the pack. No database, no network, no node.README · Layout  ·  ADR-0005

crates/vigil-wasm · the real ledger, in this browser

What it can actually do — shown, not asserted.

Five of the seven figures below are drawn from values the ledger returned in this browser moments ago. Two are diagrams of mechanisms this page does not run, and are labelled as diagrams. Nothing here is a decorative picture standing in for a computation happening somewhere else.

diagram observation created locally · no network involved
A

Work with no connection at all

The partition is the normal state. A record is written, hashed, signed and appended entirely on the device; nothing waits on a server, a quorum or a round trip.

This one is a diagram because the demo has no notion of connectivity to compute: vigil-wasm never opens a socket. Being offline is the setting here, not a state the ledger reports.

README · opening  ·  spec/04 §2.1
live
B

Prove its own history was not rewritten

Entry n carries prev = the content address of entry n−1, and seq = n. Changing anything in the past changes that entry’s address, which breaks every link after it. The only alternatives are a broken link or two entries at one seq — and both are detected.

Every seq, id and prev in the figure is a field on an entry the module returned from state(). Hover a block for its full address.

spec/01 §6.1, §6.6
live
C

Turn a meeting into evidence

When two nodes meet, each signs an attestation naming the other as subject, together with the seq and head it was shown. The witness must be a key other than the author, so a record can never seal itself.

The two ids in the figure are the content addresses of the attestations exchangeAttestation() actually produced in this browser.

spec/01 §6.5 · spec/02 §3
live
D

Entangle two independent histories

Observations and attestations form one directed graph in which every edge means “the tail is in the causal past of the head.” Once two chains share an attestation, facts about one constrain the other. The graph is a pure function of the held set: the same objects in any ingest order give the identical DAG.

The vertices are the entries and attestations state() returned. The chain edges are prev fields; the sealing edge is the upper_bound bracket() returned. No edge here is worked out in JavaScript — that would be a second implementation of the DAG, which invariant I2 forbids.

spec/02 §4.2, §5.6
live
E

Bound when a record was created — and show what it cannot bound

An attestation over a record proves it existed no later than that meeting. That is an upper bound, and it is the only kind an attestation gives. A lower bound, where one exists, is an ordering fact — “after that meeting” — and not a wall-clock time: turning it into one would need an external anchor, and v1 has none.

The axis below is causal order, not a clock, and carries no times for that reason. Bounded edges are solid; open edges are dashed and the fill fades out towards them, so an unbounded window cannot be misread as a tidy interval.

spec/02 §5.2, §5.3  ·  spec/04 §2.3
live
F

Catch one key signing two irreconcilable histories

Placing a record outside its bracket requires publishing a second entry at a seq the chain has already committed, or showing one witness a chain another witness’s attestation contradicts. Both are forks. A fork proof is self-verifying and attributes the collision to one key; quarantine then disputes that key’s unwitnessed records while leaving its pre-fork sealed ones valid.

The proof id, the collision label and the two colliding entry addresses below come from a real equivocate() call. The withheld sibling is the interesting one: no witness ever saw it, so it lands as disputed rather than being deleted — the dispute is itself evidence.

spec/02 §6.1, §6.4–6.5
diagram evidence pack honest.vgl 515 bytes org public key vigil-verify re-parse every object rebuild the chain rebuild the DAG recompute every bracket links only vigil-core chain VERIFIED per record: sealed · depth · window chain VIOLATED → exit 1 BrokenLink, attributed to a key a drawing of the process — vigil-verify is a native binary and does not run in this page
G

Hand the claim to someone who trusts none of it

The evidence pack is the minimal object set the claim follows from. vigil-verify takes the pack and the organisation’s public key and re-derives the answer from scratch — no database, no network, no node, and no call back into the code that built the pack. Feed it the tampered fixture and it reports VIOLATED, names the broken link, attributes it to the author key and exits non-zero.

This figure is a diagram, not a live check: vigil-verify is a native binary and is not compiled into this page. Run it yourself — that is rather the point of it.

spec/03 §5, §6.5 T2  ·  ADR-0005

README · invariants

Six rules the code is not allowed to break.

I1

No node is the source of truth.

The hub is a convenience peer with no authority an edge node lacks. If the hub burns down, the organisation loses convenience and nothing else.

enforced by code and CI
I2

One implementation of the ledger.

Chain, attestation and verification logic exists once, in Rust, and stays compilable to wasm32-unknown-unknown. Storage lives behind a Store trait and an in-memory backend is always available.

enforced by code and CI
I3

Capture is immutable.

Observation and Attestation are never edited.

enforced by code and CI
I4

No wall-clock reads in the ledger.

Enforced by clippy.toml. All time flows through the HLC, which is a merge hint and never evidence. Device clocks are attacker-controlled input.

enforced by code and CI
I5

Never overstate what the system knows.

Any computed confidence is conservative one-sidedly, and every simulator run asserts it. Overstating knowledge is the cardinal defect of this system.

enforced by code and CI
I6

Conflicting values are never silently resolved.

If semantic interpretation is ever modelled, two supervisors disagreeing on a severity assessment is information, not a merge failure. v1 has no interpretation layer, so nothing today enforces this.

design commitment · nothing enforces it in v1

README · what this does not claim  ·  spec/04 §2.3

What it knows, and what it does not.

A guarantee that is not stated precisely is not a guarantee. The right-hand column is not fine print; it is half the claim, and it is given the same weight here as the left.

What Vigilarch knows

  • That a chain has not been rewritten. Entry n commits to entry n−1. A chain reports Verified, Incomplete or Violated, and an incomplete chain is never quietly upgraded to a verified one. spec/01 §6.6 · tests/chain.rs
  • That a record existed no later than a given meeting. A valid attestation by a witness other than the author, over a head at or past the record’s seq, places the record before everything that follows that attestation in the DAG. spec/02 §5.2
  • Which key equivocated. Two entries from one key at one seq yield a self-verifying fork proof naming the key. Quarantine then disputes that key’s unwitnessed records and leaves its pre-fork sealed ones valid. spec/02 §6.1, §6.4–6.5
  • How wide the span is that it cannot account for. The unwitnessed window is reported rather than hidden, and narrowing it by trusting a clock would be the cardinal defect. spec/02 §8.3 · invariant I5
  • That the answer does not depend on who is asking. The DAG is a pure function of the held set; the bracket is identical across ingest orders and byte-identical across machines, and adding a valid attestation can only narrow it. spec/02 §5.5, §5.6
  • That a third party can re-derive all of it. From the pack and a public key, with no database, no network and no node — and using code that does not link the code that built the pack. spec/03 §5 · ADR-0005

What Vigilarch does not know

  • Upper bound only. An attestation proves a record existed no later than the meeting. It cannot prove the record did not exist earlier. spec/02 §8.1
  • A node isolated since genesis is not detectable. It can fabricate a complete, signature-valid, internally consistent chain with any clock values. There is no contradiction to find. The correct output is a wide unwitnessed window — not an alarm, a detection, or a fork. spec/04 §2.3 · spec/02 §8.2
  • No interpolation, ever. Where the attestation graph does not prove an ordering, the answer is unwitnessed. Never a best estimate. invariant I5
  • No defence against a real-time lie. A person who reports something false as it happens produces a record that seals perfectly. Entanglement orders records; it does not make people honest. spec/02 §8.5
  • Witness depth counts keys, not people. One actor holding several device keys can attest their own records under “distinct” keys and inflate the depth. One key per org-issued device is an operational assumption, not a cryptographic guarantee, and is not implemented in v1. spec/04 §2.3 · spec/02 §8.9
  • Relative, not absolute. Every bound is relative to other chain events and, ultimately, to the moment vigil-verify runs. “Before Friday” is shorthand for a chain of relative orderings — there is no trusted clock anywhere in this system, and no external anchor in v1. spec/04 §2.3 · spec/03 §7.3, §7.4

And none of this is a new protocol. Hash-linked timestamping is Haber–Stornetta (1991); mutual attestation between peer histories is Maniatis & Baker’s timeline entanglement (2002). The contribution here is the application to disconnected incident reporting, the honest surfacing of what is not known, and the measurement — not the primitives. README · What this does not claim

what the suite actually checks

Verification, and where it stops.

  • vigil-verify links only vigil-core — not vigil-ledger, not as a dependency and not as a dev-dependency. Its chain check, DAG construction and bracketing are a second implementation written from the spec.
    README · Layout  ·  ADR-0005
  • Equivocation yields one self-verifying ForkProof; quarantine disputes the convicted key’s unwitnessed records but keeps pre-fork sealed ones valid, and the withheld sibling is never sealed.
    crates/vigil-ledger/tests/fork.rs  ·  spec/02 §6.4–6.5
  • A chain is reported Verified / Incomplete / Violated, and the middle case never collapses into either neighbour. An incomplete chain is not a violated one, and neither is silently upgraded.
    crates/vigil-ledger/tests/chain.rs  ·  spec/01 §6.6
  • Property tests over every decode path — arbitrary, structurally plausible, mutated and truncated input never panics; rejection is total; canonical form is a bijection. These are property tests, not a coverage-guided fuzzer: a cargo-fuzz target needs nightly and does not run in this workspace’s CI, and the file says so rather than claiming the stronger thing.
    crates/vigil-core/tests/decode_robustness.rs
  • Native and wasm32 builds agree byte for byte — the divergence that would give one observation two content addresses and fork the ledger silently. The same vector assertions run on both targets in CI.
    .github/workflows/ci.yml · job wasm
  • Golden vectors were written by hand from the spec before the encoder existed, and CI regenerates them and fails on any byte diff. A vector generated by the encoder under test proves only that the encoder agrees with itself.
    testdata/README.md  ·  ci.yml · “Golden vectors are reproducible”
  • Signatures are domain-separated over "vigilarch/1/sig" || 0x00 || id, and do not verify over the bare id.
    crates/vigil-core/tests/vectors.rs  ·  src/sign.rs
  • Adding a valid attestation never widens a bracket, and the bracket is identical across ingest orders — the DAG is a pure function of the held set.
    crates/vigil-ledger/tests/bracket.rs, dag.rs  ·  spec/02 §5.5, §5.6
  • No wall-clock read can enter the ledger — banned in clippy.toml and made fatal by -D warnings in CI, so invariant I4 is a build failure rather than a review note.
    .github/workflows/ci.yml · job native
  • Open: two sites connected only through a courier get no ordering between them. An Attestation carries the subject’s head but nothing about the witness’s own chain position, so wire version 1 produces no cross-author DAG edge. Such records come out incomparable — the honest, conservative output. The mule-relay scenario is out of scope until a witness_seq field exists.
    spec/04 §5.2  ·  ADR-0003 Part 2

crates/ · the real call path

One record, end to end.

Every stage below is a function or a binary in this workspace. ./demo.sh walks it in six steps and prints its transcript into the README.

the call path
# capture — the device signs its own observation; seq and prev come from the store
capture                vigil-node     POST /obs
chain append           vigil-ledger   append(&mut store, &obs, &sig)     # guarded §6.6 write

# meet — a witness signs the subject's head; it lands in the subject's store
attestation exchange   vigil-ledger   ingest_attestation(&mut store, …)
DAG build              vigil-ledger   Dag::build(&store, &quarantine)
bracket                vigil-ledger   Dag::bracket(id)                   # sealed | unwitnessed

# hand it to a third party — the minimal object set the claim follows from
export pack            vigil-ledger   export_pack(&store, claim)         # 515 bytes, honest.vgl
independent verify     vigil-verify   vigil-verify <pack> <org-pubkey>   # links only vigil-core

# and the detection has to fire, or it is not a detection
tampered pack          vigil-verify   testdata/packs/t2-resigned-genesis.vgl
                       → chain VIOLATED · BrokenLink at seq 1 · attributed to the author key · exit 1

README · Demo transcript, steps 3–5  ·  spec/03 §5, §6.5 T2

spec/04-threat-model.md

Questions the threat model already answers.

Does Vigilarch detect backdating?

Not in general. An actor who sets a false hlc on an observation and appends it honestly to their own chain — correct prev, correct seq, no second entry at that position — produces a record that passes every check the system performs. The chain verifies. The bracket is computed correctly, and the false hlc sits inside that bracket where it changes no bound.

Backdating becomes catchable only when it additionally requires equivocation: inserting a record at a seq position the chain has already committed, or presenting one witness a chain that another witness’s attestation contradicts. Those are forks, and forks are detected and attributed.

spec/04 §4

What does a sealed verdict actually prove?

That the record provably existed no later than meeting U, and — where a lower bound exists — provably no earlier than meeting L in causal order. Backdating past U would require forging the witness’s key or having shown that witness a different chain, and the second is a fork.

It does not mean the record’s hlc is truthful.

spec/04 §2.2, §4

What happens to a node that has never met anyone?

It can fabricate a complete, signature-valid, internally consistent chain with any clock values, and there is no contradiction to find. The correct output is a wide unwitnessed window — open to genesis below, open to now above — labelled unwitnessed.

That is not an alarm, a detection, or a fork. The honest-partition scenario asserts exactly this: no alarm.

spec/04 §2.3  ·  spec/02 §8.2

Can a courier connect two sites that never meet each other?

Not in wire version 1. An Attestation carries the subject’s head but nothing about the witness’s own chain position, so the three edge rules produce no edge between two different authors’ chains. A mule that entangles Site A and then Site B issues two attestations, but nothing records the order it issued them in — the path Site A → mule → Site B does not exist in the graph.

Two sites connected only through a mule therefore produce incomparable records, which is the honest, conservative output rather than a correctness defect. The courier still tightens each site’s own brackets. Closing the gap needs a new witness_seq field and a fourth edge type, with its own ADR and a new golden vector.

spec/04 §5.2  ·  ADR-0003 Part 2

Does a witness depth of 3 mean three people vouched for this?

No — witness depth counts keys, not people. One actor holding several device keys can attest their own records under “distinct” keys and inflate the depth. The mitigation is one key per organisation-issued device, which is an operational assumption rather than a cryptographic guarantee, and it is not implemented in v1.

spec/04 §2.3  ·  spec/02 §8.9

So what does force a backdater into the open?

Within its bracket [L, U] a node may set a record’s hlc to any value; no bound depends on it. To place a record before its lower-bound meeting, the author must publish a second entry at an already-committed seq without that meeting in its acks. To place it after its upper-bound meeting, the author must have shown that witness a chain without the record.

Both are forks — detectable and attributable to a key the moment one verifier holds both branches. Escaping the bracket is not a subtle attack; it is a fork.

spec/04 §2.4  ·  spec/02 §5.4, §6.1

Is the protocol new?

No, and the repository is deliberate about saying so. Hash-linked timestamping is Haber–Stornetta (1991); mutual attestation between peer histories is Maniatis & Baker’s timeline entanglement (2002). The contribution is the application to disconnected incident reporting, the honest surfacing of what is not known, and the measurement.

README · What this does not claim

two nodes · one meeting · your machine

Don’t take the claim.
Verify it.

Clone the repository. Run the deterministic scenarios — the same seed produces a byte-identical run report on any machine. Export the evidence pack, inspect it, and verify the result with a binary that does not link the code that produced it. Then tamper with a byte and watch it exit non-zero.

  • the same seed produces a byte-identical run report
  • the evidence pack is 515 bytes
  • the verifier does not link the code that produced it
git clone https://github.com/VampiricCyborg/Vigilarch && cd Vigilarch
./demo.sh
cargo run -p vigil-sim --release -- --scale-up --seeds 1000