Skip to content

feat(tee)!: shell out to the admission CLI; exact registry genesis gate - #78

Merged
samlaf merged 1 commit into
mainfrom
admission-cli-gate
Jul 28, 2026
Merged

feat(tee)!: shell out to the admission CLI; exact registry genesis gate#78
samlaf merged 1 commit into
mainfrom
admission-cli-gate

Conversation

@samlaf

@samlaf samlaf commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

promote_measurements now shells out to seismic-measurement-admission promote — normalization is schema knowledge and lives in the shared crate — and the drifted _validate_policy_records is deleted: "the compiler accepts it" is the whole document validation. Bytes stream both ways over stdin/stdout so the hash-committed policy is never re-rendered.

The deliberately-vacuous registry-storage warning becomes an exact gate: the registry genesis account must hold the canonical MeasurementRegistry runtime (keccak256 pinned in the compile report) and precisely the compiled storage — every expected slot present, no unexplained slots, words compared in normalized form. The compile report's policy_hash is cross-checked against the artifact bytes.

BREAKING: assemble/validate now fail for a genesis whose registry account is empty or non-canonical; seed it from seismic-measurement-admission compile output.

New --admission-bin flag on assemble/validate. Tests inject compile_fn (mirroring genesis_hash_fn); subprocess-boundary tests skip without the binary on PATH; an online drift test checks the crate's runtime-code pin against the published contract artifact. eth-utils becomes a declared dependency (keccak in the gate).

promote_measurements now shells out to `seismic-measurement-admission
promote` — normalization is schema knowledge and lives in the shared
crate — and the drifted `_validate_policy_records` is deleted: "the
compiler accepts it" is the whole document validation. Bytes stream both
ways over stdin/stdout so the hash-committed policy is never re-rendered.

The deliberately-vacuous registry-storage warning becomes an exact gate:
the registry genesis account must hold the canonical MeasurementRegistry
runtime (keccak256 pinned in the compile report) and precisely the
compiled storage — every expected slot present, no unexplained slots,
words compared in normalized form. The compile report's policy_hash is
cross-checked against the artifact bytes.

BREAKING: assemble/validate now fail for a genesis whose registry account
is empty or non-canonical; seed it from `seismic-measurement-admission
compile` output.

New --admission-bin flag on assemble/validate. Tests inject compile_fn
(mirroring genesis_hash_fn); subprocess-boundary tests skip without the
binary on PATH; an online drift test checks the crate's runtime-code pin
against the published contract artifact. eth-utils becomes a declared
dependency (keccak in the gate).
@samlaf
samlaf merged commit 80b7d72 into main Jul 28, 2026
1 check passed
@samlaf
samlaf deleted the admission-cli-gate branch July 28, 2026 19:43
samlaf added a commit that referenced this pull request Jul 30, 2026
…semble (#80)

Committed genesis files stay policy-free — the accepted admission IDs
are a per-network fact. assemble now compiles the network's policy
document and writes the report's registry_genesis_storage into its copy
of the genesis: wholesale replacement of the registry account's storage,
so re-assembly is idempotent and a policy change never leaves stale
slots behind. eth.genesis_hash is computed over the injected copy, and
write_artifact_set ships it — the manifest commits to the reviewed
policy's storage, not to whatever the input happened to carry. This
lifts #78's requirement to pre-seed the input genesis from compile
output; a policy-free input (like reth's committed dev.json) now
assembles directly.

The exact registry gate is unchanged, but its mismatch arms now defend
the validate path: assemble satisfies the gate by construction, so a
storage mismatch means the shipped artifact set was edited after
assembly.

Injection fails closed: a compile report without registry storage (stale
admission CLI), a genesis alloc missing the registry account, or the
account listed twice under different hex spellings are GateErrors; the
alloc key's original spelling is preserved. The same-name
reth-genesis.json write in a network dir is deliberate and stable under
re-assembly.

Tests cover injection into a policy-free input, wholesale replacement,
the manifest committing to the injected copy's hash, stable re-assembly
over a shipped artifact set, and the gate arms via post-assembly
tampering; write_artifact_set drops its GateContext parameter and ships
assemble's bytes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant