mirror of
https://github.com/luxfi/proofs.git
synced 2026-10-30 15:21:05 +00:00
TLC had never verified anything: every MC config assigned constants with `=` (TLC model-value) instead of `<-` (operator substitution), so e.g. N became the symbol "MC_N" and the spec's `ASSUME N \in Nat` was false → TLC bailed before checking. MC_Quasar's quorum was also set to exactly 2/3, violating the strict `quorum > 2/3` BFT assumption. Fixed both; all 13 MC specs now run. Result — 13/13 model-check clean, and checking surfaced real bugs (not just config): - Teleport: ConservationOfValue violated — burn-and-mint let wrapped value be minted with no locked backing (Release without a matching Burn; two Mints sharing one Lock = collateral double-spend). Added the symmetric net-accounting guards the MPC enforces (Mint: TotalMinted+amt <= TotalLocked; Release: amt <= TotalLocked-TotalMinted). [CROSS-CHAIN SOLVENCY FIX] - Orderbook: `!.active = (@ + fillAmt < ...)` bound @ to the Bool .active → TRUE+int cast crash; fixed to reference the order's filled amount. - ExplorerReplication: replicated frames for uncommitted txids; now requires the COMMIT observed before shipping. Also `1..n \X P` precedence fix. - LiquidStaking: \div-by-zero on a fully-slashed vault (price=0); guarded. - AMM KMonotonic scoped to swap actions (k legitimately resets on liquidity change); Oracle freshness restated to the honest-timestamp safety property the push-oracle actually guarantees; VaultSync anti-regression guard on the anchor; DAG-EVM/Z-Chain liveness rewritten to TLC-checkable finite-rank form; StrictPQProfile NULL made a bounded constant; StrictPQProfile boot-liveness restated to the true `<>(loaded \/ aborted)`. Co-authored-by: Hanzo Dev <[email protected]>
31 lines
933 B
INI
31 lines
933 B
INI
\* Model checker configuration for DAGEVM
|
|
|
|
\* Small universes keep the per-vertex structure (reads/writes are subsets of
|
|
\* Keys, parents subsets of VertexId, rank in 1..MaxVertices) tractable. The
|
|
\* EVM conflict rule compares BOTH read and write sets, so each vertex has two
|
|
\* subset-valued fields and the accepted-set space grows much faster than for
|
|
\* Z-Chain (single nullifier field). Two keys still exhibit both conflicting
|
|
\* and disjoint read/write sets, and MaxVertices = 3 reaches sibling antichains
|
|
\* (two rank-1 vertices) and parent->child chains (rank 1 -> rank 2), covering
|
|
\* Safety, ConflictsAlongEdges, Serializability, NoDoubleSpend and Liveness.
|
|
CONSTANTS
|
|
Keys = {k1, k2}
|
|
MaxVertices = 3
|
|
MaxTxsPerVertex = 3
|
|
|
|
SPECIFICATION Spec
|
|
|
|
CONSTRAINT StateConstraint
|
|
|
|
INVARIANTS
|
|
TypeOK
|
|
Safety
|
|
NoDoubleSpend
|
|
Serializability
|
|
ConflictsAlongEdges
|
|
|
|
PROPERTIES
|
|
Liveness
|
|
|
|
CHECK_DEADLOCK FALSE
|