docs(proof): add proof system deployment + key registration runbook - #937
Open
agentotto[bot] wants to merge 6 commits into
Open
docs(proof): add proof system deployment + key registration runbook#937agentotto[bot] wants to merge 6 commits into
agentotto[bot] wants to merge 6 commits into
Conversation
Consolidates the Nitro proof-system deployment procedure (previously only documented inline in the Justfile) into a single docs/ runbook, and fills the gap around Phase 4 — registering the enclave's generated secp256k1 keypair on-chain via NitroEnclaveKeyRegistry.registerKey, which had no just recipe or markdown coverage. Co-authored-by: Otto <otto@toolsforhumanity.com>
agentotto
Bot
requested review from
0xForerunner,
0xOsiris,
Dzejkop,
Kemperino,
alessandromazza98,
cichaczem,
karankurbur,
kilianglas,
murph and
piohei
as code owners
July 29, 2026 15:31
…tration gap - registerKey is permissionless-by-attestation: any funded L1 key can call it; authorization is the owner-approved PCR allowlist + attestation verification, not an onlyOwner modifier. Use PRIVATE_KEY (not OWNER_KEY) in the example. - Add a 'Known gap / follow-up' section: worker self-registration on boot is compatible with the trust model but not implemented (get_public_key_async has no callers; no CLI/just/startup hook). Co-authored-by: Otto <otto@toolsforhumanity.com>
0xOsiris
approved these changes
Jul 29, 2026
Kemperino
approved these changes
Aug 3, 2026
The 'known gap' section is now implemented (PR #938); replace it with an 'Automated self-registration' section (register CLI / --auto-register / just proof-register-key) and a 'Kubernetes deployment (alphanet auto-register)' section that captures the rationale trimmed out of the crypto-apps values: production-mode enclave, probe-based keep-alive (jq + trap + sleep infinity), the funding-key provisioning chain (infra Terraform -> kube-ops -> application secret -> /etc/secrets), and PCR verification. Co-authored-by: Otto <otto@toolsforhumanity.com>
Update the K8s deployment section: read EnclaveID/EnclaveCID from run-enclave's own JSON output (not describe-enclaves .[0], which lists all node enclaves); probes filter by our specific enclave ID via /tmp/enclave-id; note the defensive startup termination of leaked node-level enclaves. Co-authored-by: Otto <otto@toolsforhumanity.com>
Correct the K8s deployment section: the launcher terminates only its own captured enclave ID (never others on the node), and on a run-enclave capacity failure it fails loudly + logs describe-enclaves for Kubernetes to retry, rather than force-terminating other enclaves. Co-authored-by: Otto <otto@toolsforhumanity.com>
A foreground sleep infinity blocks the shell in waitpid(), deferring the TERM/EXIT trap until the grace period + SIGKILL (leaking the enclave); the backgrounded sleep + wait pattern lets the trap fire promptly on rollout / eviction / liveness restart. Co-authored-by: Otto <otto@toolsforhumanity.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
docs/proof/deploy-proof-system.md— a single operational runbook for deploying the Nitro (TEE) proof system to an environment (e.g.alphanet) and registering a running enclave's signing key on-chain.Why
Today the deployment procedure only exists as inline comments on the
just proof-*recipes in theJustfile. There was no consolidated deployment doc underdocs/, and — more importantly — the final step, registering the enclave's generated secp256k1 keypair viaNitroEnclaveKeyRegistry.registerKey, had nojustrecipe and no markdown coverage at all.just proof-setupstops at Phase 3b (approve PCRs).What's in the doc
just proof-*recipe (0a → 3b) to what it does, plus the combinedproof-setup.nitro-workerpod (alphanet namespace/context/image), env config (scripts/proof-envs/), and the full secret/env-var matrix.DeployNitro.s.sol,DeployProofSystem.s.sol, andPrewarmCertManager.s.sol.PublicKey-embedding attestation → split TBS/sig →p384-hints attestation→registerKey(bytes,bytes,bytes)→ verify withisKeyRegistered. Explicitly flags the current tooling gap (bareget-attestationomitspublic_keyand can't be used to register; nojust proof-register-keyrecipe yet).Notes
docs/proof/nitro-worker.md(how-it-works) anddocs/proof/proof-cli.md(CLI reference) rather than duplicating them.just proof-register-key <env>recipe (needs aPublicKey-request CLI path, since the existingget-attestationreturns a bare attestation).Co-authored-by: Otto otto@toolsforhumanity.com
Note
Low Risk
Documentation-only; no runtime, contract, or deployment behavior changes in this PR.
Overview
Adds
docs/proof/deploy-proof-system.md, a single operational runbook for deploying the Nitro (TEE) proof stack and registering an enclave signing key on L1.It maps
just proof-*phases 0a–3b (rollup hash, enclave inspection,DeployNitro/DeployProofSystem, CertManager pre-warm, PCR approval) andjust proof-setup, with prerequisites (tooling,scripts/proof-envs/, secrets matrix, runningnitro-workerpod).just proof-setupstops at Phase 3b; the doc fills the gap with Phase 4:PublicKey-embedding attestation → TBS/sig split →p384-hints→registerKey(not owner-gated; PCR allowlist gates images), plus verification and the bare-get-attestationtooling limitation.Also documents boot-time self-registration (PR #938 entry points,
REGISTER_PRIVATE_KEY), alphanet Kubernetes behavior (production enclave mode, launcher/probe lifecycle, secret provisioning), re-registration/upgrades, and a troubleshooting table. Links tonitro-worker.mdandproof-cli.mdinstead of duplicating architecture/CLI detail.Reviewed by Cursor Bugbot for commit 0fb84de. Bugbot is set up for automated code reviews on this repo. Configure here.