OpenAgentSwarms
Every command
Serviceruns until stopped

oas witness

Run a witness: cosign the checkpoints of the logs its lists name, so no host can show two histories.

$ oas witness [flags]

5 flagsdefined in cmd/oas/main.go, runWitness

It speaks the C2SP tlog-witness protocol, so a swarm can name any witness that does, and oas witness can witness other logs. It prints its verifier key at start and writes it to <dir>/vkey.

A witness cosigns only logs it knows. Give it a host's log list with --log-list <host>/witness/logs and it learns each swarm as the host creates it. A swarm a standby takes over gets a new log origin under the standby's name: add the standby's log list too, or run with --follow-standbys.

Flags

Each takes one dash or two, and its value after a space or =. A switch is on by itself, or =false.

  • data folder

    Defaultoas-witness

  • also read the lists of the standbys a listed host's swarms name (<host>/witness/lists), so swarms stay witnessed after moving to one

  • listen address

    Default:8091

  • log lists to learn logs from, comma-separated URLs or files in the witness network logs/v0 format, such as a host's <url>/witness/logs

  • witness name, the key name on its cosignatures (e.g. witness.example/w1)

    Defaultwitness

Examples

Witness every swarm on one host.

$ oas witness --dir /var/lib/oas/witness --name witness.example/team --listen :8091 --log-list https://swarms.example/witness/logs

Keep witnessing a swarm after it moves to a standby.

$ oas witness --dir /var/lib/oas/witness --name witness.example/team --listen :8091 --log-list https://swarms.example/witness/logs --follow-standbys

See also

Read from the CLI: each flag's type, default and usage are its flag set's own, and a test fails when this page and the code disagree.