Run a mirror or a witness#

Grantstamp gets stronger with every mirror and witness that the project does not run. Either one takes a few minutes and a free GitHub account.

Who holds what Owner signs every stamp with a key only the owner holds stamp Registry puts writes in order in one public log, and signs it Witnesses cosign the log only when it extends what they saw before log head out, cosignature back Mirrors copy the log, the public records and the check map. Any plain web host will do. copy Agent, or you reads from any mirror and checks every byte data proof one, run by the project many, run by anyone A mirror can go silent. It cannot change, hide or add anything without being caught. The registry cannot show two histories. The witnesses would refuse to cosign.

Which one?#

Mirror Witness
What it does Serves a copy of the public log, the listed stamps and the check map Cosigns the log, and only when it extends the log it saw before
What it protects Availability. Checks keep working when the registry is slow or asleep. Integrity. The registry cannot show two histories.
Holds a key No Yes, one that only you hold
Trusted for Nothing. Every reader checks the copy. Not agreeing with the registry to sign a fork
Time to set up About 5 minutes About 10 minutes

Run one or the other, not both from the same account. A witness that is also a host could hide its own host's misbehaviour.

Run a mirror#

A mirror is a folder on any static web host. The ready-made way uses GitHub Pages.

  1. Create a public repository, for example grantstamp-mirror.
  2. Save integrations/join/mirror.yml in it as .github/workflows/mirror.yml.
  3. In the repository, open Settings, then Pages, and set Source to GitHub Actions.
  4. Open Actions, pick grantstamp-mirror, and click Run workflow.
  5. Check your mirror:

    pip install grantstamp
    grantstamp audit --from https://<you>.github.io/grantstamp-mirror
    
  6. Send the address to contact@grantstamp.io. Once it is listed, agents use it on their own.

The job runs again every 20 minutes. It fetches only what is new, and checks everything before it publishes.

Any other host works too. Run grantstamp mirror https://registry.grantstamp.io/log ./mirror on a schedule and serve the folder.

Run a witness#

A witness holds a key and a small state: the last log head it cosigned.

  1. Create a public repository, for example grantstamp-witness.
  2. On your own computer, make the key. The name is your repository's address.

    pip install grantstamp
    grantstamp witness keygen github.com/<you>/grantstamp-witness --out witness.key
    

    It prints one line that starts with that name. The line is public. Keep it. 3. In the repository, open Settings, then Secrets and variables, then Actions. Add a secret named GRANTSTAMP_WITNESS_KEY with the contents of witness.key. Then delete the file. 4. Save integrations/join/witness.yml in the repository as .github/workflows/witness.yml. 5. Open Actions, pick grantstamp-witness, and click Run workflow. It should end with "cosigned … entries". 6. Send the public line from step 2 to contact@grantstamp.io.

Until the registry lists your witness, it does not keep your cosignatures. That is expected. Your witness still checks the log on every run.

What your witness promises is simple. It never cosigns a log that drops or changes anything it cosigned before. The job saves its state before any cosignature leaves it, so a failed run cannot be used to make it sign a different history.

If something looks wrong#

For the registry's operator#

When someone sends you a mirror or a witness:

Raise the quorum to "all" only when the witnesses have shown they run on time.

Source of this page on GitHub. Documentation for Grantstamp 0.4, licensed CC BY 4.0.