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:
Aere Network committed 2026-10-28 00:37:27 +02:00
1 parent 5f1b781e7f
commit 0bb03d8eba
3 files changed
+9 -2

No files matched your search

+3 -1
View File
@@ -28,7 +28,9 @@ node proba-risc.mjs --control-negativ # 10 plantings on copies of risc.mjs a
AERE_TESTNET_KEY_FILE=<key> AERE_ETHERS_DIR=<dir with node_modules/ethers> AERE_VERIFY_PROOF=<verify-proof.mjs> node proba-plata-28001.mjs
# the flow on testnet 28001; AERE_VERIFY_PROOF names the reference verifier (verify-proof.mjs as served at aere.network/tools, with verify-anchor.mjs, mpt.mjs, falcon512.mjs, registry-v3.mjs and package.json beside it and `npm install` done there),
# and without a usable one the flow stops NEMASURAT before it reads or sends anything
node proba-plata-fara-verificator.mjs # 4 rows, no chain: that refusal, before any request, against a local stub that counts them
AERE_ETHERS_DIR=<dir with node_modules/ethers> node proba-plata-fara-verificator.mjs
# 4 rows, no chain: that refusal, before any request, against a local stub that counts them;
# ethers starts the flow of the positive control (without it the harness stops and says so)
node verifica-chitanta.mjs dovezi/chitanta-28001-<date>.json --rpc https://testnet-rpc.aere.network --verify-proof <verify-proof.mjs>
node proba-verifica-chitanta.mjs # 20 rows, no chain: the public reader against a local RPC stub and a stub of the reference
# verifier, each exit code and verdict word as POST /v1/payments/verify gives them
@@ -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)