igneum-census: build against class v3 (Instr width/win/off, Program class/era_bytes, fetch layout, Scratch/Hot arms)

The ci run on 3b0262f (37387751432) failed in the census release build only; windows-ci was green.
The census generates the lottery hash's class, so every new field takes its v2 value and the two
experiment ops are unreachable.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-josh 2026-10-06 00:25:52 +01:00
parent 3b0262f5aa
commit 2a62735714

View file

@ -20,7 +20,8 @@ use std::sync::Mutex;
use std::time::Instant;
use igneum_pow::accept::{check as accept_check, Reject};
use igneum_pow::generator::{candidate_from_words, generate_v1_from_words, GeneratorConfig, Instr, Op, Program, GENERATOR_VERSION, INSTR_COUNT, ITERATIONS, LANES, OP_WEIGHTS};
use igneum_pow::generator::{candidate_from_words, generate_v1_from_words, GeneratorConfig, Instr, LoadClass, Op, Program, GENERATOR_VERSION, INSTR_COUNT, ITERATIONS, LANES, OP_WEIGHTS};
use igneum_pow::memhard::Layout;
use igneum_pow::seed::{fnv1a64, program_rng, seed_words, SplitMix64};
use igneum_pow::verify::{dataset_elem, hash_warp, splitmix32, DatasetMode, DatasetSource};
@ -180,9 +181,9 @@ fn generate_fixed16(seed_string: &str, seed: [u32; 8], fresh: Fresh) -> Program
fresh_reg[src as usize] = false;
}
fresh_reg[dst as usize] = true;
instrs.push(Instr { op, dst: dst as u8, src: src as u8, src2: b as u8, imm, imm2, rot, bit: bit as u8, mask });
instrs.push(Instr { op, dst: dst as u8, src: src as u8, src2: b as u8, imm, imm2, rot, bit: bit as u8, mask, width: 1, win: 0, off: 0 });
}
Program { seed_string: seed_string.to_string(), seed_bytes: seed_string.as_bytes().to_vec(), seed, generator: GENERATOR_VERSION, attempt: 0, instrs }
Program { seed_string: seed_string.to_string(), seed_bytes: seed_string.as_bytes().to_vec(), seed, generator: GENERATOR_VERSION, attempt: 0, class: LoadClass::V2, era_bytes: None, instrs }
}
// ---------------------------------------------------------------------------------------------------------
@ -478,6 +479,9 @@ fn run_warp(p: &Program, base: u32, ds: &DatasetSource, acc: &mut Acc, lane_addr
r[d][lane] = r[d][lane].rotate_right(src[lane] & 31);
}
}
// Experiment-only ops of the read-width and scratch variants; the census generates the lottery
// hash's class only, so neither op ever appears here.
Op::Scratch | Op::Hot => unreachable!("the census never generates a scratch or hot op"),
Op::Mad => {
let src = r[a];
let src2 = r[ins.src2 as usize];
@ -505,7 +509,7 @@ fn run_warp(p: &Program, base: u32, ds: &DatasetSource, acc: &mut Acc, lane_addr
}
match memhard {
Some(m) => {
m.fetch(&idx, &mut val);
m.fetch(&idx, &mut val, Layout::LINEAR);
}
None => {
for lane in 0..LANES {