nx_optimizer_milestone_attest.nx
buildroot/runtime/nx_optimizer_milestone_attest.nx
about
nx_optimizer_milestone_attest.nx -- substrate-native attribution
for the alloca-load-fold peephole shipped 2026-05-20.
REPLACES "the right commit message" with a hash-chained attestation
that cannot be silently overwritten by parallel-agent `git add -A`.
Per [[NISHI_STORAGE_SUBSTRATE_ROADMAP]] vs Git row of the EXCEED
matrix: native SHA-256 + L1 append-only journal + tamper-detect
chain. Git only has refs.log; we ship cryptographic linkage.
What this program emits:
1. nx_blob_store_put(patched_codegen_source) -> hash A
content-address of nx_x86_64_ctx.nx after the peephole edit
2. nx_blob_store_put(emitted_asm) -> hash B
content-address of peephole_tightloop.s the self-host produced
3. nx_blob_store_put(attestation_payload) -> hash C
content-address of the metrics description
4. nx_journal_log_append three entries (schema 20260520) -> seq 0,1,2
5. nx_journal_log_verify_chain -> must return -1 (chain intact)
6. nx_journal_log_latest_hash -> the chain head; the canonical
identity of this optimizer milestone, independent of git
To re-verify any time later: rerun this program against the same
inputs; identical hashes mean nothing was tampered.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_blob_store.nxnx_journal_log.nxnx_hex.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 31 | const K_MAGIC_20260520: i64 = 20260520 |
functions
| 33 | func _puts(fd: i64, s: *u8) -> i64 |
| 40 | func _put_hash(fd: i64, label: *u8, w0: i64, w1: i64, w2: i64, w3: i64) -> i64 |
| 50 | func main() -> i64 |