interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / apps / interplane-forge / community / 30page.om

773 lines · 18014 bytes Raw Blame History
1note community/30page.om -- the pages: /community/ (what joining does, the one line, the rule, every
2note published part with its record), /community/part/<id> (the developer view: every counted key
3note with its time and fingerprints), and the record line the salvage part page shows.
4
5text cmbase "<div class=\"sl\"><p class=\"eyebrow\">INTERPLANE / COMMUNITY MACHINES</p>"
6text cmclose "</div>"
7text cmh1 "<h1>"
8text cmh1e "</h1>"
9text cmh2 "<h2>"
10text cmh2e "</h2>"
11text cmp "<p>"
12text cmpe "</p>"
13text cmpre "<pre>"
14text cmtdist "dist/"
15text cmtsums "SHA256SUMS"
16text cmcmh "Community machines"
17text cmolder "Earlier parts of the ledger, the refusal log and the alarm log (each set aside at 4 MiB):"
18text cmpree "</pre>"
19text cmcode "<code>"
20text cmcodee "</code>"
21text cmhref "<a href=\""
22text cmhrefe "\">"
23text cmae "</a>"
24text cmcard "<article class=\"sl-card\">"
25text cmcarde "</article>"
26text cmslug "community/"
27text cmslpart "community/part/"
28text cmslkey "community/key/"
29text cmslmsg "community/msg/"
30text cmslsal "salvage/"
31text cmtitle "Run Interplane's checks on your own computer"
32text cmintro "Anyone with an NVIDIA DGX Spark, or another 64-bit ARM computer running Linux, can lend it to Interplane. It asks for small public programs, builds each one and runs its example in a sealed box, and reports what it got. When several runners get the same bytes, everyone can see it here."
33text cmjoinh "Join with one line"
34text cmjoin "curl -fsSL https://interplane.io/community/join | sh"
35text cmjoinp "It puts two files in a folder called .interplane-runner in your home folder, shows their SHA-256 fingerprints (compare them with the list at the bottom of this page), explains what will happen, and asks you to type yes before anything is registered. Nothing else needs to be installed."
36text cmdoesh "What it does to your computer"
37text cmdoes "<ul><li>It only makes outgoing requests to interplane.io. Nothing from outside can connect to your computer.</li><li>Each check takes at most 2 seconds of one CPU core to build and 2 to run, 128 MiB of address space (the most memory it can reserve), 1 MiB of output, and 3 seconds of clock time for each step.</li><li>You choose how many checks an hour: 30 to start, change it any time with <code>interplane-runner set rate N</code>, and 0 pauses.</li><li>Everything it keeps is in one folder, under 10 MiB. The secret half of its key never leaves your computer.</li><li>It does not start again by itself after a restart: run <code>interplane-runner start</code>.</li></ul>"
38text cmneverh "What it can never do"
39text cmnever "A checked program runs in a sealed box made by the Linux kernel: no network, none of your files, no environment variables, no GPU, no new processes. It can only read its example input and write its output. The runner runs nothing else from Interplane."
40text cmstoph "Stop or leave"
41text cmstop "~/.interplane-runner/bin/interplane-runner stop\n~/.interplane-runner/bin/interplane-runner leave"
42text cmstopp "stop pauses it. leave stops it, tells Interplane, and deletes the folder."
43text cmruleh "How results are counted"
44text cmrule "Each runner is a key. One computer can hold several runners, and Interplane cannot tell from outside, so runners are counted, not machines. A key counts once for each revision of a part, however often it sends a result. Results agree when the built program, its output and its exit status are the same, byte for byte. Keys are free to make, so any number of agreeing keys is not called verified: agreement shows that the same bytes came back from every agreeing key, and if at least one of those keys is honest and used the pinned compiler, that runner really got them. It never changes what Interplane's own check says. Any disagreement is shown, and then the part is not presented as reproduced."
45text cmpartsh "Published parts and their reruns"
46text cmnopart "No part is published in the salvage yard yet."
47text cmdevh "For developers"
48text cmdev "The protocol, the runner's source and its gates are in the spark-connector repository. Every accepted message and every refusal is kept:"
49text cmled "community/ledger\">ledger</a> &#183; <a href=\""
50text cmrefl "community/refused\">refusals</a> &#183; <a href=\""
51text cmsums "community/dl/SHA256SUMS\">SHA256SUMS</a></p>"
52text cmfilesh "Files and fingerprints"
53text cmr0 "Not run again by community runners yet."
54text cmr1 "Ran again by "
55text cmr2 " community runner"
56text cmr2s " community runners"
57text cmr3 ": "
58text cmr4 " agree"
59text cmr5 ", "
60text cmr6 " disagree. While results disagree this part is not presented as reproduced."
61text cmr7 " No single result has more runners than every other."
62text cmplath "Which computers can join"
63text cmplat "<ul><li>Linux on 64-bit ARM (aarch64), such as an NVIDIA DGX Spark: works. Interplane runs it on its own DGX Spark.</li><li>Linux on x86-64, most PCs and servers: not covered yet. The compiler cannot yet build the sealed box for x86-64; the gap is with the compiler's owner.</li><li>Mac: not covered. The sealed box is made with Linux kernel features (Landlock and seccomp) that macOS does not have.</li></ul><p>On a computer that is not covered, the join line says so and installs nothing.</p>"
64text cmrunh "Runners now"
65text cmrun1 " runner"
66text cmrun1s " runners"
67text cmrun2 " registered: keys that joined and have not left (a key Interplane has refused since still counts here). Several runners can be on one computer."
68text cmnoteh "Interplane's note on its own runners: "
69text cmtnote "runners-note"
70text cmrtab "<table><tr><th>runner key</th><th>joined (Unix s)</th><th>checks an hour</th></tr>"
71text cmrmore "The list shows the registered keys among the first 200 key files in the store, in the store's order."
72text cmrunal "At least "
73text cmrcap " The count stops after the first 200 keys in the store, so that showing this page stays cheap however many keys are made."
74text cmr8 " The agreeing result has the same bytes as Interplane's own check."
75text cmr9 " The agreeing result differs from Interplane's own check."
76text cmr10 " Keys are free to make, so this is not called verified."
77text cmdet "details"
78text cmdot "."
79text cmown "Interplane's own check: compiler omc <code>"
80text cmownb "</code>, binary <code>"
81text cmowno "</code>, output <code>"
82text cmowne "</code>, exit 0."
83text cmtab "<table><tr><th>key</th><th>time (Unix s)</th><th>exit</th><th>binary SHA-256</th><th>output SHA-256</th><th>signed message</th></tr>"
84text cmtabe "</table>"
85text cmtr "<tr><td class=\"mono\">"
86text cmtd "</td><td class=\"mono\">"
87text cmtre "</td></tr>"
88text cmback "Back to community machines"
89text cmback2 "The part in the salvage yard"
90text cmtg2 "/g/"
91
92note ---- counting
93note cm_count: for part id, N (keys counted), K (largest agreeing group), the number of groups,
94note whether two groups tie for largest, and whether the largest group's result equals the hub's
95note own receipt (glrcpt: slpublic id must have been called)
96fn cm_count id view uchar * to void
97b = new uchar 8192 0
98put cmgv cmcn 0
99put cmgv cmck 0
100put cmgv cmcg 0
101put cmgv cmctie 0
102put cmgv cmcagr 0
103cm_p0
104cm_pa cmtparts
105cm_pa id
106cm_pa cmtg2
107fd = fopen cmpth 0 get cmgv cmpl 573440 0
108if lt fd 0
109ret
110end
111while true bound 9223372036854775807
112n = getdnts int fd b 0 8192
113if le n 0
114break
115end
116o = ulong 0
117while lt o ulong n bound 8192
118o = add o cm_gent id part b o sub ulong n o
119end
120end
121x = fclose int fd
122end
123
124note cm_gent: one entry of parts/<id>/g/: a "<hash>.v" file names a group
125fn cm_gent id view uchar * d view uchar * to ulong
126rl = or ulong get d 16 shl ulong get d 17 8
127if lt rl 86
128ret rl
129end
130if ne get d 85 0
131ret rl
132end
133if not cm_eq part d 83 2 cmtv
134ret rl
135end
136h = new uchar 64 0
137for i ulong 64
138put h i get d add 19 i
139end
140if not cm_ishex h
141ret rl
142end
143c = cm_gsize id h
144put cmgv cmcn add get cmgv cmcn c
145put cmgv cmcg add get cmgv cmcg 1
146k = get cmgv cmck
147if gt c k
148put cmgv cmck c
149put cmgv cmctie 0
150put cmgv cmcagr 0
151if cm_vhub id h
152put cmgv cmcagr 1
153end
154ret rl
155end
156if eq c k
157put cmgv cmctie 1
158end
159ret rl
160end
161
162note cm_gsize: the number of keys in parts/<id>/g/<h>/
163fn cm_gsize id view uchar * h view uchar * to ulong
164b = new uchar 8192 0
165cm_p0
166cm_pa cmtparts
167cm_pa id
168cm_pa cmtg2
169cm_pa h
170fd = fopen cmpth 0 get cmgv cmpl 573440 0
171if lt fd 0
172ret 0
173end
174c = ulong 0
175while true bound 9223372036854775807
176n = getdnts int fd b 0 8192
177if le n 0
178break
179end
180c = add c cm_dcnt part b 0 ulong n
181end
182x = fclose int fd
183ret c
184end
185
186note cm_dcnt: entries in a getdents64 buffer other than "." and ".."
187fn cm_dcnt b view uchar * to ulong
188o = ulong 0
189c = ulong 0
190while lt o len b bound 8192
191rl = or ulong get b add o 16 shl ulong get b add o 17 8
192if eq rl 0
193ret c
194end
195dot = eq get b add o 19 46
196d1 = and dot eq get b add o 20 0
197d2 = and dot and eq get b add o 20 46 eq get b add o 21 0
198if not or d1 d2
199c = add c 1
200end
201o = add o rl
202end
203ret c
204end
205
206note cm_vhub: the group's triple equals the hub's receipt: binary, stdout, exit 0
207fn cm_vhub id view uchar * h view uchar * to bool
208b = new uchar 256 0
209cm_p0
210cm_pa cmtparts
211cm_pa id
212cm_pa cmtg2
213cm_pa h
214cm_pa cmtv
215r = cm_rd b
216if ne r 132
217ret false
218end
219for i ulong 64
220if ne get b i get glrcpt add 65 i
221ret false
222end
223if ne get b add 65 i get glrcpt add 129 i
224ret false
225end
226end
227ret and eq get b 130 48 eq get b 131 10
228end
229
230note ---- the record line
231fn cm_rline id view uchar * lk bool to void
232cm_count id
233n = get cmgv cmcn
234fput cmp
235if eq n 0
236fput cmr0
237fput cmpe
238ret
239end
240k = get cmgv cmck
241fput cmr1
242fnum n
243if eq n 1
244fput cmr2
245else
246fput cmr2s
247end
248fput cmr3
249fnum k
250fput cmr4
251if gt n k
252fput cmr5
253fnum sub n k
254fput cmr6
255else
256fput cmdot
257end
258if eq get cmgv cmctie 1
259fput cmr7
260end
261if and eq n k eq get cmgv cmcagr 1
262fput cmr8
263end
264if and eq n k eq get cmgv cmcagr 0
265fput cmr9
266end
267fput cmr10
268if lk
269fputc 32
270cm_alink cmslpart id cmdet
271end
272fput cmpe
273end
274
275fn cm_alink a view uchar * id view uchar * t view uchar * to void
276fput cmhref
277fputb
278fput a
279fesc id
280fput cmhrefe
281fput t
282fput cmae
283end
284
285note cm_partln: the line on the salvage part page (nothing when the community store is off)
286fn cm_partln id view uchar * to void
287if not cm_on
288ret
289end
290fput cmh2
291fput cmcmh
292fput cmh2e
293cm_rline id true
294end
295
296note ---- /community/
297fn cm_index to long
298id = new uchar 64 0
299fput cmbase
300fput cmh1
301fput cmtitle
302fput cmh1e
303fput cmp
304fput cmintro
305fput cmpe
306fput cmh2
307fput cmjoinh
308fput cmh2e
309fput cmpre
310fput cmjoin
311fput cmpree
312fput cmp
313fput cmjoinp
314fput cmpe
315fput cmh2
316fput cmplath
317fput cmh2e
318fput cmplat
319fput cmh2
320fput cmdoesh
321fput cmh2e
322fput cmdoes
323fput cmh2
324fput cmneverh
325fput cmh2e
326fput cmp
327fput cmnever
328fput cmpe
329fput cmh2
330fput cmstoph
331fput cmh2e
332fput cmpre
333fput cmstop
334fput cmpree
335fput cmp
336fput cmstopp
337fput cmpe
338fput cmh2
339fput cmruleh
340fput cmh2e
341fput cmp
342fput cmrule
343fput cmpe
344cm_runners
345fput cmh2
346fput cmpartsh
347fput cmh2e
348shown = ulong 0
349n = get glidxn 0
350for ix ulong n bound 1000000
351pos = sub sub n ix 1
352for i ulong 64
353put id i get glidx add mul pos 65 i
354end
355if cm_ispart id
356cm_pcard id
357shown = add shown 1
358end
359end
360if eq shown 0
361fput cmp
362fput cmnopart
363fput cmpe
364end
365cm_devfoot
366fput cmclose
367ret 200
368end
369
370fn cm_ispart id view uchar * to bool
371if not slpublic id
372ret false
373end
374ret eq get glrec 8 2
375end
376
377note cm_pcard: the part's title (linking to the yard) and its record line
378fn cm_pcard id view uchar * to void
379fput cmcard
380fput cmhref
381fputb
382fput cmslsal
383fesc id
384fput cmhrefe
385slesc 1
386fput cmae
387cm_rline id true
388fput cmcarde
389end
390
391fn cm_devfoot to void
392fput cmh2
393fput cmdevh
394fput cmh2e
395fput cmp
396fput cmdev
397fputc 32
398fput cmhref
399fputb
400fput cmled
401fputb
402fput cmrefl
403fputb
404fput cmsums
405fput cmh2
406fput cmfilesh
407fput cmh2e
408fput cmpre
409cm_sumsout
410fput cmpree
411fput cmp
412fput cmolder
413cm_archls
414fput cmpe
415end
416
417note cm_archls: links to every ledger.<seconds> and refused.<seconds> in the store root
418fn cm_archls to void
419b = new uchar 8192 0
420cm_p0
421fd = fopen cmpth 0 get cmgv cmpl 573440 0
422if lt fd 0
423ret
424end
425while true bound 9223372036854775807
426n = getdnts int fd b 0 8192
427if le n 0
428break
429end
430o = ulong 0
431while lt o ulong n bound 8192
432o = add o cm_archent part b o sub ulong n o
433end
434end
435x = fclose int fd
436end
437
438fn cm_archent d view uchar * to ulong
439nm = new uchar 64 0
440n2 = new uchar 64 0
441rl = or ulong get d 16 shl ulong get d 17 8
442nl = ulong 0
443while lt add 19 nl rl bound 256
444if eq get d add 19 nl 0
445break
446end
447nl = add nl 1
448end
449if or eq nl 0 gt nl 60
450ret rl
451end
452for i ulong nl bound 64
453put nm i get d add 19 i
454end
455if cm_archok part nm 0 nl
456for i ulong nl bound 64
457put n2 i get nm i
458end
459fputc 32
460cm_alink cmslug part nm 0 nl part n2 0 nl
461end
462ret rl
463end
464
465note cm_sumsout: dist/SHA256SUMS, escaped
466fn cm_sumsout to void
467b = new uchar 4096 0
468cm_q0
469cm_pa cmtdist
470cm_pa cmtsums
471r = cm_rd b
472if gt r 0
473fesc part b 0 ulong r
474end
475end
476
477note ---- /community/part/<id>
478fn cm_partpage id view uchar * to long
479if not cm_ispart id
480ret 404
481end
482fput cmbase
483fput cmp
484cm_alink cmslug id cmback
485fput cmpe
486fput cmh1
487slesc 1
488fput cmh1e
489cm_rline id false
490fput cmp
491cm_alink cmslsal id cmback2
492fput cmpe
493x = slpublic id
494fput cmp
495fput cmown
496fput tlpin
497fput cmownb
498cm_rcp 65
499fput cmowno
500cm_rcp 129
501fput cmowne
502fput cmpe
503fput cmtab
504cm_rows id
505fput cmtabe
506fput cmclose
507ret 200
508end
509
510fn cm_rcp o ulong to void
511for i ulong 64
512fputc get glrcpt add o i
513end
514end
515
516note cm_rows: one table row per counted key (parts/<id>/k/<key>)
517fn cm_rows id view uchar * to void
518b = new uchar 8192 0
519cm_p0
520cm_pa cmtparts
521cm_pa id
522cm_pa cmtk
523fd = fopen cmpth 0 get cmgv cmpl 573440 0
524if lt fd 0
525ret
526end
527while true bound 9223372036854775807
528n = getdnts int fd b 0 8192
529if le n 0
530break
531end
532o = ulong 0
533while lt o ulong n bound 8192
534o = add o cm_row id part b o sub ulong n o
535end
536end
537x = fclose int fd
538end
539
540note cm_row: a key's row from "<binary> <stdout> <exit> <time> <message sha>\n"
541note The length test and the byte read are two ifs: or is eager in Omega, so a short entry ("." or
542note "..", 24 bytes) that ends the getdents buffer would otherwise be read past its end at byte 83
543note (trap 3; the live store lists ".." last, 2026-11-11).
544fn cm_row id view uchar * d view uchar * to ulong
545rl = or ulong get d 16 shl ulong get d 17 8
546if lt rl 84
547ret rl
548end
549if ne get d 83 0
550ret rl
551end
552k = new uchar 64 0
553b = new uchar 512 0
554for i ulong 64
555put k i get d add 19 i
556end
557if not cm_ishex k
558ret rl
559end
560cm_p0
561cm_pa cmtparts
562cm_pa id
563cm_pa cmtk
564cm_pa k
565r = cm_rd b
566if lt r 140
567ret rl
568end
569cm_rowout k part b 0 ulong r
570ret rl
571end
572
573note cm_rowout: fields of b are binary(64) sp stdout(64) sp exit sp time sp msgsha(64) LF
574fn cm_rowout k view uchar * b view uchar * to void
575kk = new uchar 64 0
576for i ulong 64
577put kk i get k i
578end
579e = cm_spn b 130
580t = cm_spn b add e 1
581if gt add t 65 len b
582ret
583end
584fput cmtr
585cm_alink cmslkey k kk
586fput cmtd
587fesc part b add e 1 sub t add e 1
588fput cmtd
589fesc part b 130 sub e 130
590fput cmtd
591fesc part b 0 64
592fput cmtd
593fesc part b 65 64
594fput cmtd
595cm_alink cmslmsg part b add t 1 64 cmdet
596fput cmtre
597end
598
599note cm_spn: the index of the first space in b at or after i (len b when none)
600fn cm_spn b view uchar * i ulong to ulong
601j = i
602while lt j len b bound 512
603if eq get b j 32
604ret j
605end
606j = add j 1
607end
608ret j
609end
610
611note ---- runners now (on /community/): the registered keys and Interplane's note on its own runners
612note cmkc: keys counted (first pass) or rows written (second pass)
613note cmke: key entries looked at in this pass; cmkcap: 1 when a pass stopped at cmkmax entries. Keys
614note are free to make, so each pass reads at most cmkmax key files (one forged serves every request).
615const cmkc ulong 15
616const cmke ulong 16
617const cmkcap ulong 17
618const cmkmax ulong 200
619fn cm_runners to void
620put cmgv cmkc 0
621put cmgv cmke 0
622put cmgv cmkcap 0
623cm_kscan 0
624n = get cmgv cmkc
625capped = get cmgv cmkcap
626fput cmh2
627fput cmrunh
628fput cmh2e
629fput cmp
630if eq capped 1
631fput cmrunal
632end
633fnum n
634if eq n 1
635fput cmrun1
636else
637fput cmrun1s
638end
639fput cmrun2
640if eq capped 1
641fput cmrcap
642end
643fput cmpe
644note the note is a file the operator writes in the read-only root (beside deny); absent: no note
645b = new uchar 2048 0
646cm_q0
647cm_pa cmtnote
648r = cm_rd b
649if gt r 0
650fput cmp
651fput cmnoteh
652fesc part b 0 ulong r
653fput cmpe
654end
655if eq n 0
656ret
657end
658fput cmrtab
659put cmgv cmkc 0
660put cmgv cmke 0
661put cmgv cmkcap 0
662cm_kscan 1
663fput cmtabe
664if eq capped 1
665fput cmp
666fput cmrmore
667fput cmpe
668end
669end
670
671note cm_kscan: every entry of keys/; m 0 counts registered keys, m 1 writes their rows (first 200)
672fn cm_kscan m ulong to void
673b = new uchar 8192 0
674cm_p0
675cm_pa cmtkeys
676fd = fopen cmpth 0 get cmgv cmpl 573440 0
677if lt fd 0
678ret
679end
680while true bound 9223372036854775807
681n = getdnts int fd b 0 8192
682if le n 0
683break
684end
685o = ulong 0
686while lt o ulong n bound 8192
687o = add o cm_kent part b o sub ulong n o m
688end
689note stop once the entry cap is hit (cmkcap). Not on the row count: the counting pass must see the
690note 201st key entry to know it stopped early, else 200 keys would be shown as an exact count.
691if eq get cmgv cmkcap 1
692break
693end
694end
695x = fclose int fd
696end
697
698note cm_kent: one entry of keys/. A registered key file is "<public key, 130 hex> <rate> <time> j\n"
699note (cm_kwrite). Every length test is its own if before the read it protects (or and and are eager).
700fn cm_kent d view uchar * m ulong to ulong
701rl = or ulong get d 16 shl ulong get d 17 8
702if lt rl 84
703ret rl
704end
705if ne get d 83 0
706ret rl
707end
708k = new uchar 64 0
709for i ulong 64
710put k i get d add 19 i
711end
712if not cm_ishex k
713ret rl
714end
715e = get cmgv cmke
716if ge e cmkmax
717put cmgv cmkcap 1
718ret rl
719end
720put cmgv cmke add e 1
721cm_krow k m
722ret rl
723end
724
725note cm_krow: key k counted (m 0) or its row written (m 1) when keys/<k> is a registered key file
726fn cm_krow k view uchar * m ulong to void
727b = new uchar 512 0
728cm_p0
729cm_pa cmtkeys
730cm_pa k
731r = cm_rd b
732if lt r 137
733ret
734end
735n = ulong r
736if ne get b sub n 1 10
737ret
738end
739if ne get b sub n 2 106
740ret
741end
742if ne get b sub n 3 32
743ret
744end
745c = get cmgv cmkc
746if eq m 0
747put cmgv cmkc add c 1
748ret
749end
750if ge c 200
751ret
752end
753e = cm_spn part b 0 n 131
754if ge e sub n 3
755ret
756end
757t = cm_spn part b 0 n add e 1
758if ne t sub n 3
759ret
760end
761put cmgv cmkc add c 1
762kk = new uchar 64 0
763for i ulong 64
764put kk i get k i
765end
766fput cmtr
767cm_alink cmslkey k kk
768fput cmtd
769fesc part b add e 1 sub t add e 1
770fput cmtd
771fesc part b 131 sub e 131
772fput cmtre
773end