payments: proba-plata-fara-verificator.mjs needs ethers for its positive control (it starts the real flow); the README now says so (AERE_ETHERS_DIR=<dir with node_modules/ethers>) and the harness stops with that reason when ethers is missing, where it reported a confusing STRICAT. Found by running the published instructions from a fresh clone.
This commit is contained in:
1 parent
5f1b781e7f
commit
0bb03d8eba
3 files changed
+9
-2
No files matched your search
@@ -15,11 +15,16 @@ import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import http from 'node:http';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { createRequire } from 'node:module';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const AICI = path.dirname(fileURLToPath(import.meta.url));
|
||||
const CLI = process.env.AERE_PROBA_PLATA_CLI ? path.resolve(process.env.AERE_PROBA_PLATA_CLI) : path.join(AICI, 'proba-plata-28001.mjs');
|
||||
const ETHERS = process.env.AERE_ETHERS_DIR || path.resolve(AICI, '..', '..', 'contracts');
|
||||
// 2026-10-27: the flow F4 starts needs ethers, and the default path exists only in the development tree; a fresh public clone has no
|
||||
// ethers there, so F4 started nothing and the harness said STRICAT with a reason that named a package.json. It now says what is missing.
|
||||
try { createRequire(path.join(ETHERS, 'package.json'))('ethers'); }
|
||||
catch { console.log(`STRICAT: ethers is not loadable from ${ETHERS}; the positive control F4 starts the real flow, which needs it: set AERE_ETHERS_DIR to a directory with node_modules/ethers (for example after npm install ethers@6 there)`); process.exit(2); }
|
||||
const D = fs.mkdtempSync(path.join(os.tmpdir(), 'aere-plata-fara-vp-'));
|
||||
const KF = path.join(D, 'cheie.key'); fs.writeFileSync(KF, 'no key here\n');
|
||||
// verifiers: alone (F2), beside its files but not starting (F3), beside its files and judging offline (F4)
|
||||
|
||||
Reference in new issue
Block a user