diff --git a/infra/fast-time/vote-or-burn.mjs b/infra/fast-time/vote-or-burn.mjs index ecdd2c585..900ed318f 100644 --- a/infra/fast-time/vote-or-burn.mjs +++ b/infra/fast-time/vote-or-burn.mjs @@ -234,12 +234,12 @@ try { const blk = await evmCall(a.evmPort, 'eth_getBlockByHash', [`0x${row.chain_block}`, false]); const addr = bridge.address[row.parent_key]; if (!blk || !addr) continue; - // the paid block's entry: the last reward entry for its miner's address (a chain block that merges its own key's - // block carries two entries for that address, and both are the same amount within one segment, since the - // execution layer credits every block of a segment at the chain block's DAA until ledger N8's rule is on) - const entries = (blk.igneum?.rewards || []).filter(e => String(e.miner).toLowerCase() === addr); - const entry = entries.length ? entries[entries.length - 1] : null; - if (!entry) continue; + // the paid block's entry: of the reward entries for its miner's address (a chain block that merges its own key's + // block carries two, its own and the parent's, in the segment's order), the parent's is the smaller credit under + // ledger N8's rule (the older block on the launch ramp) and either one before it (both at the chain block's DAA) + const entries = (blk.igneum?.rewards || []).filter(e => String(e.miner).toLowerCase() === addr).map(e => BigInt(e.wei)); + if (!entries.length) continue; + const entry = { wei: entries.reduce((m, w) => (w < m ? w : m)).toString() }; bridge.rows++; const wei = BigInt(entry.wei), want = BigInt(row.producer) * WEI_PER_SOMPI; // the EVM credit per key, for the bonus reading on the EVM side (ramp-neutral: a ratio of medians)