agents: the hosted witness for agent ledgers (sandbox on testnet 28001), its probe and negative control; crypto-inventory 0.4.1 resolves a minimum TLS version given through a constant or a ternary; proof-kinds and conformance gain the agent-witness-checkpoint kind; the reproduction scripts of the Shield recipes no longer carry a workstation path

This commit is contained in:
Aere Network committed 2026-10-20 01:04:12 +03:00
1 parent 0c8f1de3fd
commit a654c3d522
27 files changed
+4737 -43

No files matched your search

+323 -2
View File
@@ -6,7 +6,8 @@ actions need human approval, who may revoke the agent), and a ledger in which ev
policy, signed by the agent and chained. A verifier that does not trust the agent re-runs the policy over the whole ledger and says
whether any allowed action broke it. Humans approve and revoke with their own ML-DSA-65 keys.
Node.js 24 only (`node:crypto` with ML-DSA), no dependencies, no network. It moves no money: `amount` is the unit the policy names;
Node.js 24 only (`node:crypto` with ML-DSA), no dependencies, no network (except the chain witnesses below, which read a chain, and the
hosted witness, which is a service). It moves no money: `amount` is the unit the policy names;
moving value is the job of a payment layer, which can ask for this ledger as evidence that an action was allowed.
## Quick start (command line)
@@ -18,7 +19,7 @@ node agent-cli.mjs policy --spec spec.json --out policy.json
node agent-cli.mjs record --key agent/agent.key.pem --policy policy.json --ledger ledger.json --action pay.json
node agent-cli.mjs approve --key alice/human.key.pem --policy policy.json --action pay.json --out approval.json
node agent-cli.mjs record ... --approvals approval.json,approval2.json
node agent-cli.mjs verify --ledger ledger.json --policy policy.json [--revocations r.json] [--anchors a.json] [--not-before <unix>]
node agent-cli.mjs verify --ledger ledger.json --policy policy.json [--revocations r.json] [--anchors a.json] [--not-before <unix>] [--witness <id>]
node agent-cli.mjs revoke --key owner/human.key.pem --policy policy.json --out revocation.json
node agent-cli.mjs equivocation --a ledger-a.json --b ledger-b.json --out proof.json
node agent-cli.mjs verify-equivocation --proof proof.json
@@ -84,6 +85,322 @@ proves nothing. `anchors` answers not measured (exit 2) while the finality is pe
anchor it did not certify. `notarize` reads the chain id from the endpoint and refuses chain 2800 (a real transaction paid by the
key's account) unless `AERE_CONFIRM_MAINNET=yes`.
## A hosted witness (2026-10-19)
**Sandbox: testnet 28001; mainnet: at activation.** Every answer of the service says so in its `sandbox` field.
The section above asks the agent's owner to run a notary transaction, a funded wallet and the AIP-23 verifier. The hosted witness takes the
first two off the owner: the agent sends its ledger head, signed with its ML-DSA-65 key, and gets back a receipt that anyone can check
without the witness. `martor-agenti.mjs` is the format, the judge and the client; `martor-agenti-serviciu.mjs` is the service.
The form is the one transparency logs already use:
- The head is a checkpoint of the agent's log, accepted the way a C2SP tlog-witness accepts a log's checkpoint (`add-checkpoint`): it
must be signed by the log's key (here the agent's ML-DSA-65 key, from which the agent id is derived), it must name as its predecessor
exactly the last head the witness holds for that agent and policy (`previous`, `null` for the first; otherwise 409 with that head, as
C2SP answers 409 with its latest size), and it is written to disk before the answer. The ledger is a hash chain, not a Merkle tree, so
a consistency proof between two heads would need the entries, that is the actions, which the witness never sees. The agent signs its
predecessor instead, and the descent itself is checked by whoever holds the ledger: every witnessed head must be an entry of the ledger
shown.
- Two heads signed by the agent that give one position two hashes (the same `seq`, or a `previous` against a head already witnessed, also
when the new head repeats a head the witness holds) are a proof of equivocation (`aere-agent-head-equivocation`): the witness refuses the
head and returns the proof in the 409. It keeps one proof per agent and policy (one proof is enough to show the equivocation; a further one
is returned, `kept: false`, not stored). A kept proof belongs to the shard of the head it contradicts and leaves with it, so every kept proof
has a session of its own with a head in a kept shard: there are at most as many as heads kept (40,000), and that bound is the cap, so nobody
can fill the store to push out, or keep out, another agent's proof. Until the second review (2026-10-19, R2-02) the cap was 2,000 in all, and
anyone could fill it with sessions of their own (two requests per session), after which a real equivocation of another agent was returned
but not kept, and `verify --witness-url` showed that agent clean. The one proof of a session is the one that lives longest: a new proof
whose contradicted head sits in a NEWER shard than the head of the kept proof takes its place (`replaced` names the proof it took the place
of, which then answers 404); until the third review (R3-02) an agent could fill the place of its session with an equivocation against a head
of the old shard, so that the equivocation that mattered was returned not kept, and after the next rotation the session had no proof left.
`/health` counts the proofs returned and not kept
(`equivocationsNotKept`: `onePerSession`, `cap`). `GET .../heads` names the kept proofs by id, and `GET .../equivocation/<id>` returns one.
Anyone checks a proof with the public key inside (`verify-equivocation`).
- The accepted heads are the leaves of an RFC 9162 log, as in Certificate Transparency and Sigstore Rekor. On receipt the witness
returns a promise signed with its ML-DSA-65 key that it saw the head at the receive time (the role of an SCT, or of Rekor's signed
entry timestamp; an AIP-23 `time` envelope). Within the maximum merge delay (RFC 9162's MMD; 1800 s here, checkpoints every 10
minutes) it signs a checkpoint (the log's name, its size and root, as in C2SP tlog-checkpoint; an AIP-23 envelope of kind
`aere-proof-of-agent-witness-checkpoint`, registered in `proof-kinds/` with a vocabulary for each field) and notarizes it on AereNotary, so
the checkpoint's time is the chain's, certified post-quantum through the AIP-23 verifier, not the witness's word. Consecutive checkpoints
name each other and come with RFC 9162 consistency proofs.
- The log is **sharded**, the way Rekor and Certificate Transparency shard theirs: a shard holds at most 20,000 heads; when it is full the
witness signs its final checkpoint and starts the next shard, under a new log name (`aere-agent-witness/28001/<k>`, the first shard keeps
the plain name), whose first checkpoint names the final checkpoint of the shard before. The witness keeps the current shard and the one
before; an older shard is removed from its disk and memory, but only once its final checkpoint is notarized: while it is not, a head that
would make the log rotate gets 503 `log_busy` with `code: notarization_behind` (and `Retry-After`), and the heads of that shard stay served
(until the second review, R2-07, the shard was removed anyway, and heads answered 202 with a `mergeBy` were left without a certified time).
A new shard is made whole under a temporary name and then renamed (R2-08: a write that failed between the folder and its `ciob.json`, then a
restart, used to lose the link between the shards for good). A shard to remove is first renamed (`.sters-<k>-*`, an atomic rename) and only
then deleted, in the background; the next open deletes whatever carries that name, and a shard older than the two kept that lacks its
`ciob.json` or its `frunze.ndjson` is taken as the rest of a removal, not as a shard (third review, R3-01: a stop during the background
deletion used to leave a rest that the opening kept as an unnotarized shard, empty, which no notarization could ever settle, so every new head
got 503 `notarization_behind` for good, or, with checkpoints left in it, the witness refused to start). Until 2026-10-19 a full log answered 503 to everyone, for good, and anyone
could fill it.
- The receipt is that checkpoint, with the head received, its position, the receive time and the RFC 9162 inclusion proof (the role of
Rekor's `verification.inclusionProof`). It is `VALID` for the AIP-23 reference verifier: form, integrity, the witness's ML-DSA-65
signature and, once a post-quantum anchor covers the notarization, finality.
| route (behind the gateway; the service listens on 127.0.0.1) | what it does |
|---|---|
| `POST /v1/agents/witness` | a signed head (`martor-agenti.mjs request`). 202 accepted, with the signed promise; 200 already seen; 409 `equivocation` (the proof, and whether it was kept), `stale_head` (older than the last head witnessed) or `not_successor` (with the last head); 400, 403, 422 a refusal that names its rule (`continut`: any field besides the head and its signature, so a ledger's content is never taken; `semnatura`, `cheie`, `identitate`, `sesiune`, `integritate`, `timp`: a head declared more than 300 s from the witness clock); 413 above 16 KB; 429 above 60 heads per client (an IPv6 client counts by its /64) or 30 changes per agent in 10 minutes (the per-agent count takes only requests whose signature verifies AND that change the state, a new head or a newly kept proof: neither a forged request, nor a replay of the agent's public head, nor a head refused with 503 uses up its quota); 503 `log_busy` above 833 new heads per hour from everyone (20,000 / 24, so a shard never fills in less than a day), or with `code: notarization_behind` while a rotation would remove a shard whose final checkpoint is not notarized, both with `Retry-After` (also through the gateway). The gateway refuses a POST that carries an `Origin` header (a web page, through the open CORS of `/v1/`): a head is sent by the agent, not by a browser |
| `GET /v1/agents/witness/<id>` | the state of a head (its id is the statementHash of the head): `pending`, `checkpointed` (with an unnotarized receipt) or `notarized` (with the receipt); 404 for a head the witness does not hold, also one of a shard it no longer keeps |
| `GET /v1/agents/witness/<agentId>/heads?session=<s>[&from=<seq>&limit=<1..100>]` | one page of the witnessed heads of an agent under one policy, in order, with `next` (the seq to ask from, or null), the latest head and the ids of the kept equivocation proofs, and `signedPage`: the same page (each head `{seq, hash, id}`, `next`, `count`, `latest`, the kept proofs) with its time, signed by the witness with its ML-DSA-65 key; nothing is read from disk |
| `GET /v1/agents/witness/<agentId>/heads[?after=<session>]` | the sessions (policies) of an agent, at most 100 per page, each with its number of heads, its latest head and its number of kept proofs (not signed) |
| `GET /v1/agents/witness/equivocation/<id>` | one kept proof of equivocation |
| `GET /v1/agents/witness/checkpoint[?shard=<k>][&from=<size>]` | the latest checkpoint of the current shard, or of the kept shard `k` (for a frozen shard: its final checkpoint), and the latest notarized one, with a consistency proof in that shard from `from`, and the shards kept; a monitor that held a checkpoint of a shard that has since been frozen asks `?shard=<k>&from=<its size>` (until the second review, R2-09, only the current shard was served) |
| `GET /v1/agents/witness/health` | the witness id, the log and the current shard, `leaves` and `maxLeaves`, the counts (also the proofs not kept, and whether the rotation waits for a notarization), the last checkpoint and the last notarization (a failed notarization shows a code, such as `unfunded`, never its message), and the rate limiters (`limiters`: keys held, the cap, keys dropped at the cap) |
The Aere Cloud route `/v1/agents/witness` is not open yet; until it is, a witness can be run by anyone (below), and the commands are the
same with its address. The id of the hosted witness is published when the route opens; a verifier pins it.
```
node martor-agenti.mjs submit --key agent/agent.key.pem --ledger ledger.json --url <witness> # previous = the witness's last head of this agent
# nothing new to send: exit 0, no request (2 if the
# witness then does not give the state of that head);
# a 200 or 202 that is not the state of the head sent: 2
node martor-agenti.mjs receipt --url <witness> --id 0x<head id> --ledger ledger.json [--witness aere-witness:<id>] --out receipt.json
# exit 0 once notarized, 2 before (and on 503,
# 429, or a 200 that is not JSON); writes the
# answer ONLY if it is the receipt of that head of
# that ledger and the witness signature verifies:
# else 2, the reason named, nothing written
node agent-cli.mjs verify --ledger ledger.json --policy policy.json --anchors receipt.json \
--rpc https://testnet-rpc.aere.network --chain 28001 --verify-proof <verify-proof.mjs from aere.network/tools> \
--witness aere-witness:<id of the witness you trust> [--witness-url <witness>]
node martor-agenti.mjs verify-receipt --receipt receipt.json --ledger ledger.json [--witness <id>] # the local checks alone, no network;
# a pending answer: 2; an empty --witness: wrong usage, 2
node martor-agenti.mjs verify-equivocation --proof proof.json
node martor-agenti.mjs request --key agent/agent.key.pem --ledger ledger.json --previous <seq>|none --out head.json # the signed head, to POST yourself
```
`receipt` writes what the agent will hand over in `--anchors`, and what the agent hands over is its own responsibility: a receipt it hands over
that is tied to another ledger, or whose witness signature does not verify, is a fault of the ledger (below). So `receipt` writes the answer (to
`--out`, or to the standard output) only once it has checked it here: the receipt of the head asked (`--id`), a head of the ledger given
(`--ledger`: the same agent, policy, seq and hash, and its predecessor), the witness signature verified with the witness pinned by `--witness` when it
is given, otherwise with the key the receipt names (and the message then says the witness is not pinned), and the other local checks of
`verify-receipt`. Anything else is exit 2 with the reason named, and nothing is written; `--ledger` is required. So the documented flow (submit,
`receipt --out`, `verify --anchors`) cannot produce a file that comes out FAILED because of the address it read from (until the sixth review, N2,
`receipt` wrote whatever the address answered, and a proxy without any key at the agent's `--url` could give an honest agent the true receipt of
another agent's head, or one with a broken signature, which then came out FAILED when handed over).
`verify --anchors` takes a receipt (or the answer of `GET /v1/agents/witness/<id>` as it is) and accepts it as an anchor only after
checking it here: the witness's signature on the checkpoint, that the witness is one the verifier pinned (`--witness`, repeatable), the
agent's signature on the head, the leaf recomputed from the head and the receive time, the inclusion proof up to the checkpoint's root, the
head and its predecessor as entries of the ledger shown, and then the checkpoint judged by the AIP-23 verifier on the chain (`--verify-proof`,
`--rpc`): the witness's signature and the post-quantum finality `PASSED`, whose first-seen time F must not be before the receive time
(beyond 300 s) nor later than the maximum merge delay (the witness's and the verifier's, `--max-merge-delay`, 1800 s by default).
`--chain` and `--max-merge-delay` must be positive integers, and `AERE_WITNESS_WAIT_MAX_S` (below) a whole number of seconds; anything else is
wrong usage (exit 2). A receipt without `--rpc`, in `--anchors` or taken from the address, is a NOT-MEASURED piece with the rule `rpc`, judged in
its place after everything that does not need the chain (until the sixth review, N1, a receipt in `--anchors` without `--rpc` was wrong usage,
returned before the signed list was judged, so any object shaped like a receipt put there by the agent hid a branch the list showed). With
`--witness-url`, the verifier also reads the full list of heads
that witness holds for this agent and policy. Only the pages SIGNED by the witness count (`signedPage`, checked against the agent, the policy and
the page asked, chained by `next`, adding up to the `count` and `latest` it signs), and each must be signed within 300 s of the verifier's clock:
a server at that address that is not the witness cannot sign the witness's list, and an old page replayed by a proxy is not the list of now
(until the second review, R2-01, the list and the witness id, read from `/health`, were not signed, so a hostile server at the address passed as
the pinned witness and hid a head). Without `--witness`, the witness that signs the list is then the pinned one.
**`verify` is a complete evaluation followed by one verdict** (fifth review, 2026-10-19; the same text stands beside the code in
`agent-cli.mjs`). Until then it decided on the way, returning 2 or 1 at the first sign, in the order it read things, and the agent chose that
order: a fresh head still pending at the witness, a `{"status":"pending"}` put in `--anchors` or an old copy of a receipt hid a backdating that
the verified receipts proved (R5-01); a list signed by another witness, or a true plain anchor beside the receipts, came out FAILED though
nothing showed a fault of the ledger (R5-02); and a receipt that did not hold because the notary was late, or because the RPC the verifier
chose served a wrong header, gave 1 when the agent handed it over and 2 when it was taken from the address (R5-03).
1. **Gather.** Every piece of evidence is collected before anything is decided: every entry of `--anchors`, whatever its form; with
`--witness-url`, the signed list of heads, each head in it, and, for every held head without a VERIFIED receipt in `--anchors` (a receipt
with the same id that does not hold does not count), its receipt taken from the address. Nothing returns during the gathering. A
verification with no receipt, no answer of a witness and neither `--witness` nor `--witness-url` does not load the witness module
(`martor-agenti.mjs`) at all, as before.
2. **Classify.** Each piece gets one class.
- VERIFIED: it holds and gives a bound (an anchor of the ledger).
- LEDGER-FAULT, a fault of the ledger that the evidence PROVES: a head the pinned witness holds that is not an entry of the ledger (a
branch); a kept proof of equivocation; a receipt of the pinned witness tied to another ledger (another agent, policy or branch, also
through the signed predecessor of its head); a receipt the AGENT hands over whose signature of the witness it names (a pinned one, or any
when none is pinned) does not verify; an entry backdated against a bound given by VERIFIED evidence (and any other refusal of the ledger
itself by `verifyLedger`). The two kinds of receipt the agent answers for are the ones `receipt` no longer writes (above, since the sixth
review, N2): a file `receipt` wrote for this ledger is not one of them, whatever the address answered.
- NOT-MEASURED: anything else. A head or receipt pending or not notarized yet; a wrong form or wrong types; a receipt judged without `--rpc`
(`[rpc]`); a notary that is behind (`[intarziere]`); a finality the AIP-23 verifier refuses or leaves pending through the RPC the verifier
chose (`[lant]`); a receipt or a
list of another witness than the pinned one (`[martor]`); a plain anchor under a pinned witness (`[martor]`); an answer the address breaks,
a receipt with a broken signature taken from the address included (an address cannot make a FAILED); `--witness` with no receipt of a
pinned witness and no list (`[martor]`).
3. **Verdict.** FAILED (exit 1) if there is at least one LEDGER-FAULT; otherwise NOT MEASURED (exit 2) if a REQUIRED piece is NOT-MEASURED;
otherwise OK (exit 0). Every piece is required except a receipt, or an answer without a receipt, in `--anchors` whose head has a VERIFIED
receipt of its own: that old copy is listed as superseded. So a proven fault cannot be hidden by a piece that could not be measured, however
early it comes, and an outage of the witness, its notary or the verifier's RPC cannot turn an honest ledger into a FAILED. The order in which
the pieces come does not change the verdict: the negative control reverses it in three ways (the held heads before `--anchors`, `--anchors`
from the last, the held heads from the last) and requires the whole probe to stay green.
Rule (c), the types: the type of every value that comes from outside (`--anchors`, the address, the service) is judged before it is used. A
negative `receivedAtMs`, an object (`{"toString":0}`) where a string or a number is expected, in a receipt, in a page of the list, in a `status`
or in the answers to `submit`, is a NOT-MEASURED piece with its rule named (`chitanta-forma`, `punct-integritate`, `lant`, a page refused by its
form), or for `submit` exit 2 with `--out` not written, never an exception (until the fifth review, R5-04, these came out 1 through an
exception; on the "nothing new" path of `submit`, the unsigned `latest` of the page and the state of the head it names, until the sixth, N3). The output: one line per piece on stderr (`ok` verified, `FAIL` a fault of the ledger, `--` not measured and required, `..`
superseded) and a closing line; the JSON result carries `verdict` (`OK`, `FAILED`, `NOT MEASURED`), `ok` (true, false, null) and `evidence`
(each piece with its `source`, `class` `VERIFIED`, `LEDGER-FAULT` or `NOT-MEASURED`, `required`, `seq` and `rule`).
The class of an entry of `--anchors`, by its form:
| an entry of `--anchors` | no witness pinned | `--witness` or `--witness-url` |
|---|---|---|
| a receipt, or a GET answer that carries one, that holds here and on the chain | VERIFIED; its witness is not pinned, so the chain alone bounds the head, and the result says so | VERIFIED if its witness is a pinned one; a receipt of another witness, its signature valid: NOT-MEASURED `[martor]` |
| a receipt whose signature of the witness it names does not verify (`receipt` does not write one since the sixth review, N2) | LEDGER-FAULT (`[punct-semnatura]`, or `[martor]` for a key that is not the key of that witness) | LEDGER-FAULT when it names a pinned witness |
| a receipt of the witness for another ledger: another agent, policy or branch, or a head whose signed predecessor is not an entry (`receipt` does not write one for the ledger it is given since the sixth review, N2) | LEDGER-FAULT `[registru]` | LEDGER-FAULT `[registru]` |
| a receipt whose inclusion proof, leaf, promise, receive rule or head signature fails, the witness signature valid | NOT-MEASURED, by the rule that fails | the same |
| a receipt not notarized yet, notarized too late (`[intarziere]`), with a finality refused or pending (`[lant]`), with no AIP-23 verifier, or judged without `--rpc` (`[rpc]`; until the sixth review, N1, wrong usage, returned before the list was judged) | NOT-MEASURED | the same |
| a receipt with wrong types (`receivedAtMs` -1, an object for a hash or a chain id) | NOT-MEASURED `[chitanta-forma]` or the rule of the field | the same |
| an answer of the witness without a receipt (`{"status":"pending"}`, `checkpointed`) | NOT-MEASURED `[fara-chitanta]` | the same |
| a plain anchor `{seq, hash, at}` | VERIFIED, as the verifier's own anchor (anchors of your own run, such as `agent-ancora.mjs anchors`); one that is not an entry of the ledger: LEDGER-FAULT `[ancora]` | NOT-MEASURED `[martor]`: the word of whoever wrote the file, not the witness's (until the fifth review, R5-02, FAILED) |
| anything else: null, a number, a string, an object of no known form | NOT-MEASURED `[forma]` | the same |
A receipt taken from `--witness-url` is classified the same way, except that a broken signature of the witness is NOT-MEASURED there (the
address, not the agent, gave it). Anchors of your own run are judged in a run without `--witness` and `--witness-url`; each anchor only adds
constraints, so two runs catch what one would.
So an honest ledger whose last head the witness notarized late (a notary outage beyond the merge delay) is not measured, not refused, whether
the agent hands over that receipt or the verifier takes it (until the fourth review, R4-01, it came out FAILED when taken, and until the fifth,
R5-03, when handed over); a proxy at the address that breaks the answer for one head gives not measured, never FAILED and never an exception
(R4-02, R5-04); and an agent that hands over only the receipt of an old head does not leave the entries after an INTERMEDIATE head backdatable
down to the old one (R4-03), whatever else it puts in `--anchors` (R5-01). With `--witness-url` and a witness that holds no head of the ledger,
the list is judged and a NOTE says that the time of the entries is not bounded by the witness. Without `--witness-url` the bound is still the
one of the receipts the agent hands over.
**The cost, and the read limit of the witness** (fifth review, R5-06). The verifier takes one receipt per held head that has no verified receipt
in `--anchors`, and runs the AIP-23 verifier once per checkpoint (the heads of one round share it). The service gives 1,200 reads per client in 10
minutes, the pages of the list included (a page holds 100 heads). A read over the limit answers 429 with `Retry-After`, the seconds until the
client's window opens again, and the verifier waits as asked, within one budget for the whole run: `AERE_WITNESS_WAIT_MAX_S`, 900 s by default,
named in a NOTE when it was used. Measured on 2026-10-19 with the real limits: an honest ledger with 1,250 held heads and no receipt handed over,
exit 0 after waiting 595 s (601 s in all; until this review, exit 2 at the head seq 1,187, whose read was refused with 429). By arithmetic, not measured: the default budget covers
two windows of reads (one wait of at most 600 s), so about 2,370 held heads; each further 1,200 heads ask up to 600 s more of budget, and a run
whose budget is spent is NOT MEASURED, with the 429, its `Retry-After` and the seconds already waited named. An agent that hands over its own
receipts spares those reads. The gateway passes `Retry-After` through (read in its code, not measured live); the limits of the public door
itself (the gateway and its edge) were not measured.
**A head sent for an older entry is a statement about now** (fifth review, a finding rejected by its verifier, kept here as the intended
behaviour). A head says "my head was `seq` at `createdAt`". An agent that comes back after a time offline and sends, one by one, heads for
entries it wrote meanwhile (`submit --seq <k>` for each), signs for each an old position at a NEW time; the entries after it, written before,
then declare times before that head, and `verify --witness-url`, which takes every head the witness holds as a bound, gives FAILED `backdated`
(without `--witness-url`, with the receipts of older heads only, 0). The signed statement is false, and nothing tells it apart from a real
backdating, so FAILED is the honest answer. The recovery that does not produce it is `submit` without `--seq`, which sends the current tip.
The arguments of both command lines come in pairs, a flag and its value. A flag that takes a value and is given without one (the last on the
line, or followed by another flag) or with an empty value, a flag the command does not know (a typo such as `--ledgr`, or the form
`--flag=value`), and a flag given twice (but `--witness`, which repeats) are wrong usage (exit 2), in `agent-cli.mjs` and in
`martor-agenti.mjs` (third review, R3-03, and fourth, R4-05: `--witness-url` or `--policy-hash` put last, `--revocations ""`,
`verify-receipt --ledger ""`, `--witness-url=<URL>`, `--policy-hash=<h>`, `verify-receipt --witness=<id>` or `--ledgr` used to drop the list
of the witness, the pinned policy, the revocations, the pinned witness or the link of the receipt to the ledger, without a word); only
`--reason` may be empty. The result names the witness of every receipt (`witnessReceipts`, with `pinned`), and when a witness was not pinned its
`time.lowerBound` says the bound is the chain's alone.
An end-to-end run with a witness of your own on testnet 28001 (Node.js 24; ethers for the notarization: `npm install` in `x402/`):
```
node agent-cli.mjs id --out agent/
node agent-cli.mjs policy --spec spec.json --out policy.json
node agent-cli.mjs record --key agent/agent.key.pem --policy policy.json --ledger ledger.json --action pay.json
node martor-agenti-serviciu.mjs --stare witness/ --port 8802 --cheie testnet.key \
[--robinet <client of the testnet faucet>] # notarizes on testnet 28001 every 10 minutes (--interval); --fara-lant: no chain at all
node martor-agenti.mjs submit --key agent/agent.key.pem --ledger ledger.json --url http://127.0.0.1:8802
node martor-agenti.mjs receipt --url http://127.0.0.1:8802 --id 0x<id from submit> --ledger ledger.json --out receipt.json # after the next checkpoint
node agent-cli.mjs verify --ledger ledger.json --policy policy.json --anchors receipt.json \
--rpc https://testnet-rpc.aere.network --chain 28001 --verify-proof verify-proof.mjs --witness-url http://127.0.0.1:8802
```
`--cheie` is a testnet key file (a hex key, or a `d=<hex>` line); if it does not exist the service makes one there (mode 0600) and, given
`--robinet`, funds it from the public testnet faucet; it never prints it. The service reads the chain id from `--rpc` and refuses any chain
but 28001 before it touches the key.
**What a receipt proves.** That a head of the agent's ledger (its sequence number and entry hash), signed by the agent, was in the log of
the witness that signed the receipt no later than a time the chain certifies post-quantum (the checkpoint's first-seen time on testnet
28001), with its inclusion checkable by anyone from the receipt alone. As an anchor: the agent signed that its head was `seq` at
`createdAt`, so an entry written after the head that declares a time before `createdAt` minus 300 s contradicts the agent's own signature
and is caught as backdated, and an entry up to the head cannot declare a time after it. The chain bounds `createdAt` to between F minus the
merge delay and F, each widened by 600 s (the witness's 300 s rule between `createdAt` and the receive time, plus 300 s between the receive
time and F). **Only a witness the verifier pins** (`--witness`, or the one at `--witness-url`) tightens it to 300 s around its clock and
refuses an equivocating branch: any ML-DSA-65 key can be a witness of itself, so an agent can run its own witness, set its clock back to
F minus 2,100 s, and obtain a receipt for a head claimed at F minus 2,400 s, or for a branch the hosted witness refused as an equivocation.
Without pinning such a receipt is still accepted, as the agent's own signed statement bounded by the chain, and the result says so.
**What it does not prove.**
- The witness never sees, and never judges, the actions: it receives a sequence number and a hash, and refuses any other field. Whether an
action was allowed is the ledger verifier's job (`verify`), with the ledger.
- The lower bound on the time of the entries after a head rests on the clock of a pinned witness up to 300 s; beyond that it is the chain's,
within the merge delay. Without `--witness-url` it holds only after the heads whose receipts the agent hands over; with it, after every head
the witness holds (the complete evaluation above), and a head held with no verified receipt makes the verdict not measured, unless the
evidence proves a fault of the ledger. A witness that colludes with the agent (or a witness the agent runs, when the verifier pins none) can accept a head
claimed up to the merge delay earlier than the truth.
- The witness checks that a new head names its last head as the predecessor, not that it descends from it (that needs the entries). A
branch that forks after the last head for which the agent hands over a receipt passes the receipts: it is caught only with the full list
of heads the witness holds (`verify --witness-url`), not with the receipts the agent chooses to give. The list is signed by the witness page by
page; what the signature does not cover is the order of the requests: a page is fresh for 300 s, so a proxy that recorded a page can replay it
within those 300 s, and a branch whose head reached the witness within the last 300 s may be hidden that way. A witness that lies in its own
signed list is the witness lying, which no list can catch (C2SP cosigning by other witnesses is not built here, below).
- The witness's memory is two shards (at most 40,000 heads; at the hourly cap, at least the last day), and a third only while the final
checkpoint of the oldest one waits for its notarization. A head of an older shard is no longer served (`GET` answers 404; its receipt, once
notarized, stays verifiable without the witness), and the witness no longer remembers it: an agent whose last head was there starts again with
`previous` null, and an equivocation against a head the witness no longer holds is not caught by the witness, nor kept (a kept proof leaves
with the shard of the head it contradicts; receipts already given still show the equivocation to whoever holds both).
- Sandbox: checkpoints are notarized on the public testnet 28001 with a test key; nothing here runs on chain 2800 (mainnet at activation).
- The availability of a witness is not proven: a witness that is down or that drops a head breaks only its promise, which the agent
holds signed. A flood can delay new heads for everyone (503 `log_busy` above the hourly cap, 429 per client); it cannot fill the log for
good, and it cannot lose a head already answered. A notarization that fails for as long as a shard takes to fill (at least a day at the
cap) stops new heads (503 `notarization_behind`) until it succeeds again: the log waits rather than drop heads it promised to anchor. Each rate
limiter keeps at most 100,000 client keys; at that cap the key with the oldest window is dropped and the new client gets in (until the second
review, R2-03, every NEW client was refused while the cap was full, so whoever filled 100,000 keys locked out every new client). A flood
from more than 100,000 keys in 10 minutes therefore makes the per-client count partial (a dropped client starts a fresh window), never a
lockout; `/health` shows the keys held and dropped. Whether the Cloudflare edge delivers IPv6 client addresses to the witness is not
measured; the per-client count groups an IPv6 address by its /64 either way.
- The log refuses to start on a damaged state: a leaf line damaged in the middle (not a line cut at the tail, which is never answered and
is cut), a leaf without its head, or a checkpoint signed over more leaves than are on disk or with another root (the witness would
otherwise sign a fork of its own log). The service then stays down until a person looks, so whoever runs it should alarm on its unit
stopping. A write that fails halfway is cut back before the answer, so it does not leave such a line. The lock of the state (`.lacat`)
carries the process id, the start of the machine (`boot_id` on Linux; elsewhere the boot time from `os.uptime`, within 120 s) and, where
`/proc` has it, the start time of the process: a lock left by an unclean stop (a power cut, a reset) whose process id now belongs to another
live process no longer keeps the witness from starting (until the second review, R2-10, it did, at every restart). On a system without
`/proc` (Windows, the laboratory) a lock of the same boot whose process id was reused by another live process is still taken as held.
- One witness is not a network of witnesses: someone who sees only one witness cannot know what another was shown; C2SP-style
cosigning of the witness's checkpoints by other witnesses is not built here.
**Bounds**, derived from measurement (2026-10-19, Node.js 24.14.1, Windows; `martor-agenti.mjs` writes the arithmetic beside each constant):
- Shards: at most 20,000 heads each, two kept (a third only while its final checkpoint waits for the notarization). At the hourly cap of 833
new heads (20,000 / 24) a shard takes at least a day to fill, so a head is served, and remembered by the witness, for at least a day after its
shard is frozen.
- The WORST state, measured after the second review (2026-10-19, R2-02 and R2-06): both shards full (40,000 heads), one checkpoint per head (low
traffic gives that: at most one checkpoint per round, whenever a head came) and one kept proof of equivocation per head (a session per head:
the bound of the proofs by construction). The first review's bounds were measured with one checkpoint every 1,000 heads and 2,000 proofs at
most, and missed this state: with one checkpoint per head, the memory per interval of the Merkle tree (rebuilt at every open, and growing with
every receipt served from a frozen shard) took ~5 KB per checkpoint, about 372 MB at the open (measured by a verifier), and above the unit's
cap of then (`MemoryMax=400M`) once the limiters were full. The log's tree is now incremental (only the perfect subtrees, 32 bytes each, at most
2n per shard; no memory per interval), checked against `merkleTree` of `aere-verify-layer` on every size up to 70 and every pair of sizes up to 40.
- Disk, measured on that state: 1,320 MB (33 KB per head: the signed head and promise ~15.5 KB, the leaf line 0.35 KB, a checkpoint ~7.9 KB, a kept
proof ~7.9 KB, which holds only the new head: the head it contradicts is already in its shard). The installer asks for 2,048 MB free (~1.55x).
- Memory, measured on that state in a fresh process: the open peaks at 266 MB of RSS (50 MB of it the empty process), serving 2,000 receipts,
2,000 signed pages of heads, 2,000 kept proofs and a consistency proof of the frozen shard peaks at 277 MB, and with the three rate limiters at
their key cap (100,000 keys each) at 330 MB (314 MB after a collection). The unit's `MemoryMax` is 512M (~1.55x), and the installer asks the host
for at least that much available memory. A state with one checkpoint per 1,000 heads now retains ~340 bytes of heap per head (before: ~900).
- Time: the open of the worst state took 37 s on the laptop (reading 40,000 checkpoints and 40,000 proofs; on Linux not measured). Signing a page
of 100 heads takes ~1.1 ms. Per-request latency was measured only before the second review (no submission above 200 ms, rotations included);
the worst-state run, with a checkpoint built after every head and fsync off, averaged 8.6 ms per head. A shard is removed from disk after the
answer, in the background. A page of `GET .../heads` reads nothing from disk.
**Going back to a version before the second or the third review** (the deployer's rollback restores the unit and the tools, not the state): the state
format stays `aere-agent-witness-state-2`, so the version before opens it; what differs is this. Kept proofs are now written to `echivocari-2/`
(only the new head); the version before reads only `echivocari/`, so it does not see them (and does not delete them), and they are back when
this version runs again, unless the head they contradict was removed meanwhile. Proofs of the version before are read by this one, tied to the
shard of the head they contradict, and dropped when that head is no longer kept. The lock is JSON now; the version before reads it as no
process, removes it and writes its own. The version before removes, at its first open, a shard older than the two newest even when this version
kept it waiting for its notarization, and its heads then lose their certified time, as they did before the review. Going back also puts back the
unit of before (`MemoryMax=400M`); on a state with one checkpoint per head the version before needed ~372 MB at its open (measured by a verifier
of the second review) plus ~60 MB of limiters at their cap, above that cap. Since the third review (R3-01) a removed shard is renamed
`cioburi/.sters-<k>-*` before it is deleted, and, when the rename fails, marked with a `.de-sters` file: the versions before do not know either.
They ignore a `.sters-*` folder (not a shard name), which then stays on disk until this version opens the state again; and a shard folder marked
`.de-sters` whose deletion was interrupted, or a rest without `ciob.json`, they keep as a shard (the defect R3-01 repairs). A proof that replaced
another (R3-02) is an ordinary proof of form 2 for them.
## What the verifier can and cannot see
- **Time.** An entry's time is the statement of whoever holds the agent key. The verifier bounds it from above with its clock. It
@@ -119,6 +436,10 @@ Measured on 2026-09-29 (Node.js 24.14.1, Windows):
| `AERE_TESTNET_KEY_FILE=<funded testnet key> node proba-agent-ancora-testnet.mjs` | 7/7 on the public testnet 28001, measured 2026-09-30: a real ledger's head notarized, read back under a post-quantum certified anchor by the published AIP-23 verifier within 20 s, the certified time equal to the contract's first-seen time, the honest continuation valid with the anchor, a backdated continuation valid without it and caught with it, another branch refused; evidence in `dovezi-ancora-28001/` |
| `node control-negativ-ancora.mjs` | 11/11: each anchoring guard removed in a copy turns its named test red |
| `node control-negativ-aprobare.mjs` | 28/28 (2026-10-19): each guard is removed in a copy, one at a time, and the named test must fail for that reason; a test that stops before its summary counts as a failure of the control |
| `node proba-martor-agenti.mjs` | 158/158 offline, measured 2026-10-19 after the sixth review of the hosted witness (two reviewers and two verifiers in each of the first two, a reviewer and a verifier in the third, the fourth and the fifth, and as the sixth a targeted verification of the fifth's repairs; 18 findings in the first, all confirmed; 15 confirmed and one rejected in the second; 5 confirmed in the third; 6 confirmed and one rejected in the fourth; 6 confirmed and one rejected in the fifth; 4 in the sixth, N1..N4, of which N4 is this table; until the sixth review this row said 138/138, "after the fourth"), with keys made at run time and a local notary mock named as such: two agents, successive heads, a head that skips, an older head and one that does not continue the last (409), equivocation at the same position and through `previous` caught and returned, one proof kept per agent and policy, the named refusals of a request (form, the ledger's content, signature, key, identity, session, integrity, time), the rate limits, checkpoints signed by the witness with inclusion and consistency proofs, a restart on the same state, a leaf line cut at the tail by a crash, any chain but 28001 refused before the key, receipts checked without the witness and as anchors (backdating caught with the anchor and not without it), the command line, the gateway's door with and without `AERE_AGENTS_WITNESS_PORT` (in the development repository; the gateway is not part of this copy, where those rows are information), the checkpoint `VALID` for the AIP-23 reference verifier (`AERE_VERIFY_PROOF`; without it those rows are skipped by name and the exit code is 2); and a row for each finding (`9.R<n>`): a pinned witness and the receipt of a witness the agent runs itself, the full list of heads (`--witness-url`), the sharded log and the hourly cap, an equivocation on the "already seen" path, `--chain 2800x`, `submit` with nothing new, the vocabulary of the checkpoint kind, the cap on kept proofs, the paginated `GET .../heads`, a replay of the agent's public head, the limiters (IPv6 /64, key cap and cleanup) and the door's refusal of a browser `Origin`, short and failed writes, a damaged state refused at start, error codes instead of messages; and a row for each finding of the second review (`10.R2-<nn>`, with `10.P2-<nn>` the controls of the guards its repairs added): the list of heads signed by the witness (a hostile proxy that drops a head, one that changes only the unsigned fields, an impostor, an old page replayed), kept proofs tied to the shard of the head they contradict (a stranger who fills the cap no longer keeps out another agent's proof), the limiter at its key cap, a list with malformed elements, plain anchors and an empty anchors file under a pinned witness, the incremental Merkle tree against `merkleTree` and the heap of a state with one checkpoint per head, the rotation that waits for a notarization, a shard born whole and one repaired, the route to a frozen shard, the lock after a reboot, the exit codes of `receipt` and `verify-receipt`, the log budget read before the agent quota, `Retry-After` through the door, and the "root" half of the opening guard. Run on a copy with the files of before the first review and its probe, 22 of its 23 rows failed (the 23rd, `9.P11`, is the control of a guard the repair added, which the old code passed for another reason); run on a copy with the files of before the second review (cf56bcda6) and this probe, 21 of the 24 new rows fail, each on its scenario, and the other 3 (`10.R2-15` twice, `10.P2-13`) pass there too: the behaviour was already right, what was missing was a test that could turn red; and a row for each finding of the third review (`11.R3-<nn>`, with `11.P3-<nn>` the controls of its new guards): the rest of a shard removal interrupted by a stop (in any order, and a rest of the form before, left in place), the one proof of a session that lives longest, flags given without a value, the receipt of the last head the witness holds under `--witness-url` (and a pending one: exit 2), and the exit codes of `receipt` and `submit` on answers that are not the state of a head. Run on a copy with the files of c34b34f1b and this probe, 7 of the 8 new rows fail, each on its scenario, and the 122 rows of before pass; the 8th, `11.P3-04b`, gives the check of the list against the ledger a row of its own, which the receipt of the last head (R3-04) can no longer hide: it passes there too; and a row for each finding of the fourth review (`12.R4-<nn>`, `12.P4-<nn>`), on the rule of `--witness-url`: a receipt notarized late taken from the address (not measured, not FAILED), a proxy that breaks the answer for one held head (not measured, no exception), a receipt for EVERY held head (an intermediate one too), a held head whose signed predecessor is not in the ledger (FAILED), `submit` on a 200 or 202 that is not the state of the head sent, flags written `--flag=value`, mistyped or given twiceLine truncated
| `node proba-martor-agenti.mjs --testnet` | 75/75 on the public testnet 28001, measured 2026-10-19 at 05:35 UTC with the version BEFORE the adversarial review (the 70 offline rows of that version plus 5): a fresh test key funded from the faucet, a checkpoint notarized on AereNotary (block 6,828,096), the receipt `VALID` for the AIP-23 reference verifier with the witness's signature and the post-quantum finality `PASSED` (51 s after the notarization), `verify --anchors receipt.json` on the live chain: the honest ledger 0, the backdated one 1. Evidence in `dovezi-martor-agenti-28001/` (no private key). **The versions after the first and the second review were not run on the testnet** (not measured: the faucet allows one claim per 24 h, and it was cooling down); their testnet rows also pin the witness (`--witness`), with the receipt that pinning now requires. Without a funded key and a faucet that answers, the testnet rows are skipped by name (exit 2) |
| `node control-negativ-martor-agenti.mjs` | 131/131 plantations red on their row and 3/3 neutral ones green (2026-10-19, after the sixth review; 1,102 s with 12 plantations at a time, the default; after the fourth review, with 112 plantations, ~475 s with 12 and ~747 s with 4, `AERE_CONTROL_PARALEL=4`; the B2 runner gives this test 1650 s since the sixth review, 1.5 x the measurement on an idle laptop, after the 1200 s of before stopped a green control at 1,212 s inside the suite while another workload held the processor (the arithmetic is in `probele-b2.sh`); until the sixth review this row said 112/112 "after the fourth", and the fifth's 123 plantations and 3 neutral ones were not written here): every one of the 99 guard markers (`PAZA-MARTOR`) of the witness, the service and, since the second review, the command line (`agent-cli.mjs`) has a plantation that removes it, and a coverage gate counts a marker without one as a failure of the control (with its own check: one plantation taken out, the gate names its marker); the guards the repairs added (the per-agent quota after "already seen", the "already seen" exit after the predecessor check, the write to the last byte and the cut-back, the paging, the /64 key and the key cleanup, the error codes, the command line's pinned witnesses, `--chain` and an unanswering `--witness-url`, the vocabulary in `proof-kinds/`, the door's `Origin` refusal) are planted too. Each removal is made in a copy, and the named row must fail; a pattern not found once, or a test that stops before its summary, counts as a failure of the control. The guards of the second review are planted too (the signed page: its form, integrity, signature, age and count, and reading it instead of the unsigned fields; the list signed by another witness than the pinned one; proofs tied to the shard of the head they contradict and the cap derived from the shards; the limiter dropping its oldest key; a malformed list; plain anchors and no receipt under a pinned witness; the rotation and the opening that keep an unnotarized shard; the shard born whole and the link repaired; the route to a kept shard; the lock across a reboot and a reused process id; the exit codes; the budget read before the quota; `Retry-After` through the door), and the opening guard is split into its size and its root, each with its row. So are those of the third (the rename before a shard is deleted and the removal of a rest at the opening; the newer proof taking the place of the older; a flag without a value, in both command lines; the receipt of the last head under `--witness-url`; the exit codes of `receipt` and `submit`), and those of the fourth (every held head with its receipt, the receipt of a head required, its id read without an exception, a receipt taken from the address judged as testimony both ways, `submit` on the main path, unknown and repeated flags in both command lines, the choice between two proofs at the opening, and the two halves of the rest of a removal, each with its row). Those of the fifth review are planted too (the order of the classes in the verdict, an early exit on the way, the class of each receipt both ways, the old copy, the types, the wait on a 429), with three NEUTRAL plantations that reverse the order in which the evidence comes and require the whole probe to stay green; and those of the sixth (a receipt without `--rpc` as a not-measured piece, planted both ways: the early exit of before and the guard removed; `receipt` writing only a verified receipt of the head asked, with its id, its ledger and its pinned witness each planted; the types on the "nothing new" path of `submit`). After the first review the control planted 64 guards over 45 markers and did not look at `agent-cli.mjs`; until the first review it planted 24, which covered 20 of the 34 markers of then |
| `bash ../../cloud-gateway/proba-desfasoara-martor-agenti.sh` (development repository) | 12/12 (2026-10-19): the rollback functions and the laboratory copy of the deployer, extracted from its host script and run on the laptop with `systemctl` replaced: a reinstall that fails before step 5 leaves the live service and its unit untouched, one that fails after it puts the old unit back and restarts the service, a first install that fails is removed, the laboratory is beside the state (not under `/root`) and removed on the way back, a laboratory copy of a real state opens with the same leaves; and as negative control the rollback of before the review (it stopped the live service and deleted its unit) and five plantations, each red on its scenario |
The data format is version 2 (2026-09-29). Code comments, test names and most internal names are in Romanian; messages, data and
the exported interface are in English. No third party has reviewed this component.
+188 -9
View File
@@ -11,6 +11,18 @@
// node agent-cli.mjs approve --key human.key.pem --policy p.json --action a.json [--valid 600] [--out ap.json]
// node agent-cli.mjs revoke --key owner.key.pem --policy p.json [--at <unix>] [--reason text] [--out rv.json]
// node agent-cli.mjs verify --ledger l.json --policy p.json [--policy-hash 0x..] [--revocations r1.json,r2.json] [--anchors a.json] [--not-before <unix>]
// a.json: anchors {seq, hash, at}, or receipts of the agents witness (martor-agenti.mjs), which then need --rpc <url> and
// --verify-proof <verify-proof.mjs> (or AERE_VERIFY_PROOF) [--chain 28001] [--max-merge-delay <s>]; without --rpc or the verifier such a
// receipt is not measured (exit 2, unless another piece proves a fault of the ledger)
// [--witness aere-witness:<40 hex>[,...]] the witnesses whose receipts are accepted (a receipt of any other, or a plain anchor:
// not measured; no receipt of one: exit 2); without it any ML-DSA-65 key is a witness of
// itself, and the result says the bound is the chain's alone
// [--witness-url <base>] the full list of heads that witness holds for this agent and policy, signed by it page by page within the
// last 300 s, must be entries of this ledger, and every held head needs a verified receipt (taken from the
// address when --anchors has none; a 429 is waited out as its Retry-After asks, within AERE_WITNESS_WAIT_MAX_S
// seconds, 900 by default); no signed list, or one signed by another witness than --witness: not measured
// verify gathers every piece of evidence first, then gives ONE verdict: 1 if a piece proves a fault of the ledger, else 2 if a
// required piece could not be measured, else 0 (README: "verify is a complete evaluation followed by one verdict")
// node agent-cli.mjs equivocation --a l1.json --b l2.json [--out proof.json]
// node agent-cli.mjs verify-equivocation --proof proof.json
// Iesiri: 0 da (permis, valid, gasit), 1 nu (invalid, negasit, refuzat de verificare), 3 actiune refuzata de politica, 2 folosire gresita.
@@ -43,8 +55,35 @@ const acum = () => Math.floor(Date.now() / 1000);
export function main(argv) {
const [cmd, ...rest] = argv;
const get = (f) => { const i = rest.indexOf(f); return i >= 0 ? rest[i + 1] : undefined; };
const lista = (f) => (get(f) ? String(get(f)).split(',').filter(Boolean) : []);
// un steag dat fara valoare (pus ultimul, sau urmat de alt steag) ori cu valoarea goala e folosire gresita (2), nu un steag nedat (revizia B3 a
// treia, R3-03): pana atunci `--witness-url` sau `--policy-hash` puse ultimele, `--revocations ""` (o variabila goala) scoteau in tacere lista
// martorului, pinul politicii sau revocarile, si un registru prins iesea 0. Numai `--reason` are voie sa fie gol.
const GOALE_PERMISE = ['--reason'];
const get = (f) => { const i = rest.indexOf(f); if (i < 0) return undefined; const v = rest[i + 1]; if (!(v !== undefined && !/^--[a-z]/.test(v) && (v !== '' || GOALE_PERMISE.includes(f))) /*PAZA-MARTOR:steag-fara-valoare*/) throw new Folosire(`${f} needs a value`); return v; };
// (un element gol din lista, `a.json,`, ajunge la citesteJson, care il refuza ca folosire gresita)
const lista = (f) => { const v = get(f); return v === undefined ? [] : String(v).split(','); };
// toate aparitiile unui steag repetabil (--witness a --witness b, sau --witness a,b)
const toate = (f) => rest.flatMap((x, i) => (x === f ? (rest[i + 1] === undefined ? [''] : String(rest[i + 1]).split(',')) : []));
// un numar intreg pozitiv; altfel folosire gresita (revizia B3, constatarea 5: `--chain 2800x` dadea NaN si paza lantului cadea DESCHISA)
const intregPozitiv = (f) => { const v = get(f); if (v === undefined) return undefined; if (!/^[1-9]\d{0,14}$/.test(String(v))) throw new Folosire(`${f} must be a positive integer, not "${v}"`); return Number(v); };
// STEAGURILE CUNOSCUTE ale fiecarei comenzi (revizia B3 a patra, R4-05): argumentele vin in perechi steag + valoare, si un argument care nu e un
// steag al comenzii (`--witness-url=<URL>`, o greseala de tastare ca `--ledgr`, o valoare ramasa fara steag) e folosire gresita (2). Pana atunci
// cititorul cauta potrivirea exacta si nu refuza nimic necunoscut, deci `--witness-url=<URL>` sau `--policy-hash=<h>` erau "nedate" si paza lor
// cadea in tacere, cu exit 0. Un steag dat de doua ori e si el folosire gresita, afara de --witness (repetabil). Valorile le judeca `get`.
const STEAGURI = { id: ['--out'], human: ['--out'], policy: ['--spec', '--out'], check: ['--policy', '--action', '--spent'],
record: ['--key', '--policy', '--ledger', '--action', '--approvals', '--provenance'], approve: ['--key', '--policy', '--action', '--valid', '--out'],
revoke: ['--key', '--policy', '--at', '--reason', '--out'],
verify: ['--ledger', '--policy', '--policy-hash', '--revocations', '--anchors', '--not-before', '--rpc', '--verify-proof', '--chain', '--max-merge-delay', '--witness', '--witness-url'],
equivocation: ['--a', '--b', '--out'], 'verify-equivocation': ['--proof'] };
if (Object.hasOwn(STEAGURI, cmd)) {
const vazute = new Set();
for (let i = 0; i < rest.length; i += 2) {
const s = String(rest[i]);
if (!(STEAGURI[cmd].includes(s) /*PAZA-MARTOR:steag-necunoscut*/)) throw new Folosire(`${cmd}: unknown argument ${JSON.stringify(s.slice(0, 60))} (its flags: ${STEAGURI[cmd].join(' ')}; the value follows its flag, never --flag=value)`);
if (!(!vazute.has(s) || s === '--witness') /*PAZA-MARTOR:steag-dublu*/) throw new Folosire(`${cmd}: ${s} is given twice`);
vazute.add(s);
}
}
switch (cmd) {
case 'id':
case 'human': {
@@ -110,9 +149,150 @@ export function main(argv) {
const ledger = citesteJson(get('--ledger'), 'ledger');
const j = citesteJson(get('--policy'), 'policy');
const pinned = get('--policy-hash') ?? j.policyHash;
const v = verifyLedger(ledger, { policy: j.policy || j, policyHash: pinned, revocations: lista('--revocations').map((f) => citesteJson(f, 'revocations')),
anchors: get('--anchors') ? citesteJson(get('--anchors'), 'anchors') : [], notBefore: get('--not-before') != null ? Number(get('--not-before')) : null });
console.log(JSON.stringify(v, null, 1)); return v.ok ? 0 : 1;
const revocari = lista('--revocations').map((f) => citesteJson(f, 'revocations'));
const notBefore = get('--not-before') != null ? Number(get('--not-before')) : null;
const date = get('--anchors') ? citesteJson(get('--anchors'), 'anchors') : [];
const toate2 = Array.isArray(date) ? date : [date];
// argumentele martorului se judeca INAINTE de orice: o valoare gresita e folosire gresita (2), niciodata o paza care cade deschisa
const chain = intregPozitiv('--chain'), mergeMax = intregPozitiv('--max-merge-delay');
const martori = toate('--witness');
if (martori.some((w) => !/^aere-witness:[0-9a-f]{40}$/.test(w))) throw new Folosire('--witness must be aere-witness:<40 hex> (repeatable, or comma-separated)');
const urlMartor = get('--witness-url');
if (urlMartor !== undefined && !/^https?:\/\/[^\s]+$/.test(String(urlMartor))) throw new Folosire('--witness-url must be the base URL of a witness (http:// or https://)');
const rpc = get('--rpc'), verifyProof = get('--verify-proof') || process.env.AERE_VERIFY_PROOF;
// bugetul de asteptare pe 429 (R5-06): un numar intreg de secunde; o valoare gresita e folosire gresita, nu o tacere pe valoarea implicita
const asteptareMax = process.env.AERE_WITNESS_WAIT_MAX_S;
if (asteptareMax !== undefined && asteptareMax !== '' && !/^\d{1,6}$/.test(asteptareMax)) throw new Folosire('AERE_WITNESS_WAIT_MAX_S must be a whole number of seconds (0 to 999999)');
// o chitanta fara --rpc (din --anchors sau adusa) e o dovada NEMASURATA cu regula `rpc`, judecata la locul ei, dupa tot ce nu cere lantul (lista,
// capetele tinute, ancorele); pana la a sasea revizie (N1) o chitanta din --anchors fara --rpc iesea aici cu 2 (folosire gresita), INAINTEA listei
// semnate, deci o ramura aratata de lista se ascundea punand in --anchors orice obiect cu forma de chitanta
const ob = (x) => !!x && typeof x === 'object' && !Array.isArray(x); // ca esteChitanta din martor-agenti.mjs (incarcat abia mai jos)
const esteChitanta = (a) => ob(a) && (ob(a.witnessReceipt) || (ob(a.receipt) && ob(a.receipt.witnessReceipt)));
// o chitanta a martorului gazduit (martor-agenti.mjs) e primita ca ancora numai dupa ce ESTE verificata aici: includerea refacuta local si
// momentul capului de jurnal certificat de verificatorul AIP-23 pe lant
const dinMartor = (a) => !!a && typeof a === 'object' && !Array.isArray(a) && ['witnessReceipt', 'receipt', 'promise', 'status'].some((k) => a[k] !== undefined);
const ancoraSimpla = (a) => !!a && typeof a === 'object' && !Array.isArray(a) && !dinMartor(a) && Number.isSafeInteger(a.seq) && a.seq >= 0 && typeof a.hash === 'string' && /^[0-9a-f]{64}$/.test(a.hash) && Number.isSafeInteger(a.at);
const txt = (x) => (typeof x === 'string' ? x.slice(0, 120) : `<${x === null ? 'null' : Array.isArray(x) ? 'array' : typeof x}>`);
return (async () => {
// ================================================================================================================================
// EVALUAREA COMPLETA, UN SINGUR VERDICT (revizia B3 a cincea, 2026-10-19, R5-01..R5-05; scrisa si in README). Pana atunci verificarea
// decidea PE DRUM, iesind cu 2 sau 1 la primul semn, in ordinea citirii, iar ordinea o alegea agentul: un cap proaspat in asteptare, un
// {"status":"pending"} in --anchors sau o copie veche a unei chitante ascundeau o antedatare DOVEDITA (R5-01), iar o chitanta cazuta din
// vina notarului dadea 1 predata si 2 adusa (R5-03). Acum:
// 1. Se ADUNA toate dovezile: fiecare intrare din --anchors (orice forma), lista semnata a martorului, fiecare cap tinut, chitanta
// adusa de la adresa pentru fiecare cap tinut fara o chitanta VERIFICATA in --anchors. Nimic nu iese din functie in timpul adunarii.
// 2. Fiecare dovada primeste o CLASA: VERIFICATA (tine, da o margine), VINA-REGISTRULUI (dovedita: un cap tinut de martor care nu e
// intrare a registrului, o echivocare pastrata, o chitanta a martorului fixat legata de alt registru, o chitanta predata de agent cu
// semnatura martorului pe care il numeste INVALIDA, o intrare antedatata fata de o margine din dovezi VERIFICATE), NEMASURATA
// (orice altceva: in asteptare, forma gresita, notarul in urma, finalitatea data de RPC-ul verificatorului, o lista semnata de alt
// martor decat cel fixat, o ancora simpla sub un martor fixat, o adresa care strica raspunsul).
// 3. VERDICTUL: FAILED daca exista o VINA-REGISTRULUI; altfel NOT MEASURED daca o dovada CERUTA e NEMASURATA; altfel OK. Deci o vina
// dovedita nu poate fi ascunsa de un NEMASURAT, oricat de devreme vine, iar o pana a martorului nu face dintr-un registru cinstit un
// FAILED. O dovada e CERUTA afara de o chitanta (sau un raspuns in asteptare) din --anchors al carei cap are deja o chitanta VERIFICATA.
// REGULA (c): nicio forma de raspuns nu arunca; tipurile se judeca inainte de folosire (martor-agenti.mjs: sir(), chitanta-tipuri).
// ================================================================================================================================
// modulul martorului se incarca numai cand o dovada sau un steag il cere: un registru cu ancore simple (sau fara) se verifica si fara el
const M = urlMartor !== undefined || martori.length > 0 || toate2.some(dinMartor) ? await import('./martor-agenti.mjs') : null;
const dovezi = [];
const adauga = (d) => { dovezi.push({ ceruta: true, ...d }); };
let fixati = martori.length ? martori : null;
const fixare = !!fixati || urlMartor !== undefined;
// buget comun de asteptare pe 429 (Retry-After), pentru lista si chitantele aduse (R5-06)
const buget = { ramasS: asteptareMax ? Number(asteptareMax) : 900, asteptatS: 0 };
const cere = M ? M.cereRabdator(buget) : null;
// 1a. lista semnata a capetelor (sub --witness-url)
let tinute = null;
if (urlMartor !== undefined) {
const c = await M.citesteCapeteMartorului(urlMartor, ledger.agentId, ledger.session, { cere });
if (!c.ok) adauga({ sursa: 'list', clasa: 'NEMASURATA', detail: `the witness at --witness-url did not give a list of heads it signed: ${c.motiv}` });
else if (!(!fixati || fixati.includes(c.witness)) /*PAZA-MARTOR:martor-url*/) adauga({ sursa: 'list', clasa: 'NEMASURATA', rule: 'martor', detail: `the list at --witness-url is signed by ${c.witness}, not by a pinned witness (${fixati.join(', ')}): not the testimony of the pinned witness (another address, or a server without its key)` });
else {
fixati = fixati || [c.witness];
const vc = M.verificaCapeteMartorului(ledger, c);
for (const x of vc.randuri) adauga({ sursa: `list of ${c.witness} (signed at ${c.at})`, clasa: x.pass === true ? 'VERIFICATA' : x.pass === false ? 'VINA' : 'NEMASURATA', rule: x.rule, seq: x.seq, detail: x.detail });
tinute = c.heads;
}
}
// o chitanta, din --anchors (`agent`) sau adusa de la adresa (`adusa`), judecata local si apoi pe lant; fara exceptie pe nicio forma
const idCap = (a) => { const p = M.chitantaDin(a); const w = p && typeof p === 'object' ? p.witnessReceipt : null; const h = w && typeof w === 'object' ? w.head : null; return h && typeof h === 'object' && typeof h.statementHash === 'string' ? h.statementHash : null; } /*PAZA-MARTOR:chitanta-id-sigur*/;
const areVerificator = !!verifyProof && fs.existsSync(verifyProof);
const o = { verifyProof, rpc, chain: chain ?? null, mergeMax, martori: null, verdicte: new Map() };
const evalueaza = async (x, sursa) => {
const plic = M.chitantaDin(x);
const l = M.verificaChitanta(plic, { ledger, martori: fixati });
if (!l.ok) {
// vina registrului: o chitanta a martorului fixat legata de alt registru (alt agent, alta politica, alta ramura); si, numai pentru una PREDATA
// de agent, o semnatura INVALIDA a martorului pe care il numeste (cand e fixat, sau cand nu e fixat niciunul)
const vp = M.verificaPunct(plic);
const numit = vp.rule === 'martor' || vp.rule === 'punct-semnatura' ? plic.statement.witness : null;
const falsificata = sursa === 'agent' && numit !== null && (!fixati || fixati.includes(numit)) /*PAZA-MARTOR:chitanta-falsificata*/;
const vina = l.rule === 'registru' /*PAZA-MARTOR:chitanta-alt-registru*/ || falsificata;
return { chitanta: true, clasa: vina ? 'VINA' : 'NEMASURATA', rule: l.rule, detail: l.error };
}
if (!rpc /*PAZA-MARTOR:fara-rpc*/) return { chitanta: true, seq: l.head.seq, clasa: 'NEMASURATA', rule: 'rpc', detail: 'a witness receipt needs --rpc <url>: the chain is read, not trusted from the receipt' };
if (!areVerificator) return { chitanta: true, seq: l.head.seq, clasa: 'NEMASURATA', rule: 'lant', detail: 'a witness receipt needs the AIP-23 reference verifier (--verify-proof <verify-proof.mjs> or AERE_VERIFY_PROOF)' };
// pe lant: nenotarizata, intarziata, cu finalitatea refuzata de RPC-ul ales de verificator: vina martorului, a notarului sau a RPC-ului, nu a
// registrului, pe ambele drumuri (R5-03: pana atunci o chitanta predata de agent dadea aici FAILED, iar aceeasi, adusa, NEMASURAT)
const r = await M.ancoreDinChitante(ledger, [plic], { ...o, martori: fixati });
const rd = r.randuri[0] || {};
if (r.stare === 'OK' && r.anchors.length === 1) return { chitanta: true, seq: l.head.seq, clasa: 'VERIFICATA', ancora: r.anchors[0], detail: rd.detail };
return { chitanta: true, seq: l.head.seq, clasa: 'NEMASURATA' /*PAZA-MARTOR:lant-nemasurat*/, rule: rd.rule || 'lant', detail: rd.detail || 'not judged' };
};
// 1b. fiecare intrare din --anchors, oricare ar fi forma ei
const fazaAnchors = async () => { for (const [i, a] of toate2.entries()) {
const sursa = `anchors[${i}]`;
if (esteChitanta(a)) { const e = await evalueaza(a, 'agent'); adauga({ sursa, id: idCap(a), ...e }); continue; }
if (dinMartor(a)) { adauga({ sursa, id: typeof a.id === 'string' && /^0x[0-9a-f]{64}$/.test(a.id) ? a.id : null, clasa: 'NEMASURATA', rule: 'fara-chitanta', detail: `an answer of the witness that carries no receipt yet (status ${txt(a.status)}): ask the witness again after its next checkpoint` }); continue; }
if (ancoraSimpla(a)) {
if (fixare /*PAZA-MARTOR:martor-simple*/) adauga({ sursa, seq: a.seq, clasa: 'NEMASURATA', rule: 'martor', detail: 'a plain anchor {seq, hash, at} under a pinned witness is not the testimony of the witness (anchors of your own run, such as agent-ancora.mjs anchors, are judged in a run without --witness and --witness-url)' });
else adauga({ sursa, seq: a.seq, clasa: 'VERIFICATA', ancora: { seq: a.seq, hash: a.hash, at: a.at }, detail: `a plain anchor at seq ${a.seq}, taken as the verifier's own (no witness pinned)` });
continue;
}
adauga({ sursa, clasa: 'NEMASURATA', rule: 'forma', detail: `not a piece of evidence: neither a receipt, nor an answer of the witness, nor an anchor {seq, hash, at} (${txt(a)})` });
} };
// 1c. fiecare cap tinut de martor, cu o chitanta VERIFICATA: a agentului, altfel adusa de la adresa (oricare cap, nu doar ultimul; o chitanta a
// agentului cu acelasi id care nu tine nu tine locul celei verificate, R5-01)
const descrie = (r) => (!r.status ? `the witness did not answer (${txt(r.eroare)})` : r.status === 429 ? `the witness answered HTTP 429 (Retry-After ${r.retryAfter === null ? 'none' : r.retryAfter + ' s'}; ${buget.asteptatS} s already waited of a budget of ${buget.asteptatS + buget.ramasS} s, AERE_WITNESS_WAIT_MAX_S)`
: r.status !== 200 ? `the witness answered HTTP ${r.status}` : !(r.j && typeof r.j === 'object' && !Array.isArray(r.j)) ? 'the answer is not the state of a head (not JSON)'
: !M.esteChitanta(r.j) ? (typeof r.j.status === 'string' && r.j.status !== 'notarized' ? `the witness has it ${txt(r.j.status)}, not notarized yet (ask again after its checkpoint is notarized)` : 'the answer carries no receipt')
: idCap(r.j) === null ? 'the receipt in the answer has no head' : 'the answer is the receipt of another head');
const fazaCapete = async () => { for (const h of tinute || [] /*PAZA-MARTOR:martor-fiecare-cap*/) {
if (dovezi.some((d) => d.clasa === 'VERIFICATA' && d.id === h.id) /*PAZA-MARTOR:martor-chitanta-ceruta*/) continue;
const sursa = `seq ${h.seq}, taken from --witness-url`;
const r = await M.stareaCapuluiLa(urlMartor, h.id, { cere });
if (!(r.status === 200 && M.esteChitanta(r.j) && idCap(r.j) === h.id)) { adauga({ sursa, seq: h.seq, id: h.id, clasa: 'NEMASURATA', rule: 'adusa', detail: `the witness holds seq ${h.seq} and no verified receipt of it was in --anchors; ${descrie(r)}: the entries after seq ${h.seq} are not bounded by the witness` }); continue; }
const e = await evalueaza(r.j, 'adusa');
adauga({ sursa, seq: h.seq, id: h.id, ...e, detail: e.clasa === 'NEMASURATA' ? `${e.detail}: the entries after seq ${h.seq} are not bounded by the witness` : e.detail });
} };
// adunarea: --anchors, apoi capetele tinute (o chitanta VERIFICATA a agentului scuteste aducerea); ordinea nu schimba verdictul, numai cate se aduc
await fazaAnchors(); await fazaCapete();
// 1d. --witness cere o legatura SEMNATA de martorul fixat: fara nicio chitanta de judecat, marginea martorului nu e masurata
if (!(!martori.length || dovezi.some((d) => d.chitanta) || (tinute && tinute.length)) /*PAZA-MARTOR:martor-fara-chitanta*/) adauga({ sursa: 'witness', clasa: 'NEMASURATA', rule: 'martor', detail: '--witness was given, but there is no receipt of a pinned witness: the bound of the witness was not measured' });
// o chitanta (sau un raspuns in asteptare) din --anchors al carei cap are o chitanta VERIFICATA nu mai e ceruta (o copie veche)
for (const d of dovezi) if (d.clasa === 'NEMASURATA' && d.id && dovezi.some((x) => x !== d && x.clasa === 'VERIFICATA' && x.id === d.id) /*PAZA-MARTOR:copie-veche*/) d.ceruta = false;
// 2. registrul, judecat cu ancorele VERIFICATE (o antedatare fata de ele e vina registrului)
const ancore = dovezi.filter((d) => d.clasa === 'VERIFICATA' && d.ancora).map((d) => d.ancora).sort((a, b) => a.seq - b.seq);
const v = verifyLedger(ledger, { policy: j.policy || j, policyHash: pinned, revocations: revocari, anchors: ancore, notBefore });
if (!v.ok) adauga({ sursa: 'ledger', clasa: 'VINA', rule: v.rule, detail: v.error });
// 3. UN SINGUR verdict, dupa ce s-a adunat tot
const vina = dovezi.filter((d) => d.clasa === 'VINA'), nemasurate = dovezi.filter((d) => d.clasa === 'NEMASURATA' && d.ceruta);
const verdict = vina.length ? 'FAILED' : nemasurate.length ? 'NOT MEASURED' : 'OK' /*PAZA-MARTOR:verdict-vina-intai*/;
for (const d of dovezi) console.error(`${d.clasa === 'VERIFICATA' ? 'ok' : d.clasa === 'VINA' ? 'FAIL' : d.ceruta ? '--' : '..'} ${d.sursa}: ${d.rule ? '[' + d.rule + '] ' : ''}${d.detail}${d.ceruta ? '' : ' (superseded by a verified receipt of the same head)'}`);
const chit = ancore.filter((a) => a.witness);
if (chit.length) {
v.witnessReceipts = chit.map((a) => ({ seq: a.seq, witness: a.witness, pinned: a.witnessPinned, chainLowerBound: a.chainLowerBound }));
if (v.time && chit.some((a) => !a.witnessPinned)) v.time.lowerBound = 'witnessed by an UNPINNED witness: the chain alone bounds each head to no earlier than its chainLowerBound (F minus the merge delay minus 600 s); pass --witness to pin the witness';
}
if (!fixati && chit.length) console.error('NOTE: no witness was pinned (--witness or --witness-url): each receipt above bounds its head by the chain alone, not by the witness clock');
if (tinute && !tinute.length && verdict === 'OK') console.error('NOTE: the witness holds no head of this ledger: the list was checked, but the time of the entries is not bounded by the witness');
if (buget.asteptatS) console.error(`NOTE: the witness rate-limited this verification (HTTP 429): ${buget.asteptatS} s waited, as its Retry-After asked, of a budget of ${buget.asteptatS + buget.ramasS} s (AERE_WITNESS_WAIT_MAX_S)`);
v.verdict = verdict; v.ok = verdict === 'OK' ? true : verdict === 'FAILED' ? false : null;
v.evidence = dovezi.map((d) => ({ source: d.sursa, class: d.clasa === 'VINA' ? 'LEDGER-FAULT' : d.clasa === 'VERIFICATA' ? 'VERIFIED' : 'NOT-MEASURED', required: d.ceruta, ...(d.seq !== undefined ? { seq: d.seq } : {}), ...(d.rule ? { rule: d.rule } : {}) }));
if (verdict === 'FAILED') console.error(`FAILED: ${vina.length} piece(s) of evidence show a fault of the ledger (${[...new Set(vina.map((d) => d.rule || 'ledger'))].join(', ')})`);
if (verdict === 'NOT MEASURED') console.error(`NOT MEASURED: ${nemasurate.length} required piece(s) of evidence could not be verified, and none shows a fault of the ledger (${[...new Set(nemasurate.map((d) => d.rule || 'list'))].join(', ')})`);
console.log(JSON.stringify(v, null, 1));
return verdict === 'OK' ? 0 : verdict === 'FAILED' ? 1 : 2;
})();
}
case 'equivocation': {
const p = findEquivocation(citesteJson(get('--a'), 'a'), citesteJson(get('--b'), 'b'));
@@ -130,8 +310,7 @@ export function main(argv) {
}
if (import.meta.url === pathToFileURL(process.argv[1] || '').href) {
let cod;
try { cod = main(process.argv.slice(2)); }
catch (e) { console.error(`agent: ${e.message}`); cod = e instanceof Folosire ? 2 : 1; }
process.exitCode = cod;
// main intoarce un cod, sau (verify cu o chitanta a martorului, care citeste lantul) o promisiune de cod
Promise.resolve().then(() => main(process.argv.slice(2)))
.then((cod) => { process.exitCode = cod; }, (e) => { console.error(`agent: ${e.message}`); process.exitCode = e instanceof Folosire ? 2 : 1; });
}
+325
View File
@@ -0,0 +1,325 @@
// Controlul negativ al martorului gazduit al agentilor (martor-agenti.mjs, martor-agenti-serviciu.mjs, proba-martor-agenti.mjs; B3, 2026-10-19):
// fiecare paznic scos intr-o COPIE a componentei trebuie sa inroseasca proba NUMITA, cu proba chiar rulata (rezumatul ei exista); pe copia
// neatinsa, proba e verde. Trei stari, ca la celelalte controale ale agentilor: ROSU cum trebuia (randul numit pica), CONTROL CAZUT (randul a
// ramas verde) si STRICAT (tiparul nu apare exact o data, sau proba nu ajunge la rezumat), iar ultimele doua se numara esecuri.
// Plantarile se ancoreaza pe partea STABILA a randului (conditia cu markerul ei PAZA-MARTOR), nu pe tot randul, si toate ruleaza (JavaScript:
// o conditie inlocuita cu `false`), deci un rosu e al probei, nu al unui fisier care nu se mai incarca.
// ACOPERIREA (2026-10-19, revizia adversariala B3, constatarea 6): pana la reparatie controlul planta 24 de paznici si README-ul spunea "each
// guard", desi primire (de doua ori), martor, lant (pe lant si pe nivelul semnaturii), promisiune, sesiune, integritate si punct-integritate nu
// erau plantati. Acum FIECARE marker PAZA-MARTOR din martor-agenti.mjs si martor-agenti-serviciu.mjs trebuie sa fie in tiparul unei plantari, sau
// pe lista EXCEPTII cu motivul scris; un marker neacoperit e un ESEC al controlului. Garda isi are si ea martorul: cu o plantare scoasa, trebuie
// sa numeasca exact markerul ei. Pe langa markeri, plantarile pazesc si ordinea si forma reparatiilor din revizie (cota inainte de "deja vazut",
// scrierea pana la ultimul octet, taierea inapoi, paginarea, cheia /64, linia de comanda, vocabularul felului in proof-kinds, usa gateway-ului).
// A DOUA REVIZIE (2026-10-19, 15 constatari R2-01..R2-15): fiecare paznic nou are plantarea lui, tinta randul lui 10.R2-<nn> / 10.P2-<nn>; garda de
// acoperire priveste acum si agent-cli.mjs (R2-15: potrivirea --witness / --witness-url si ancorele simple sub un martor fixat nu aveau nici
// plantare, nici rand), iar paznicul radacinii de la deschidere e impartit in doua (marimea, radacina), fiecare cu randul lui.
// A TREIA REVIZIE (2026-10-19, 5 constatari R3-01..R3-05): fiecare paznic nou are plantarea lui, tinta randul lui 11.R3-<nn> / 11.P3-<nn>.
// A PATRA REVIZIE (2026-10-19, 6 constatari R4-01..R4-06): regula de proiectare a lui --witness-url (agent-cli.mjs, README) si paznicii ei, fiecare
// cu plantarea lui si tinta 12.R4-<nn> / 12.P4-<nn>; paznicul `martor-adusa-vina` are doua plantari, una pe fiecare sens (aduse FAILED / ramura 2).
// A CINCEA REVIZIE (2026-10-19, 6 constatari R5-01..R5-06): verify e o EVALUARE COMPLETA cu un singur verdict (agent-cli.mjs, README); paznicii ei
// (ordinea claselor in verdict, clasa fiecarei chitante, copia veche, tipurile, asteptarea pe 429) au plantarile lor, tinta 13.R5-<nn> / 13.P5-<nn>, iar
// plantarile NEUTRE rastoarna ordinea in care vin dovezile si cer proba verde intreaga. Plantarea scurtaturii `--witness ocolit` a disparut cu scurtatura.
// A SASEA REVIZIE (2026-10-19, verificarea tintita a reparatiilor R5, N1..N3): o chitanta fara --rpc ca dovada NEMASURATA [rpc] (doua plantari, una pe
// fiecare sens), `receipt` care scrie numai chitanta verificata a capului cerut (id, registru, martorul fixat, fiecare cu plantarea lui) si tipurile pe
// drumul "nimic nou" al lui submit; tinta 14.N<n>.
// Copia pastreaza asezarea relativa (dosarul componentei si surorile ei, `../aere-verify-layer` sau `../verify-layer`, `../proof-kinds`), derivata
// din importurile modulului, in arborele de dezvoltare si in copia publicata. Verificatorul AIP-23 si gateway-ul (daca sunt) se dau probei
// din locul lor, neatinse: AERE_VERIFY_PROOF, AERE_GATEWAY; plantarea usii gateway-ului lucreaza pe o copie a dosarului cloud-gateway.
// node control-negativ-martor-agenti.mjs iesire 0 = martorul verde, acoperirea intreaga si toate plantarile rosii pe randul lor
import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path';
import { spawn } from 'node:child_process'; import { fileURLToPath } from 'node:url';
const AICI = path.dirname(fileURLToPath(import.meta.url));
const MA = 'martor-agenti.mjs', MS = 'martor-agenti-serviciu.mjs', CLI = 'agent-cli.mjs', PKF = '../proof-kinds/proof-kinds.mjs', GWF = 'gateway';
const PLANTARI = [
// [nume, fisier, tipar, inlocuire, randul probei (inceputul numelui lui)]
// ---- cererea (verificaCapSemnat)
['plicul neobiect nejudecat (forma)', MA, 'if (!(obiect(env) && obiect(env.statement) /*PAZA-MARTOR:forma*/)) return', 'if (false) return', '2. CONTROL ritm pe client'],
['forma capului nejudecata', MA, 'if (!(formaBuna /*PAZA-MARTOR:forma*/)) return', 'if (false) return', '1. CONTROL: forma capului'],
['continutul registrului primit in cerere', MA, 'if (!(inPlus.length === 0 /*PAZA-MARTOR:continut*/)) return', 'if (false) return', '1. CONTROL: intrarile registrului langa cap'],
['sesiunea nederivata din agent si politica', MA, 'if (!(st.session === sessionId(st.agentId, st.policyHash) /*PAZA-MARTOR:sesiune*/)) return', 'if (false) return', '1. CONTROL: o sesiune care nu e cea derivata'],
['integritatea capului nejudecata', MA, 'if (!(sha(text) === env.statementHash /*PAZA-MARTOR:integritate*/)) return', 'if (false) return', '1. CONTROL: declaratia schimbata fara hash refacut'],
['cheia agentului poate fi oricare', MA, 'if (!(!!pub && pub.asymmetricKeyType === ALG /*PAZA-MARTOR:cheie*/)) return', 'if (!(!!pub /*PAZA-MARTOR:cheie*/)) return', '1. CONTROL: un cap semnat cu o cheie Ed25519'],
['agentId nederivat din cheie', MA, 'if (!(agentIdFromKey(pub) === st.agentId /*PAZA-MARTOR:identitate*/)) return', 'if (false) return', '1. CONTROL: cheia lui A semneaza un cap cu id-ul lui B'],
['semnatura capului nejudecata', MA, 'if (!(verificaSemnaturaText(text, pub, env.signature.signature) /*PAZA-MARTOR:semnatura*/)) return', 'if (false) return', '1. CONTROL: declaratia schimbata si hash-ul refacut'],
['momentul cererii nejudecat fata de ceasul martorului', MA, 'if (!(Math.abs(t - Number(acumS)) <= toleranta /*PAZA-MARTOR:timp*/)) return', 'if (false) return', '1. CONTROL: un cap declarat cu 400 s'],
// ---- capul de jurnal si chitanta (verificaPunct, verificaChitanta)
['cheia care semneaza capul de jurnal nu trebuie sa fie a martorului numit', MA, 'if (!(!!pub && pub.asymmetricKeyType === ALG && witnessIdFromKey(pub) === witnessId /*PAZA-MARTOR:martor*/)) return', 'if (false) return', '3. CONTROL chitanta: capul de jurnal semnat de alta cheie'],
['semnatura martorului pe capul de jurnal nejudecata', MA, 'if (!(verificaSemnaturaText(JSON.stringify(env.statement), pub, s.signature) /*PAZA-MARTOR:punct-semnatura*/)) return', 'if (false) return', '3. CONTROL chitanta: capul de jurnal schimbat (hash refacut'],
['forma capului de jurnal nejudecata', MA, 'if (!(obiect(env) && env.kind === CHECKPOINT_KIND + \'-attestation\' && formaPunctului(st) /*PAZA-MARTOR:punct-forma*/)) return', 'if (false) return', '3. CONTROL chitanta: capul de jurnal cu marimea 0'],
['integritatea capului de jurnal nejudecata', MA, 'if (!(H32.test(sir(env.statementHash)) && sha(JSON.stringify(st)) === env.statementHash /*PAZA-MARTOR:punct-integritate*/)) return', 'if (false) return', '3. CONTROL chitanta: capul de jurnal schimbat fara hash refacut'],
['forma chitantei nejudecata', MA, '&& Array.isArray(w.path) /*PAZA-MARTOR:chitanta-forma*/)) return', '&& Array.isArray(w.path) || true)) return', '3. CONTROL chitanta: chitanta fara leafHash'],
['martorul FIXAT de verificator nejudecat', MA, 'if (!(!fixati || fixati.includes(st.witness) /*PAZA-MARTOR:martor*/)) return', 'if (false) return', '9.R1 un martor COERENT'],
['frunza nelegata de momentul primirii', MA, 'if (!(frunzaMartor(w.head.statementHash, w.receivedAtMs) === w.leafHash /*PAZA-MARTOR:frunza*/)) return', 'if (false) return', '3. CONTROL chitanta: alt moment de primire'],
['dovada de includere falsa primita', MA, 'if (!(w.treeSize === st.treeSize && verifyInclusion({ leafHash: w.leafHash, index: w.leafIndex, treeSize: w.treeSize, path: w.path, rootHash: st.root }) /*PAZA-MARTOR:includere*/)) return', 'if (false) return', '3. CONTROL chitanta: un element al drumului schimbat'],
['regula de primire a martorului nejudecata in chitanta', MA, 'if (!(Math.abs(C - R) <= toleranta /*PAZA-MARTOR:primire*/)) return', 'if (false) return', '3. CONTROL: o chitanta a unui martor care a scris in frunza'],
['promisiunea nejudecata', MA, 'verificaSemnaturaMartor(pr, st.witness).ok /*PAZA-MARTOR:promisiune*/)) return', 'verificaSemnaturaMartor(pr, st.witness).ok || true)) return', '3. CONTROL chitanta: promisiunea cu alt moment'],
['capul martorizat nu mai trebuie sa fie al registrului verificat', MA, '&& (!h.previous || (!!pe && pe.hash === h.previous.hash)) /*PAZA-MARTOR:registru*/)) return', '&& true) && false) return', '3. CONTROL chitanta: judecata pe alta ramura'],
// ---- ancorele (ancoreDinChitante)
['lantul notarizarii nu mai trebuie sa fie al capului de jurnal si cel cerut', MA, 'if (!(lantNotar === plic.statement.chainId && (!chain || chain === plic.statement.chainId) /*PAZA-MARTOR:lant*/)) {', 'if (false) {', '4. CONTROL: chitanta pe alta ramura'],
['plicul judecat de verificatorul AIP-23 nu mai trebuie sa fie acesta', MA, "if (!(String(v.statementHash || '').toLowerCase() === plic.statementHash /*PAZA-MARTOR:lant*/)) {", 'if (false) {', '4. CONTROL: verificatorul a judecat alt statementHash'],
['semnatura martorului la verificatorul AIP-23 nu mai trebuie sa fie PASSED', MA, "if (!(!!sg && sg.state === 'PASSED' /*PAZA-MARTOR:lant*/)) {", 'if (false) {', '4. CONTROL: semnatura martorului FAILED'],
['finalitatea nu mai trebuie sa fie PASSED', MA, "if (!(fs2.stare === 'PASSED' /*PAZA-MARTOR:lant*/)) {", 'if (false) {', '4. CONTROL: finalitate in asteptare'],
['primirea dupa momentul lantului primita', MA, 'if (!(l.receivedAt <= F + toleranta /*PAZA-MARTOR:primire*/)) {', 'if (false) {', '4. CONTROL: lantul a vazut capul de jurnal INAINTE'],
['intarzierea maxima nejudecata', MA, 'if (!(F - l.receivedAt <= mmd + toleranta /*PAZA-MARTOR:intarziere*/)) {', 'if (false) {', '4. CONTROL: capul de jurnal vazut de lant la 4000 s'],
['radacina neverificata pe lant (momentul luat din notarizarea scrisa in chitanta)', MA, 'const fs2 = firstSeenFromVerdict(v);', "const fs2 = { stare: 'PASSED', at: Number(n.firstSeen) };", '4. CONTROL: finalitate FAILED'],
['lantul cerut nevalid primit de biblioteca', MA, 'if (!(chain == null || (Number.isSafeInteger(chain) && chain > 0))) throw', 'if (false) throw', '9.R5 agent-cli verify --chain 2800x'],
// ---- lista intreaga a capetelor martorului (verificaCapeteMartorului)
// (tinta mutata la a treia revizie: de la R3-04 chitanta ultimului cap prinde si ea ramura din 9.R2, deci randul acela nu mai deosebea paznicul)
['un cap martorizat care nu e in registrul aratat primit', MA, 'if (!(!!e && e.hash === h.hash /*PAZA-MARTOR:registru*/)) {', 'if (false) {', '11.P3-04b CONTROL'],
['o dovada de echivocare tinuta de martor ignorata', MA, 'if (!(eq.length === 0 /*PAZA-MARTOR:echivocare*/)) {', 'if (false) {', '9.R2 CONTROL: --witness-url'],
// ---- deschiderea starii
['un rand de frunza stricat in mijloc taiat in tacere', MA, 'if (!(bun /*PAZA-MARTOR:frunze-mijloc*/)) throw', 'if (false) throw', '9.R16 o stare cu un rand de frunza stricat'],
['randul taiat la coada ramas in jurnal', MA, "if (coada !== '' /*PAZA-MARTOR:coada*/) {", 'if (false) {', '3. CONTROL: un rand de frunza taiat la coada'],
['un cap de jurnal peste frunze pierdute primit la deschidere (marimea)', MA, 'if (!(p.treeSize <= ciob.frunze.length /*PAZA-MARTOR:radacina-marime*/)) throw', 'if (false) throw', '9.R16 o stare cu un rand de frunza stricat'],
// revizia B3 a doua, R2-15: jumatatea "radacina" are acum plantarea ei si randul ei (o frunza din mijloc inlocuita de alt rand valid)
['radacina capului de jurnal nejudecata la deschidere', MA, 'if (!(ciob.arbore.root(p.treeSize) === p.root /*PAZA-MARTOR:radacina*/)) throw', 'if (false) throw', '10.R2-15 o stare cu o frunza din mijloc'],
['cioburile vechi pastrate (memoria si discul cresc)', MA, 'for (const j of [...cioburi.keys()]) if (j <= k - CIOBURI_PASTRATE) scoateCiob(j);', '', '9.R3/R12 cioburile'],
// ---- primirea (primeste, echivoca)
['mai multe dovezi pastrate pe agent si politica', MA, '!z.eq /*PAZA-MARTOR:echivocare-una*/', 'true', '2. CONTROL: zece echivocari'],
['dovezile pastrate fara plafon total', MA, 'echivocari.size < maxEchivocari /*PAZA-MARTOR:echivocare-plafon*/', 'true', '9.R9 un agent cu 12 politici'],
['pastrarea unei dovezi noi nu consuma cota agentului', MA, 'if (limitaAgent && limitaAgent(proof.agentId) /*PAZA-MARTOR:ritm*/) return', 'if (false) return', '9.P11 CONTROL (paznicul nou al lui R11)'],
['echivocarea nepastrata (fara index)', MA, 'echivocari.set(pid, q) /*PAZA-MARTOR:echivocare*/;', '', '2. GET heads?session'],
['echivocarea la aceeasi pozitie nedetectata', MA, 'if (laSeq && !(laSeq.e === st.hash) /*PAZA-MARTOR:echivocare*/) return', 'if (false) return', '2. ECHIVOCARE: alta ramura a lui A'],
['echivocarea prin predecesor nedetectata', MA, 'if (laPrev && !(laPrev.e === st.previous.hash) /*PAZA-MARTOR:echivocare*/) return', 'if (false) return', '2. ECHIVOCARE prin predecesor'],
['"deja vazut" judecat inaintea predecesorului contrazis', MA, 'const laPrev = st.previous ? gaseste(lista, st.previous.seq) : null;', 'const laPrev = st.previous ? gaseste(lista, st.previous.seq) : null; if (laSeq && laSeq.e === st.hash) return stareaCapului(laSeq.h);', '9.R4 un cap la un seq deja tinut'],
['un cap mai VECHI primit', MA, 'if (!(!ultim || st.seq > ultim.q) /*PAZA-MARTOR:vechi*/) return', 'if (false) return', '2. CONTROL: un cap mai VECHI'],
['consistenta capetelor nejudecata (succesorul)', MA, 'if (!(prevBun /*PAZA-MARTOR:succesor*/)) return', 'if (false) return', '2. CONTROL: un cap care nu numeste ca predecesor'],
['limita de ritm pe agent scoasa', MA, 'if (limitaAgent && limitaAgent(st.agentId) /*PAZA-MARTOR:ritm*/) return', 'if (false) return', '2. CONTROL ritm pe agent'],
['limita pe agent judecata pe corpul neautentificat', MA, 'const v = verificaCapSemnat(env, { acumS: acumMs / 1000, toleranta });', "if (limitaAgent && env && env.statement && limitaAgent(String(env.statement.agentId))) return { cod: 429, corp: { error: 'rate_limited' } }; const v = verificaCapSemnat(env, { acumS: acumMs / 1000, toleranta });", '2. CONTROL: 14 cereri cu semnatura rea'],
['cota pe agent consumata de un cap deja vazut (retrimiterea capului public)', MA, 'if (dupaCap.has(id)) return stareaCapului(id);', "if (limitaAgent && limitaAgent(st.agentId)) return { cod: 429, corp: { error: 'rate_limited' } }; if (dupaCap.has(id)) return stareaCapului(id);", '9.R11 un strain retrimite'],
['bugetul jurnalului pe ora scos', MA, 'if (bugetPlin /*PAZA-MARTOR:buget*/) return', 'if (false) return', '9.R12 bugetul jurnalului'],
['ciobul plin nerotit', MA, 'if (!(cur.frunze.length < maxFrunze /*PAZA-MARTOR:plin*/)) roteste();', 'if (false) roteste();', '9.R3/R12 cioburile'],
// ---- scrierile durabile, paginarea, erorile publice
['o scriere scurta neterminata (un singur writeSync)', MA, 'off += n;', 'off = buf.length;', '9.R16 fiecare fs.writeSync'],
['o scriere cazuta lasata pe disc (fara taiere inapoi)', MA, 'try { fs.ftruncateSync(fd, inainte); fs.fsyncSync(fd); } catch { try { fs.truncateSync(f, inainte); } catch { e.taiereEsuata = true; } }', '', '9.R16 o scriere a frunzei care cade'],
['mesajul notarizarii cazute public in lastError', MA, "else p.lastError = rez && typeof rez.cod === 'string' && /^[a-z_]{1,40}$/.test(rez.cod) ? rez.cod : 'notarization_failed';", 'else p.lastError = String(rez && rez.motiv);', '9.R18 o notarizare cazuta'],
['GET heads nepaginat', MA, 'const a = primulDeLa(l, from); const pagina = l.slice(a, a + limit);', 'const a = 0; const pagina = l;', '9.R10 GET heads?session'],
['submit iese 1 cand martorul tine deja intrarea ceruta', MA, 'if (ultim.seq === s && e && e.hash === ultim.hash) {', 'if (false) {', '9.R7 submit fara nimic nou'],
// ---- serviciul
['limita de ritm pe client scoasa', MS, 'if (peClient(client) /*PAZA-MARTOR:ritm*/) return', 'if (false) return', '2. CONTROL ritm pe client'],
['plafonul de chei al limitatorului scos', MS, 'if (!(m.size < maxChei /*PAZA-MARTOR:ritm-plafon*/)) {', 'if (false) {', '9.R13 limitatorul'],
['cheile expirate ale limitatorului necuratate', MS, 'if (m.size >= maxChei && acum - ultimaCuratare >= 1000) curata(acum);', '', '9.R13 limitatorul'],
['cheia unui client IPv6 pe adresa intreaga (nu pe /64)', MS, 'return tot.slice(0, 4).map(', 'return tot.slice(0, 8).map(', '9.R13 cheia clientului'],
['mesajul unei erori interne in raspunsul public', MS, "code: e && /^E[A-Z]+$/.test(String(e.code)) ? 'io_error' : 'internal'", "code: 'io_error', detail: String(e && e.message)", '9.R16/R18 GET pe un cap'],
['notarizarea pe alt lant decat 28001', MS, 'if (!(chainId === LANT /*PAZA-MARTOR:sandbox*/)) return', 'if (false) return', '3. CONTROL: notarizatorul pe un RPC care serveste lantul 2800'],
// ---- linia de comanda a verificatorului
['martorii fixati nu mai ajung la verificare', CLI, 'let fixati = martori.length ? martori : null;', 'let fixati = null;', '9.R17 agent-cli verify'],
['--chain nevalid primit (paza care cade deschisa)', CLI, 'if (!/^[1-9]\\d{0,14}$/.test(String(v))) throw new Folosire(', 'if (false) throw new Folosire(', '9.R5 agent-cli verify --chain 2800x'],
['un martor care nu raspunde la --witness-url luat drept verde', CLI, "if (!c.ok) adauga({ sursa: 'list', clasa: 'NEMASURATA',", "if (!c.ok) adauga({ sursa: 'list', clasa: 'VERIFICATA',", '9.R2 CONTROL: --witness-url'],
// ---- a doua revizie adversariala B3 (2026-10-19): fiecare paznic nou, cu randul lui 10.R2-<nn> / 10.P2-<nn>
// R2-01: lista capetelor, semnata de martor pagina cu pagina, din ultimele 300 s
['forma paginii de capete nejudecata', MA, 'if (!(formaBuna /*PAZA-MARTOR:pagina-forma*/)) return', 'if (false) return', '10.P2-01 CONTROL'],
['integritatea paginii de capete nejudecata', MA, 'if (!(H32.test(sir(env.statementHash)) && sha(JSON.stringify(st)) === env.statementHash /*PAZA-MARTOR:pagina-integritate*/)) return', 'if (false) return', '10.P2-01 CONTROL'],
['semnatura martorului pe pagina de capete nejudecata', MA, 'if (!(s.ok /*PAZA-MARTOR:pagina-semnatura*/)) return', 'if (false) return', '10.R2-01 --witness <W>'],
['o pagina veche (reluata) primita drept lista de acum', MA, 'if (!(Math.abs(t - Number(acumS)) <= toleranta /*PAZA-MARTOR:pagina-vechi*/)) return', 'if (false) return', '10.R2-01 --witness <W>'],
['paginile care nu dau numarul si ultimul cap semnate primite', MA, 'if (!(aduna /*PAZA-MARTOR:pagina-numar*/)) return', 'if (false) return', '10.P2-01 CONTROL'],
['lista citita din campurile NESEMNATE de langa pagina', MA, 'witness = st.witness; heads.push(...st.heads);', 'witness = st.witness; heads.push(...(Array.isArray(r.j.heads) ? r.j.heads : []).map((h) => ({ seq: h.seq, hash: h.hash, id: h.id })));', '10.R2-01 --witness <W>'],
['lista semnata de alt martor decat cel fixat primita', CLI, 'else if (!(!fixati || fixati.includes(c.witness)) /*PAZA-MARTOR:martor-url*/)', 'else if (false)', '10.R2-15 agent-cli verify --witness <alt id>'],
// R2-02: dovezile de echivocare legate de ciobul capului contrazis; plafonul = marginea prin constructie
['dovada legata de ciobul curent, nu de al capului contrazis', MA, 'k: tinut.k /*PAZA-MARTOR:echivocare-ciob*/', 'k: cur.k', '10.R2-02 maxFrunze 4'],
['plafonul dovezilor fix (2.000), nu marginea lor prin constructie', MA, 'if (maxEchivocari == null) maxEchivocari = CIOBURI_PASTRATE * maxFrunze;', 'if (maxEchivocari == null) maxEchivocari = 2000;', '10.P2-02 CONTROL'],
// R2-03: la plafonul de chei se scoate cheia cea mai veche
['la plafonul de chei clientul NOU e refuzat (nu e scoasa cheia cea mai veche)', MS, '{ m.delete(m.keys().next().value); scoase++; }', 'return true;', '10.R2-03 limitatorul'],
// R2-04: o lista cu elemente care nu sunt capete
['un element care nu e cap primit de verificaCapeteMartorului', MA, 'if (!(rau < 0 /*PAZA-MARTOR:capete-forma*/)) return', 'if (false) return', '10.R2-04 verificaCapeteMartorului'],
// R2-05: sub un martor fixat, numai chitante ale lui
['ancora simpla primita sub un martor fixat', CLI, 'if (fixare /*PAZA-MARTOR:martor-simple*/) adauga(', 'if (false) adauga(', '10.R2-05 registrul antedatat'],
['--witness fara nicio chitanta a lui primit', CLI, 'if (!(!martori.length || dovezi.some((d) => d.chitanta) || (tinute && tinute.length)) /*PAZA-MARTOR:martor-fara-chitanta*/)', 'if (false)', '10.R2-05 registrul antedatat'],
// R2-07: un ciob nu se scoate pana nu i s-a notarizat capul de jurnal final
['rotirea scoate un ciob nenotarizat', MA, 'if (!(!plin || !rotireaPierdeNenotarizat() /*PAZA-MARTOR:rotire-notarizata*/)) {', 'if (false) {', '10.R2-07 maxFrunze 2'],
['la deschidere un ciob vechi nenotarizat sters', MA, 'if (!(faraLant || finalNotarizatPeDisc(k) /*PAZA-MARTOR:ciob-vechi-notarizat*/)) {', 'if (false) {', '10.P2-07 CONTROL'],
// R2-08: ciobul nou se naste intreg; un ciob fara ciob.json isi reface legatura
['ciobul nou nascut pe jumatate (dosarul inaintea lui ciob.json)', MA, "scrieAtomic(path.join(t, 'ciob.json'), meta); fs.renameSync(t, d) /*PAZA-MARTOR:ciob-intreg*/; fsyncDosar(dc);", 'fs.renameSync(t, d); scrieAtomic(fcb, meta);', '10.R2-08 rotirea cade'],
['legatura ciobului fara ciob.json nerefacuta', MA, 'previousShardFinal: legat /*PAZA-MARTOR:ciob-legatura*/', 'previousShardFinal: null', '10.P2-08 CONTROL'],
// R2-09: ruta capului de jurnal pentru un ciob pastrat (si inghetat)
['ruta capului de jurnal numai pe ciobul curent', MA, 'const c = shard == null ? cur : cioburi.get(Number(shard)) /*PAZA-MARTOR:ciob-cerut*/;', 'const c = cur;', '10.R2-09 un monitor'],
// R2-10: lacatul isi poarta pornirea masinii si a procesului
['lacatul de dinainte de ultima pornire a masinii tinut', MA, 'if (!(o.boot == null || aceeasiPornire(o.boot, boot) /*PAZA-MARTOR:lacat-pornire*/)) return', 'if (false) return', '10.R2-10 lacatTinut'],
['lacatul cu pid-ul luat de alt proces tinut', MA, 'if (!(acum == null || acum === String(o.start) /*PAZA-MARTOR:lacat-proces*/)) return', 'if (false) return', '10.R2-10 lacatTinut'],
// R2-11 / R2-12: codurile de iesire ale lui martor-agenti.mjs si valorile goale ale lui --witness
['receipt iese 1 la un martor care raspunde 503 sau 429', MA, 'if (r.status >= 500 || r.status === 429 /*PAZA-MARTOR:cod-indisponibil*/) {', 'if (false) {', '10.R2-11 receipt'],
['verify-receipt iese 1 pe raspunsul unui cap pending', MA, "if (obiect(x) && !esteChitanta(x) && x.status === 'pending' /*PAZA-MARTOR:cod-pending*/) {", 'if (false) {', '10.R2-11 receipt'],
['valorile goale ale lui --witness aruncate (verify-receipt nefixat)', MA, "(rest[i + 1] === undefined ? [''] : String(rest[i + 1]).split(',')) /*PAZA-MARTOR:steag-gol*/", "(rest[i + 1] === undefined ? [] : String(rest[i + 1]).split(',').filter(Boolean))", '10.R2-12 verify-receipt'],
// R2-13: bugetul jurnalului citit inaintea cotei agentului, consumat dupa ea
['cota agentului consumata inaintea bugetului jurnalului', MA, 'const bugetPlin = ', "if (limitaAgent && limitaAgent(st.agentId)) return { cod: 429, corp: { error: 'rate_limited' } }; const bugetPlin = ", '10.R2-13 cota pe agent 3'],
['bugetul jurnalului consumat la citire (serviciul fara `ar`)', MS, "{ ar: () => acceptate.ar('jurnal') /*PAZA-MARTOR:buget-citit*/ }", '{}', '10.P2-13 CONTROL prin serviciu'],
// R2-14: Retry-After prin usa gateway-ului
['usa gateway-ului arunca Retry-After', GWF, "? { 'retry-after': ra } : {})", '? {} : {})', '10.R2-14 prin usa gateway-ului'],
// ---- a treia revizie adversariala B3 (2026-10-19): fiecare paznic nou, cu randul lui 11.R3-<nn> / 11.P3-<nn>
// R3-01: un ciob de scos se redenumeste intai; un rest al formei de dinainte se sterge la deschidere
['ciobul de scos sters pe loc, fara sa fie redenumit intai', MA, 'fs.renameSync(d, t) /*PAZA-MARTOR:ciob-sters-intai*/; fsyncDosar(dc); tinta = t;', 'void t;', '11.R3-01 o oprire'],
['restul unei stergeri intrerupte tinut drept un ciob la deschidere', MA, 'if (restDeStergere(k) /*PAZA-MARTOR:ciob-rest*/) {', 'if (false) {', '11.P3-01 CONTROL'],
// revizia B3 a patra, R4-06: fiecare jumatate a restului cu plantarea si randul ei
['un rest fara ciob.json sau frunze.ndjson tinut drept un ciob', MA, "(!fs.existsSync(path.join(d, 'ciob.json')) || !fs.existsSync(path.join(d, 'frunze.ndjson'))) /*PAZA-MARTOR:ciob-fara-fisiere*/", 'false', '11.P3-01 CONTROL'],
['un ciob marcat .de-sters tinut drept un ciob', MA, "fs.existsSync(path.join(dc, String(k), '.de-sters')) /*PAZA-MARTOR:ciob-marcat*/", 'false', '12.R4-06 redenumirea'],
// R3-02: dovada care traieste cel mai mult pe sesiune
['o dovada contra unui cap din ciobul vechi tine locul celei care conteaza', MA, 'const inlocuieste = !!q0 && q0.k < tinut.k /*PAZA-MARTOR:echivocare-mai-noua*/;', 'const inlocuieste = false;', '11.R3-02 agentul X'],
// R3-03: un steag fara valoare, sau cu valoarea goala, e folosire gresita
['un steag fara valoare primit in tacere (martor-agenti.mjs)', MA, "if (!(v !== undefined && v !== '' && !/^--[a-z]/.test(v)) /*PAZA-MARTOR:steag-fara-valoare*/) throw", 'if (false) throw', '11.R3-03 agent-cli verify'],
['un steag fara valoare primit in tacere (agent-cli.mjs)', CLI, "if (!(v !== undefined && !/^--[a-z]/.test(v) && (v !== '' || GOALE_PERMISE.includes(f))) /*PAZA-MARTOR:steag-fara-valoare*/) throw", 'if (false) throw', '11.R3-03 agent-cli verify'],
// R3-04: chitanta ultimului cap tinut de martor, sub --witness-url
['chitanta unui cap tinut nu mai e ceruta (marginea o dau chitantele alese de agent)', CLI, "if (dovezi.some((d) => d.clasa === 'VERIFICATA' && d.id === h.id) /*PAZA-MARTOR:martor-chitanta-ceruta*/) continue;", 'if (true) continue;', '11.R3-04 martorul fixat'],
// revizia B3 a cincea, R5-01: numai o chitanta VERIFICATA a capului scuteste aducerea (forma veche: orice chitanta cu acelasi id, verificata sau nu)
['o chitanta NEVERIFICATA cu acelasi id (o copie veche) scuteste aducerea chitantei capului tinut', CLI, "if (dovezi.some((d) => d.clasa === 'VERIFICATA' && d.id === h.id) /*PAZA-MARTOR:martor-chitanta-ceruta*/) continue;", 'if (dovezi.some((d) => d.id === h.id)) continue;', '13.R5-01 copia VECHE'],
// R3-05: codurile lui receipt si submit
['submit "nimic nou" iese 0 pe o stare a capului care nu e a lui', MA, "if (!(r.status === 200 && obiect(r.j) && r.j.id === ultim.id && typeof r.j.status === 'string') /*PAZA-MARTOR:cod-nimic-nou*/) {", 'if (false) {', '11.R3-05 receipt'],
['receipt pe un 200 care nu e JSON (exceptie, 1)', MA, "if (!(obiect(r.j) && typeof r.j.status === 'string') /*PAZA-MARTOR:cod-ne-json*/) {", 'if (false) {', '11.R3-05 receipt'],
// ---- a patra revizie adversariala B3 (2026-10-19): regula de proiectare a lui --witness-url si paznicii ei, cu randurile 12.R4-<nn> / 12.P4-<nn>
['numai ULTIMUL cap tinut cu chitanta (capetele intermediare fara)', CLI, 'tinute || [] /*PAZA-MARTOR:martor-fiecare-cap*/', '(tinute || []).slice(-1)', '12.R4-03 martorul tine'],
['id-ul capului unei chitante citit fara garda (exceptie pe o forma gresita)', CLI, "const idCap = (a) => { const p = M.chitantaDin(a); const w = p && typeof p === 'object' ? p.witnessReceipt : null; const h = w && typeof w === 'object' ? w.head : null; return h && typeof h === 'object' && typeof h.statementHash === 'string' ? h.statementHash : null; } /*PAZA-MARTOR:chitanta-id-sigur*/;", 'const idCap = (a) => M.chitantaDin(a).witnessReceipt.head.statementHash;', '12.R4-02 proxy'],
// (revizia a cincea: paznicul `martor-adusa-vina` al formei de dinainte e acum clasa dovezii, pe ORICE drum: `chitanta-alt-registru`, cu cele doua sensuri)
['o chitanta care nu tine LOCAL judecata vina registrului, oricare ar fi regula (o includere stricata face un FAILED)', CLI, "const vina = l.rule === 'registru' /*PAZA-MARTOR:chitanta-alt-registru*/ || falsificata;", 'const vina = true;', '13.R5-05 chitanta agentului cu includerea stricata'],
['o chitanta a martorului fixat pentru alt registru (o ramura) luata drept NEMASURAT', CLI, "l.rule === 'registru' /*PAZA-MARTOR:chitanta-alt-registru*/", 'false', '12.P4-03b CONTROL'],
['submit pe un 200/202 care nu e starea capului trimis iese 0', MA, "(r.status === 200 || r.status === 202) && !(obiect(r.j) && H32.test(sir(r.j.id)) && r.j.session === env.statement.session && r.j.seq === env.statement.seq && typeof r.j.status === 'string') /*PAZA-MARTOR:cod-trimis*/", 'false', '12.R4-04 submit'],
['un steag necunoscut primit in tacere (agent-cli.mjs)', CLI, 'if (!(STEAGURI[cmd].includes(s) /*PAZA-MARTOR:steag-necunoscut*/)) throw', 'if (false) throw', '12.R4-05 agent-cli'],
['un steag necunoscut primit in tacere (martor-agenti.mjs)', MA, 'if (!(STEAGURI[cmd].includes(s) /*PAZA-MARTOR:steag-necunoscut*/)) throw', 'if (false) throw', '12.R4-05 agent-cli'],
['un steag dat de doua ori primit (agent-cli.mjs)', CLI, "if (!(!vazute.has(s) || s === '--witness') /*PAZA-MARTOR:steag-dublu*/) throw", 'if (false) throw', '12.R4-05 agent-cli'],
['un steag dat de doua ori primit (martor-agenti.mjs)', MA, "if (!(!vazute.has(s) || s === '--witness') /*PAZA-MARTOR:steag-dublu*/) throw", 'if (false) throw', '12.R4-05 agent-cli'],
['departajarea a doua dovezi la deschidere rasturnata (ramane cea veche)', MA, 'vechi && vechi.k >= x.k /*PAZA-MARTOR:echivocare-departajare*/', 'vechi && vechi.k <= x.k', '12.R4-06 o inlocuire'],
// ---- a cincea revizie adversariala B3 (2026-10-19): verify ca EVALUARE COMPLETA cu un singur verdict, tipurile, asteptarea pe 429; randurile 13.R5-<nn> / 13.P5-<nn>
// R5-01: verdictul se da DUPA ce s-a adunat tot, iar o vina dovedita trece inaintea oricarui NEMASURAT
['un NEMASURAT judecat inaintea unei vine dovedite (verdictul dupa ordinea claselor)', CLI, "const verdict = vina.length ? 'FAILED' : nemasurate.length ? 'NOT MEASURED' : 'OK' /*PAZA-MARTOR:verdict-vina-intai*/;", "const verdict = nemasurate.length ? 'NOT MEASURED' : vina.length ? 'FAILED' : 'OK';", '13.R5-01 capul seq 4'],
['un NEMASURAT iesit pe drum, inaintea judecatii (forma de dinainte de a cincea revizie)', CLI, 'const adauga = (d) => { dovezi.push({ ceruta: true, ...d }); };', "const adauga = (d) => { dovezi.push({ ceruta: true, ...d }); if (d.clasa === 'NEMASURATA') { console.error('NOT MEASURED: ' + d.detail + ' (planted: an early exit)'); process.exit(2); } };", '13.R5-01 capul seq 4'],
['o copie veche a unei chitante ramane ceruta langa chitanta verificata a aceluiasi cap', CLI, "dovezi.some((x) => x !== d && x.clasa === 'VERIFICATA' && x.id === d.id) /*PAZA-MARTOR:copie-veche*/", 'false', '13.R5-01 copia VECHE'],
// R5-03 / R5-05: clasa unei chitante care nu tine: vina agentului numai pe o semnatura INVALIDA a martorului fixat (predata) sau pe alt registru
['o pana a notarului sau a RPC-ului ales de verificator judecata vina registrului', CLI, "clasa: 'NEMASURATA' /*PAZA-MARTOR:lant-nemasurat*/", "clasa: 'VINA'", '13.R5-03 registru CINSTIT'],
['o chitanta a agentului cu semnatura martorului fixat INVALIDA luata drept NEMASURATA', CLI, "const falsificata = sursa === 'agent' && numit !== null && (!fixati || fixati.includes(numit)) /*PAZA-MARTOR:chitanta-falsificata*/;", 'const falsificata = false;', '13.P5-05 CONTROL vina agentului'],
['o chitanta ADUSA cu semnatura martorului invalida judecata vina registrului (o adresa face un FAILED)', CLI, "sursa === 'agent' && numit !== null", 'numit !== null', '13.P5-05 CONTROL un proxy'],
// R5-04: regula (c), tipurile judecate inainte de folosire
['submit primeste un 200/202 al carui `status` nu e un sir ({"toString":0}): --out scris si iesire 0', MA, "r.j.seq === env.statement.seq && typeof r.j.status === 'string') /*PAZA-MARTOR:cod-trimis*/", 'r.j.seq === env.statement.seq) /*PAZA-MARTOR:cod-trimis*/', '13.R5-04 submit'],
['un receivedAtMs negativ primit de forma chitantei (exceptia vine mai jos, in frunza)', MA, 'w.receivedAtMs >= 0 /*PAZA-MARTOR:chitanta-tipuri*/', 'true', '13.R5-04 un proxy'],
['un camp care trebuie sa fie sir trecut prin String() (exceptie pe {"toString":0})', MA, "const sir = (x) => (typeof x === 'string' ? x : '');", 'const sir = (x) => String(x);', '13.R5-04 un proxy'],
// R5-06: o citire peste limita spune cand se poate reincerca, iar verificatorul asteapta
['pe un 429 cu Retry-After verificatorul nu mai asteapta', MA, 'if (!(r.status === 429 && Number.isSafeInteger(r.retryAfter) && r.retryAfter <= buget.ramasS && i < 50) /*PAZA-MARTOR:asteapta-429*/) return r;', 'if (true) return r;', '13.R5-06 serviciul'],
['429-ul unei citiri fara Retry-After', MS, "{ 'retry-after': String(ra) } /*PAZA-MARTOR:get-retry-after*/", '{}', '13.R5-06 serviciul'],
// ---- a sasea revizie B3 (2026-10-19, verificarea tintita a reparatiilor R5): N1..N3, randurile 14.N<n>
// N1: o chitanta fara --rpc e o dovada NEMASURATA [rpc], judecata la locul ei; doua plantari pe acelasi paznic, una pe fiecare sens (iesirea timpurie
// a formei de dinainte, care ascunde ramura aratata de lista; si paznicul scos, care ia chitanta drept VERIFICATA fara lant)
['o chitanta fara --rpc iese pe drum cu 2, inaintea judecatii (forma de dinainte de a sasea revizie: folosire gresita)', CLI, 'if (!rpc /*PAZA-MARTOR:fara-rpc*/) return {', "if (!rpc) throw new Folosire('a witness receipt needs --rpc <url> (planted: the early exit of before the sixth review)'); if (false) return {", '14.N1 fara --rpc'],
['o chitanta fara --rpc judecata VERIFICATA (marginea luata fara lant)', CLI, 'if (!rpc /*PAZA-MARTOR:fara-rpc*/) return {', 'if (false) return {', '14.N1 fara --rpc'],
// N2: receipt scrie numai chitanta capului cerut, a registrului dat, cu semnatura martorului verificata (cu cel fixat, daca e dat)
['receipt scrie raspunsul adresei fara sa il verifice (forma de dinainte de a sasea revizie)', MA, 'if (!(!!l && l.ok) /*PAZA-MARTOR:receipt-verificata*/) {', 'if (false) {', '14.N2 receipt printr-un proxy'],
['receipt nu cere ca chitanta sa fie a capului cerut (--id)', MA, 'capPrimit === idc /*PAZA-MARTOR:receipt-id*/', 'true', '14.N2 receipt printr-un proxy'],
['receipt nu leaga chitanta de registrul dat (--ledger)', MA, 'ledger /*PAZA-MARTOR:receipt-registru*/,', 'ledger: null,', '14.N2 receipt fata de --ledger'],
['receipt nu cere martorul fixat prin --witness', MA, 'martori: martori.length ? martori : null /*PAZA-MARTOR:receipt-fixat*/', 'martori: null', '14.N2 receipt fata de --ledger'],
// N3: regula (c) pe drumul "nimic nou" al lui submit
['submit "nimic nou" foloseste `latest` (campul nesemnat) fara sa ii judece tipurile', MA, 'if (!(ultim === null || (obiect(ultim) && Number.isSafeInteger(ultim.seq) && ultim.seq >= 0 && HASH_INTRARE.test(sir(ultim.hash)) && H32.test(sir(ultim.id)))) /*PAZA-MARTOR:nimic-nou-latest*/) {', 'if (false) {', '14.N3 submit'],
['submit "nimic nou" primeste o stare a capului cu status care nu e sir ({"toString":0}): --out scris, apoi exceptie', MA, "r.j.id === ultim.id && typeof r.j.status === 'string') /*PAZA-MARTOR:cod-nimic-nou*/", 'r.j.id === ultim.id) /*PAZA-MARTOR:cod-nimic-nou*/', '14.N3 submit'],
// ---- vocabularul felului (proof-kinds, citit si de judecatorul martorului) si usa gateway-ului
['vocabularul felului agent-witness-checkpoint slabit in proof-kinds', PKF, 'treeSize: [(v) => Number.isSafeInteger(v) && v >= 1,', 'treeSize: [(v) => true,', '9.R8 felul agent-witness-checkpoint'],
['usa gateway-ului primeste un POST din browser (Origin)', GWF, "if (req.method === 'POST' && req.headers.origin !== undefined) return json(res, 403,", 'if (false) return json(res, 403,', '9.R13 gateway: un POST'],
];
// PLANTARILE NEUTRE (revizia B3 a cincea, R5-05): schimba numai ORDINEA in care verify aduna si judeca dovezile. Verdictul e o functie de multimea
// dovezilor, nu de ordinea lor, deci cu oricare din ele proba trebuie sa ramana VERDE intreaga; un rand rosu aici e un ESEC al componentei (ordinea
// a ajuns sa conteze), numarat ca orice control cazut. [nume, fisier, tipar, inlocuire]
const NEUTRE = [
['ordinea adunarii rasturnata: capetele tinute (si chitantele lor aduse) inaintea lui --anchors', CLI, 'await fazaAnchors(); await fazaCapete();', 'await fazaCapete(); await fazaAnchors();'],
['intrarile din --anchors judecate de la ultima la prima', CLI, 'for (const [i, a] of toate2.entries()) {', 'for (const [i, a] of [...toate2.entries()].reverse()) {'],
['capetele tinute parcurse de la ultimul la primul', CLI, 'for (const h of tinute || [] /*PAZA-MARTOR:martor-fiecare-cap*/) {', 'for (const h of [...(tinute || [])].reverse()) {'],
];
// markerii care NU au plantare, fiecare cu motivul (azi niciunul: o exceptie noua se scrie aici, cu motivul, nu se lasa neacoperita). De la a doua
// revizie (R2-15) garda priveste si agent-cli.mjs: paznicii martorului din linia de comanda poarta markeri, deci si plantari.
const EXCEPTII = [];
const PROPRII = ['agent-policy.mjs', 'agent-ledger.mjs', 'agent-aprobare.mjs', 'agent-ancora.mjs', CLI, MA, MS, 'proba-martor-agenti.mjs'];
// surorile: din importurile relative '../<dosar>/<fisier>' ale modulului (aceeasi asezare in arborele de dezvoltare si in copia publicata)
const SURORI = [...fs.readFileSync(path.join(AICI, MA), 'utf8').matchAll(/from '\.\.\/([^'/]+)\/([^'/]+)'/g)].map((x) => [x[1], x[2]]);
const DEV_VERIFY = path.resolve(AICI, '..', '..', 'verificator-falcon', 'verify-proof.mjs');
const VERIFY = process.env.AERE_VERIFY_PROOF !== undefined ? process.env.AERE_VERIFY_PROOF : (fs.existsSync(DEV_VERIFY) ? DEV_VERIFY : '');
const GW_DIR = path.resolve(AICI, '..', '..', 'cloud-gateway'); const GW = path.join(GW_DIR, 'gateway.mjs');
const fisierPlantat = (t, d, fisier) => (fisier === GWF ? path.join(t, 'cloud-gateway', 'gateway.mjs') : path.join(d, fisier));
function copie(cuGateway = false) {
const t = fs.mkdtempSync(path.join(os.tmpdir(), 'aere-martor-ctl-')); const d = path.join(t, path.basename(AICI)); fs.mkdirSync(d);
for (const f of PROPRII) fs.copyFileSync(path.join(AICI, f), path.join(d, f));
for (const [dir, f] of SURORI) { fs.mkdirSync(path.join(t, dir), { recursive: true }); fs.copyFileSync(path.join(AICI, '..', dir, f), path.join(t, dir, f)); }
if (cuGateway) fs.cpSync(GW_DIR, path.join(t, 'cloud-gateway'), { recursive: true, filter: (s) => !/node_modules/.test(s) });
return { t, d };
}
function ruleaza(d, gateway = fs.existsSync(GW) ? GW : null) {
return new Promise((resolve) => {
const c = spawn(process.execPath, [path.join(d, 'proba-martor-agenti.mjs')], { env: { ...process.env, AERE_VERIFY_PROOF: VERIFY ? path.resolve(VERIFY) : '', ...(gateway ? { AERE_GATEWAY: gateway } : {}) } });
let out = ''; const ceas = setTimeout(() => c.kill(), 300000);
c.stdout.on('data', (x) => { out += x; }); c.stderr.on('data', (x) => { out += x; });
c.on('close', (cod) => { clearTimeout(ceas); const linii = out.split('\n'); resolve({ cod, rulat: /martor-agenti: \d+\/\d+ cum trebuia/.test(out), rosii: linii.filter((l) => l.startsWith(' RAU ')), sarite: linii.filter((l) => l.startsWith(' -- ')) }); });
});
}
// o plantare NEUTRA: proba rulata si verde intreaga (zero rosii, zero sarite in afara usii gateway-ului)
async function neutru([nume, fisier, din, inl]) {
const { t, d } = copie();
try {
const f = fisierPlantat(t, d, fisier); const src = fs.readFileSync(f, 'utf8');
if (src.split(din).length !== 2) return [false, ` STRICAT (neutra) ${nume}: tiparul apare de ${src.split(din).length - 1} ori in ${fisier}`];
fs.writeFileSync(f, src.replace(din, () => inl));
const r = await ruleaza(d);
if (!r.rulat) return [false, ` STRICAT (neutra) ${nume}: proba nu a ajuns la rezumat (cod ${r.cod})`];
const sarite = r.sarite.filter((l) => !/usa gateway-ului/.test(l));
if (!r.rosii.length && !sarite.length) return [true, ` VERDE cum trebuia (neutra) ${nume} (proba intreaga verde: ordinea nu schimba nimic)`];
return [false, ` CONTROL CAZUT (neutra) ${nume}: ${r.rosii.length} rosii, ${sarite.length} sarite: ${[...r.rosii, ...sarite].join(' | ').slice(0, 300)}`];
} finally { fs.rmSync(t, { recursive: true, force: true }); }
}
async function planteaza([nume, fisier, din, inl, tinta]) {
const cuGw = fisier === GWF; if (cuGw && !fs.existsSync(GW)) return [true, ` (sarit pe nume: ${nume}: gateway.mjs nu e in aceasta copie)`];
const { t, d } = copie(cuGw);
try {
const f = fisierPlantat(t, d, fisier); const src = fs.readFileSync(f, 'utf8');
if (src.split(din).length !== 2) return [false, ` STRICAT ${nume}: tiparul apare de ${src.split(din).length - 1} ori in ${fisier}`];
fs.writeFileSync(f, src.replace(din, () => inl));
const r = await ruleaza(d, cuGw ? f : undefined);
if (!r.rulat) return [false, ` STRICAT ${nume}: proba nu a ajuns la rezumat (cod ${r.cod})`];
if (r.rosii.some((l) => l.startsWith(' RAU ' + tinta))) return [true, ` ROSU cum trebuia ${nume} (randul '${tinta}' pica)`];
return [false, ` CONTROL CAZUT ${nume}: randul '${tinta}' a ramas verde (${r.rosii.length} rosii altundeva)`];
} finally { fs.rmSync(t, { recursive: true, force: true }); }
}
// ACOPERIREA: fiecare aparitie a unui marker PAZA-MARTOR din MA si MS sta in tiparul unei plantari (sau pe EXCEPTII); intoarce markerii neacoperiti
function acoperire(plantari) {
const lipsa = []; let total = 0;
for (const fisier of [MA, MS, CLI]) {
const src = fs.readFileSync(path.join(AICI, fisier), 'utf8');
const spatii = plantari.filter((p) => p[1] === fisier).map((p) => { const i = src.indexOf(p[2]); return i < 0 ? null : [i, i + p[2].length]; }).filter(Boolean);
for (const mk of src.matchAll(/PAZA-MARTOR:([a-z-]+)/g)) {
total++;
const rand = src.slice(0, mk.index).split('\n').length;
if (spatii.some(([a, b]) => mk.index >= a && mk.index < b)) continue;
if (EXCEPTII.some(([f, nume, ancora]) => f === fisier && nume === mk[1] && src.slice(Math.max(0, mk.index - 200), mk.index + 50).includes(ancora))) continue;
lipsa.push(`${fisier}:${rand} ${mk[1]}`);
}
}
return { total, lipsa };
}
let rele = 0;
for (const [dir, f] of SURORI) if (!fs.existsSync(path.join(AICI, '..', dir, f))) { console.log(` STRICAT sora ${dir}/${f} nu e langa componenta: copia nu se poate face`); process.exitCode = 1; process.exit(); }
const ac = acoperire(PLANTARI);
if (!ac.lipsa.length) console.log(` OK acoperirea: toti cei ${ac.total} markeri PAZA-MARTOR din ${MA}, ${MS} si ${CLI} au plantarea lor (exceptii: ${EXCEPTII.length})`);
else { rele++; console.log(` ESEC acoperirea: ${ac.lipsa.length} din ${ac.total} markeri fara plantare si fara exceptie scrisa: ${ac.lipsa.join(', ')}`); }
// martorul acoperirii: cu o plantare scoasa, garda trebuie sa numeasca exact markerul ei (altfel o garda care nu vede nimic ar iesi verde)
const scoasa = PLANTARI.findIndex((p) => p[0] === 'promisiunea nejudecata');
const ac2 = acoperire(PLANTARI.filter((_, i) => i !== scoasa));
if (scoasa >= 0 && ac2.lipsa.length === ac.lipsa.length + 1 && ac2.lipsa.some((x) => / promisiune$/.test(x))) console.log(` OK martorul acoperirii: fara plantarea '${PLANTARI[scoasa][0]}' garda numeste markerul ei (${ac2.lipsa.find((x) => / promisiune$/.test(x))})`);
else { rele++; console.log(` STRICAT martorul acoperirii: fara o plantare, garda nu a numit markerul ei (${JSON.stringify(ac2.lipsa).slice(0, 200)})`); }
// --numai-acoperirea: acoperirea si unicitatea fiecarui tipar in fisierul lui, fara rularile probei (o verificare rapida in timpul lucrului)
if (process.argv.includes('--numai-acoperirea')) {
const { t, d } = copie(fs.existsSync(GW));
for (const [nume, fisier, din] of [...PLANTARI, ...NEUTRE]) { if (fisier === GWF && !fs.existsSync(GW)) continue; const n = fs.readFileSync(fisierPlantat(t, d, fisier), 'utf8').split(din).length - 1; if (n !== 1) { rele++; console.log(` STRICAT ${nume}: tiparul apare de ${n} ori in ${fisier}`); } }
fs.rmSync(t, { recursive: true, force: true });
console.log(rele ? `ACOPERIREA: ${rele} probleme` : `ACOPERIREA: ${ac.total} markeri acoperiti, ${PLANTARI.length} tipare unice, ${NEUTRE.length} neutre (probele NU au rulat)`); process.exitCode = rele ? 1 : 0; process.exit();
}
const c0 = copie(); const m = await ruleaza(c0.d); fs.rmSync(c0.t, { recursive: true, force: true });
// martorul: proba ajunge la rezumat, zero rosii; un rand sarit e primit numai pe nume (usa gateway-ului cand gateway-ul nu e in aceasta copie)
const saritePermise = m.sarite.filter((l) => !/usa gateway-ului/.test(l));
if (m.rulat && !m.rosii.length && !saritePermise.length) console.log(` OK martorul: copia neatinsa verde (cod ${m.cod}${m.sarite.length ? ', ' + m.sarite.length + ' rand sarit pe nume: usa gateway-ului' : ''})`);
else { rele++; console.log(` STRICAT martorul nu e verde (cod ${m.cod}, ${m.rosii.length} rosii, ${saritePermise.length} sarite: ${[...m.rosii, ...saritePermise].join(' | ').slice(0, 400)})`); }
const LUCRARI = [...PLANTARI.map((p) => () => planteaza(p)), ...NEUTRE.map((p) => () => neutru(p))];
const rez = new Array(LUCRARI.length); let i = 0;
// cate plantari ruleaza deodata: AERE_CONTROL_PARALEL (implicit 12). Masurat 2026-10-19 pe laptop (16 fire): dupa prima revizie 4 deodata 529 s,
// 8 deodata 311 s, 12 deodata 270 s; dupa a patra (112 plantari) ~475 s cu 12 si ~747 s cu 4; dupa a sasea (134 de lucrari:
// 131 de plantari si 3 neutre, proba de 158 de randuri) masurarea e in README, randul acestui control (pana la a sasea revizie comentariul trimitea la
// masurarile de dupa a cincea, 126 de lucrari, care nu ajunsesera in README). Rulatorul B2 (scripts/deschise/ruleaza-probe.sh) da acestui control
// 1650 s din a sasea revizie (1200 s pana atunci; aritmetica in probele-b2.sh); fiecare rulare a probei din el are 300 s (ceasul din ruleaza()).
const PARALEL = /^[1-9]\d?$/.test(String(process.env.AERE_CONTROL_PARALEL || '')) ? Number(process.env.AERE_CONTROL_PARALEL) : 12;
await Promise.all(Array.from({ length: PARALEL }, async () => { while (i < LUCRARI.length) { const k = i++; rez[k] = await LUCRARI[k](); } }));
for (const [bun, linie] of rez) { console.log(linie); if (!bun) rele++; }
console.log(rele ? `CONTROL NEGATIV: ${rele} probleme` : `DOVEDIT: martorul verde, acoperirea intreaga (${ac.total} markeri), ${PLANTARI.length} din ${PLANTARI.length} paznici scosi -> randul lor rosu, ${NEUTRE.length} din ${NEUTRE.length} plantari neutre (ordinea) -> proba verde intreaga`);
process.exitCode = rele ? 1 : 0;
@@ -0,0 +1,385 @@
{
"v": 1,
"kind": "aere-agent-witness-evidence",
"network": "eip155:28001",
"rpc": "https://testnet-rpc.aere.network",
"witness": "aere-witness:fe5657cab99b3636a22cdc68b2dc952e77e9223d",
"policy": {
"policy": {
"v": 1,
"kind": "aere-agent-policy",
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"spend": {
"amount": "1000",
"windowSeconds": 3600,
"asset": "AERE"
},
"tools": null,
"recipients": [
"0xbbbb"
]
},
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b"
},
"ledgerBefore": {
"version": "aere-agent-ledger/2 (2026-09-29)",
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIHsjALBglghkgBZQMEAxIDggehAMeyolW9hoGp59fYDAvBPDRQC9MRvxK+hxLi\nhLC9DZPk7RkogqtIAE/+lGLeyEtNxufIlWTDTvQ8cniJrtX+NntmQqK8460VBM+S\nZ/xgKw4dV+lsvb0okAE4ovQKr/CsyAbYPWF+hmINeaDSCdTbMD10k/oP+o2wnB35\nBZ0rrMfXZ9i4/BOH9hEjjRxKV8N7l6udBDWQCboaKUc0APITlI5nWkRwAaQ6ntBP\nJAUNqzccbX31+/Bh0Iw6mRBB8gPQf9jhwJENENJ3dgCXPuam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PVWh97zJaQlMpWmEgbwouDluTXylV6izonHeePEfiFE7oZE6zvhWOQm\nbHPL+DUoxx+I6b5i4vf7Fb/2Dvj8G3aL68b0lLlZO7WjSFDefjkeMyOfAvgQ/mSw\nhd9JsRj3wTP2rqDfr+x6I33tFBh3AiIHKSHk7we10C7oIDDqifY7yrHEo4j77bbW\ndQc2DoqIg3MvDl3uV8t6gdLD4lYcyJ8Ukj3kDTv7PD7ThoxahijrbEtpjbGq2Xsp\nk/orF/12\n-----END PUBLIC KEY-----\n",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"entries": [
{
"seq": 0,
"prev": "0000000000000000000000000000000000000000000000000000000000000000",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792387118,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792387118
},
"decision": {
"allowed": true,
"reason": "under the limit"
},
"provenance": null,
"seq": 0
},
"signature": "X2jLRNTVdAQKqd9+3gKrU2qO7LeY66kQwTp249Npaq2/WKxnf7k0h8pUpLNeLHNe7Xlfd6djEgJs4jwDgLAWr+cNTYDYEpXSaMpOc7fbkEz8yfWmXQkpy1bBj7YWxz67UIfgn5helsZZKqvJE/tqA+Gh28kOWhPr3fMq3//NLq8YhWu3bWIFzKwcQ5kT9Gr1q3ncvOnVP5KNkK3ot/DT5nnvERdBDRVwrdsS0ExAjMxNjZvGBTb/SoDIZGGHlqUxaq6dbf3sS/TwTPd0aOeYHo8eMaHYeIMtK1EY8W9QSI5VciJ7GBeSw31BOxTBWOrGdDH4pHA+ka9wGrOr8Ougvuz9n8/nEntMggFBl5VKbRbMWBYmlBW08XIQEEAUGACV12hEutGUSAL3gGPRJRpIvZaLv75GfivMBpQm03q5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iXHmYGzDuDGfB9NkLysd1XJUy0zdO3aMy5rY96Xh3q6IGp5km19UDZ+etsdsgeCgCLTFoMgTHz9/C08P+BgIlqcSdPNAkZN7aiCQe7T9i8GMCqOOSSDSEOMBo+1mgR4hrGrR3LsclMlJZFfEmQf0nzUSxCqqkm0fIwvSuF1ExxnQ7lQF6wjEnrXl5h8VFlnJzygLUsedsTzEFeCphCdCmB2+DzRa6KsuiF8+kAE88/wmc74w0XHnqpYYDbntsKInPEpJ347P4NnZD+6WhVBTH+pvvv42g4aYYT3bVhbM8SsYU4LAHp8LLEx2mKuMy2GFzjeKTbjMbdvJjdNFTz2nNad6MAPrr2OAniIbhRdfeeXpB4XNg4MMZT+NS+zgA3IrYLuMU+YSeCD7857LHBeet+hQkB/CHJ6tbiFr4EcevIvIdMDXkyyZK9jPQ5MmBnTxCpcemGRR0vXzGgXt0x74g4nQCv8fVe/l2hyW0cSPHGnj2tws+faZrwN7Bz0QicanaKJqFmJRQVOHRvZfLw6wOIwSWw2KRhO0PEDB21QUBlNFUuAKB6nhqdYvlRd4tLsI1rerLwyCJl95qcQWRJ3kPdeq4w780sMrUZPnxBIGqXuoJZYFNEW7XtrTwb1wvivSC73yWOTmXP488JZlkyjv4ICigwNmBkb4XJ4AQHUmCaohYnPUHH4xdJUWCf2PskJnaN2hZqlMzmAAAAAAAAAAAAAAAAAAAACxEXHiMo",
"hash": "932ce0bd9da3549bfb83473da0ef076104efa0e6a592fe452a1adfb0a0570f7e"
},
{
"seq": 1,
"prev": "932ce0bd9da3549bfb83473da0ef076104efa0e6a592fe452a1adfb0a0570f7e",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792387123,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792387123
},
"decision": {
"allowed": true,
"reason": "under the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AWRzp7OBMQIM9Ab8WhVna69Rxhv9rX+1lgHeerLbSEn3cN/5MHHBIdoY9PnN6fs3W3m0WLj1xnKHB0DNpvb7P3ipbX566xskAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwsMFBoh",
"hash": "6032a854c357ad3f1aeacb7419bf3c3f0c29bc34b84024bd18a12c54c7300f99"
}
]
},
"head": {
"v": 1,
"kind": "aere-agent-ledger-head-attestation",
"statement": {
"v": 1,
"kind": "aere-agent-ledger-head",
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"session": "86f9d221fce6611824990720800c7d36",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"seq": 1,
"hash": "6032a854c357ad3f1aeacb7419bf3c3f0c29bc34b84024bd18a12c54c7300f99",
"createdAt": "2026-10-19T05:33:38.130Z",
"previous": null
},
"statementHash": "0x25f1993926057b1da46cd815b3e7ae0d84d4ac777344c4476a87f4e3c13966fc",
"signature": {
"scheme": "ml-dsa-65",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIHsjALBglghkgBZQMEAxIDggehAMeyolW9hoGp59fYDAvBPDRQC9MRvxK+hxLi\nhLC9DZPk7RkogqtIAE/+lGLeyEtNxufIlWTDTvQ8cniJrtX+NntmQqK8460VBM+S\nZ/xgKw4dV+lsvb0okAE4ovQKr/CsyAbYPWF+hmINeaDSCdTbMD10k/oP+o2wnB35\nBZ0rrMfXZ9i4/BOH9hEjjRxKV8N7l6udBDWQCboaKUc0APITlI5nWkRwAaQ6ntBP\nJAUNqzccbX31+/Bh0Iw6mRBB8gPQf9jhwJENENJ3dgCXPuamFZMLkWjzgvWFLF4v\n4BnhfXaxTiRbc8Dr0DPJY745AxW0zqCUPn7GKD2WtThGwEuKIOuiS5hhvtMjXnuX\ntWoXBzf8gPR5LDrh+hEr3lWBPXBYUZL6uJgpEEbNxTR5ot6r4gybX2r8RciXUIgN\nVwhaPV3dfteGWnUgjM3l9u6EU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CC1Q+wdGO20VbSrSUvIf/6F/V2QKFruY8f/zYVogSuIIdBX/Wl7ixSwPr/Y6IX6rcSoKtkNi1J/KRFP2BOQAgy1qwWeQEtv6TAuI+Nt7Hrb4/Mg0RFDZawP0kTHiI0dXcAz5zn/AWiY+zwtomq8IsMEtZWm97s+MAAAAAAAAAAAAAAAAAAAAAAAAABg0SGBsk"
}
},
"receipt": {
"v": 1,
"kind": "aere-proof-of-agent-witness-checkpoint-attestation",
"statement": {
"v": 1,
"kind": "aere-proof-of-agent-witness-checkpoint",
"root": "0x1b4af9bfc354446fc9ea2ec1583e02fe916f9aa83862c64230f699806fde2027",
"log": "aere-agent-witness/28001",
"witness": "aere-witness:fe5657cab99b3636a22cdc68b2dc952e77e9223d",
"chainId": 28001,
"treeSize": 1,
"maxMergeDelay": 1800,
"createdAt": "2026-10-19T05:33:38.138Z"
},
"statementHash": "0xe1fcad7a17d13430cb3295fb26efe1aa8e2695fa7f1c35dfcfed56d5d17994bd",
"signature": {
"scheme": "ml-dsa-65",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIHsjALBglghkgBZQMEAxIDggehADYE41hQ1spV//pznI7Wow4hMxrg3p6hb+3P\nPsdJBWLj0RNT1AT7Wh8SnuC6DeYtw45G/0xzXsFXVpmiG1QGXx0ey6fkxiJACVpl\nPLbLBAbM0IHDyhk+g94cuuV3FPHDgnA4sK4Fvb/KtKMILCfv161hAbGSPYDdIMXx\nYxIHkCkBb9Z0ob2iUabmPKjWWpTUKAIK2Ed9lsqCgedEFaH//XDPMdke7zqeTDky\nJvSDJARMFX++jgCle1Heo4DSYwDsE8/XYL37F+0w+1EZUuIlQJf2nfHLPRrpz8nA\nEB/LPRxImNNoiTvVH11GQ2HqQ1ufDcRSHUAEe8ZKU8TXafWWIQUyV4ITcod4xi1I\nMgvJXWdZRTUQg5HuzUcC/HfSLTdN2/acrmdMql80NAPNJRPykVAdo0Jc3TDwUMsV\n/YBVs2UM2/SsDjzCcE9h/1S5/nUdKm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V49jtANUirMA6cWUUBZ7gllG8K7KCQ2icWobJRPzr8VdQ0cVHH36S7nIG9icpF4PSgzn7rNaw3GCcEaX9ij4Gvz3Gk29pJlOALqjsGk9nNOjrHU3BVNtM3wJjg7YpkGGl5pnKnj/ggtPFRdi42xx4Weov4AAAAAAAAAAAAAAAAAAAAAAAAABQoPFyAk"
},
"notarization": {
"chainId": 28001,
"notary": "0x70099E62735500AA2F85B60C518551a57B202d54",
"firstSeen": 1792388029,
"txHash": "0x41fcb96d337eef07e2ce99739ac2a0940e501c76cee9e18fe252625842f69227",
"block": 6828096,
"submitter": "0xBAD08a6e956b77cAD3f66823BA7a6DD47005d131"
},
"witnessReceipt": {
"format": "aere-agent-witness-receipt-1",
"head": {
"v": 1,
"kind": "aere-agent-ledger-head-attestation",
"statement": {
"v": 1,
"kind": "aere-agent-ledger-head",
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"session": "86f9d221fce6611824990720800c7d36",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"seq": 1,
"hash": "6032a854c357ad3f1aeacb7419bf3c3f0c29bc34b84024bd18a12c54c7300f99",
"createdAt": "2026-10-19T05:33:38.130Z",
"previous": null
},
"statementHash": "0x25f1993926057b1da46cd815b3e7ae0d84d4ac777344c4476a87f4e3c13966fc",
"signature": {
"scheme": "ml-dsa-65",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIHsjALBglghkgBZQMEAxIDggehAMeyolW9hoGp59fYDAvBPDRQC9MRvxK+hxLi\nhLC9DZPk7RkogqtIAE/+lGLeyEtNxufIlWTDTvQ8cniJrtX+NntmQqK8460VBM+S\nZ/xgKw4dV+lsvb0okAE4ovQKr/CsyAbYPWF+hmINeaDSCdTbMD10k/oP+o2wnB35\nBZ0rrMfXZ9i4/BOH9hEjjRxKV8N7l6udBDWQCboaKUc0APITlI5nWkRwAaQ6ntBP\nJAUNqzccbX31+/Bh0Iw6mRBB8gPQf9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IG07uJbeWriMrIaqV1NXPCcsiFZ6TEAxL1CvDjkyla4TKMYYFhXPptZjuQXgG3Zz7npboN1XAQTiZP//+f3dJOli5XkYTeA1UKS0G2FVU9ZmpB51sc8v4FkXorC1sR3KKZY7EcmGfZ6vHZizo7uNVPUnlhWoU4vMnZ1C1w66k/0PPNHsZoMzf+F9amg0s6L7MbCC1Q+wdGO20VbSrSUvIf/6F/V2QKFruY8f/zYVogSuIIdBX/Wl7ixSwPr/Y6IX6rcSoKtkNi1J/KRFP2BOQAgy1qwWeQEtv6TAuI+Nt7Hrb4/Mg0RFDZawP0kTHiI0dXcAz5zn/AWiY+zwtomq8IsMEtZWm97s+MAAAAAAAAAAAAAAAAAAAAAAAAABg0SGBsk"
}
},
"receivedAtMs": 1792388018133,
"receivedAt": "2026-10-19T05:33:38.133Z",
"leafIndex": 0,
"treeSize": 1,
"leafHash": "0x1b4af9bfc354446fc9ea2ec1583e02fe916f9aa83862c64230f699806fde2027",
"path": [],
"promise": {
"v": 1,
"kind": "aere-proof-of-time-attestation",
"statement": {
"v": 1,
"kind": "aere-proof-of-time",
"subjectHash": "0x25f1993926057b1da46cd815b3e7ae0d84d4ac777344c4476a87f4e3c13966fc",
"source": "aere-witness:fe5657cab99b3636a22cdc68b2dc952e77e9223d",
"at": "2026-10-19T05:33:38.133Z",
"createdAt": "2026-10-19T05:33:38.133Z"
},
"statementHash": "0x0a3c2beb66b6e2cf31bbfaf80fae2ff6888e369c483cdce7c0aba32f2ced7658",
"signature": {
"scheme": "ml-dsa-65",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIHsjALBglghkgBZQMEAxIDggehADYE41hQ1spV//pznI7Wow4hMxrg3p6hb+3P\nPsdJBWLj0RNT1AT7Wh8SnuC6DeYtw45G/0xzXsFXVpmiG1QGXx0ey6fkxiJACVpl\nPLbLBAbM0IHDyhk+g94cuuV3FPHDgnA4sK4Fvb/KtKMILCfv161hAbGSPYDdIMXx\nYxIHkCkBb9Z0ob2iUabmPK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Snf1n0XKtNbaJ7NGEnJy+I3qYO/8EAl7NRiR+CHV8aVk0sVa/ZENvtlwx8gJe0taCDA6cMe4/lYtl0UWBEG7QrNN8Dhe98JbJSYS+tVmICrAebnBdc9xWReF/FI/KRRGwMvl3/FS/bKz6DL2Dxq9hQ1UJii67vnpMZI71fmKniZqcQwXNGmXtybQsSOVXOoQcBPo9OPEw9f2qpxaFAAgEYRAUAx+XTKnLkAEwN4jzw375/gXZrq53AyEwa4RQlxY9/PxcdI2v49aEzh9cbfPqb8eyB6Unf5nYkpdv+FEHkn7EEbQPpBsHShDIViEfGNgLRIxrOZGB1KIHPpbk8kLi2DHpQQFuRQBr3FyuJmB0YE6FVgOZvrBenfsYmTLG6RpC01O3bQ/wtXYGaVwGCFnsXj+wB7srPAV1llxAcXGDM3dXmPpAAAAAAAAAAAAAAAAAAAAAAAAAAABQsRFhoj"
}
}
}
},
"aip23": {
"verdict": "VALID",
"levels": [
{
"level": "form",
"state": "PASSED",
"detail": "kind=aere-proof-of-agent-witness-checkpoint-attestation"
},
{
"level": "integrity",
"state": "PASSED",
"detail": "sha256(statement) == statementHash (0xe1fcad7a17d13430..)"
},
{
"level": "signature",
"state": "PASSED",
"detail": "ml-dsa-65: verifies over the canonical statement text"
},
{
"level": "finality",
"state": "PASSED",
"detail": "post-quantum: the state of block 6828127, the parent of anchor 6828128 whose post-quantum certificate verified here records this statementHash in AereNotary 0x70099e62735500aa2f85b60c518551a57b202d54 as first seen at 2026-10-19T05:33:49.000Z (1792388029); first seen in block 6828096, transaction 0x41fcb96d337eef07.. (located through the endpoint's logs, not part of what is certified)",
"certified": {
"chainId": 28001,
"notary": "0x70099e62735500aa2f85b60c518551a57b202d54",
"firstSeen": 1792388029,
"stateOfBlock": 6828127,
"anchor": 6828128
}
}
]
},
"honest": {
"version": "aere-agent-ledger/2 (2026-09-29)",
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\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716rjnGR3+493aWo/eq2x5QhGPz+pbiX8zQ2us6m6\nWkaSU6x35kCMkPAic8Tti/WX0trTbEPU3HVjm136NxRuA8y2D96ZtB7Co6A6yXrl\nlXly91dPCqR5qP0XRreK8pAFwtlIVBvFUJpxa1yoo/rgXm/tiUQIgu98Y79NRI3N\n+nM5LrQf1JFHJA6ZdqDJW6W/oGPnbIDudnM67MBwieZWd242qd6hN5crreTBhEz5\nOOFhjA00OyP+JlAFtoCKe+SIr7sDOjXuIAIUPP4ngqMKcn+KboPxxAx1ANz7t4Ys\nPV7N/E99PPVWh97zJaQlMpWmEgbwouDluTXylV6izonHeePEfiFE7oZE6zvhWOQm\nbHPL+DUoxx+I6b5i4vf7Fb/2Dvj8G3aL68b0lLlZO7WjSFDefjkeMyOfAvgQ/mSw\nhd9JsRj3wTP2rqDfr+x6I33tFBh3AiIHKSHk7we10C7oIDDqifY7yrHEo4j77bbW\ndQc2DoqIg3MvDl3uV8t6gdLD4lYcyJ8Ukj3kDTv7PD7ThoxahijrbEtpjbGq2Xsp\nk/orF/12\n-----END PUBLIC KEY-----\n",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"entries": [
{
"seq": 0,
"prev": "0000000000000000000000000000000000000000000000000000000000000000",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792387118,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792387118
},
"decision": {
"allowed": true,
"reason": "under the limit"
},
"provenance": null,
"seq": 0
},
"signature": "X2jLRNTVdAQKqd9+3gKrU2qO7LeY66kQwTp249Npaq2/WKxnf7k0h8pUpLNeLHNe7Xlfd6djEgJs4jwDgLAWr+cNTYDYEpXSaMpOc7fbkEz8yfWmXQkp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83473da0ef076104efa0e6a592fe452a1adfb0a0570f7e"
},
{
"seq": 1,
"prev": "932ce0bd9da3549bfb83473da0ef076104efa0e6a592fe452a1adfb0a0570f7e",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792387123,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792387123
},
"decision": {
"allowed": true,
"reason": "under the limit"
},
"provenance": null,
"seq": 1
},
"signature": "yXzPjTeOrpBDTbuMRYAjSYsS/bHRoKJH9nPga98bppJI3fTLf+wSZ3vx4n4hjjtrNks2qZaqPmiGupocTyDeCwUmmxvQ13AtG1no8tjGKhtcLLmT4TWTgiReEtmadpTmqWvh228RqUXHRmSTg+wzqGnNplf/euIE2jEDsFMzj89DYyrxh59zAyWJfTM53gw+q5CJwVENaVX6uCCbhibsMdI/YrKLMDakJIB9F0ppqXfS9e6Li/p3zhGghp3w+wtJhEeTz1/y0hsYEhzH8/oXVrAoMThGMNlBM6UD8CA2T6SmeMJNAkogQ8P21JGim847VwGJdO9xOg2LPnW9/mJ/sGRro1uN0SukcNH8xsWI+crhki/I/Vq6YJIk1kjFhg0xr7cNvKqkDz8aXXIGIH+kxnw1cbBpSAgA6ApC7+ISXRasZSM9rybuFjKmcY6HuMkmjoVWWM/d2a8BUrXzj6fOLDf8X00rPXaK4GXU3tpWUm/7CBR3u3GOR9/vrYp+l43tFmpvechF9vDI8xoY4UenB/rbm1W/eQ6m3YxAgGw6pUIlDM850VUeSN1Sn7kUXv209DNI4GYbnuaFTdXj5cpuhmTZnnllFMxgtQXsw2oth5X2Hum6tub3sKSCK9+wZSfJNq9toU2KaZTxHGLql28d/H40+VZByKPb7HACNNGKkL/8Ar79lUxa1bdkHl54k0gEZ44w+imfelMc9IAMPDFlgJ1fqXZ2Hvd3UplBxsfSD+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2wLHiBxB0pPHOFH+AG9rZR2ag0T0kCo6d1+B2IpWGTEuZV8uOwM0sGeCLNgv5K2WbTMquAptJkGIPSV1zZMXxTeMIQbEthgKjy7AYXienuvDUMPIJO/SCU5zqW2cbdr8s78tokTvtvuAuwlnnUehdTNDqilk7E/uJyFiZqABbLLrWSqRElMoX/UKO4ELXEVwg769S+FZHX871K9f6kjJqiL34WB69S0Va/H0Rov7uvFxU5SrpOdSXLY4nH+AqsudQOF6eIwQzKHxIHOqiew50voE+I5bPnPxEf7ZbWN9mCU2dQfD5wxVkKmnmjlAWRzp7OBMQIM9Ab8WhVna69Rxhv9rX+1lgHeerLbSEn3cN/5MHHBIdoY9PnN6fs3W3m0WLj1xnKHB0DNpvb7P3ipbX566xskAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwsMFBoh",
"hash": "6032a854c357ad3f1aeacb7419bf3c3f0c29bc34b84024bd18a12c54c7300f99"
},
{
"seq": 2,
"prev": "6032a854c357ad3f1aeacb7419bf3c3f0c29bc34b84024bd18a12c54c7300f99",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792388083,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792388083
},
"decision": {
"allowed": true,
"reason": "under the limit"
},
"provenance": null,
"seq": 2
},
"signature": "H3wyyL1BMUKnXmRjhHaZnmOxbCPQzriYjqYZu7kmao1MsHe+GNKy5XQWNKe+nTfpeNVjy+2g58qH7ZC71ToFLLStS6m+cauxnpfCfkYSDI5v/a4CEoRaLM3XRa2r3n8HFQ19BU4/K8m5Sj5q8hOqcYn1h5zElXSkO2JMmbdcg86g/nTnO9gezTe0WlO51FSyIT7aVgG6Sy6kptk+0pw1eWi/zrKz02RBiDac4jMiCSjpEEqnjgyYzkFGY0JAzM9acUFOTdlCpB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mcnE55bWemOjH631YW2yO10J7TJYdMkrXIxg+eQDRXR2zL99iE4J5rVwg3Z0eJvy1vihQcKNY5bgHa6nl9TwEAnu5s74q/RnttSi6099sqAX7FD6yhp0dfKvXiA/menS5NNOc9F/Y8STqgUbxaA7rOhElXgnjplNalU38Rwuer4BajYN7qsYbZrrpSxycarxLRRTZ2TYv0aKKKaBiMjbHDSLaE2Kd5uUjVSXWsYLl8+fhgZ4o3hJSpZoGESm0zbR3u1ebhcnLL5o3GbK9j2F8w2jglCvxw5rbXhgW0NnrTwpmyUrCiHjJ24x5e5nV8rCN/e0off0geC+fVSjeXj61TcXncQie42PsxO0VDyRBltBdcCWRNFwYb207L+y05o5pLHqzTu5BTZLFYwrKyHDRxz/vkVnxoX6g/rkLkmqHFEfTqVhKJ5+joSb/2IgccuVVJ9gE+ZctC+Kwnp1I/jN71DVOGkEyktbYX3gdX6gM1GA6fnRjRp94QWNPPK//FHC4nBhe+06XOV1sgCwxC/ny2E8WtTcpcuARR9aVhQOdlOQ2AFm7rMM8RLn2Q8Zq5+QVC73nC3UMvscnU33P+rC6XXblDuVLqge+qr5YaqaGHNSHXdD9kv1diWFqIPX6VkzBbph271fH3Uw+xAAljfFL6zz9Gju0TTX+Syen8LNTODItJI71oFIAsdqTwR4GV3j60qIVjYGF9HdQgR2CJrlNEfH2Qnw/98EHj9x3aONzkYBRDQdJyiaRveqgu/c5ZS4YJ3emsYZrMv4VzM6Lr5Oai30NdI4Ur/4WS+9tJfzmH0xeiXpCxgWpFIMMDRcMKYjhl9oOOKyDGV+gfwNHEVMZ5/P09TvJjFBbAmSE9n+Qn6cskd87wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACg4QExca",
"hash": "e6dab29070b8a57506ead833ae1b6951148cb6da350cf6ed2b675c2352ba2059"
}
]
},
"backdated": {
"version": "aere-agent-ledger/2 (2026-09-29)",
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"publicKeyPem": "-----BE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uRv80e76dLCFwaVRH716rjnGR3+493aWo/eq2x5QhGPz+pbiX8zQ2us6m6\nWkaSU6x35kCMkPAic8Tti/WX0trTbEPU3HVjm136NxRuA8y2D96ZtB7Co6A6yXrl\nlXly91dPCqR5qP0XRreK8pAFwtlIVBvFUJpxa1yoo/rgXm/tiUQIgu98Y79NRI3N\n+nM5LrQf1JFHJA6ZdqDJW6W/oGPnbIDudnM67MBwieZWd242qd6hN5crreTBhEz5\nOOFhjA00OyP+JlAFtoCKe+SIr7sDOjXuIAIUPP4ngqMKcn+KboPxxAx1ANz7t4Ys\nPV7N/E99PPVWh97zJaQlMpWmEgbwouDluTXylV6izonHeePEfiFE7oZE6zvhWOQm\nbHPL+DUoxx+I6b5i4vf7Fb/2Dvj8G3aL68b0lLlZO7WjSFDefjkeMyOfAvgQ/mSw\nhd9JsRj3wTP2rqDfr+x6I33tFBh3AiIHKSHk7we10C7oIDDqifY7yrHEo4j77bbW\ndQc2DoqIg3MvDl3uV8t6gdLD4lYcyJ8Ukj3kDTv7PD7ThoxahijrbEtpjbGq2Xsp\nk/orF/12\n-----END PUBLIC KEY-----\n",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"entries": [
{
"seq": 0,
"prev": "0000000000000000000000000000000000000000000000000000000000000000",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792387118,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792387118
},
"decision": {
"allowed": true,
"reason": "under the limit"
},
"provenance": null,
"seq": 0
},
"signature": "X2jLRNTVdAQKqd9+3gKrU2qO7LeY66kQwTp249Npaq2/WKxnf7k0h8pUpLNeLHNe7Xlfd6djEgJs4jwDgLAWr+cNTYDYEpXSaMpOc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": "932ce0bd9da3549bfb83473da0ef076104efa0e6a592fe452a1adfb0a0570f7e"
},
{
"seq": 1,
"prev": "932ce0bd9da3549bfb83473da0ef076104efa0e6a592fe452a1adfb0a0570f7e",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792387123,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792387123
},
"decision": {
"allowed": true,
"reason": "under the limit"
},
"provenance": null,
"seq": 1
},
"signature": "yXzPjTeOrpBDTbuMRYAjSYsS/bHRoKJH9nPga98bppJI3fTLf+wSZ3vx4n4hjjtrNks2qZaqPmiGupocTyDeCwUmmxvQ13AtG1no8tjGKhtcLLmT4TWTgiReEtmadpTmqWvh228RqUXHRmSTg+wzqGnNplf/euIE2jEDsFMzj89DYyrxh59zAyWJfTM53gw+q5CJwVENaVX6uCCbhibsMdI/YrKLMDakJIB9F0ppqXfS9e6Li/p3zhGghp3w+wtJhEeTz1/y0hsYEhzH8/oXVrAoMThGMNlBM6UD8CA2T6SmeMJNAkogQ8P21JGim847VwGJdO9xOg2LPnW9/mJ/sGRro1uN0SukcNH8xsWI+crhki/I/Vq6YJIk1kjFhg0xr7cNvKqkDz8aXXIGIH+kxnw1cbBpSAgA6ApC7+ISXRasZSM9rybuFjKmcY6HuMkmjoVWWM/d2a8BUrXzj6fOLDf8X00rPXaK4GXU3tpWUm/7CBR3u3GOR9/vrYp+l43tFmpvechF9vDI8xoY4UenB/rbm1W/eQ6m3YxAgGw6pUIlDM850VUeSN1Sn7kUXv209DNI4GYbnuaFTdXj5cpuhmTZnnllFMxgtQXsw2oth5X2Hum6tub3sKSCK9+wZSfJNq9toU2KaZTxHGLql28d/H40+VZByKPb7HACNNGKkL/8Ar79lUxa1bdkHl54k0gEZ44w+imfelMc9IAMPDFlgJ1fqXZ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8rXKTlDqLyEoXZ2wLHiBxB0pPHOFH+AG9rZR2ag0T0kCo6d1+B2IpWGTEuZV8uOwM0sGeCLNgv5K2WbTMquAptJkGIPSV1zZMXxTeMIQbEthgKjy7AYXienuvDUMPIJO/SCU5zqW2cbdr8s78tokTvtvuAuwlnnUehdTNDqilk7E/uJyFiZqABbLLrWSqRElMoX/UKO4ELXEVwg769S+FZHX871K9f6kjJqiL34WB69S0Va/H0Rov7uvFxU5SrpOdSXLY4nH+AqsudQOF6eIwQzKHxIHOqiew50voE+I5bPnPxEf7ZbWN9mCU2dQfD5wxVkKmnmjlAWRzp7OBMQIM9Ab8WhVna69Rxhv9rX+1lgHeerLbSEn3cN/5MHHBIdoY9PnN6fs3W3m0WLj1xnKHB0DNpvb7P3ipbX566xskAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwsMFBoh",
"hash": "6032a854c357ad3f1aeacb7419bf3c3f0c29bc34b84024bd18a12c54c7300f99"
},
{
"seq": 2,
"prev": "6032a854c357ad3f1aeacb7419bf3c3f0c29bc34b84024bd18a12c54c7300f99",
"body": {
"v": 2,
"agentId": "aere-agent:fc3651d19506cc9b91d84ac9e4cae2f6673af0df",
"policyHash": "0x835511d0a8a352fe7cc116833d444ea8497326a5332be0553475aa40289afe3b",
"session": "86f9d221fce6611824990720800c7d36",
"at": 1792387418,
"action": {
"kind": "payment",
"to": "0xbbbb",
"amount": "10",
"at": 1792387418
},
"decision": {
"allowed": true,
"reason": "under the limit"
},
"provenance": null,
"seq": 2
},
"signature": "VyksabkVmiwuydvZB5/KnAcJr7CFCLZKnNYbNFJvUX1ho9G9TJqr+uIha5Y6WP0kSqRBGSjNu4Ei4OfG9OCWd12iEg4UEPJ3oIy+333BeR2/ul/U9xGaHapDIro1cx3VxCIm+N2uZf0bUrWYKkoqdXjTvCQ96zp3+HuWGZl8BRjirLlkFo1e/HPY8HvlaNBWv0GmItQG9DsykC5mMXMW+outir5KKYGN44MTrfeDW091RfOcujGBKhNONswljpmPa2x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K4o8v1e/tvT9qFNMrD0eeJgceKPEPiKvnUfYyRMISVXvalBT12bdJDhSfNwCCWe0M9b/iy6q6rHQucp9MyxrhVL9kJcQGMiDomBoXd2blYXEekry6FlAeHyMoMd87/0HSjmPKCMBpdlWyU1gmEGAK4GYLcVYXd8nHoP9JGBlfrN8AB4NpBqFpsyFh8JrQD9I3yrBKemhPQE65VD2mLFxSxwaq/rcUvg0xL/R63nb9fLiUVR+2D2xlev9daJPnwLdO8i/HJUkVYnGVQpPBkXZqHGfCeWXIcG3iL4JyVocEAY2NcKUNnl+h5OPJMRduGO9gpZ/flWTX6g5SXrxTmkzq9HeFd7jtctkMhBaq86nwUmQuZyIa5s06zmQ3BHOAsXNvPzlLlltIGu4OcAPtGMaGIBkPblOdkTYXHA7O8uA2F2nsVdYmD/gVpj2kZwP/X/3Xo+Asuw3C/C6yQmh9vAg+6JOXYWjh7Q9iV6EUk7u7KmtXxUEBs3b8bTYHHzB8AiUuPsa2o9C+QF81TpLJKK5en03AIFyWXyOgpZoVmixlPsaIpDNCUgFdByzippT9iGMcGFalK31gY9jc1jE0ScmJPjecY/qiwK9X+7pdXe3/VvflQ2LKqHAroiKXBy+LTDW9n+hWYVO2Ls5g2EHWfyHbF0MFnA2waxYopNMCNeZWEDqgb15eu1VcjDxvbgw70lL7xcnK2HN5NHJH4Qu3Z5s62SkTAQuPSw7arG2lgBPFdm0ksC2JX6sz7oFLKiZ7uvX0vlMG5enmeq5CBMBLSuPWACAHhTqlFrdmmV2+Mw16qDN/A62EZ5U0SpSjOnQsxQ8fnB217k7XVEyNakKjV+BZdZGqHkhlwgJPz9ly50AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAoRFx0g",
"hash": "8720911f2ada1371c8795d5275583ebcef46408260c8943445e1b5e275bd5db4"
}
]
},
"verdicts": {
"honestWithReceipt": 0,
"backdatedWithReceipt": 1
}
}
+245
View File
@@ -0,0 +1,245 @@
#!/usr/bin/env node
// martor-agenti-serviciu.mjs: SERVICIUL martorului gazduit al agentilor (B3, 2026-10-19), sandbox catre testnetul 28001. Un proces pe loopback
// (Node 24: ML-DSA-65 din node:crypto), in spatele gateway-ului Aere Cloud (/v1/agents/witness, cum serveste adunatorul scutului /v1/shield/*):
// POST /v1/agents/witness un cap de registru semnat de agent (martor-agenti.mjs cerereMartor); 202 primit, cu
// promisiunea semnata de martor; 200 deja vazut; 409 echivocare (dovada intoarsa, si
// pastrata: una pe agent si politica), cap vechi, sau cap care nu continua ultimul; 4xx
// refuz numit; 429 ritm; 503 bugetul jurnalului pe ora (log_busy, cu Retry-After)
// GET /v1/agents/witness/0x<id> starea capului: pending | checkpointed | notarized, cu chitanta (plicul AIP-23)
// GET /v1/agents/witness/aere-agent:<40 hex>/heads?session=<32 hex>[&from=<seq>][&limit<=100] o pagina a capetelor unei sesiuni, cu
// pagina SEMNATA de martor (`signedPage`, cu momentul ei), singura pe care o crede verificatorul
// GET /v1/agents/witness/aere-agent:<40 hex>/heads[?after=<session>] sesiunile agentului (cel mult 100)
// GET /v1/agents/witness/equivocation/0x<id> o dovada de echivocare pastrata
// GET /v1/agents/witness/checkpoint[?shard=<k>][&from=<size>] ultimul cap de jurnal al ciobului curent (sau al ciobului pastrat `k`, si al
// unuia inghetat: cel final) si cel notarizat, cu dovada de consistenta in acel ciob de la `from`
// GET /v1/agents/witness/health starea martorului si a limitatoarelor (chei tinute, scoase la plafon)
// La fiecare `--interval` minute: un cap de jurnal nou daca au venit capete, si notarizarea capetelor de jurnal nenotarizate (ultimul al fiecarui
// ciob pastrat) pe AereNotary 28001, cu o cheie de PROBA a testnetului (nascuta in starea serviciului daca lipseste, alimentata din robinet daca
// e dat). Orice alt lant decat 28001 e refuzat inainte de cheie: mainnet-ul cere tranzactiile fondatorului ("sandbox: 28001; mainnet: at activation").
// Ce tine jurnalul de cereri: momentul, ruta (fara id-uri) si statusul; o eroare interna merge INTREAGA numai aici, raspunsul public poarta un cod
// (revizia B3, constatarea 18). Limitele de ritm stau in memorie, cu cheile sarate pe proces, fiecare cu un plafon de chei.
//
// node martor-agenti-serviciu.mjs --stare <dir> [--port 8802] [--interval 10] [--rpc https://testnet-rpc.aere.network] [--cheie <f>]
// [--robinet <robinet.mjs>] [--log aere-agent-witness/28001] [--merge-max 1800] [--fara-lant] [--o-data]
// --fara-lant laborator: capete de jurnal construite si semnate, nicio notarizare (chitantele raman `checkpointed`)
// --o-data un singur tur (cap de jurnal + notarizare), apoi iesire: 0 notarizat sau nimic de facut, 2 notarizarea n-a reusit
import fs from 'node:fs';
import net from 'node:net';
import path from 'node:path';
import http from 'node:http';
import crypto from 'node:crypto';
import { fileURLToPath, pathToFileURL } from 'node:url';
import { deschideMartor, CERERE_MAX_OCTETI, SANDBOX, LANT, CHECKPOINT_KIND, PLAFON_FRUNZE, PAGINA_MAX } from './martor-agenti.mjs';
import { notarizeEnvelope, cheiaDinFisier, NOTARI } from './agent-ancora.mjs';
const AICI = path.dirname(fileURLToPath(import.meta.url));
export const PORT_IMPLICIT = 8802;
export const RPC_28001 = 'https://testnet-rpc.aere.network';
// limitele, pe fereastra de 10 minute: un agent cinstit trimite un cap la cateva minute; GET-urile sunt ieftine dar nu nelimitate. Bugetul
// jurnalului (capete NOI primite pe ora, de la toti) e DERIVAT din plafonul ciobului: PLAFON_FRUNZE / 24 pe ora, deci un ciob nu se umple in mai
// putin de o zi, iar un cap al lui se serveste cel putin o zi dupa ce ciobul e inghetat (martorul tine ciobul curent si pe cel de dinainte).
export const LIMITE = { postPeClient: { cereri: 60, ms: 600_000 }, postPeAgent: { cereri: 30, ms: 600_000 }, getPeClient: { cereri: 1200, ms: 600_000 },
acceptatePeOra: { cereri: Math.floor(PLAFON_FRUNZE / 24), ms: 3_600_000 } };
// plafonul de chei al unui limitator, DERIVAT din masuratoare (2026-10-19, README "Bounds"): 198 de octeti pe cheie (100.000 de chei = 19,8 MB pe
// limitator, deci ~60 MB pentru cele trei). La plafon (dupa curatarea cheilor expirate) se scoate cheia cu fereastra cea mai VECHE si clientul nou
// intra (revizia B3 a doua, R2-03): prima reparatie limita aici orice client NOU, deci cine umplea 100.000 de chei (de pe /64-uri reale) tinea
// afara pe toti clientii noi cat le reimprospata. Un client scos asa primeste doar o fereastra noua; un atacator care are deja 100.000 de chei are
// deja 100.000 de cote. Memoria nu creste cu adresele (pana la prima reparatie: 293 de octeti pe adresa, pe viata procesului, si niciun plafon).
export const LIMITATOR_MAX_CHEI = 100_000;
const taie = (s) => String(s ?? '').replace(/(0x)?[0-9a-fA-F]{40,}/g, '<hex>').slice(0, 300);
/**
* Cheia unui client pentru limite (revizia B3, constatarea 13): o adresa IPv6 pe prefixul ei /64 (un client IPv6 primeste de obicei un /64 intreg,
* deci pe adresa intreaga ar fi avut 2^64 de chei), o adresa IPv4 mapata in IPv6 ca IPv4, o adresa IPv4 intreaga; orice altceva (o proba) ca atare.
*/
export function cheieClient(a) {
let s = String(a ?? '').trim().toLowerCase();
if (s.startsWith('[') && s.includes(']')) s = s.slice(1, s.indexOf(']'));
const pct = s.indexOf('%'); if (pct >= 0) s = s.slice(0, pct);
const m4 = /^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/.exec(s); if (m4 && net.isIPv4(m4[1])) return m4[1];
if (net.isIPv4(s)) return s;
if (net.isIPv6(s)) {
let [cap, coada = ''] = s.split('::'); const g = (t) => (t ? t.split(':') : []);
let a1 = g(cap), a2 = g(coada);
const v4 = (l) => { const u = l[l.length - 1]; if (u && u.includes('.')) { const o = u.split('.').map(Number); l.splice(-1, 1, ((o[0] << 8) | o[1]).toString(16), ((o[2] << 8) | o[3]).toString(16)); } };
if (s.includes('::')) v4(a2); else v4(a1);
const tot = s.includes('::') ? [...a1, ...Array(Math.max(0, 8 - a1.length - a2.length)).fill('0'), ...a2] : a1;
return tot.slice(0, 4).map((x) => (parseInt(x, 16) || 0).toString(16)).join(':') + '::/64';
}
return 'altul:' + s.slice(0, 64);
}
/**
* Un limitator pe fereastra fixa (de la prima cerere a cheii), cu cheile sarate pe proces (nicio adresa sau id nu se tine in clar), cu cheile
* expirate CURATATE (la 1024 de apeluri, si cand plafonul e atins, dar cel mult o data pe secunda) si cu un PLAFON de chei: pana la reparatie
* nicio cheie nu se stergea si fiecare adresa noua lasa ~293 de octeti pe viata procesului (revizia B3, constatarea 13). La plafon se scoate cheia
* cu fereastra cea mai veche (harta e in ordinea inceputului ferestrei: o fereastra noua se muta la coada), numarata (`scoase`), in loc sa fie
* limitat clientul nou (revizia B3 a doua, R2-03). `ar(cheie)`: ar fi limitata cheia acum? fara sa consume nimic (bugetul jurnalului, R2-13).
*/
export function limitator({ cereri, ms }, { maxChei = LIMITATOR_MAX_CHEI, ceas = Date.now } = {}) {
const sare = crypto.randomBytes(16); const m = new Map(); let apeluri = 0, ultimaCuratare = 0, scoase = 0;
const cheieDe = (cheie) => crypto.createHash('sha256').update(sare).update(String(cheie)).digest('base64url').slice(0, 16);
const curata = (acum) => { ultimaCuratare = acum; for (const [k, v] of m) if (acum - v[0] >= ms) m.delete(k); };
const f = (cheie) => {
const k = cheieDe(cheie);
const acum = ceas();
if (++apeluri % 1024 === 0) curata(acum);
let v = m.get(k);
if (v && acum - v[0] >= ms) { m.delete(k); v[0] = acum; v[1] = 0; m.set(k, v); }
if (!v) {
if (m.size >= maxChei && acum - ultimaCuratare >= 1000) curata(acum);
if (!(m.size < maxChei /*PAZA-MARTOR:ritm-plafon*/)) { m.delete(m.keys().next().value); scoase++; }
v = [acum, 0]; m.set(k, v);
}
if (v[1] >= cereri) return true;
v[1]++; return false;
};
f.ar = (cheie) => { const v = m.get(cheieDe(cheie)); return !!v && ceas() - v[0] < ms && v[1] >= cereri; };
// cat mai are de asteptat cheia pana i se deschide o fereastra noua (ms; 0 daca nu e limitata), pentru Retry-After (revizia B3 a cincea, R5-06)
f.ramasMs = (cheie) => { const v = m.get(cheieDe(cheie)); return v && v[1] >= cereri ? Math.max(0, ms - (ceas() - v[0])) : 0; };
f.marime = () => m.size;
f.scoase = () => scoase;
return f;
}
const loopback = (a) => /^(127\.|::1$|::ffff:127\.)/.test(String(a || ''));
/** Serverul HTTP peste starea deschisa `m` (deschideMartor). Clientul real e X-Real-IP numai cand cererea vine de pe loopback (gateway-ul il pune). */
export function porneste(m, { port = 0, limite = LIMITE, jurnal = () => {}, maxChei = LIMITATOR_MAX_CHEI } = {}) {
const peClient = limitator(limite.postPeClient, { maxChei }), peAgent = limitator(limite.postPeAgent, { maxChei }), citiri = limitator(limite.getPeClient, { maxChei });
const acceptate = limite.acceptatePeOra ? limitator(limite.acceptatePeOra, { maxChei: 1 }) : null;
// bugetul jurnalului: martorul il CITESTE intai (`ar`, fara sa consume) si il consuma abia dupa cota agentului (R2-13)
const limitaGlobala = acceptate ? Object.assign(() => acceptate('jurnal'), { ar: () => acceptate.ar('jurnal') /*PAZA-MARTOR:buget-citit*/ }) : null;
// starea limitatoarelor, in /health: cate chei tin si cate au scos la plafon (o inundatie din multe adrese se vede, nu se ghiceste)
const stareLimite = () => Object.fromEntries([['postPerClient', peClient], ['postPerAgent', peAgent], ['getPerClient', citiri]].map(([n, l]) => [n, { keys: l.marime(), maxKeys: maxChei, droppedAtCap: l.scoase() }]));
const raspunde = (req, res, cod, obiect, antete = {}) => {
const text = Buffer.from(JSON.stringify(obiect));
res.writeHead(cod, { 'content-type': 'application/json; charset=utf-8', 'content-length': text.length, 'cache-control': 'no-store', 'x-content-type-options': 'nosniff', ...antete });
res.end(text);
jurnal(`${req.method} ${String(req.url).replace(/0x[0-9a-fA-F]{64}/g, '0x..').replace(/aere-agent:[0-9a-f]{40}/g, 'aere-agent:..').replace(/\?.*$/, '').slice(0, 60)} ${cod}`);
};
// o eroare interna: INTREAGA numai in jurnalul local; public un cod (fara cai, fara numele starii)
const interna = (req, res, e) => { jurnal(`internal error on ${req.method} ${String(req.url).replace(/\?.*$/, '').slice(0, 60)}: ${taie(e && (e.stack || e.message))}`); if (!res.headersSent) raspunde(req, res, 500, { error: 'witness_error', code: e && /^E[A-Z]+$/.test(String(e.code)) ? 'io_error' : 'internal', sandbox: SANDBOX }); };
const RUTE = ['POST /v1/agents/witness', 'GET /v1/agents/witness/0x<head id>', 'GET /v1/agents/witness/aere-agent:<40 hex>/heads[?session=<32 hex>&from=<seq>&limit=<1..100>][?after=<session>]', 'GET /v1/agents/witness/equivocation/0x<id>', 'GET /v1/agents/witness/checkpoint[?shard=<k>][&from=<size>]', 'GET /v1/agents/witness/health'];
const intreg = (s, d) => (s === null ? d : /^\d{1,15}$/.test(s) ? Number(s) : NaN);
const handler = (req, res) => {
try {
const url = new URL(req.url, 'http://x'); const cale = url.pathname;
const client = cheieClient(loopback(req.socket.remoteAddress) && req.headers['x-real-ip'] ? String(req.headers['x-real-ip']) : String(req.socket.remoteAddress || ''));
if (req.method === 'POST' && cale === '/v1/agents/witness') {
if (peClient(client) /*PAZA-MARTOR:ritm*/) return raspunde(req, res, 429, { error: 'rate_limited', hint: `${limite.postPeClient.cereri} heads per ${limite.postPeClient.ms / 60000} minutes per client`, sandbox: SANDBOX });
const ct = String(req.headers['content-type'] || '').split(';')[0].trim().toLowerCase();
const parti = []; let n = 0, prea = false;
req.on('data', (d) => { n += d.length; if (n > CERERE_MAX_OCTETI) { if (!prea) { prea = true; raspunde(req, res, 413, { error: 'body_too_large', max: CERERE_MAX_OCTETI, hint: 'a signed head is about 8 KB; the witness never takes the ledger', sandbox: SANDBOX }); req.destroy(); } } else parti.push(d); });
req.on('end', () => {
if (prea) return;
try {
if (ct !== 'application/json') return raspunde(req, res, 415, { error: 'bad_content_type', hint: 'application/json: the signed head (martor-agenti.mjs request)', sandbox: SANDBOX });
let env; try { env = JSON.parse(Buffer.concat(parti).toString('utf8')); } catch { return raspunde(req, res, 400, { error: 'bad_json', sandbox: SANDBOX }); }
const r = m.primeste(env, { limitaAgent: peAgent, limitaGlobala });
return raspunde(req, res, r.cod, r.corp, r.corp && r.corp.retryAfterS ? { 'retry-after': String(r.corp.retryAfterS) } : {});
} catch (e) { return interna(req, res, e); }
});
req.on('error', () => {});
return;
}
if (req.method !== 'GET') return raspunde(req, res, 405, { error: 'method_not_allowed', routes: RUTE, sandbox: SANDBOX });
// o citire peste limita spune si cand se poate reincerca (Retry-After, secundele pana la fereastra noua a clientului): verificatorul aduce
// cate o chitanta pe cap tinut si asteapta cat spune antetul (revizia B3 a cincea, R5-06)
if (citiri(client)) { const ra = Math.max(1, Math.ceil(citiri.ramasMs(client) / 1000)); return raspunde(req, res, 429, { error: 'rate_limited', retryAfterS: ra, sandbox: SANDBOX }, { 'retry-after': String(ra) } /*PAZA-MARTOR:get-retry-after*/); }
if (cale === '/v1/agents/witness/health') return raspunde(req, res, 200, { ...m.sanatate(), limiters: stareLimite() });
if (cale === '/v1/agents/witness/checkpoint') {
const sh = url.searchParams.get('shard'); if (sh !== null && !/^\d{1,9}$/.test(sh)) return raspunde(req, res, 400, { error: 'bad_shard', sandbox: SANDBOX });
const r = m.capulJurnalului(url.searchParams.get('from'), sh === null ? null : Number(sh)); return raspunde(req, res, r.cod, r.corp);
}
const me = /^\/v1\/agents\/witness\/equivocation\/(0x[0-9a-fA-F]{64})$/.exec(cale);
if (me) { const r = m.dovadaEchivocarii(me[1]); return raspunde(req, res, r.cod, r.corp); }
const mi = /^\/v1\/agents\/witness\/(0x[0-9a-fA-F]{64})$/.exec(cale);
if (mi) { const r = m.stareaCapului(mi[1]); return raspunde(req, res, r.cod, r.corp); }
const ma = /^\/v1\/agents\/witness\/(aere-agent:[0-9a-f]{40})\/heads$/.exec(cale);
if (ma) {
const s = url.searchParams.get('session'), after = url.searchParams.get('after');
const from = intreg(url.searchParams.get('from'), 0), limit = intreg(url.searchParams.get('limit'), PAGINA_MAX);
if (s !== null && !/^[0-9a-f]{32}$/.test(s)) return raspunde(req, res, 400, { error: 'bad_session', sandbox: SANDBOX });
if (after !== null && !/^[0-9a-f]{32}$/.test(after)) return raspunde(req, res, 400, { error: 'bad_after', sandbox: SANDBOX });
if (!(Number.isSafeInteger(from) && from >= 0 && Number.isSafeInteger(limit) && limit >= 1 && limit <= PAGINA_MAX)) return raspunde(req, res, 400, { error: 'bad_page', hint: `from >= 0, 1 <= limit <= ${PAGINA_MAX}`, sandbox: SANDBOX });
return raspunde(req, res, 200, m.capeteAgent(ma[1], s, { from, limit, after }));
}
return raspunde(req, res, 404, { error: 'not_found', routes: RUTE, sandbox: SANDBOX });
} catch (e) { return interna(req, res, e); }
};
const server = http.createServer(handler);
return new Promise((ok) => server.listen(port, '127.0.0.1', () => ok({ server, port: server.address().port, close: () => new Promise((g) => server.close(() => g())) })));
}
/**
* Notarizatorul real: capul de jurnal pe AereNotary, NUMAI pe testnetul 28001 (lantul citit de la RPC, refuzat altfel inainte de cheie), cu o
* cheie de proba din fisier (nascuta acolo, 0600, daca lipseste; niciodata tiparita), alimentata din robinetul testnetului cand soldul nu
* ajunge si cand `robinet` numeste clientul lui (tools/aere-quantum-shield/robinet.mjs; fara el, `unfunded`, spus). Intoarce {ok, notarization}
* sau {ok: false, cod, motiv}: `cod` e cel public (unfunded, chain_refused, ...), `motiv` merge numai in jurnalul local.
*/
export function notarizatorReal({ rpc = RPC_28001, cheieFisier, robinet = null, ethers = null }) {
return async (env) => {
let E = ethers;
if (!E) { try { const { incarcaEthers } = await import(pathToFileURL(path.join(AICI, 'x402', 'wallet.mjs')).href); E = incarcaEthers(); } catch (e) { return { ok: false, cod: 'ethers_missing', motiv: 'ethers is not here: ' + taie(e.message) }; } }
try {
const provider = new E.JsonRpcProvider(rpc);
const chainId = Number((await provider.getNetwork()).chainId);
if (!(chainId === LANT /*PAZA-MARTOR:sandbox*/)) return { ok: false, cod: 'chain_refused', motiv: `REFUSED: this RPC serves chain ${chainId}; the agents witness notarizes on the public testnet ${LANT} only (mainnet at activation, with the founder's transactions)` };
if (!fs.existsSync(cheieFisier)) {
const w = E.Wallet.createRandom();
fs.mkdirSync(path.dirname(cheieFisier), { recursive: true });
fs.writeFileSync(cheieFisier, `# AERE-SINTETIC: test key of the agents witness for testnet ${LANT}, made ${new Date().toISOString()}; funds only from the faucet\nd=${w.privateKey.slice(2)}\n`, { mode: 0o600, flag: 'wx' });
}
const wallet = new E.Wallet(cheiaDinFisier(cheieFisier), provider);
const min = E.parseEther('0.01');
if ((await provider.getBalance(wallet.address)) < min) {
if (!robinet) return { ok: false, cod: 'unfunded', motiv: 'unfunded: the test key has no testnet balance and no faucet client was given (--robinet)' };
const { cereRobinet } = await import(pathToFileURL(path.resolve(robinet)).href);
const c = await cereRobinet(wallet.address);
if (!c.ok) return { ok: false, cod: 'unfunded', motiv: 'unfunded: the faucet refused: ' + taie(JSON.stringify(c.claim || c.motiv)) };
let sold = 0n; for (let i = 0; i < 40 && sold < min; i++) { await new Promise((g) => setTimeout(g, 1500)); sold = await provider.getBalance(wallet.address); }
if (sold < min) return { ok: false, cod: 'unfunded', motiv: 'unfunded: the faucet transaction did not land in 60 s' };
}
const r = await notarizeEnvelope({ envelope: env, kind: CHECKPOINT_KIND, rpc, keyFile: cheieFisier, ethers: E, notary: NOTARI[LANT], confirmMainnet: false });
return r.ok ? { ok: true, notarization: { ...r.envelope.notarization, submitter: wallet.address } } : { ok: false, cod: 'notarization_failed', motiv: taie(r.motiv) };
} catch (e) { return { ok: false, cod: 'notarization_failed', motiv: 'the notarization failed: ' + taie(e.shortMessage || e.message) }; }
};
}
/** Un tur: un cap de jurnal nou (daca au venit capete), apoi notarizarea fiecarui cap de jurnal nenotarizat (cel final al unui ciob inghetat intai). */
export async function tur(m, { notarizeaza = null } = {}) {
const nou = m.construiestePunct();
const deFacut = m.deNotarizate();
if (!deFacut.length) return { built: nou ? nou.n : null, notarized: null, note: nou ? 'built' : 'nothing new' };
if (!notarizeaza) return { built: nou ? nou.n : null, notarized: null, note: 'laboratory: no notarization' };
let ultim = null;
for (const p of deFacut) {
const r = await notarizeaza(m.plicPunct(p));
m.inregistreazaNotarizarea(p, r);
if (!r.ok) return { built: nou ? nou.n : null, notarized: ultim ? ultim.n : null, shard: p.k, firstSeen: null, error: r.motiv, code: r.cod || 'notarization_failed' };
ultim = { n: p.n, k: p.k, firstSeen: r.notarization.firstSeen };
}
return { built: nou ? nou.n : null, notarized: ultim.n, shard: ultim.k, firstSeen: ultim.firstSeen, error: null };
}
// ------------------------------------------------------------------------------------------------ CLI
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) await main();
async function main() {
const arg = (n, d) => { const i = process.argv.indexOf(n); return i > 0 ? process.argv[i + 1] : d; };
const stare = arg('--stare', null);
if (!stare) { console.error('usage: martor-agenti-serviciu.mjs --stare <dir> [--port 8802] [--interval 10] [--rpc url] [--cheie f] [--robinet robinet.mjs] [--log name] [--merge-max s] [--fara-lant] [--o-data]'); process.exitCode = 2; return; }
const scrieJurnal = (l) => console.log(new Date().toISOString() + ' ' + l);
let m;
const faraLant = process.argv.includes('--fara-lant');
// laboratorul (--fara-lant) nu notarizeaza nimic: rotirea nu asteapta notarizarea capului de jurnal final al ciobului scos (R2-07)
try { m = deschideMartor(stare, { log: arg('--log', undefined), maxMergeDelay: arg('--merge-max', null) != null ? Number(arg('--merge-max')) : undefined, jurnal: scrieJurnal, faraLant }); }
catch (e) { console.error('cannot open the state: ' + taie(e.message)); process.exitCode = 2; return; }
const notarizeaza = faraLant ? null : notarizatorReal({ rpc: arg('--rpc', RPC_28001), cheieFisier: arg('--cheie', path.join(stare, 'cheie-de-proba-28001.key')), robinet: arg('--robinet', null) });
const t = async () => { try { const r = await tur(m, { notarizeaza }); console.log(new Date().toISOString() + ' round: ' + JSON.stringify(r).slice(0, 300)); return r; } catch (e) { console.log(new Date().toISOString() + ' round UNMEASURED: ' + taie(e.message)); return { error: e.message }; } };
if (process.argv.includes('--o-data')) { const r = await t(); m.inchide(); process.exitCode = r.error ? 2 : 0; return; }
const srv = await porneste(m, { port: Number(arg('--port', PORT_IMPLICIT)), jurnal: scrieJurnal });
console.log(`agents witness ${m.witnessId} on 127.0.0.1:${srv.port} (log ${m.log}, state ${stare}, ${faraLant ? 'laboratory: no chain' : 'notarizing on chain ' + LANT}); ${SANDBOX}`);
const opreste = () => { m.inchide(); srv.close().then(() => process.exit(0)); };
process.on('SIGTERM', opreste); process.on('SIGINT', opreste);
await t(); setInterval(t, Number(arg('--interval', 10)) * 60_000);
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff