adv-mixer-2: harness (census, exact, scm, calendar, avalanche, redraw), lease-pool queue files and chain runner
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
2e12f2d761
commit
2f5483a343
11 changed files with 1565 additions and 0 deletions
14
tools/attack/adv-mixer-2/Cargo.lock
generated
Normal file
14
tools/attack/adv-mixer-2/Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "attack-adv-mixer-2"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"igneum-pow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "igneum-pow"
|
||||
version = "0.2.0"
|
||||
21
tools/attack/adv-mixer-2/Cargo.toml
Normal file
21
tools/attack/adv-mixer-2/Cargo.toml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[package]
|
||||
name = "attack-adv-mixer-2"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Adversarial lane adv-mixer-2: the day-key weakness class of the mixer M_r (weak parameter draws), censused through the real draw code of igneum-pow"
|
||||
license = "MIT"
|
||||
publish = false
|
||||
|
||||
[[bin]]
|
||||
name = "adv-mixer-2"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
igneum-pow = { path = "../../../igneum-pow" }
|
||||
|
||||
[workspace]
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
17
tools/attack/adv-mixer-2/queue/01-adv-mixer-2-census-2p24.sh
Executable file
17
tools/attack/adv-mixer-2/queue/01-adv-mixer-2-census-2p24.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
||||
set -uo pipefail
|
||||
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
||||
L=/srv/builds/_adv-adv-mixer-2/logs
|
||||
mkdir -p "$L"
|
||||
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
||||
local name="$1" thr="$2" mn="$3"; shift 3
|
||||
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
||||
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
||||
echo $! > "$L/$name.pid"
|
||||
wait $!
|
||||
local rc=$?
|
||||
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
||||
rm -f "$L/$name.pid"
|
||||
}
|
||||
run census-2p24 32 16 census --from 20729 --count 2^24 --threads {cores} --lowest 16384 --out-days "$L/tail-2p24.txt"
|
||||
17
tools/attack/adv-mixer-2/queue/02-adv-mixer-2-calendar.sh
Executable file
17
tools/attack/adv-mixer-2/queue/02-adv-mixer-2-calendar.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
||||
set -uo pipefail
|
||||
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
||||
L=/srv/builds/_adv-adv-mixer-2/logs
|
||||
mkdir -p "$L"
|
||||
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
||||
local name="$1" thr="$2" mn="$3"; shift 3
|
||||
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
||||
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
||||
echo $! > "$L/$name.pid"
|
||||
wait $!
|
||||
local rc=$?
|
||||
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
||||
rm -f "$L/$name.pid"
|
||||
}
|
||||
run calendar-100y 32 16 calendar --from 20729 --years 100 --threads {cores}
|
||||
17
tools/attack/adv-mixer-2/queue/03-adv-mixer-2-scm-calendar.sh
Executable file
17
tools/attack/adv-mixer-2/queue/03-adv-mixer-2-scm-calendar.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
||||
set -uo pipefail
|
||||
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
||||
L=/srv/builds/_adv-adv-mixer-2/logs
|
||||
mkdir -p "$L"
|
||||
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
||||
local name="$1" thr="$2" mn="$3"; shift 3
|
||||
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
||||
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
||||
echo $! > "$L/$name.pid"
|
||||
wait $!
|
||||
local rc=$?
|
||||
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
||||
rm -f "$L/$name.pid"
|
||||
}
|
||||
run scm-calendar 32 16 scm-refine --from 20729 --count 36525 --threads {cores}
|
||||
19
tools/attack/adv-mixer-2/queue/04-adv-mixer-2-scm-tail-sample.sh
Executable file
19
tools/attack/adv-mixer-2/queue/04-adv-mixer-2-scm-tail-sample.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
||||
set -uo pipefail
|
||||
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
||||
L=/srv/builds/_adv-adv-mixer-2/logs
|
||||
mkdir -p "$L"
|
||||
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
||||
local name="$1" thr="$2" mn="$3"; shift 3
|
||||
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
||||
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
||||
echo $! > "$L/$name.pid"
|
||||
wait $!
|
||||
local rc=$?
|
||||
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
||||
rm -f "$L/$name.pid"
|
||||
}
|
||||
while [ ! -s "$L/tail-2p24.txt" ]; do sleep 30; done
|
||||
run scm-tail-2p24 32 16 scm-refine --days "$L/tail-2p24.txt" --threads {cores}
|
||||
run scm-sample-2p16 32 16 scm-refine --sample 65536 --seed 1 --threads {cores}
|
||||
26
tools/attack/adv-mixer-2/queue/05-adv-mixer-2-avalanche.sh
Executable file
26
tools/attack/adv-mixer-2/queue/05-adv-mixer-2-avalanche.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
||||
set -uo pipefail
|
||||
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
||||
L=/srv/builds/_adv-adv-mixer-2/logs
|
||||
mkdir -p "$L"
|
||||
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
||||
local name="$1" thr="$2" mn="$3"; shift 3
|
||||
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
||||
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
||||
echo $! > "$L/$name.pid"
|
||||
wait $!
|
||||
local rc=$?
|
||||
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
||||
rm -f "$L/$name.pid"
|
||||
}
|
||||
run avalanche-genesis 1 1 avalanche --index 20729 --states 1024
|
||||
run avalanche-plant-alleq 1 1 avalanche --plant alleq --states 1024
|
||||
run avalanche-plant-rot1 1 1 avalanche --plant rot1 --states 1024
|
||||
run avalanche-plant-weakday 1 1 avalanche --plant weakday --states 1024
|
||||
# the worst ROT days of the 2^24 census, read from its log once it exists
|
||||
while [ ! -f "$L/census-2p24.log" ] || ! grep -q "end census-2p24" "$L/census-2p24.log"; do sleep 30; done
|
||||
for cls in "ROT distinct <= 2" "ROT distinct <= 3" "ROT two same-word pairs sum to 32" "ROT >= 4 in {1,31}" "ROT all 8 in {1,2,30,31}" "ROT >= 4 in {8,16,24}" "ROT column set == diagonal set"; do
|
||||
d=$(grep -F "| $cls |" "$L/census-2p24.log" | head -1 | sed -n 's/.*day \([0-9]*\):.*/\1/p')
|
||||
[ -n "$d" ] && run "avalanche-day-$d" 1 1 avalanche --index "$d" --states 1024
|
||||
done
|
||||
17
tools/attack/adv-mixer-2/queue/06-adv-mixer-2-census-2p32.sh
Executable file
17
tools/attack/adv-mixer-2/queue/06-adv-mixer-2-census-2p32.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
||||
set -uo pipefail
|
||||
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
||||
L=/srv/builds/_adv-adv-mixer-2/logs
|
||||
mkdir -p "$L"
|
||||
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
||||
local name="$1" thr="$2" mn="$3"; shift 3
|
||||
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
||||
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
||||
echo $! > "$L/$name.pid"
|
||||
wait $!
|
||||
local rc=$?
|
||||
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
||||
rm -f "$L/$name.pid"
|
||||
}
|
||||
run census-2p32 32 16 census --from 20729 --count 2^32 --threads {cores} --lowest 4096 --out-days "$L/tail-2p32.txt"
|
||||
18
tools/attack/adv-mixer-2/queue/07-adv-mixer-2-redraw.sh
Executable file
18
tools/attack/adv-mixer-2/queue/07-adv-mixer-2-redraw.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 queue file (owner: lane adv-mixer-2). Self-contained: binary, args, log, pid file. Runs on either box through /srv/builds/_bin/lease pool (rule of 20:22 BST, 7 October 2026).
|
||||
set -uo pipefail
|
||||
B=/srv/builds/_adv-adv-mixer-2/bin/adv-mixer-2
|
||||
L=/srv/builds/_adv-adv-mixer-2/logs
|
||||
mkdir -p "$L"
|
||||
run() { # <name> <lease-threads> <min> <args...>: one sweep through lease pool (class adv), log + pid file beside it
|
||||
local name="$1" thr="$2" mn="$3"; shift 3
|
||||
echo "$(date -u +%FT%TZ) start $name (lease pool $thr min $mn): $B $*" >> "$L/$name.log"
|
||||
/srv/builds/_bin/lease pool "$thr" --min "$mn" --label "adv-mixer-2 $name" --owner adv-mixer-2 -- "$B" "$@" >> "$L/$name.log" 2>&1 &
|
||||
echo $! > "$L/$name.pid"
|
||||
wait $!
|
||||
local rc=$?
|
||||
echo "$(date -u +%FT%TZ) end $name rc=$rc" >> "$L/$name.log"
|
||||
rm -f "$L/$name.pid"
|
||||
}
|
||||
run redraw-2p24-206 32 16 redraw-census --from 20729 --count 2^24 --threads {cores} --max-cost 206
|
||||
run redraw-2p28-206 32 16 redraw-census --from 20729 --count 2^28 --threads {cores} --max-cost 206
|
||||
29
tools/attack/adv-mixer-2/run-box.sh
Executable file
29
tools/attack/adv-mixer-2/run-box.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
# adv-mixer-2 chain runner (Mac side). For each queue file named: claim it on build-2 (mkdir
|
||||
# /srv/builds/_adv/mixer/claims/<file>, atomic; exists = taken), copy its text to the named box and run it there in one
|
||||
# detached chain, in order. Every queue file is self-contained and starts its binary only through
|
||||
# `/srv/builds/_bin/lease pool` (class adv, 32 cores, --min 16; single-threaded sweeps take 1), which pins and nices it.
|
||||
# Logs and pid files live under /srv/builds/_adv-adv-mixer-2/ on the box, never under the worktree mirror. Kill by pid
|
||||
# file only. History: 19:4x BST the SIGSTOP yield was dropped (cores 8 to 95 at nice 10); 20:22 BST the lease pool
|
||||
# became the only way to start a sweep; 20:40 BST priority classes (release > v5 > measure > adv).
|
||||
# Usage: run-box.sh <1|2> <queue-file-name>...
|
||||
set -euo pipefail
|
||||
BOX="$1"; shift
|
||||
KEY=~/.ssh/igneum_ed25519
|
||||
H1=$(head -1 ~/.config/igneum/build-server); H2=$(head -1 ~/.config/igneum/build-server-2)
|
||||
case "$BOX" in 1) H="$H1" ;; 2) H="$H2" ;; *) echo "box 1 or 2" >&2; exit 2 ;; esac
|
||||
QDIR=/srv/builds/_adv/mixer/queue; CDIR=/srv/builds/_adv/mixer/claims
|
||||
CHAIN=""
|
||||
for Q in "$@"; do
|
||||
if ssh -i "$KEY" -o BatchMode=yes "$H2" "mkdir '$CDIR/$Q' 2>/dev/null && echo 'adv-mixer-2 box $BOX '\$(date -u +%FT%TZ) > '$CDIR/$Q/owner'"; then
|
||||
BODY=$(ssh -i "$KEY" -o BatchMode=yes "$H2" "cat '$QDIR/$Q'")
|
||||
ssh -i "$KEY" -o BatchMode=yes "$H" "mkdir -p /srv/builds/_adv-adv-mixer-2/logs /srv/builds/_adv-adv-mixer-2/q && cat > /srv/builds/_adv-adv-mixer-2/q/$Q && chmod +x /srv/builds/_adv-adv-mixer-2/q/$Q" <<< "$BODY"
|
||||
CHAIN="$CHAIN /srv/builds/_adv-adv-mixer-2/q/$Q;"
|
||||
echo "claimed $Q for box $BOX"
|
||||
else
|
||||
echo "queue file $Q is already claimed, skipped" >&2
|
||||
fi
|
||||
done
|
||||
[ -n "$CHAIN" ] || exit 0
|
||||
STAMP=$(date -u +%Y%m%dT%H%M%SZ)
|
||||
ssh -i "$KEY" -o BatchMode=yes "$H" "cd /srv/builds/_adv-adv-mixer-2 && setsid nohup bash -c '$CHAIN' > logs/chain-$STAMP.log 2>&1 < /dev/null & echo \$! > /srv/builds/_adv-adv-mixer-2/logs/chain-$STAMP.pid; echo chain started on box $BOX: pid \$(cat /srv/builds/_adv-adv-mixer-2/logs/chain-$STAMP.pid), log logs/chain-$STAMP.log"
|
||||
1370
tools/attack/adv-mixer-2/src/main.rs
Normal file
1370
tools/attack/adv-mixer-2/src/main.rs
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue