market-settlement: the sender of a job event is read from the raw transaction (ethers does not decode the post-quantum transaction type 0x50, live on testnet 28001, and the whole timeline threw); a read-only proof re-reads the senders of the recorded run

This commit is contained in:
Aere Network committed 2026-10-20 13:20:52 +03:00
1 parent 336994f65a
commit c1721b3bf1
4 files changed
+51 -3

No files matched your search

+8 -1
View File
@@ -71,7 +71,14 @@ export async function cronologie({ ethers, provider, market, artifact, jobId, fr
const events = [];
for (const l of brute) {
if (!blocuri.has(l.blockHash)) blocuri.set(l.blockHash, await provider.getBlock(l.blockHash));
if (!txs.has(l.transactionHash)) txs.set(l.transactionHash, await provider.getTransaction(l.transactionHash));
// 2026-10-20: the transaction is read as the node serves it and only its sender is taken (in the checksummed form ethers gave):
// ethers' getTransaction decodes it, and it does not know the post-quantum type 0x50 (AIP-20, live on 28001), so a job event sent
// with a post-quantum transaction made the whole timeline throw
if (!txs.has(l.transactionHash)) {
const raw = await provider.send('eth_getTransactionByHash', [l.transactionHash]);
if (!raw || !raw.from) throw new Error('transaction ' + l.transactionHash + ' not found');
txs.set(l.transactionHash, { from: ethers.getAddress(raw.from) });
}
const b = blocuri.get(l.blockHash), t = txs.get(l.transactionHash);
const args = {}; l.fragment.inputs.forEach((inp, i) => { args[inp.name] = s(l.args[i]); });
events.push({ name: l.fragment.name, args, blockNumber: l.blockNumber, blockHash: l.blockHash, timestamp: b.timestamp, txHash: l.transactionHash, from: t.from, logIndex: l.index });