diff --git a/docs/design/class-v5-bench/20261007T083716Z/alone-v4.txt b/docs/design/class-v5-bench/20261007T083716Z/alone-v4.txt new file mode 100644 index 000000000..00cb9280e --- /dev/null +++ b/docs/design/class-v5-bench/20261007T083716Z/alone-v4.txt @@ -0,0 +1,8 @@ +igneum-pow bench: seed "igneum-genesis", day "2026-10-03", dataset 2^28 words (memory-hard) +cache: fill 540.7 ms on one core (2^26 words, 256 MiB, 65536 chains of 64 ChaCha12 blocks), FNV-1a 64 48c4f5bf24166b2e +program: class mx8+sh256x27, 128 loads/hash, 512 bytes/hash, widths (1,4,16 words) [16, 0, 0], 4096 items/warp, mixer x8 (72 mixers/item), cache 2^26 words, op mix load=16 add=8 shfl=8 xor=6 mad=5 mul=5 mulhi=5 sub=4 rotl=3 rotr=3 or=1; epoch built in 536.5 ms +shadow: 256 instructions x 27 passes per iteration, 55296 shadow instructions per hash, op mix add=47 rotl=30 xor=30 shfl=29 mad=27 mul=22 sub=21 rotr=20 mulhi=18 or=12 +warp base 0: single cold run 8.110 ms, 4096 items derived, lane0 2576769ee4a14c8d lane31 c58ddcb717dd3370 +warp base 4096: single cold run 7.636 ms, 4096 items derived, lane0 1ce77a600ec573b4 lane31 03600a05ffba0055 +warp base 1000000: single cold run 7.620 ms, 4096 items derived, lane0 6b390e64bbdd91ce lane31 91c944d603539c62 +CPU verify: 7.830 ms per 32-lane warp, avg of 50 (checksum 17e36e7905b81375) diff --git a/docs/design/class-v5-bench/20261007T083716Z/alone-v5.txt b/docs/design/class-v5-bench/20261007T083716Z/alone-v5.txt new file mode 100644 index 000000000..32b1514b6 --- /dev/null +++ b/docs/design/class-v5-bench/20261007T083716Z/alone-v5.txt @@ -0,0 +1,9 @@ +igneum-pow bench: seed "igneum-genesis", day "2026-10-03", dataset 2^28 words (memory-hard) +cache: fill 551.4 ms on one core (2^26 words, 256 MiB, 65536 chains of 64 ChaCha12 blocks), FNV-1a 64 48c4f5bf24166b2e +state stream /srv/builds/_log/v5-class/node1-state.igsd1: chain block 159357 af89be5ddbadb6f6b4aee28ac8f249713be5d4c12621e3cea7f83ceada3c66b3, root 1c583d352bb9c75a06dadb8d82d42836ebe8afa82d0b413be87bf921741f1526, 93 records, 93 leaves +program: class mx8+sh256x27+state, 128 loads/hash, 512 bytes/hash, widths (1,4,16 words) [16, 0, 0], 4096 items/warp, mixer x8 (72 mixers/item), cache 2^26 words, op mix load=16 add=8 shfl=8 xor=6 mad=5 mul=5 mulhi=5 sub=4 rotl=3 rotr=3 or=1; epoch built in 555.1 ms +shadow: 256 instructions x 27 passes per iteration, 55296 shadow instructions per hash, op mix add=47 rotl=30 xor=30 shfl=29 mad=27 mul=22 sub=21 rotr=20 mulhi=18 or=12 +warp base 0: single cold run 8.712 ms, 4096 items derived, lane0 18d47ad5e5f0db00 lane31 d1b36ed0ff68e575 +warp base 4096: single cold run 8.478 ms, 4095 items derived, lane0 a1f55f0b0cae0ed2 lane31 8c548231ef24eb73 +warp base 1000000: single cold run 8.549 ms, 4096 items derived, lane0 bd47078fc688b540 lane31 01f4d9a0bef81008 +CPU verify: 8.538 ms per 32-lane warp, avg of 50 (checksum 60bcc82b11d41f0f) diff --git a/docs/design/class-v5-bench/20261007T083716Z/loaded-v4.txt b/docs/design/class-v5-bench/20261007T083716Z/loaded-v4.txt new file mode 100644 index 000000000..18e5cf018 --- /dev/null +++ b/docs/design/class-v5-bench/20261007T083716Z/loaded-v4.txt @@ -0,0 +1,8 @@ +igneum-pow bench: seed "igneum-genesis", day "2026-10-03", dataset 2^28 words (memory-hard) +cache: fill 589.9 ms on one core (2^26 words, 256 MiB, 65536 chains of 64 ChaCha12 blocks), FNV-1a 64 48c4f5bf24166b2e +program: class mx8+sh256x27, 128 loads/hash, 512 bytes/hash, widths (1,4,16 words) [16, 0, 0], 4096 items/warp, mixer x8 (72 mixers/item), cache 2^26 words, op mix load=16 add=8 shfl=8 xor=6 mad=5 mul=5 mulhi=5 sub=4 rotl=3 rotr=3 or=1; epoch built in 556.0 ms +shadow: 256 instructions x 27 passes per iteration, 55296 shadow instructions per hash, op mix add=47 rotl=30 xor=30 shfl=29 mad=27 mul=22 sub=21 rotr=20 mulhi=18 or=12 +warp base 0: single cold run 8.744 ms, 4096 items derived, lane0 2576769ee4a14c8d lane31 c58ddcb717dd3370 +warp base 4096: single cold run 8.694 ms, 4096 items derived, lane0 1ce77a600ec573b4 lane31 03600a05ffba0055 +warp base 1000000: single cold run 8.738 ms, 4096 items derived, lane0 6b390e64bbdd91ce lane31 91c944d603539c62 +CPU verify: 8.629 ms per 32-lane warp, avg of 50 (checksum 17e36e7905b81375) diff --git a/docs/design/class-v5-bench/20261007T083716Z/loaded-v5.txt b/docs/design/class-v5-bench/20261007T083716Z/loaded-v5.txt new file mode 100644 index 000000000..eb85a8d65 --- /dev/null +++ b/docs/design/class-v5-bench/20261007T083716Z/loaded-v5.txt @@ -0,0 +1,9 @@ +igneum-pow bench: seed "igneum-genesis", day "2026-10-03", dataset 2^28 words (memory-hard) +cache: fill 566.6 ms on one core (2^26 words, 256 MiB, 65536 chains of 64 ChaCha12 blocks), FNV-1a 64 48c4f5bf24166b2e +state stream /srv/builds/_log/v5-class/node1-state.igsd1: chain block 159357 af89be5ddbadb6f6b4aee28ac8f249713be5d4c12621e3cea7f83ceada3c66b3, root 1c583d352bb9c75a06dadb8d82d42836ebe8afa82d0b413be87bf921741f1526, 93 records, 93 leaves +program: class mx8+sh256x27+state, 128 loads/hash, 512 bytes/hash, widths (1,4,16 words) [16, 0, 0], 4096 items/warp, mixer x8 (72 mixers/item), cache 2^26 words, op mix load=16 add=8 shfl=8 xor=6 mad=5 mul=5 mulhi=5 sub=4 rotl=3 rotr=3 or=1; epoch built in 588.0 ms +shadow: 256 instructions x 27 passes per iteration, 55296 shadow instructions per hash, op mix add=47 rotl=30 xor=30 shfl=29 mad=27 mul=22 sub=21 rotr=20 mulhi=18 or=12 +warp base 0: single cold run 9.025 ms, 4096 items derived, lane0 18d47ad5e5f0db00 lane31 d1b36ed0ff68e575 +warp base 4096: single cold run 8.877 ms, 4095 items derived, lane0 a1f55f0b0cae0ed2 lane31 8c548231ef24eb73 +warp base 1000000: single cold run 8.955 ms, 4096 items derived, lane0 bd47078fc688b540 lane31 01f4d9a0bef81008 +CPU verify: 8.833 ms per 32-lane warp, avg of 50 (checksum 60bcc82b11d41f0f) diff --git a/docs/design/class-v5-bench/20261007T083716Z/meta.txt b/docs/design/class-v5-bench/20261007T083716Z/meta.txt new file mode 100644 index 000000000..7871aced4 --- /dev/null +++ b/docs/design/class-v5-bench/20261007T083716Z/meta.txt @@ -0,0 +1,2 @@ +host igneum-build-1 load 70.78 56.14 34.92 freq40 3724858 kHz siblings 40,88 pow 978c9a64d265746f state abb5800350b02dd9 +load after 69.49 56.35 35.22 diff --git a/docs/design/class-v5-bench/20261007T083716Z/sibling-v4.txt b/docs/design/class-v5-bench/20261007T083716Z/sibling-v4.txt new file mode 100644 index 000000000..ff5740094 --- /dev/null +++ b/docs/design/class-v5-bench/20261007T083716Z/sibling-v4.txt @@ -0,0 +1,8 @@ +igneum-pow bench: seed "igneum-genesis", day "2026-10-03", dataset 2^28 words (memory-hard) +cache: fill 546.6 ms on one core (2^26 words, 256 MiB, 65536 chains of 64 ChaCha12 blocks), FNV-1a 64 48c4f5bf24166b2e +program: class mx8+sh256x27, 128 loads/hash, 512 bytes/hash, widths (1,4,16 words) [16, 0, 0], 4096 items/warp, mixer x8 (72 mixers/item), cache 2^26 words, op mix load=16 add=8 shfl=8 xor=6 mad=5 mul=5 mulhi=5 sub=4 rotl=3 rotr=3 or=1; epoch built in 542.9 ms +shadow: 256 instructions x 27 passes per iteration, 55296 shadow instructions per hash, op mix add=47 rotl=30 xor=30 shfl=29 mad=27 mul=22 sub=21 rotr=20 mulhi=18 or=12 +warp base 0: single cold run 8.165 ms, 4096 items derived, lane0 2576769ee4a14c8d lane31 c58ddcb717dd3370 +warp base 4096: single cold run 8.058 ms, 4096 items derived, lane0 1ce77a600ec573b4 lane31 03600a05ffba0055 +warp base 1000000: single cold run 8.080 ms, 4096 items derived, lane0 6b390e64bbdd91ce lane31 91c944d603539c62 +CPU verify: 10.536 ms per 32-lane warp, avg of 4000 (checksum 5abf8f93f330d440) diff --git a/docs/design/class-v5-bench/20261007T083716Z/sibling-v5.txt b/docs/design/class-v5-bench/20261007T083716Z/sibling-v5.txt new file mode 100644 index 000000000..78b16115a --- /dev/null +++ b/docs/design/class-v5-bench/20261007T083716Z/sibling-v5.txt @@ -0,0 +1,8 @@ +igneum-pow bench: seed "igneum-genesis", day "2026-10-03", dataset 2^28 words (memory-hard) +cache: fill 757.6 ms on one core (2^26 words, 256 MiB, 65536 chains of 64 ChaCha12 blocks), FNV-1a 64 48c4f5bf24166b2e +state stream /srv/builds/_log/v5-class/node1-state.igsd1: chain block 159357 af89be5ddbadb6f6b4aee28ac8f249713be5d4c12621e3cea7f83ceada3c66b3, root 1c583d352bb9c75a06dadb8d82d42836ebe8afa82d0b413be87bf921741f1526, 93 records, 93 leaves +program: class mx8+sh256x27+state, 128 loads/hash, 512 bytes/hash, widths (1,4,16 words) [16, 0, 0], 4096 items/warp, mixer x8 (72 mixers/item), cache 2^26 words, op mix load=16 add=8 shfl=8 xor=6 mad=5 mul=5 mulhi=5 sub=4 rotl=3 rotr=3 or=1; epoch built in 1062.6 ms +shadow: 256 instructions x 27 passes per iteration, 55296 shadow instructions per hash, op mix add=47 rotl=30 xor=30 shfl=29 mad=27 mul=22 sub=21 rotr=20 mulhi=18 or=12 +warp base 0: single cold run 17.767 ms, 4096 items derived, lane0 18d47ad5e5f0db00 lane31 d1b36ed0ff68e575 +warp base 4096: single cold run 17.585 ms, 4095 items derived, lane0 a1f55f0b0cae0ed2 lane31 8c548231ef24eb73 +warp base 1000000: single cold run 14.724 ms, 4096 items derived, lane0 bd47078fc688b540 lane31 01f4d9a0bef81008 diff --git a/docs/design/class-v5-stored-state.md b/docs/design/class-v5-stored-state.md index af17606aa..d46392ee0 100644 --- a/docs/design/class-v5-stored-state.md +++ b/docs/design/class-v5-stored-state.md @@ -14,7 +14,10 @@ | 08:42 | Section 2a committed (3cbe8c0f) | | 08:56 | FIRST GREEN: igneum-pow class v5 (c6bbde78): blake2b, state leaves, the leaf XOR behind `Shape.state`, `V5_CLASS`, generator 5, the emitters' leaf buffer, the CLI's `--state`; 66 unit and 39 integration tests on igneum-build-1, the known-failed case (a stateless hasher) first | | 09:10 | The fork builds (class-v5-node): `ProgramClass::V5`, `program_class_v5_activation_daa` (never, in the digest once set), the byte-5 tally and the one-step rule, the executor's per-epoch state captures and `igneum_getPowStateLeaves`, the engine's `DayStateProvider` and `DayStateUnavailable`, the miner's RPC provider with `--exec-rpc` and `--freeze-state`, the template's v5 fields (37 to 40); kaspa-pow 16 tests green; the harness `infra/fast-time/class-v5-signal.mjs` and the 4090 bench committed (e528cb05) | -| 09:1x | The remaining fork suites wait behind another lane's measurement hold on igneum-build-1 | +| 09:30 | Fork suites on igneum-build-1: kaspa-pow with the feature 16 passed (the engine's known-failed case `class_v5_refuses_without_state_and_refreshes_the_leaves_per_epoch` among them), igneum-exec 28 passed (`a_tampered_stream_is_refused`, `epoch_state_captures_follow_the_cut_and_unwind`), kaspa-consensus `class_signal` 1 passed, kaspa-consensus-core 122 of 123: the one failure is `fast_time_60x_file_is_the_devnet_at_60x` demanding the `emission` field of the 0.3.18 fork's `OverrideParams` in the repo's 60x file, which master's file lacks as well (the economy lane's field, not this lane's; the v5 field is in the file and read) | +| 09:33 | The pinned packs exported on the box from the devnet's IGSD1 stream (`proto-cuda/packs-ca3-v5/`, 4d10ac56); the packs test 20 passed: the v4 control pack agrees with the v5 epoch on 0 of 32 lanes, the hash kernel text equal, the build kernel and leaves the difference | +| 09:37 | The verifier measured (section 7): v5 adds 0.28 ms cold and 0.20 ms on average over v4 on the loaded reference core; both under 10 ms | +| 09:37 | The harness's known-failed case started on the box (`tools/class-v5/harness-remote.sh failed-case -- --signal 5,5,4 --expect flip`) | ## 1. The claim, in one paragraph @@ -174,7 +177,7 @@ The same machinery as class v4 and the ladder (counter-asic-3-node.md section 6; | Row | Value | Where | |---|---|---| | The devnet's state (node 1's exec snapshot, tip 159,357) | 93 records, 8,619 bytes; stream built in 0.1 ms; rebuilt and root-checked in 0.1 ms | `igneum-day-stream`, 08:33 UK, core 40 at nice 19 | -| Verifier per unit, class v4 against class v5 (cold warp, core 40, sibling loaded; the ladder's method) | owed (section 0 carries the time) | `tools/ladder/verify-bench-remote.sh` shape with `--program-class v5 --state ` | +| Verifier per unit, class v4 against class v5 (one 32-lane warp, core 40 at 3.72 GHz, nice 19, the ladder's method; the box at load 70 from other lanes' builds, so every figure is a loaded-box figure: the ladder's rung-0 row read 5.14 alone and 8.77 loaded at load 25) | v4: cold 8.11 ms alone, 8.74 ms with the sibling loaded; average of 50: 7.83 and 8.63. v5 over the devnet's 93 leaves: cold 8.71 alone, 9.03 loaded; average of 50: 8.54 and 8.83. So v5 adds 0.28 ms cold and 0.20 ms on average with the sibling loaded (+3.2 and +2.3 percent), inside the prototype's +0.11 to 0.21 ms row, and both classes stay under the 10 ms gate on the loaded core at load 70 | `tools/class-v5/verify-bench-remote.sh`, 09:37 UK, raw lines under `docs/design/class-v5-bench/20261007T083716Z/` | | 4090: hash rate and watts, v4 against v5; dataset build with the devnet's leaves | owed | the fleet pod, `proto-newpow/state-dataset` harness on the class v4 pack text with the real leaf array | The prototype's rows stand meanwhile (new-pow 5.2): 63.083 against 63.088 MH/s, 205 to 208 W, build 30.55 against 31.98 ms resident, verifier +0.11 to 0.21 ms per unit. diff --git a/tools/class-v5/verify-bench-remote.sh b/tools/class-v5/verify-bench-remote.sh new file mode 100755 index 000000000..32ec1b42e --- /dev/null +++ b/tools/class-v5/verify-bench-remote.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# The class v5 verifier cost against class v4 on igneum-build-1 (docs/design/class-v5-stored-state.md section 7), the +# latency ladder's method (tools/ladder/verify-bench-remote.sh): the cold verify of one 32-lane warp on the reference +# core (core 40, nice 19), alone and with its SMT sibling (core 88) running the same bench, plus the average of 50 +# warps; class v4 at rung 0 against class v5 over the devnet's state stream (node 1's exec snapshot, 93 records). +# +# tools/class-v5/verify-bench-remote.sh [--pow ] [--state ] [--out ] +# +# Runs ON the box under its measure hold (infra/build-server/remote-run.sh BR_MEASURE=1), as the ladder's does. +set -euo pipefail +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +BS_TOOL=class-v5-verify-bench +# shellcheck source=../../infra/build-server/lib.sh +. "$HERE/../../infra/build-server/lib.sh" +POW=""; STATE="/srv/builds/_log/v5-class/node1-state.igsd1"; OUT="" +while [ $# -gt 0 ]; do + case "$1" in + --pow) POW="$2"; shift 2 ;; --state) STATE="$2"; shift 2 ;; --out) OUT="$2"; shift 2 ;; + *) echo "unknown argument $1" >&2; exit 2 ;; + esac +done +bs_host +pushd "$HERE/../../igneum-pow" > /dev/null; bs_context; popd > /dev/null +WT_ROOT="$BS_WT_ROOT" +WT_NAME="$BS_WT" +POW="${POW:-/srv/builds/$WT_NAME/igneum-pow/target/release/igneum-pow}" +OUT="${OUT:-$WT_ROOT/docs/design/class-v5-bench}" +STAMP=$(date -u +%Y%m%dT%H%M%SZ) +REMOTE_OUT="/srv/builds/_log/v5-class/bench/$STAMP" +mkdir -p "$OUT" +read -r -d '' CMD </dev/null || echo ?) kHz siblings \$(cat /sys/devices/system/cpu/cpu40/topology/thread_siblings_list) pow \$(sha256sum '$POW' | cut -c1-16) state \$(sha256sum '$STATE' | cut -c1-16)" > meta.txt +for cls in v4 v5; do + extra=""; [ "\$cls" = v5 ] && extra="--state '$STATE'" + eval nice -n 19 taskset -c 40 '$POW' bench --seed igneum-genesis --day 2026-10-03 --program-class \$cls \$extra --warps 50 > alone-\$cls.txt 2>&1 + eval nice -n 19 taskset -c 88 '$POW' bench --seed igneum-genesis --day 2026-10-03 --program-class \$cls \$extra --warps 4000 > sibling-\$cls.txt 2>&1 & + sib=\$! + sleep 1.5 + eval nice -n 19 taskset -c 40 '$POW' bench --seed igneum-genesis --day 2026-10-03 --program-class \$cls \$extra --warps 50 > loaded-\$cls.txt 2>&1 + kill \$sib 2>/dev/null; wait \$sib 2>/dev/null + echo "class \$cls done \$(date -u +%H:%M:%SZ)" +done +echo "load after \$(cut -d' ' -f1-3 /proc/loadavg)" >> meta.txt +EOF +bs_log "measuring class v4 and v5 verifier on $BS_HOST under the measure hold (pow $POW, state $STATE); results to $OUT" +BR_MEASURE=1 BR_KIND=measure BR_COMMAND="igneum-pow bench class v4 and v5 (core 40 alone, then with core 88 loaded)" BR_TARGET=x86_64-unknown-linux-gnu \ + bs_remote_run "$(dirname "$POW")" "class v5 verifier bench" "$CMD" +bs_rsync -a "$BS_HOST:$REMOTE_OUT/" "$OUT/$STAMP/" +for cls in v4 v5; do + for kind in alone loaded; do + f="$OUT/$STAMP/$kind-$cls.txt" + cold=$(grep -o "single cold run[^0-9]*[0-9.]* ms" "$f" | head -1 || true) + avg=$(grep -i "CPU verify" "$f" | head -1 || true) + echo "$cls $kind: $cold | $avg" + done +done +cat "$OUT/$STAMP/meta.txt"