Merge remote-tracking branch 'origin/ca3-v4-node' into ca3-v4-node

This commit is contained in:
igneum-labs 2026-10-07 13:17:39 +00:00
commit 19196e1806
4 changed files with 10 additions and 8 deletions

View file

@ -8,8 +8,8 @@
"split": 180,
"watch": 150,
"keys": {
"a": "4c03930c1a0daa6d98265ff99fb6dfd95d3916ae701c634b76402a102b7249fc",
"b": "0e2c6fe281de9bc86cd5562cbf497e7e9ed14a0d8eb4313fd787ed0aeb7e3478"
"a": "4c03930c…",
"b": "0e2c6fe2…"
},
"share_at_fork": {
"a": 89,

View file

@ -8,8 +8,8 @@
"split": 180,
"watch": 150,
"keys": {
"a": "4c03930c1a0daa6d98265ff99fb6dfd95d3916ae701c634b76402a102b7249fc",
"b": "0e2c6fe281de9bc86cd5562cbf497e7e9ed14a0d8eb4313fd787ed0aeb7e3478"
"a": "4c03930c…",
"b": "0e2c6fe2…"
},
"share_at_fork": {
"a": 95,

View file

@ -8,8 +8,8 @@
"split": 180,
"watch": 150,
"keys": {
"a": "4c03930c1a0daa6d98265ff99fb6dfd95d3916ae701c634b76402a102b7249fc",
"b": "0e2c6fe281de9bc86cd5562cbf497e7e9ed14a0d8eb4313fd787ed0aeb7e3478"
"a": "4c03930c…",
"b": "0e2c6fe2…"
},
"share_at_fork": {
"a": 87,

View file

@ -22,6 +22,7 @@ import { spawn, spawnSync } from 'node:child_process';
import { createServer, connect as netConnect } from 'node:net';
import { mkdirSync, rmSync, writeFileSync, readFileSync, openSync, existsSync } from 'node:fs';
import { connectRpc } from '../../tools/finality-attacks/lib/rpc.mjs';
import { writeSummary } from './lib/redact-keys.mjs';
const ROOT = new URL('../../', import.meta.url).pathname;
const FILE = `${ROOT}infra/fast-time/override-60x.json`;
@ -228,8 +229,9 @@ const good = EXPECT === 'hold'
? checks.b_was_a_minority_at_the_fork && checks.fork_deeper_than_window && checks.b_chain_heavier_at_heal && checks.a_learned_b_blocks_after_heal && checks.a_held_its_chain && checks.refusal_line_on_a
: checks.b_was_a_minority_at_the_fork && checks.fork_deeper_than_window && checks.b_chain_heavier_at_heal && checks.a_reorged_to_b;
const summary = { pass: good, expect: EXPECT, case: CASE, gate: GATE, window: WINDOW, joint: JOINT, split: SPLIT, watch: WATCH, keys: { a: keyA, b: keyB }, share_at_fork: share, joint_sinks: joint, split_sinks: split, fork_depth_daa_at_heal: forkDepthAtHeal, reorg_at_s: reorgAt, refusal_lines: refusals.length, refusal_example: refusals[0]?.replace(/^.*?Fork choice/, 'Fork choice') ?? null, b_blocks_learned_by_a: bBlocksKnownToA, peer_connections_on_a: peers, checks, samples, node: IGNEUMD, miner: CPU_MINER };
mkdirSync(OUT.replace(/\/[^/]+$/, ''), { recursive: true });
writeFileSync(OUT, JSON.stringify(summary, null, 2));
// keys (the two vote-key hashes, every *.key under the sinks) go out as 8 hex and an ellipsis; a raw key fails here, not in CI
// (the no-secrets class of 7 October 2026: three summaries under docs/plans/counter-asic-3-gate turned eight runs red)
writeSummary(OUT, summary);
const fails = Object.entries(checks).filter(([k, v]) => (EXPECT === 'hold' ? !['a_reorged_to_b'].includes(k) : ['b_was_a_minority_at_the_fork', 'fork_deeper_than_window', 'b_chain_heavier_at_heal', 'a_reorged_to_b'].includes(k)) && !v).map(([k]) => k);
log(`SUMMARY ${good ? 'PASS' : 'FAIL'} (expect ${EXPECT}, gate ${GATE}): B held ${share.share_b_bps} bps of the blue blocks at the fork; fork depth ${forkDepthAtHeal} DAA against window ${WINDOW}; B blue ${split.b.blue} vs A ${split.a.blue} at heal; A learned ${bBlocksKnownToA} blocks after the heal; A's sink ${reorgAt == null ? 'stayed A-built' : `became B-built at ${reorgAt} s`}; ${refusals.length} refusal lines on A${fails.length ? `; FAILED CHECK ${fails.join(', ')}` : ''}`);
log(`summary: ${OUT}`);