nx_fabric_research_fetch.nx source
↩ module page · 88 lines · 6300 B
1// nx_fabric_research_fetch.nx -- SOVEREIGN web-fetch for the SCALE-UP AI-FABRIC / INTERCONNECT exceed
2// research (the SkyHammer(TM) domain: GPU<->GPU load/store fabric, deterministic flow control, lossless
3// Ethernet, collective communication, telemetry, resiliency). SkyHammer (Upscale AI, $200M Series A, 2026)
4// is a clean-slate scale-up interconnect ASIC supporting ESUN / UEC / UALink that targets NVIDIA NVLink/
5// NVSwitch. To BENCHMARK + s-class-exceed it in the Nishi ecosystem we first ground the standard in REAL
6// fetched bytes (rule #4: verified facts, never assumptions), SEPARATE on disk so the benchmark cannot be
7// confused with a hallucination (feedback: benchmarks-must-exist-separate). 100% sovereign (own TLS-1.3 via
8// nx_https_fetch_follow + Mozilla CA store; nx_cc->nxasm; NO curl/wget/gcc) -- no API rate limit. Idempotent
9// (rule #10): a source already on disk is skipped, so re-runs fill gaps + resume past the per-process TLS
10// mmap-leak ceiling. Curated orientation set = Wikipedia + standards-body pages (the explicitly-allowed
11// orientation tier; dynamic SREACH depth is the next rung, not this organ). Mirrors nx_connect_research_fetch.
12// expect_exit: 0 license_tier: ORIGINAL
13import "nx_syscalls.nx"
14import "nx_x509_trust_store.nx"
15import "nx_trust_store_load_from_certdata.nx"
16import "nx_https_fetch_follow.nx"
17const K_MAGIC_4194304: i64 = 4194304
18const K_MAGIC_8388608: i64 = 8388608
19
20func gf_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
21func gf_putn(v: i64) -> i64 {
22 if v == 0 { sys_write(1, "0" as *u8, 1); return 0 }
23 var m: i64 = v
24 if m < 0 { sys_write(1, "-" as *u8, 1); m = 0 - m }
25 let d: *u8 = sys_mmap(24); var k: i64 = 0
26 while m > 0 { d[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 }
27 var j: i64 = k - 1
28 while j >= 0 { sys_write(1, ((d as i64)+j) as *u8, 1); j = j - 1 }
29 return 0
30}
31func have_file(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
32
33func fetch_save(url: *u8, opath: *u8, store: *TrustStore, out: *u8, cap: i64) -> i64 {
34 if have_file(opath) == 1 { gf_puts(opath); gf_puts(" [have-skip]\n"); return 1 }
35 let status: *i64 = sys_mmap(8) as *i64
36 let n: i64 = nx_https_fetch_follow(url, store, out, cap, 6, status)
37 gf_puts(url); gf_puts(" status="); gf_putn(status[0]); gf_puts(" bytes="); gf_putn(n)
38 if n <= 0 { gf_puts(" FETCH-FAIL\n"); return 0 }
39 var gz: i64 = 0
40 if n >= 2 { if out[0] == 0x1f as u8 { if out[1] == 0x8b as u8 { gz = 1 } } }
41 if gz == 1 { gf_puts(" [GZIP-skip]\n"); return 0 }
42 let fd: i64 = sys_openat_wr(opath, 0x1a4)
43 if fd < 0 { gf_puts(" SAVE-FAIL\n"); return 0 }
44 sys_write(fd, out, n); sys_close(fd)
45 gf_puts(" SAVED\n")
46 return 1
47}
48
49func main() -> i64 {
50 let r: i64 = nx_trust_store_load_from_certdata("data/mozilla_certdata.txt" as *u8, 512, K_MAGIC_4194304)
51 if r <= 0 { gf_puts("FRF: certdata load failed\n"); return 1 }
52 let store: *TrustStore = r as *TrustStore
53 gf_puts("CA roots="); gf_putn(trust_store_count(store)); gf_puts("\n")
54 let cap: i64 = K_MAGIC_8388608
55 let out: *u8 = sys_mmap(cap)
56 var ok: i64 = 0
57
58 gf_puts("== THE STANDARD ITSELF (SkyHammer + the $200M / challenge-NVSwitch framing) ==\n")
59 ok = ok + fetch_save("https://upscaleai.com/upscale-ai-unveils-skyhammer-architecture/" as *u8, "knowledge/fetched/fab_skyhammer.raw" as *u8, store, out, cap)
60 ok = ok + fetch_save("https://www.theregister.com/2026/01/22/upscale_skyhammer_nvidia" as *u8, "knowledge/fetched/fab_skyhammer_register.raw" as *u8, store, out, cap)
61
62 gf_puts("== SCALE-UP LOAD/STORE FABRIC (the incumbent SkyHammer attacks: NVLink/NVSwitch) ==\n")
63 ok = ok + fetch_save("https://en.wikipedia.org/wiki/NVLink" as *u8, "knowledge/fetched/fab_nvlink.raw" as *u8, store, out, cap)
64 ok = ok + fetch_save("https://en.wikipedia.org/wiki/UALink" as *u8, "knowledge/fetched/fab_ualink.raw" as *u8, store, out, cap)
65 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Compute_Express_Link" as *u8, "knowledge/fetched/fab_cxl.raw" as *u8, store, out, cap)
66 ok = ok + fetch_save("https://en.wikipedia.org/wiki/InfiniBand" as *u8, "knowledge/fetched/fab_infiniband.raw" as *u8, store, out, cap)
67
68 gf_puts("== SCALE-OUT LOSSLESS ETHERNET (RDMA / RoCE / flow control) ==\n")
69 // NOTE: Ultra Ethernet / UEC has NO Wikipedia page yet (both titles 404) -- its specs
70 // come from dynamic SREACH depth (the next researcher rung), not a hardcoded 404 endpoint.
71 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Remote_direct_memory_access" as *u8, "knowledge/fetched/fab_rdma.raw" as *u8, store, out, cap)
72 ok = ok + fetch_save("https://en.wikipedia.org/wiki/RDMA_over_Converged_Ethernet" as *u8, "knowledge/fetched/fab_roce.raw" as *u8, store, out, cap)
73 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Data_center_bridging" as *u8, "knowledge/fetched/fab_dcb.raw" as *u8, store, out, cap)
74 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Explicit_Congestion_Notification" as *u8, "knowledge/fetched/fab_ecn.raw" as *u8, store, out, cap)
75
76 gf_puts("== COLLECTIVE COMMUNICATION (the AI-training workload the fabric must accelerate) ==\n")
77 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Collective_operation" as *u8, "knowledge/fetched/fab_collective.raw" as *u8, store, out, cap)
78 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Message_Passing_Interface" as *u8, "knowledge/fetched/fab_mpi.raw" as *u8, store, out, cap)
79
80 gf_puts("== TOPOLOGY + TRANSPORT SUBSTRATE (radix / Clos / PCIe / DPU) ==\n")
81 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Fat_tree" as *u8, "knowledge/fetched/fab_fattree.raw" as *u8, store, out, cap)
82 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Clos_network" as *u8, "knowledge/fetched/fab_clos.raw" as *u8, store, out, cap)
83 ok = ok + fetch_save("https://en.wikipedia.org/wiki/PCI_Express" as *u8, "knowledge/fetched/fab_pcie.raw" as *u8, store, out, cap)
84 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Data_processing_unit" as *u8, "knowledge/fetched/fab_dpu.raw" as *u8, store, out, cap)
85
86 gf_puts("FABRIC SOURCES SAVED: "); gf_putn(ok); gf_puts(" / 16\n")
87 return 0
88}