nx_blocklist_store.nx
buildroot/runtime/nx_blocklist_store.nx
about
nx_blocklist_store.nx -- the do-not-recover blocklist on the sovereign seg_store (NOT a TSV). Modeled on
nx_app_store. Append-only / immutable: each entry is a record under key "bl:<id>"; status changes
(pending -> approved -> retracted) are NEW versions, so the full SUPERVISED history is preserved by construction
(additive law) and tamper-evident by content-address. A "__blidx__" index record (newline-separated ids), advanced
in the SAME commit, enumerates the whole list atomically. PENDING BY DEFAULT: bl_put writes status=pending and does
NOT block; only an operator approve flips it to approved. Record (tab-separated):
dhash_hex16 <TAB> threshold <TAB> category <TAB> authority <TAB> date <TAB> ref <TAB> status
license_tier: ORIGINAL
dependencies 1 imports · 4 importers
imports: nx_seg_store.nx
imported by: nx_blocklist_seed_demo.nxnx_blocklist_store_gate.nxnx_blocklist_view.nxnx_recovery_guard.nx
structs
| none |
consts
| 10 | const BL_MAGIC_1048576: i64 = 1048576 |
| 12 | const BL_PREFIX: *u8 = "knowledge/blocklist-" as *u8 |
functions
| 14 | func bls_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i } |
| 15 | func bls_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: bl_put_pfx |
| 17 | func bl_key(kbuf: *u8, id: *u8) -> i64 |
| 25 | func bl_id_present(buf: *u8, n: i64, id: *u8, idlen: i64) -> i64 |
| 40 | func bl_put_pfx(prefix: *u8, id: *u8, record: *u8, reclen: i64) -> i64 called by 5: bl_set_status_pfxbl_putmainmainseed calls 8: bl_keyss_next_segidss_beginss_addss_getbls_strlen+2 |
| 65 | func bl_get_pfx(prefix: *u8, id: *u8, ptrout: *i64, lenout: *i64) -> i64 |
| 72 | func bl_index_pfx(prefix: *u8, idxbuf: *u8) -> i64 |
| 82 | func bl_set_status_pfx(prefix: *u8, id: *u8, status: *u8) -> i64 |
| 99 | func bl_put(id: *u8, record: *u8, reclen: i64) -> i64 { return bl_put_pfx(BL_PREFIX, id, record, reclen) } |
| 100 | func bl_get(id: *u8, ptrout: *i64, lenout: *i64) -> i64 { return bl_get_pfx(BL_PREFIX, id, ptrout, lenout) } |
| 101 | func bl_index(idxbuf: *u8) -> i64 { return bl_index_pfx(BL_PREFIX, idxbuf) } calls 1: bl_index_pfx |
| 102 | func bl_approve(id: *u8) -> i64 { return bl_set_status_pfx(BL_PREFIX, id, "approved" as *u8) } calls 1: bl_set_status_pfx |
| 103 | func bl_retract(id: *u8) -> i64 { return bl_set_status_pfx(BL_PREFIX, id, "retracted" as *u8) } calls 1: bl_set_status_pfx |