feat: add proof-verify-pcrs target - #974
Merged
Merged
Conversation
The enclave image is built from a mutable tag, so every EIF rebuild changes PCR0 (enclave image) and PCR2 (application) while PCR1 (kernel) stays put. Nothing re-approves the new measurements, so the running enclave silently drops off the on-chain allowlist and every registerKey / TEE proof reverts — with no signal until someone reads a revert reason. This is not hypothetical: on alphanet the running enclave measures PCR0=4f1adb…/PCR2=e89ada… while the verifier only approves b94235…/f0e0ed…, and `isPCRSetApproved` returns false. `just proof-verify-pcrs` measures the enclave that is actually running and asserts its PCR set is approved on-chain, printing both sets side by side and the remediation command when it is not. It deliberately re-measures rather than trusting PCR0/1/2 from the shell — trusting the shell would reproduce exactly the drift this is meant to catch. Wired into `proof-setup` as Step 3c so setup verifies rather than assumes (skipped under dry_run, which approves nothing). Also documents the mutable-tag hazard where PROOF_NITRO_IMAGE is defined — note that variable is currently declarative only, so pinning a digest there does not by itself prevent drift. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…rldcoin/world-chain into chore/pin-nitro-enclave-image
0xOsiris
marked this pull request as ready for review
August 4, 2026 18:52
0xOsiris
requested review from
0xForerunner,
Dzejkop,
Kemperino,
alessandromazza98,
cichaczem,
karankurbur,
kilianglas,
murph and
piohei
as code owners
August 4, 2026 18:53
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 4, 2026
0xOsiris
changed the base branch from
main
to
fix/nitro-auto-register-not-fatal
August 4, 2026 22:12
piohei
approved these changes
Aug 5, 2026
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.
Note
Low Risk
Changes are limited to Justfile deployment/ops scripts and env comments; no contract or runtime code paths are modified.
Overview
Adds Phase 3c (
proof-verify-pcrs): re-measures PCR0/1/2 from the running enclave (via existingproof-get-pcrs), hashes them the same way asproof-approve-pcrs, and callsisPCRSetApprovedonNitroAttestationVerifier. Fails with actionable output (running vs recorded sets, fix hint) when the allowlist does not match—so EIF rebuilds under a mutablePROOF_NITRO_IMAGEtag cannot silently breakregisterKey/ TEE proofs after setup.proof-setupnow runs this step after approval when not in dry-run, and workflow docs extend through 0a–3c.scripts/proof-envs/alphanet.envdocuments the mutable-tag / PCR drift risk and points operators at verify + optional digest pinning (image line is still:nightly; no digest change in this diff).Reviewed by Cursor Bugbot for commit fe922e6. Configure here.