payments: the public reader of a receipt now exits 2 and says PARTIAL when it did not verify the notarization (no --verify-proof, the reference verifier answering PARTIAL or PENDING, a chain that does not answer), as POST /v1/payments/verify answers; the receiptFile of /v1/payments/receipt carries the policy and the inputs it needs; new probe proba-verifica-chitanta.mjs (14 rows, no chain); README rule names as the module returns them
This commit is contained in:
1 parent
fcece14a12
commit
687e5e54a4
5 files changed
+167
-21
No files matched your search
+14
-3
@@ -27,16 +27,27 @@ node proba-risc.mjs # 23 rows, no chain: the verdicts unde
|
||||
node proba-risc.mjs --control-negativ # 10 plantings on copies of risc.mjs and chitanta.mjs; each forged fixture must then be accepted
|
||||
AERE_TESTNET_KEY_FILE=<key> AERE_ETHERS_DIR=<dir with node_modules/ethers> node proba-plata-28001.mjs # the flow on testnet 28001
|
||||
node verifica-chitanta.mjs dovezi/chitanta-28001-<date>.json --rpc https://testnet-rpc.aere.network --verify-proof <verify-proof.mjs>
|
||||
node proba-verifica-chitanta.mjs # 14 rows, no chain: the public reader against a local RPC stub and a stub of the reference
|
||||
# verifier, each exit code and verdict word as POST /v1/payments/verify gives them
|
||||
```
|
||||
|
||||
Measured on 2026-10-02 on testnet 28001 (9/9): a person's payment of 0.4 tAERE at a declared 0.5 USD/tAERE = 0.20 USD allowed, paid
|
||||
by a plain transfer the payer signed, its receipt issued, notarized by the payee and read back with finality PASSED under a
|
||||
post-quantum certified anchor; a payment of 1.50 USD refused above the per-payment limit with no transaction sent; the fourth payment
|
||||
in the window refused above the count; the receipt forged (amount changed) INVALID; a looser policy shown under the receipt's policy
|
||||
hash INVALID. The public reader (`verifica-chitanta.mjs`) needs only Node.js: the chain is read by plain JSON-RPC.
|
||||
hash INVALID. The public reader (`verifica-chitanta.mjs`) needs only Node.js: the chain is read by plain JSON-RPC. Its file is the
|
||||
receipt with the policy and the inputs the issuer judged (the `receiptFile` of the Payments API's receipt route), and its verdicts are
|
||||
those of POST /v1/payments/verify: exit 0 `VALID` only when the transaction is compared on chain and the reference verifier finds the
|
||||
notarization under a post-quantum certified anchor (finality `PASSED`), 1 `INVALID` with the reasons, 2 `PARTIAL` when something was
|
||||
not measured (no `--rpc`, no chain answer, an RPC of another chain, no `--verify-proof`, the policy or the inputs missing, finality
|
||||
`PENDING` or `UNMEASURED`). Corrected 2026-10-27: until this date it wrote `VALID` and exited 0 without `--verify-proof` and while
|
||||
the notarization was pending, and it called a file without the policy and the inputs `INVALID`.
|
||||
|
||||
Every refusal names its rule: `rules` on a risk verdict (form, asset, counterparty, rate, limit, window; outside the hashed body, so
|
||||
the hash of a verdict already issued is unchanged), `reguli` on a receipt verdict (binding, amount, policy, risk, chain). The rate is a
|
||||
Every refusal names its rule, in the module's working language: `rules` on a risk verdict (`forma`, `activ`, `contrapartida`,
|
||||
`curs`, `limita`, `fereastra`, that is form, asset, counterparty, rate, limit and window; outside the hashed body, so the hash of a
|
||||
verdict already issued is unchanged), `reguli` on a receipt verdict (`legatura`, `suma`, `politica`, `risc`, `lant`, that is binding,
|
||||
amount, policy, risk and chain). The Payments API of Aere Cloud returns the risk rules under their English names since 2026-10-27,
|
||||
translated at its boundary. (Corrected 2026-10-27: this paragraph gave the English names as the ones the module returns.) The rate is a
|
||||
decimal string (a JSON number is refused, not rounded), and a history entry the engine cannot count is refused, not left out of the
|
||||
window. The conformance suite (`conformance/`) holds a vector for each of these rules and runs any implementation against them.
|
||||
|
||||
|
||||
Reference in new issue
Block a user