Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/challenge/CHALLENGE.md # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / challenge / CHALLENGE.md` 92 lines · 5148 bytes Raw Blame History Rendered 1 # The seed-chain bootstrap challenge 2 3 Rebuild the Omega compiler `omc` from 408 hand-written bytes on your own AArch64 Linux machine, and check 4 that every rung of the chain comes out byte for byte the same as the published values. 5 6 ``` 7 seed0.hex --load0.sh (POSIX printf)--> seed0 (408 B) --> hex1 (776 B) --> asm2 (2,464 B) 8 --> om4 (14,224 B) --> omc stage1 --> omc stage2 --> omc stage3 (625,676 B) 9 ``` 10 11 No C compiler, assembler or linker writes a byte of this chain. The one outside step is `load0.sh`, a 12 POSIX shell script whose `printf` turns the hex words of `seed0.hex` into the first 408 bytes. Each later 13 rung is a program written by the rung before it. 14 15 ## Run it 16 17 Needs AArch64 Linux (a Raspberry Pi 4/5 on a 64-bit OS, an Ampere or Graviton box, Apple silicon running 18 an arm64 Linux VM, a DGX Spark) with `git`, `sh`, `awk`, `sed`, `tar` and coreutils. No root, no 19 network after the clone, no compiler. 20 21 Get a copy of the project from its page, (the page shows how), 22 then: 23 24 ```sh 25 cd omega-mv 26 sh seed/challenge/run.sh 27 ``` 28 29 It prints one line per input file and per rung, and ends with `CHALLENGE PASS` (exit 0) or 30 `CHALLENGE FAIL` (exit 1). On another architecture it prints `CHALLENGE NOT_RUN` and exits 3: the seed 31 programs are AArch64 Linux ELF files and are never emulated or translated by this script. The full log, 32 with every hash, is `build/seed/challenge/challenge.log`. 33 34 The script builds in `build/seed/challenge/` from `git archive `: it never runs 35 `seed/omega-from-seed.sh` and never rewrites a tracked file. 36 37 Use a full clone. In a `git clone --depth 1` the pinned commit is missing, and the script stops with 38 `CHALLENGE NOT_RUN: pin … is not in this clone` (exit 3). Running 39 `git fetch --depth 1 origin ` (the `pin` line of the table) first makes a shallow clone work. 40 41 ## The published values 42 43 The challenge is versioned. Each version is a table naming a pin and the sha256 and size of each input 44 and each rung. Every value was read from the file committed at the pin (`git show : | 45 sha256sum`) before anything was rebuilt, so a table does not come from the build it checks. A new version 46 adds a table; an old one is never rewritten, so a result reproduced against it stays checkable. 47 48 | Version | Table | Pin | Why | 49 |---|---|---|---| 50 | v2 (default) | `seed/challenge/expected.txt` | ``c945f974674cd5ba0276759d161888bc6735fd56`` | om4's function table grows from 512 to 4096 entries (omega#1013) | 51 | v1 | `seed/challenge/expected-v1.txt` | ``369dbc96daa1684db2d7c2c7085bbf16b3fd77ee`` | first published table | 52 53 `sh seed/challenge/run.sh` checks v2; `sh seed/challenge/run.sh --expect seed/challenge/expected-v1.txt` 54 checks v1. Until omega#1013 the v1 table was `expected.txt`. 55 56 v2: 57 58 | Rung | Written by | Bytes | sha256 | 59 |---|---|---:|---| 60 | seed0 | `load0.sh` from `seed0.hex` | 408 | ``aca00cf3677236809f0f223437398c6bb429e4c65f13d58762bcf96d13799474`` | 61 | hex1 | seed0 from `hex1.hex` | 776 | ``920e1756aec399c7c74f5cedd1676abb91b844ea75448e14aa50dcb0bbc7ba5d`` | 62 | asm2 | hex1 from `asm2.hex1` | 2,464 | ``6988abe072fac3cdef2240d5ad13a3ecd8fb576fa09112d344b9e7c2315969c4`` | 63 | om4 | asm2 from `table.s2 table3.s2 table4.s2 om4.s` | 14,224 | ``bfc1cfd197348c398be19425b21704ad5ea79d28e33c0e1eff676142f47812b7`` | 64 | omc (stages 1, 2 and 3) | om4, then omc itself, from `seed/omc/omc.om` | 625,676 | ``3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194`` | 65 66 v1 differs in om4 (``d0da40e45f1fcc45d9a39c9c52c9d745b545e076970729e51c12d76ef519efab``, 14,224 B) and omc 67 (``2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f``, 325,524 B); seed0, hex1 and asm2 are 68 the same. 69 70 Besides the hashes, the script checks that seed0 and hex1 rebuild themselves, that the `p_filesz` field 71 of `om4.s` already holds the size of the image it describes, and that stage3 compiles 72 `seed/rung4/tests/r5b_fwd.om` into a program that exits 7. 73 74 ## Watch it pass, post your result 75 76 - A GitHub-hosted `ubuntu-24.04-arm` runner does the same thing in public, with three negative controls (a 77 tampered rung, a wrong published value and a forged log must all fail): 78 . 79 - Post your own run with the "I reproduced it" issue form, or a pull request adding your 80 `challenge.log`, at . A check compares the hashes in 81 a submitted log with this table. 82 83 ## What a pass shows, and what it does not 84 85 - It shows that your machine, starting from 408 bytes that you can read word by word 86 (`seed/rung0/seed0.audit`), produced the same compiler binary that is committed in the repository, and 87 that the compiler reproduces itself (stage1 = stage2 = stage3). 88 - A fixed-output match is not general self-hosting, and it is not diverse double compilation: every rung 89 is built by the rung before it, so there is only one path. It does not show that `omc` compiles every 90 program correctly. 91 - The pin is fixed. Later commits change `seed/omc/omc.om`, so the omc hash of `main` moves; a new pin 92 needs a new table, read from the committed files the same way.