Class v6 census, the pack harness: the per-pack launcher (pack-run.sh), the verdict sheet (pack-summ.py), the census script with state and era hex
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Documents-only replay of 982302d0e (25098c1a276d80987262eda59a7f1beef8cd6ba4) for the box mirror master
This commit is contained in:
parent
785172a493
commit
76fc903f2b
2 changed files with 96 additions and 0 deletions
39
tools/attack/v6-census/pack-run.sh
Normal file
39
tools/attack/v6-census/pack-run.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env bash
|
||||
# Class v6 census lane 2 (8 October 2026): one class v6 pack through the sub-version 3 harness on this box, fanned through
|
||||
# the lease pool (class v5, nice 19). Steps: (A) the pack's own program re-drawn from its seeds and judged (show, sitestats:
|
||||
# the whole rule with (c'''), the per-site bucket sigma and the index-bit era-stride sigma); (B) the attempts census over
|
||||
# 256 chain-shaped seeds of the pack's class under its era and state; (C) the F8-form census on the live state-keyed
|
||||
# dataset: the known-failed set at 2^24 nonces one program per job, and 16 seeds at 2^22 (the 64 x 2^24 point is 45 to 100
|
||||
# core-hours and is owed when the pool has it).
|
||||
# usage: pack-run.sh <tag> <bin-commit> <class> <epoch-hex> <day-hex> <era-hex> <state-file> <day-index> [era-widths-bytes] [steps]
|
||||
set -u
|
||||
TAG=$1; C=$2; CLASS=$3; EH=$4; DH=$5; ERA=$6; STATE=$7; DAY=$8; EW=${9:-4}; STEPS=${10:-ABC}
|
||||
ROOT=/srv/builds/v6-census; BIN=$ROOT/bin/$C/igneum-pow; F8=$ROOT/bin/$C/attack-f8; OUT=$ROOT/packs-out/$TAG
|
||||
mkdir -p "$OUT" "$ROOT/pids"
|
||||
export IGNEUM_FAMILY_GATE=1
|
||||
echo "# pack $TAG class $CLASS epoch $EH day $DH era $ERA state $STATE day-index $DAY era-widths $EW bin $(sha256sum "$BIN" | cut -c1-16) f8 $(sha256sum "$F8" | cut -c1-16) host $(hostname) start $(date -u +%FT%TZ)" | tee "$OUT/run.txt"
|
||||
case $STEPS in *A*)
|
||||
nice -n 19 "$BIN" show --epoch-hex "$EH" --day-hex "$DH" --class "$CLASS" --era "0:$ERA" --era-widths "$EW" --state "$STATE" > "$OUT/show.txt" 2>&1
|
||||
head -1 "$OUT/show.txt" | cut -c1-200
|
||||
nohup /srv/builds/_bin/lease pool 1 --min 1 --nice 19 --class v5 --label "class v6 census: pack $TAG sitestats (the whole rule, the per-site sigmas)" --owner class-v6-census -- \
|
||||
"$BIN" sitestats --epoch-hex "$EH" --day-hex "$DH" --class "$CLASS" --era "0:$ERA" --era-widths "$EW" --state "$STATE" > "$OUT/sitestats.tsv" 2> "$OUT/sitestats.err" < /dev/null &
|
||||
echo $! > "$ROOT/pids/$TAG-sitestats.lease.pid";;
|
||||
esac
|
||||
case $STEPS in *B*)
|
||||
nohup /srv/builds/_bin/lease pool 16 --min 4 --nice 19 --class v5 --label "class v6 census: pack $TAG attempts census, 256 seeds, class $CLASS under its era and state" --owner class-v6-census -- \
|
||||
env THREADS={cores} BIN="$BIN" OUT="$OUT" TAG=census CLASS="$CLASS" ERAS=0 ERAHEX="$ERA" SEEDS=256 ERAW="$EW" STATE="$STATE" "$ROOT/v6census.sh" > "$OUT/run-census.log" 2>&1 < /dev/null &
|
||||
echo $! > "$ROOT/pids/$TAG-census.lease.pid";;
|
||||
esac
|
||||
case $STEPS in *C*)
|
||||
for p in 4 8 10 15 34 212 225; do
|
||||
mkdir -p "$OUT/f8-p$p"
|
||||
nohup /srv/builds/_bin/lease pool 8 --min 2 --nice 19 --class v5 --label "class v6 census: pack $TAG F8 known-failed p$p at 2^24 (window control, by site)" --owner class-v6-census -- \
|
||||
"$F8" census --programs "$p..$p" --nonces 16777216 --control window --by-site --class v5 --state "$STATE" --load-class "$CLASS" --era-widths "$EW" --day "$DAY" --threads "{cores}" --out "$OUT/f8-p$p" > "$OUT/f8-p$p.log" 2>&1 < /dev/null &
|
||||
echo $! > "$ROOT/pids/$TAG-f8-p$p.lease.pid"; sleep 1
|
||||
done
|
||||
mkdir -p "$OUT/f8-seeds"
|
||||
nohup /srv/builds/_bin/lease pool 16 --min 4 --nice 19 --class v5 --label "class v6 census: pack $TAG F8 census 16 seeds at 2^22 (window control, by site)" --owner class-v6-census -- \
|
||||
"$F8" census --programs 2..17 --nonces 4194304 --control window --by-site --class v5 --state "$STATE" --load-class "$CLASS" --era-widths "$EW" --day "$DAY" --threads "{cores}" --out "$OUT/f8-seeds" > "$OUT/f8-seeds.log" 2>&1 < /dev/null &
|
||||
echo $! > "$ROOT/pids/$TAG-f8-seeds.lease.pid";;
|
||||
esac
|
||||
echo "queued $TAG steps $STEPS at $(date -u +%FT%TZ)"
|
||||
57
tools/attack/v6-census/pack-summ.py
Normal file
57
tools/attack/v6-census/pack-summ.py
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#!/usr/bin/env python3
|
||||
"""class v6 census lane 2: the verdict sheet of one pack's harness run (pack-run.sh output directory)."""
|
||||
import sys, os, re, glob, collections, statistics
|
||||
d = sys.argv[1]
|
||||
def rd(p):
|
||||
try: return open(p).read()
|
||||
except: return ''
|
||||
run = rd(os.path.join(d, 'run.txt')).strip().splitlines()
|
||||
print(run[0] if run else '# no run.txt')
|
||||
show = rd(os.path.join(d, 'show.txt')).splitlines()
|
||||
print('show: ' + (show[0][:200] if show else 'none'))
|
||||
ss = rd(os.path.join(d, 'sitestats.tsv')).splitlines()
|
||||
for l in ss:
|
||||
if l.startswith(('program', 'rule', 'summary')): print('sitestats: ' + l)
|
||||
sites = [l.split('\t') for l in ss if l and l[0].isdigit()]
|
||||
if sites:
|
||||
bad = [s for s in sites if abs(float(s[12])) > 6]
|
||||
print('sitestats: sites over 6 sigma on a free bit: ' + ', '.join(f"site {s[0]} instr {s[1]} bit {s[13]} z {float(s[12]):.0f}" for s in bad) if bad else 'sitestats: no site over 6 sigma')
|
||||
# census
|
||||
c = rd(os.path.join(d, 'census.tsv')).splitlines()
|
||||
rows = [l.split('\t') for l in c if l and not l.startswith(('#', 'cand'))]
|
||||
if rows:
|
||||
n = len(rows); acc = sum(int(r[4]) for r in rows); cands = sum(int(r[3]) for r in rows)
|
||||
atts = [int(r[5]) for r in rows if r[4] == '1']
|
||||
reasons = collections.Counter()
|
||||
for r in rows:
|
||||
for kv in r[9].split(';'):
|
||||
if '=' in kv:
|
||||
k, v = kv.rsplit('=', 1); reasons[k] += int(v)
|
||||
c3 = reasons.get("c'''", 0)
|
||||
end = [l for l in c if l.startswith('# end')]
|
||||
print(f"census: seeds {n}, accepted {acc}, exhausted {n-acc}, candidates {cands}, r {(cands-acc)/cands:.3f}, mean attempt {statistics.mean(atts):.2f}, max {max(atts)}, (c''') refused {c3} ({100*c3/cands:.2f} percent), parts {' '.join(f'{k}={v}' for k,v in reasons.most_common())}{' (complete)' if end else ' (RUNNING)'}")
|
||||
else:
|
||||
print('census: no rows yet')
|
||||
# f8
|
||||
def f8(path):
|
||||
t = rd(path)
|
||||
m = re.search(r'ratio \S+: top 0\.1% / 0\.5% / 1% share over the WINDOW-MODEL control ([0-9.]+)x / ([0-9.]+)x / ([0-9.]+)x \(gate 1\.2x at 0\.1%: (\w+)\)', t)
|
||||
b = re.search(r'largest bucket ([+-][0-9.]+) sigma, smallest ([+-][0-9.]+) -> (\w+)', t)
|
||||
h = re.search(r'\(windowed control\): verdict (\w+)', t)
|
||||
v = re.search(r'DONE: (\d+) nonces; 6-sigma \(windowed\) (\w+); hot-set (\w+); verdict (\w+)', t)
|
||||
return m, b, h, v
|
||||
for p in [4, 8, 10, 15, 34, 212, 225]:
|
||||
m, b, h, v = f8(os.path.join(d, f'f8-p{p}.log'))
|
||||
if v:
|
||||
print(f"f8 p{p}: ratio {m.group(1)}x ({m.group(4)}) bucket {b.group(1)} sigma ({b.group(3)}) hot-set {h.group(1)} verdict {v.group(4)} at 2^{int(v.group(1)).bit_length()-1}")
|
||||
else:
|
||||
print(f"f8 p{p}: not done")
|
||||
t = rd(os.path.join(d, 'f8-seeds.log'))
|
||||
dones = re.findall(r'program (p\d+)-attack-f8 DONE: (\d+) nonces; 6-sigma \(windowed\) (\w+); hot-set (\w+); verdict (\w+)', t)
|
||||
ratios = re.findall(r'ratio (p\d+)-attack-f8: top 0\.1% / 0\.5% / 1% share over the WINDOW-MODEL control ([0-9.]+)x', t)
|
||||
if dones:
|
||||
vc = collections.Counter(x[4] for x in dones)
|
||||
rmax = max(float(r[1]) for r in ratios) if ratios else float('nan')
|
||||
print(f"f8 seeds: {len(dones)} done: {dict(vc)}, max 0.1% ratio over the window model {rmax:.4f}x; flagged: {', '.join(x[0] for x in dones if x[4] != 'PASS') or 'none'}")
|
||||
else:
|
||||
print('f8 seeds: none done yet')
|
||||
Loading…
Reference in a new issue