latency-ladder harness: genesis (header version 0) is out of the low-byte check; the first known-failed run tripped it (a harness fault, recorded in the file)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
0e79d08036
commit
8d5d1d3998
1 changed files with 4 additions and 2 deletions
|
|
@ -178,7 +178,8 @@ const bitsOf = (v) => (v & 0x8000) ? 'up' : (v & 0x4000) ? 'down' : 'none';
|
|||
const ladderBits = blocks.reduce((m, b) => { const k = bitsOf(b.version); m[k] = (m[k] || 0) + 1; return m; }, {});
|
||||
const upShareOnChain = blocks.length ? Math.round(10000 * (blocks.filter(b => bitsOf(b.version) === 'up').length) / blocks.length) : 0;
|
||||
const objectBytes = blocks.reduce((m, b) => { const v = (b.version >> 8) & 0x3f; m[v] = (m[v] || 0) + 1; return m; }, {});
|
||||
const lowBytes = new Set(blocks.map(b => b.version & 0xff));
|
||||
// genesis carries header version 0 (genesis.rs), every mined block the block version 2 in its low byte
|
||||
const lowBytes = new Set(blocks.filter(b => b.daa > 0).map(b => b.version & 0xff));
|
||||
|
||||
const programs = new Map();
|
||||
for (const i of [0, 1, 2]) for (const l of minerLog(i)) {
|
||||
|
|
@ -229,7 +230,8 @@ const common = {
|
|||
rung0_ids_equal_the_cli_rung0_id: idRows.filter(r => r.reps === RUNG0).length > 0 && idRows.filter(r => r.reps === RUNG0).every(r => r.cli_rung0 != null && r.cli_rung0 === r.miners_id),
|
||||
};
|
||||
// every block carries block version 2, an object byte of 0 (class signalling off) and the ladder bits of one of the three
|
||||
// nodes; genesis, made before any node, is the one bit-less block when every node signals
|
||||
// nodes; genesis, made before any node, is the one bit-less block when every node signals (the first run of the known-failed
|
||||
// case, 22:26Z, failed this check on genesis's version 0 in the low-byte test, a harness fault, not a chain one)
|
||||
const noneNodes = SIGNAL.filter(s => s === 'none').length;
|
||||
common.chain_carries_the_bits = blocks.length > 0 && [...lowBytes].every(v => v === 2) && Object.keys(objectBytes).every(v => +v === 0)
|
||||
&& Object.keys(ladderBits).every(k => SIGNAL.includes(k) || k === 'none') && (noneNodes > 0 || (ladderBits.none || 0) === 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue