The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
# Deploying the online log at zkdefi.org/lean-transparency-log
|
|
|
|
|
|
DEPLOY.md: as-built record - the LTL is LIVE at zkdefi.org/lean-transparency-log
Deployed from the provider notebook over the dedicated deploy key. The
host runs a compose stack, so the LTL joined it as a read-only container
(read_only: true, :ro volumes, no published ports, compose-network-only)
rather than the host-systemd variant; the domain's Caddy site block
gained a path handle that precedes the existing catch-all, validated in
a throwaway container before reload, with timestamped backups of both
config files. The servable log dir is reconstructed FROM the published
GitHub mirror (the server holds witness-grade data only - no keys).
Live smoke over the public internet from the provider machine: /docs
(the SVG site), /v1/sth, /healthz (tree size 8) all 200; the existing
service on the domain unaffected; and the complete agent flow ran
against the production URL - log-fetch, receipt-verify through the
dogfood verifier with a fresh pin store and freshness policy, and
sth-refresh confirming pin consistency online.
DEPLOY.md now leads with the as-built compose record + update runbook
(reconstruct.py helper installed server-side); the original systemd
variant is kept for docker-less deployments. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:22:43 +00:00
|
|
|
STATUS: DEPLOYED (2026-07-06) and serving. This file is now the as-built
|
|
|
|
|
record plus the update runbook. Deliberately generic about the host: it
|
|
|
|
|
names only what customers must know anyway (the service URL) and standard
|
|
|
|
|
software layouts - no provider inventory, no credentials.
|
|
|
|
|
|
|
|
|
|
## As built (docker compose variant)
|
|
|
|
|
|
|
|
|
|
The target host runs a compose stack; the LTL joined it as a read-only
|
|
|
|
|
container instead of the host-systemd variant below:
|
|
|
|
|
|
2026-07-06 15:42:09 +00:00
|
|
|
- app (git clone of the now-public pacta repo) + published-log clone + reconstructed log dir under the compose
|
DEPLOY.md: as-built record - the LTL is LIVE at zkdefi.org/lean-transparency-log
Deployed from the provider notebook over the dedicated deploy key. The
host runs a compose stack, so the LTL joined it as a read-only container
(read_only: true, :ro volumes, no published ports, compose-network-only)
rather than the host-systemd variant; the domain's Caddy site block
gained a path handle that precedes the existing catch-all, validated in
a throwaway container before reload, with timestamped backups of both
config files. The servable log dir is reconstructed FROM the published
GitHub mirror (the server holds witness-grade data only - no keys).
Live smoke over the public internet from the provider machine: /docs
(the SVG site), /v1/sth, /healthz (tree size 8) all 200; the existing
service on the domain unaffected; and the complete agent flow ran
against the production URL - log-fetch, receipt-verify through the
dogfood verifier with a fresh pin store and freshness policy, and
sth-refresh confirming pin consistency online.
DEPLOY.md now leads with the as-built compose record + update runbook
(reconstruct.py helper installed server-side); the original systemd
variant is kept for docker-less deployments. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:22:43 +00:00
|
|
|
project directory (`ltl/app`, `ltl/published`, `ltl/log`);
|
|
|
|
|
- compose service: `python:3.12-alpine`, `read_only: true`, both volumes
|
|
|
|
|
mounted `:ro`, NO published ports (reachable only on the compose
|
|
|
|
|
network), `restart: unless-stopped`;
|
|
|
|
|
- Caddy site block for the domain gained a path `handle` that takes
|
|
|
|
|
precedence over the existing catch-all:
|
|
|
|
|
|
|
|
|
|
```caddy
|
|
|
|
|
redir /lean-transparency-log /lean-transparency-log/docs
|
|
|
|
|
handle /lean-transparency-log/* {
|
|
|
|
|
reverse_proxy ltl:8461
|
|
|
|
|
}
|
|
|
|
|
handle {
|
|
|
|
|
reverse_proxy <existing upstream>
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- config validated in a throwaway caddy container before `caddy reload`;
|
|
|
|
|
Caddyfile and compose file backed up with timestamps first.
|
|
|
|
|
|
|
|
|
|
Update runbook (after each new proof-check run on the provider machine):
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# on the provider machine
|
|
|
|
|
pacta_provider log-append ... # sign new head (offline, dogfood)
|
|
|
|
|
pacta_provider log-publish --log-dir ... --git-dir <mirror clone> --public-key <pub>
|
|
|
|
|
cd <mirror clone> && git add -A && git commit -m "log update" && git push
|
2026-07-06 15:42:09 +00:00
|
|
|
# both app/ and published/ on the server are git clones of the now-public repos,
|
|
|
|
|
# so the server-side update is pure git pull (no code shipping):
|
|
|
|
|
ssh zkdefi-ltl 'cd <compose-dir>/ltl && (cd app && git pull -q) && (cd published && git pull -q) && \
|
DEPLOY.md: as-built record - the LTL is LIVE at zkdefi.org/lean-transparency-log
Deployed from the provider notebook over the dedicated deploy key. The
host runs a compose stack, so the LTL joined it as a read-only container
(read_only: true, :ro volumes, no published ports, compose-network-only)
rather than the host-systemd variant; the domain's Caddy site block
gained a path handle that precedes the existing catch-all, validated in
a throwaway container before reload, with timestamped backups of both
config files. The servable log dir is reconstructed FROM the published
GitHub mirror (the server holds witness-grade data only - no keys).
Live smoke over the public internet from the provider machine: /docs
(the SVG site), /v1/sth, /healthz (tree size 8) all 200; the existing
service on the domain unaffected; and the complete agent flow ran
against the production URL - log-fetch, receipt-verify through the
dogfood verifier with a fresh pin store and freshness policy, and
sth-refresh confirming pin consistency online.
DEPLOY.md now leads with the as-built compose record + update runbook
(reconstruct.py helper installed server-side); the original systemd
variant is kept for docker-less deployments. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:22:43 +00:00
|
|
|
python3 reconstruct.py && cd .. && sudo docker compose restart ltl'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
(`reconstruct.py` = the entries.jsonl/sth-history rebuild from step 1
|
|
|
|
|
below; it lives in the server's ltl dir.)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
The remainder of this file is the original host-systemd variant, kept for
|
|
|
|
|
deployments without docker.
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
|
|
|
|
|
## What gets deployed
|
|
|
|
|
|
|
|
|
|
One **read-only** Python process (standard library only, no pip installs)
|
|
|
|
|
serving the CT-style API + customer docs. It never touches private keys:
|
|
|
|
|
tree heads are signed offline by the provider CLI and only *stored,
|
|
|
|
|
already-signed* material is served. A compromised web process can withhold
|
|
|
|
|
or replay (agents detect both via pinning + freshness) but cannot forge.
|
|
|
|
|
|
|
|
|
|
## 1. Get the code and the log data onto the server
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo useradd --system --home /srv/pacta --create-home pacta
|
|
|
|
|
sudo -u pacta git clone https://github.com/saymrwulf/proof-aware-crypto-tooling-agent /srv/pacta/app
|
|
|
|
|
# the log STATE (entries + signed heads, no keys) comes from the published mirror:
|
|
|
|
|
sudo -u pacta git clone https://github.com/saymrwulf/lean-transparency-log /srv/pacta/published
|
|
|
|
|
# reconstruct a servable log dir from the published mirror:
|
|
|
|
|
sudo -u pacta mkdir -p /srv/pacta/log
|
|
|
|
|
sudo -u pacta python3 - <<'EOF'
|
|
|
|
|
import json, pathlib
|
|
|
|
|
pub = pathlib.Path("/srv/pacta/published"); log = pathlib.Path("/srv/pacta/log")
|
|
|
|
|
(log / "metadata.json").write_text((pub / "log-metadata.json").read_text())
|
|
|
|
|
with (log / "entries.jsonl").open("w") as out:
|
|
|
|
|
for p in sorted((pub / "entries").glob("[0-9]*.json")):
|
|
|
|
|
r = json.loads(p.read_text())
|
|
|
|
|
out.write(json.dumps({"index": r["index"], "leaf_hash": r["leaf_hash"], "leaf": r["leaf"]},
|
|
|
|
|
sort_keys=True, separators=(",", ":")) + "\n")
|
|
|
|
|
(log / "sth-history.jsonl").write_text((pub / "sth-history.jsonl").read_text())
|
|
|
|
|
import shutil; shutil.copy(pub / "latest-sth.json", log / "sth.yaml")
|
|
|
|
|
print("log dir reconstructed")
|
|
|
|
|
EOF
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
(Alternative: rsync `provider/state/transparency-log-main/` from the
|
|
|
|
|
provider machine. The published mirror is preferred — it keeps the server
|
|
|
|
|
in the same trust position as any other witness.)
|
|
|
|
|
|
|
|
|
|
## 2. Systemd unit
|
|
|
|
|
|
|
|
|
|
`/etc/systemd/system/pacta-log.service`:
|
|
|
|
|
|
|
|
|
|
```ini
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=Lean Transparency Log (read-only)
|
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
User=pacta
|
|
|
|
|
WorkingDirectory=/srv/pacta/app
|
|
|
|
|
Environment=PYTHONPATH=/srv/pacta/app/src:/srv/pacta/app/provider/src
|
|
|
|
|
ExecStart=/usr/bin/python3 -m pacta_provider serve --log-dir /srv/pacta/log --base-path lean-transparency-log --host 127.0.0.1 --port 8461
|
|
|
|
|
Restart=on-failure
|
|
|
|
|
# hardening: read-only service, no key material anywhere near it
|
|
|
|
|
ProtectSystem=strict
|
|
|
|
|
ReadOnlyPaths=/srv/pacta
|
|
|
|
|
PrivateTmp=true
|
|
|
|
|
NoNewPrivileges=true
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo systemctl daemon-reload && sudo systemctl enable --now pacta-log
|
|
|
|
|
curl -s http://127.0.0.1:8461/lean-transparency-log/healthz
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 3. Reverse proxy on zkdefi.org
|
|
|
|
|
|
Public-exposure self-audit: genericize DEPLOY.md, scrub provider paths
Socratic pass over everything this public repo reveals, adversary-first:
- DEPLOY.md no longer names the hosting provider or the server's other
software inventory (that sentence was NEW public information - the
site's front page does not advertise it). It now states its own
redaction policy up front, leads with a Caddy proxy config (matching
what the target site actually fronts with), adds rate-limiting and
proxy timeouts for the stdlib backend, generalizes the second-mirror
section, and gains an explicit key-hygiene section (the signing key
never touches the public server; a compromised box has nothing to
rotate).
- Future attestations stop leaking provider-machine paths: the
machine_protection guard path is recorded repo-relative and the Lean
project dir is recorded in its configured env-var form, never
machine-resolved. (The 12 already-published leaves containing local
home paths are immutable by design - severity assessed low: a local
username on a non-addressable dev box, no credentials - and an
append-only log does not rewrite its history.)
Audited clean: no keys, tokens, or credential-named files anywhere in
git history; no public IPs; loopback-only binds; commit identity is the
owner's long-standing public one. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:16:10 +00:00
|
|
|
Caddy (inside the existing `zkdefi.org` site block):
|
|
|
|
|
|
|
|
|
|
```caddy
|
|
|
|
|
redir /lean-transparency-log /lean-transparency-log/docs
|
|
|
|
|
route /lean-transparency-log/* {
|
|
|
|
|
reverse_proxy 127.0.0.1:8461 {
|
|
|
|
|
transport http {
|
|
|
|
|
response_header_timeout 15s
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
nginx equivalent, with basic rate limiting (the backend is a stdlib
|
|
|
|
|
threading server - let the proxy absorb abuse):
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
|
|
|
|
|
```nginx
|
Public-exposure self-audit: genericize DEPLOY.md, scrub provider paths
Socratic pass over everything this public repo reveals, adversary-first:
- DEPLOY.md no longer names the hosting provider or the server's other
software inventory (that sentence was NEW public information - the
site's front page does not advertise it). It now states its own
redaction policy up front, leads with a Caddy proxy config (matching
what the target site actually fronts with), adds rate-limiting and
proxy timeouts for the stdlib backend, generalizes the second-mirror
section, and gains an explicit key-hygiene section (the signing key
never touches the public server; a compromised box has nothing to
rotate).
- Future attestations stop leaking provider-machine paths: the
machine_protection guard path is recorded repo-relative and the Lean
project dir is recorded in its configured env-var form, never
machine-resolved. (The 12 already-published leaves containing local
home paths are immutable by design - severity assessed low: a local
username on a non-addressable dev box, no credentials - and an
append-only log does not rewrite its history.)
Audited clean: no keys, tokens, or credential-named files anywhere in
git history; no public IPs; loopback-only binds; commit identity is the
owner's long-standing public one. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:16:10 +00:00
|
|
|
limit_req_zone $binary_remote_addr zone=pactalog:1m rate=20r/s;
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
location /lean-transparency-log/ {
|
Public-exposure self-audit: genericize DEPLOY.md, scrub provider paths
Socratic pass over everything this public repo reveals, adversary-first:
- DEPLOY.md no longer names the hosting provider or the server's other
software inventory (that sentence was NEW public information - the
site's front page does not advertise it). It now states its own
redaction policy up front, leads with a Caddy proxy config (matching
what the target site actually fronts with), adds rate-limiting and
proxy timeouts for the stdlib backend, generalizes the second-mirror
section, and gains an explicit key-hygiene section (the signing key
never touches the public server; a compromised box has nothing to
rotate).
- Future attestations stop leaking provider-machine paths: the
machine_protection guard path is recorded repo-relative and the Lean
project dir is recorded in its configured env-var form, never
machine-resolved. (The 12 already-published leaves containing local
home paths are immutable by design - severity assessed low: a local
username on a non-addressable dev box, no credentials - and an
append-only log does not rewrite its history.)
Audited clean: no keys, tokens, or credential-named files anywhere in
git history; no public IPs; loopback-only binds; commit identity is the
owner's long-standing public one. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:16:10 +00:00
|
|
|
limit_req zone=pactalog burst=40 nodelay;
|
|
|
|
|
proxy_read_timeout 15s;
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
proxy_pass http://127.0.0.1:8461/lean-transparency-log/;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
Public-exposure self-audit: genericize DEPLOY.md, scrub provider paths
Socratic pass over everything this public repo reveals, adversary-first:
- DEPLOY.md no longer names the hosting provider or the server's other
software inventory (that sentence was NEW public information - the
site's front page does not advertise it). It now states its own
redaction policy up front, leads with a Caddy proxy config (matching
what the target site actually fronts with), adds rate-limiting and
proxy timeouts for the stdlib backend, generalizes the second-mirror
section, and gains an explicit key-hygiene section (the signing key
never touches the public server; a compromised box has nothing to
rotate).
- Future attestations stop leaking provider-machine paths: the
machine_protection guard path is recorded repo-relative and the Lean
project dir is recorded in its configured env-var form, never
machine-resolved. (The 12 already-published leaves containing local
home paths are immutable by design - severity assessed low: a local
username on a non-addressable dev box, no credentials - and an
append-only log does not rewrite its history.)
Audited clean: no keys, tokens, or credential-named files anywhere in
git history; no public IPs; loopback-only binds; commit identity is the
owner's long-standing public one. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:16:10 +00:00
|
|
|
location = /lean-transparency-log { return 301 /lean-transparency-log/docs; }
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Check: `https://zkdefi.org/lean-transparency-log/docs` renders the customer
|
|
|
|
|
documentation; `/v1/sth` returns the dogfood-signed head.
|
|
|
|
|
|
Public-exposure self-audit: genericize DEPLOY.md, scrub provider paths
Socratic pass over everything this public repo reveals, adversary-first:
- DEPLOY.md no longer names the hosting provider or the server's other
software inventory (that sentence was NEW public information - the
site's front page does not advertise it). It now states its own
redaction policy up front, leads with a Caddy proxy config (matching
what the target site actually fronts with), adds rate-limiting and
proxy timeouts for the stdlib backend, generalizes the second-mirror
section, and gains an explicit key-hygiene section (the signing key
never touches the public server; a compromised box has nothing to
rotate).
- Future attestations stop leaking provider-machine paths: the
machine_protection guard path is recorded repo-relative and the Lean
project dir is recorded in its configured env-var form, never
machine-resolved. (The 12 already-published leaves containing local
home paths are immutable by design - severity assessed low: a local
username on a non-addressable dev box, no credentials - and an
append-only log does not rewrite its history.)
Audited clean: no keys, tokens, or credential-named files anywhere in
git history; no public IPs; loopback-only binds; commit identity is the
owner's long-standing public one. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:16:10 +00:00
|
|
|
## 4. Second mirror (any Forgejo/Gitea/GitLab you operate)
|
|
|
|
|
|
|
|
|
|
Create a periodic pull-mirror of
|
|
|
|
|
`https://github.com/saymrwulf/lean-transparency-log` on a second,
|
|
|
|
|
independently-operated git host. The published repo is the witness
|
|
|
|
|
channel; two independent mirrors mean split-view lies must fool two
|
|
|
|
|
infrastructures at once — exactly the point.
|
|
|
|
|
|
|
|
|
|
## 4b. Key hygiene (non-negotiable)
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
|
Public-exposure self-audit: genericize DEPLOY.md, scrub provider paths
Socratic pass over everything this public repo reveals, adversary-first:
- DEPLOY.md no longer names the hosting provider or the server's other
software inventory (that sentence was NEW public information - the
site's front page does not advertise it). It now states its own
redaction policy up front, leads with a Caddy proxy config (matching
what the target site actually fronts with), adds rate-limiting and
proxy timeouts for the stdlib backend, generalizes the second-mirror
section, and gains an explicit key-hygiene section (the signing key
never touches the public server; a compromised box has nothing to
rotate).
- Future attestations stop leaking provider-machine paths: the
machine_protection guard path is recorded repo-relative and the Lean
project dir is recorded in its configured env-var form, never
machine-resolved. (The 12 already-published leaves containing local
home paths are immutable by design - severity assessed low: a local
username on a non-addressable dev box, no credentials - and an
append-only log does not rewrite its history.)
Audited clean: no keys, tokens, or credential-named files anywhere in
git history; no public IPs; loopback-only binds; commit identity is the
owner's long-standing public one. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:16:10 +00:00
|
|
|
The provider SIGNING key never touches this server. The service is
|
|
|
|
|
read-only by construction and the systemd unit mounts the tree read-only;
|
|
|
|
|
keep it that way. If the box is ever compromised, rotate nothing —
|
|
|
|
|
there is nothing to rotate here; verify the published mirror with
|
|
|
|
|
`verify.py --all` and redeploy.
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
|
|
|
|
|
## 5. Update cycle (provider machine → world)
|
|
|
|
|
|
|
|
|
|
After each new proof-check run on the provider machine:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
pacta_provider log-append ... # signs new head (offline, dogfood)
|
|
|
|
|
pacta_provider log-publish --log-dir ... --git-dir <clone of lean-transparency-log> \
|
|
|
|
|
--public-key provider/state/local-provider/provider.ed25519.pub
|
Public-exposure self-audit: genericize DEPLOY.md, scrub provider paths
Socratic pass over everything this public repo reveals, adversary-first:
- DEPLOY.md no longer names the hosting provider or the server's other
software inventory (that sentence was NEW public information - the
site's front page does not advertise it). It now states its own
redaction policy up front, leads with a Caddy proxy config (matching
what the target site actually fronts with), adds rate-limiting and
proxy timeouts for the stdlib backend, generalizes the second-mirror
section, and gains an explicit key-hygiene section (the signing key
never touches the public server; a compromised box has nothing to
rotate).
- Future attestations stop leaking provider-machine paths: the
machine_protection guard path is recorded repo-relative and the Lean
project dir is recorded in its configured env-var form, never
machine-resolved. (The 12 already-published leaves containing local
home paths are immutable by design - severity assessed low: a local
username on a non-addressable dev box, no credentials - and an
append-only log does not rewrite its history.)
Audited clean: no keys, tokens, or credential-named files anywhere in
git history; no public IPs; loopback-only binds; commit identity is the
owner's long-standing public one. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:16:10 +00:00
|
|
|
cd <clone> && git add -A && git commit -m "log update" && git push # mirrors sync from here
|
The log goes public: git-published mirror, online service, witnesses
Three synchronized faces of one log - transport orthogonal to trust:
- PUBLISHED GIT MIRROR: log-publish exports the public face (one file
per leaf so git history mirrors log history; the FULL STH history as
the witness channel; per-component attestations + receipts; the
provider public key; a standalone stdlib-only verify.py and customer
README). Live at github.com/saymrwulf/lean-transparency-log (genesis:
8 leaves incl. the honest failed-run entries, dogfood-signed head).
- ONLINE SERVICE (pacta_provider serve): read-only, zero-dependency
HTTP with CT-style endpoints under a base path for
zkdefi.org/lean-transparency-log - /v1/sth, /v1/sth-history,
/v1/sth-consistency?first=N, /v1/proof, /v1/attestation, /v1/entries,
/v1/metadata, /healthz - plus self-contained customer documentation
at /docs (current state, attested components, API, the verify-
without-trusting-this-site path, and the means/does-NOT-mean
boundary). The process never loads private keys: heads are signed
offline; a compromised server can withhold or replay (pinning +
freshness detect both) but never forge. STH history now recorded
append-only by the provider (with a backfill head signed for the
existing log).
- AGENT ONLINE CLIENT: pacta log-fetch (download evidence; explicitly
UNVERIFIED until receipt-verify runs - transport is not trust) and
pacta sth-refresh (fetch head, verify signature, advance the pin via
an online consistency proof from the pinned size; fail closed).
- WITNESSES: pacta witness-audit over a clone of the published mirror
recomputes every prefix root from the public leaves and checks every
historical head + signature - no consistency proofs needed when the
leaves are public. Tampering one published entry trips both the
leaf-hash check and the prefix-root check (tested). verify.py gives
customers the same audit with zero installation.
- DEPLOY.md: the complete server-session checklist for zkdefi.org -
reconstruct the servable log FROM the published mirror (the server
stays in witness trust-position), hardened systemd unit, nginx/Caddy
path routing, Forgejo mirror setup, the provider->world update
cycle, and remote smoke tests.
Validated end-to-end on the REAL log: all 10 endpoints, online-fetched
proof re-verified locally through the dogfood verifier with pinning,
online pin refresh, publish + witness audit green, tamper caught,
standalone verify.py green in the published clone. 54/54 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:20 +00:00
|
|
|
# on the server: cd /srv/pacta/published && git pull && re-run step 1's reconstruction
|
|
|
|
|
sudo systemctl restart pacta-log
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 6. Smoke tests from anywhere
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
pacta log-fetch --url https://zkdefi.org/lean-transparency-log --component dalek-ed25519-verified --out-dir /tmp/e
|
|
|
|
|
pacta receipt-verify --attestation /tmp/e/dalek-ed25519-verified.attestation.json \
|
|
|
|
|
--receipt /tmp/e/dalek-ed25519-verified.receipt.json \
|
|
|
|
|
--log-public-key <provider.ed25519.pub from the published repo> \
|
|
|
|
|
--sth-store ~/.pacta-pins.json
|
|
|
|
|
pacta sth-refresh --url https://zkdefi.org/lean-transparency-log \
|
|
|
|
|
--sth-store ~/.pacta-pins.json --log-public-key <pubkey>
|
|
|
|
|
git clone https://github.com/saymrwulf/lean-transparency-log && cd lean-transparency-log && python3 verify.py --all
|
|
|
|
|
```
|