Dated corrections (2026-10-27): formal-consensus/RULEAZA-TOT.md translated into English and dated (it stated, without a date, facts of the chain of August 2026); the models print the chain facts of their time with the date, or the facts of today (labels and printed strings only, the logic and the verdicts unchanged: 37 of 37 models pass); README: 37 models counted on 2026-10-27 and the reproduction pointer to aere-docs REPRODUCE.md section 3b
This commit is contained in:
1 parent
9b2a69ab6b
commit
6d24576357
8 files changed
+149
-133
No files matched your search
@@ -1,83 +1,85 @@
|
||||
# RULEAZA-TOT: verificarea formala a consensului AERE, un capat la altul
|
||||
# RULEAZA-TOT: the formal verification of AERE consensus, end to end
|
||||
|
||||
Rularea completa a tot ce se poate verifica automat pe consensul AERE (QBFT / IBFT 2.0,
|
||||
chain 2800), cu doua metode independente:
|
||||
*Translated into English and dated on 2026-10-27. Until that date this document was in Romanian and stated, without a date,
|
||||
facts that were true only of the chain of August 2026 (a set of nine validators, an anchor minimum of three); the
|
||||
corrections are marked below, and the results it records keep the date they were measured on.*
|
||||
|
||||
- **SMT (z3)** parametric, in acest dosar (`formal-consensus/*_smt.py`): dovedeste fiecare
|
||||
proprietate aratand ca negatia ei e UNSAT, plus un control negativ care planteaza
|
||||
incalcarea si trebuie sa iasa SAT. Scaleaza la N=9 (flota reala).
|
||||
- **TLA+ / TLC** exhaustiv, in `aerenew/formal-tla/`: verifica prin explorare de stari la
|
||||
scara mica (N=4), unde combinatoria e suficienta.
|
||||
A complete run of everything that can be checked automatically about AERE consensus (QBFT / IBFT 2.0, chain 2800), with two
|
||||
independent methods:
|
||||
|
||||
Regula peste tot: **niciun model nu se raporteaza verde daca nu poate iesi ROSU.** Fiecare
|
||||
proprietate are un control negativ rulat.
|
||||
- **SMT (z3)**, parametric, in this directory (`formal-consensus/*_smt.py`): each property is proved by showing that its
|
||||
negation is UNSAT, plus a negative control that plants the violation and must come back SAT. The models scale to N=9,
|
||||
the validator set of 2026-08-24, when the table below was written; the set has had ten validators since 2026-09-11, and
|
||||
the models state the N each one is run at.
|
||||
- **TLA+ / TLC**, exhaustive, in `formal-tla/` of the development tree (not in this repository): it explores the state
|
||||
space at a small scale (N=4), where the combinatorics is enough.
|
||||
|
||||
The rule everywhere: **no model is reported green unless it can come out RED.** Every property has a negative control
|
||||
that is run.
|
||||
|
||||
---
|
||||
|
||||
## 1. Suita SMT (z3) - o singura comanda
|
||||
## 1. The SMT suite (z3): one command
|
||||
|
||||
```
|
||||
cd aerenew/publish-bundle/aere-research/formal-consensus
|
||||
cd formal-consensus
|
||||
python run_consensus_verification.py
|
||||
```
|
||||
|
||||
Ruleaza TOATE modelele `*_smt.py` din dosar (garda de completitudine refuza sa iasa verde
|
||||
daca vreun model prezent nu e cablat). Tipareste PASS/FAIL per model, timpul fiecaruia, si
|
||||
tally-ul de linii de verdict.
|
||||
It runs ALL the `*_smt.py` models in this directory (the completeness guard refuses a green result if a model that is
|
||||
present is not wired). It prints PASS / FAIL per model, the time of each, and the tally of verdict lines.
|
||||
|
||||
**Masurat 2026-10-07** (Windows, python 3.14.4 / z3 4.16.0; timpii variaza cu masina):
|
||||
**Measured 2026-10-07** (Windows, Python 3.14.4 / z3 4.16.0; the times vary with the machine):
|
||||
|
||||
```
|
||||
models run: 37 passed: 37 (16 consensus + 11 contract + 10 application)
|
||||
verdict lines: 301 PROVED 159 CEX-FOUND 0 FAILED
|
||||
wall time: ~37s total (cel mai lent: qbft_safety_smt.py ~20s)
|
||||
wall time: ~37s total (slowest: qbft_safety_smt.py ~20s)
|
||||
coverage: 37 of 37 *_smt.py files wired
|
||||
RESULT: ALL MODELS PASS (proofs PROVED, negative controls fired)
|
||||
```
|
||||
|
||||
Istoria cifrelor, datata: 2026-08-24, 35 de modele (14 consens), 282 PROVED / 149 CEX-FOUND, ~39 s;
|
||||
The history of the figures, dated: 2026-08-24, 35 models (14 consensus), 282 PROVED / 149 CEX-FOUND, ~39 s;
|
||||
2026-09-02, + `pq_message_enforcement_smt.py` (36 of 36); 2026-10-07, + `anchor_rewrite_bound_roundfree_smt.py`
|
||||
(37 of 37; 13 dovezi, 2 leme, 4 martori, 1 definitie, 8 controale negative; limita de rescriere 32 / 33 sub modelul
|
||||
fara runda, ca functie de K_eff si de cheile PQ tinute; vezi `research/rewrite-bound-round-free-seal-2026-10-07.md`
|
||||
si `anchor_rewrite_bound_roundfree_smt.RESULT.txt`).
|
||||
(37 of 37; 13 proofs, 2 lemmas, 4 witnesses, 1 definition, 8 negative controls; the rewrite bound is 32 / 33 under the
|
||||
round-free model, as a function of K_eff and of the post-quantum keys held; see
|
||||
`research/rewrite-bound-round-free-seal-2026-10-07.md` and `anchor_rewrite_bound_roundfree_smt.RESULT.txt`).
|
||||
|
||||
Cele 16 modele de consens (14 pe 24 august, + 1 pe 2 septembrie, + 1 pe 7 octombrie):
|
||||
The 16 consensus models (14 on 24 August, + 1 on 2 September, + 1 on 7 October):
|
||||
|
||||
| model | ce dovedeste | N |
|
||||
| model | what it proves | N |
|
||||
|---|---|---|
|
||||
| `qbft_safety_smt.py` | agreement (quorum-intersection unbounded; one-round + cross-round locking) | 4,5,7,10,13,16 |
|
||||
| `qbft_liveness_smt.py` | progres post-GST (f+1 runde ating un proposer onest) | 4,5,7 |
|
||||
| `qbft_locking_smt.py` | locking IBFT 2.0 pe rolurile motorului (view-change / round-change) | 4,5,7 |
|
||||
| `qbft_prepare_counting_smt.py`, `qbft_digest_keyed_smt.py` | numararea voturilor (bug+fix 2026-07-14) | mic |
|
||||
| `falcon_blocking_smt.py`, `anchor_blocking_quorum_smt.py` | pragul de sigilii pe ancora (K=3 din 9) | 9 |
|
||||
| `qbft_pqc_activation_smt.py` | tranzitia log-only -> blocant | - |
|
||||
| **`partition_safety_smt.py`** (NOU) | **partitii de retea: split-brain, starvatie, vindecare** | **9 param.** |
|
||||
| **`anchor_viewchange_smt.py`** (NOU) | **o schimbare de runda pe o ancora nu da doua certificate valide** | **9** |
|
||||
| `pqanchor_ceiling_monotonicity_smt.py` | plafonul de urgenta doar coboara K | - |
|
||||
| `registry_index_binding_smt.py`, `registry_rotation_coverage_smt.py` | registrul de chei pe inaltime | - |
|
||||
| **`anchor_rewrite_bound_roundfree_smt.py`** (2026-10-07) | **limita de rescriere sub adversarul cu toate cheile clasice: 32 de blocuri (ancora + 31), 33 sub exceptia din erata AIP-22 (fratele nedecis, bunicul comun); marginita exact cand cheile PQ tinute j < K_eff (K_eff = 7 pe validator, 1 pe urmaritorul publicat cu plafon); 128 / 129 in fereastra datata cu interval 128; punctul de referinta fixeaza prefixul (lantul de hash-uri desfasurat 1280 de inaltimi); `--plant-bounds` = controlul controlului** | 10, orice K_eff >= 1 |
|
||||
| `qbft_safety_smt.py` | agreement (quorum intersection unbounded; one-round + cross-round locking) | 4,5,7,10,13,16 |
|
||||
| `qbft_liveness_smt.py` | progress after GST (f+1 rounds reach an honest proposer) | 4,5,7 |
|
||||
| `qbft_locking_smt.py` | IBFT 2.0 locking on the engine roles (view change / round change) | 4,5,7 |
|
||||
| `qbft_prepare_counting_smt.py`, `qbft_digest_keyed_smt.py` | the counting of votes (bug and fix of 2026-07-14) | small |
|
||||
| `falcon_blocking_smt.py`, `anchor_blocking_quorum_smt.py` | the anchor seal threshold of 2026-08-15 (K=3 of 9; the minimum is 7 of 10 since block 20,715,632) | 9 |
|
||||
| `qbft_pqc_activation_smt.py` | the log-only -> blocking transition | - |
|
||||
| **`partition_safety_smt.py`** (new on 2026-08-24) | **network partitions: split brain, starvation, healing** | **9, parametric** |
|
||||
| **`anchor_viewchange_smt.py`** (new on 2026-08-24) | **a round change at an anchor does not give two valid certificates, in the model, under its finalized-block guard (the code has no such guard: note added 2026-10-01)** | **9** |
|
||||
| `pqanchor_ceiling_monotonicity_smt.py` | the emergency ceiling only lowers K | - |
|
||||
| `registry_index_binding_smt.py`, `registry_rotation_coverage_smt.py` | the key registry by height (the registries of 2026-08-15) | - |
|
||||
| **`anchor_rewrite_bound_roundfree_smt.py`** (2026-10-07) | **the rewrite bound under the adversary holding every classical key: 32 blocks (the anchor + 31), 33 under the exception of the AIP-22 erratum (the undecided sibling, the common grandparent); bounded exactly when the post-quantum keys held j < K_eff (K_eff = 7 on a validator, 1 on the published follower with its ceiling); 128 / 129 in the dated window with interval 128; the reference point pins the prefix (the hash chain unrolled over 1280 heights); `--plant-bounds` is the control of the control** | 10, any K_eff >= 1 |
|
||||
|
||||
> Nota: cele trei modele de registru/plafon existau in dosar din 15-19 august dar NU erau
|
||||
> cablate in rulator (garda de completitudine il facea sa iasa cu cod 2). Cablate pe 24 august
|
||||
> impreuna cu cele doua modele noi.
|
||||
> Note: the three registry / ceiling models were in the directory from 15 to 19 August but were NOT wired into the runner
|
||||
> (the completeness guard made it exit with code 2). They were wired on 24 August together with the two new models.
|
||||
|
||||
---
|
||||
|
||||
## 2. TLA+ / TLC exhaustiv - partitiile de retea (NOU, 24 august)
|
||||
## 2. TLA+ / TLC, exhaustive: network partitions (new on 24 August)
|
||||
|
||||
Modelul `aerenew/formal-tla/QBFTPartition.tla` face partitia un DEFECT modelat explicit
|
||||
(un predicat pe livrarea mesajelor intre grupuri) si o verifica exhaustiv la N=4. Sase
|
||||
configuratii, fiecare cu perechea ei pozitiv/negativ.
|
||||
The model `formal-tla/QBFTPartition.tla` (development tree) makes the partition an explicitly modelled FAULT (a predicate
|
||||
on the delivery of messages between groups) and checks it exhaustively at N=4. Six configurations, each with its positive
|
||||
/ negative pair.
|
||||
|
||||
### Rularea (WSL, mult mai rapid decat pe Windows)
|
||||
### The run (much faster under Linux, or WSL on Windows, than natively on Windows)
|
||||
|
||||
Scrie un script, copiaza-l, ruleaza-l fara ghilimele inline (comenzile inline se mangleaza
|
||||
prin wsl.exe). Toate rularile folosesc `-deadlock` fiindca protocolul se TERMINA in mod normal
|
||||
(toti au decis) si terminarea nu e un defect:
|
||||
Write a script, copy it, run it without inline quotes. Every run uses `-deadlock`, because the protocol TERMINATES
|
||||
normally (everyone has decided) and termination is not a defect:
|
||||
|
||||
```bash
|
||||
# copie dosarul in /root (rulare rapida, in afara /mnt)
|
||||
AERE_REPO=/calea/catre/clona/depozitului # radacina clonei tale; dosarul formal-tla/ sta direct sub ea
|
||||
# copy the directory outside any mounted Windows drive (a faster run)
|
||||
AERE_REPO=/path/to/the/clone # the root of your clone; the formal-tla/ directory sits directly under it
|
||||
mkdir -p /root/ftla
|
||||
cp -f "$AERE_REPO"/formal-tla/*.tla /root/ftla/
|
||||
cp -f "$AERE_REPO"/formal-tla/*.cfg /root/ftla/
|
||||
@@ -89,62 +91,61 @@ for CFG in MCpart_safety MCpart_safety_witness MCpart_safety_negctrl \
|
||||
done
|
||||
```
|
||||
|
||||
Lanseaza din PowerShell:
|
||||
`MSYS_NO_PATHCONV=1 wsl.exe -d Ubuntu-24.04 -- bash /mnt/c/.../script.sh`
|
||||
### Results measured 2026-08-24 (WSL, OpenJDK 21, exhaustive, 0 states left in the queue)
|
||||
|
||||
### Rezultate masurate 2026-08-24 (WSL, OpenJDK 21, exhaustiv, 0 stari ramase in coada)
|
||||
|
||||
| config | ce verifica | asteptat | rezultat | timp |
|
||||
| config | what it checks | expected | result | time |
|
||||
|---|---|---|---|---|
|
||||
| `MCpart_safety` | 3-1, quorum 3, heal: SAFETY se pastreaza | fara eroare | **No error** (1866 stari) | ~3s |
|
||||
| `MCpart_safety_witness` | acelasi, invariant `NoCommit` | VIOLARE (commit e atins) | **NoCommit violated** -> `committed={a}` | ~2s |
|
||||
| `MCpart_safety_negctrl` | 2-2, quorum COBORAT la 2 | VIOLARE (fork) | **NoFork violated** -> `committed={a,b}` (v1->a, v3->b) | ~4s |
|
||||
| `MCpart_noprogress` | 2-2, quorum 3, FARA vindecare, invariant `NoCommit` | fara eroare | **No error** (81 stari; nimic nu se finalizeaza) | ~2s |
|
||||
| `MCpart_liveness` | 2-2, quorum 3, vindecare, `EventualCommit` | fara eroare | **No error** (liveness revine dupa heal) | ~3s |
|
||||
| `MCpart_liveness_negctrl` | 2-2, quorum 3, FARA vindecare, `EventualCommit` | VIOLARE | **EventualCommit violated** (stuttering, `committed={}`) | ~2s |
|
||||
| `MCpart_safety` | 3-1, quorum 3, heal: SAFETY holds | no error | **No error** (1866 states) | ~3s |
|
||||
| `MCpart_safety_witness` | the same, invariant `NoCommit` | VIOLATION (a commit is reached) | **NoCommit violated** -> `committed={a}` | ~2s |
|
||||
| `MCpart_safety_negctrl` | 2-2, quorum LOWERED to 2 | VIOLATION (fork) | **NoFork violated** -> `committed={a,b}` (v1->a, v3->b) | ~4s |
|
||||
| `MCpart_noprogress` | 2-2, quorum 3, NO healing, invariant `NoCommit` | no error | **No error** (81 states; nothing finalizes) | ~2s |
|
||||
| `MCpart_liveness` | 2-2, quorum 3, healing, `EventualCommit` | no error | **No error** (liveness returns after the heal) | ~3s |
|
||||
| `MCpart_liveness_negctrl` | 2-2, quorum 3, NO healing, `EventualCommit` | VIOLATION | **EventualCommit violated** (stuttering, `committed={}`) | ~2s |
|
||||
|
||||
Cele trei perechi acopera exact intrebarile cerute:
|
||||
- **SAFETY se pastreaza in ambele parti**: `MCpart_safety` verde, si non-vacuu prin `witness`
|
||||
(partea majoritara chiar finalizeaza). Controlul negativ `safety_negctrl` arata ca ce
|
||||
opreste fork-ul e quorum-ul ceil(2N/3): coborat la 2, cele doua parti finalizeaza `a` si `b`.
|
||||
- **LIVENESS se pierde in grupul fara quorum**: `MCpart_noprogress` (nimic nu se finalizeaza
|
||||
intr-o partitie 2-2 nevindecata).
|
||||
- **LIVENESS revine la vindecare**: `MCpart_liveness` verde; controlul negativ
|
||||
`liveness_negctrl` arata ca fara pasul de vindecare `EventualCommit` PICA (heal e cauza).
|
||||
The three pairs answer exactly the questions asked:
|
||||
- **SAFETY holds on both sides**: `MCpart_safety` is green, and non-vacuous through `witness` (the majority side does
|
||||
finalize). The negative control `safety_negctrl` shows that what stops the fork is the ceil(2N/3) quorum: lowered to 2,
|
||||
the two sides finalize `a` and `b`.
|
||||
- **LIVENESS is lost in the group without a quorum**: `MCpart_noprogress` (nothing finalizes in an unhealed 2-2
|
||||
partition).
|
||||
- **LIVENESS returns on healing**: `MCpart_liveness` is green; the negative control `liveness_negctrl` shows that without
|
||||
the healing step `EventualCommit` FAILS (the heal is the cause).
|
||||
|
||||
---
|
||||
|
||||
## 3. TLA+ / TLC - modelul QBFT complet (agreement + view-change + echivocatie)
|
||||
## 3. TLA+ / TLC: the complete QBFT model (agreement + view change + equivocation)
|
||||
|
||||
`aerenew/formal-tla/QBFT.tla` cu `MCsafety.cfg` (N=4) / `MCsafety7.cfg` (N=7) si
|
||||
`MCliveness.cfg`. **Masurat 2026-07-19 si 2026-08-24: aceste configuratii NU se termina** in
|
||||
bugetul local (spatiul de stari e de ordinul zecilor de milioane; `MCliveness` a generat
|
||||
543k stari distincte in 197s cu 527k inca in coada). Ce e stabilit acolo e un martor
|
||||
explicit-state partial (9,35 milioane de stari fara violare pe N=4 round-0), NU o verificare
|
||||
completa. Vezi `TLC-RUN-REPORT.md`. Miezul all-N (quorum-intersection, agreement sub locking)
|
||||
e deja dovedit pentru ORICE N de suita SMT; TLA+ e metoda independenta, iar valoarea lui la
|
||||
partitii este ca `QBFTPartition.tla` chiar SE TERMINA exhaustiv (single-height), spre
|
||||
deosebire de modelul complet.
|
||||
`formal-tla/QBFT.tla` (development tree) with `MCsafety.cfg` (N=4) / `MCsafety7.cfg` (N=7) and `MCliveness.cfg`.
|
||||
**Measured 2026-07-19 and 2026-08-24: these configurations do NOT terminate** within the local budget (the state space is
|
||||
in the tens of millions; `MCliveness` generated 543k distinct states in 197 s with 527k still queued). What is established
|
||||
there is a partial explicit-state witness (9.35 million states without a violation at N=4 round 0), NOT a complete
|
||||
check (`TLC-RUN-REPORT.md`, development tree). The all-N core (quorum intersection, agreement under locking) is already
|
||||
proved for ANY N by the SMT suite; TLA+ is the independent method, and its value for partitions is that
|
||||
`QBFTPartition.tla` does TERMINATE exhaustively (single height), unlike the complete model.
|
||||
|
||||
---
|
||||
|
||||
## 4. Cross-check optional: quint / Apalache
|
||||
## 4. Optional cross-check: quint / Apalache
|
||||
|
||||
`FalconQuorum.qnt` e un cross-check secundar (vezi `CONSENSUS-VERIFICATION-2026-07-12.md`
|
||||
pentru comenzile `quint run`).
|
||||
`FalconQuorum.qnt` is a secondary cross-check (see `CONSENSUS-VERIFICATION-2026-07-12.md` for the `quint run`
|
||||
commands).
|
||||
|
||||
---
|
||||
|
||||
## Granita cinstita (se citeste, nu se sare)
|
||||
## The honest boundary (read it, do not skip it)
|
||||
|
||||
- Model checking **nu e demonstratie completa.** SMT dovedeste combinatoria design-ului
|
||||
(numararea voturilor, intersectia quorum-urilor, legarea certificatului), nu bytecode-ul
|
||||
Besu/EVM. TLC verifica exhaustiv doar configuratia finita enuntata (N=4 la partitii).
|
||||
- SMT parametric la N=9 dovedeste proprietatea pentru **acel** N; miezul aritmetic
|
||||
(quorum-intersection, 2q>N) e unbounded in N.
|
||||
- Consensul chain 2800 comita cu **ECDSA clasic** secp256k1; ancora PQ e ADITIVA. Nimic de
|
||||
aici nu implica "consens post-cuantic".
|
||||
- Primitivele criptografice (injectivitatea keccak, soliditatea gateway-ului SP1, validarea
|
||||
sigiliului Falcon) sunt tratate ca `[VERIFY]`, modelate, nu re-dovedite.
|
||||
- Ancora foloseste K=3 = **f+1**, NU un quorum. Unicitatea certificatului vine din legarea la
|
||||
blocul finalizat (dovada `anchor_viewchange_smt.py`), nu din intersectia sigiliilor.
|
||||
- Model checking **is not a complete proof.** SMT proves the combinatorics of the design (vote counting, quorum
|
||||
intersection, the binding of the certificate), not the Besu / EVM bytecode. TLC checks exhaustively only the finite
|
||||
configuration stated (N=4 for partitions).
|
||||
- Parametric SMT at N=9 proves the property for **that** N; the arithmetic core (quorum intersection, 2q > N) is
|
||||
unbounded in N.
|
||||
- When these models were written (July to October 2026), chain 2800 committed its blocks with **classical** secp256k1
|
||||
ECDSA seals and the post-quantum anchor was ADDITIVE; nothing here implies "post-quantum consensus". The chain of today
|
||||
is described in the aere-node SPEC.md. (Corrected 2026-10-27: this point was stated in the present tense.)
|
||||
- The cryptographic primitives (keccak injectivity, the soundness of the SP1 gateway, the validation of the Falcon seal)
|
||||
are treated as `[VERIFY]`: modelled, not re-proved.
|
||||
- In the models of August 2026 the anchor used K=3 = **f+1**, NOT a quorum; since block 20,715,632 the minimum is 7 of
|
||||
10 per scheme, as many as the QBFT quorum of the ten validators (corrected 2026-10-27: this point was stated in the
|
||||
present tense). In the model, the uniqueness of the certificate comes from its binding to the finalized block, the
|
||||
guard of `anchor_viewchange_smt.py`, not from an intersection of seals; the client code has no such guard (note added
|
||||
2026-10-01 in the runner).
|
||||
Reference in new issue
Block a user