verify_cosigned_anchor
Verifies an anchor's signed head by counting valid cosignatures from distinct allowlisted witnesses, returning success only when the count meets the threshold and split-view forks are detected.
Instructions
CLIENT-side k-of-n trust on a TAMPER-EVIDENT MEMORY head: how many DISTINCT allowlisted WITNESSES validly
co-signed this anchor's signed head? This is the gossip layer that upgrades tamper-evidence (which catches
a rewrite on ONE timeline) into SPLIT-VIEW detection: a compromised operator cannot show divergent histories to
different clients without getting threshold independent witnesses to co-sign the fork — and honest witnesses
refuse. Pass cosignatures as [[pubkey_hex, sig_hex], ...] and witnesses as the allowlist [pubkey_hex, ...].
Returns {ok, count, threshold, signers, covers_history[, limits, error]}; ok = count >= threshold.
Read-only; needs no access to the log.
Three things it refuses to report as success. The anchor's sth_hash is re-derived from the head's own
fields before any signature is counted, so genuine signatures over a SUBSTITUTED n_writes/writes_tip come
back with error rather than as co-signed. threshold below 1 is rejected — a quorum of zero is met by an
anchor no witness ever signed. And a head over a store with no receipt chain reports covers_history=false
plus limits, because a valid co-signature over an empty history is evidence about no stored data at all.
Verify-yourself quickstart: docs/TRANSPARENCY.md.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| anchor | Yes | ||
| threshold | No | ||
| witnesses | Yes | ||
| cosignatures | Yes |