Skip to content

Commit a5d62e7

Browse files
committed
Initial docs closing M1
1 parent 8b8072e commit a5d62e7

File tree

4 files changed

+476
-1
lines changed

4 files changed

+476
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Define and reuse Cardano DApp logic via annotated CEM-machines, resulting in free implementations for:
1111

1212
* On-chain scripts
13-
* Tx building/submission/resubmission on L1/L2/emulated testnet
13+
* Tx building/submission/resubmission on L1/emulated testnet
1414
* Tx parsing/indexing
1515
* Automatically testing invariants
1616
* Human-readable specs

docs/arch_principles.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Constraints design
2+
3+
## Principles
4+
5+
* Generic compilation across: on-chain code,
6+
offchain Tx construction and indexing backend
7+
* Simple normalization and SMT conversion for:
8+
* Equivalence checking
9+
* Bi-simulation checking
10+
* Constraints determine TxIn/Outs up to UTxO coin-selection
11+
(we call it almost-determinacy)
12+
@todo #3: wording for almost-determinacy
13+
* Datum properties encoded as class types
14+
* Common on-chain optimizations are perfomed if possible
15+
* Constraints normalization, and CSE
16+
* Best error short-cutting
17+
* Common security problems prevention
18+
19+
## Potential obstacles
20+
21+
* Ease and optimality of backend compilation
22+
* Robustnes of SMT conversion and overall normalization
23+
* Possibility for parsing and correct offchain usage
24+
of almost-determinacy
25+
* Having enough information for Tx submit retrying strategies
26+
* Desing for using custom Datum properties is not obvious
27+
28+
# CEM machine design
29+
30+
As it is done on top of constraints language,
31+
all their principles and obstacles are affecting CEM as well.
32+
33+
## Principles
34+
35+
* State-machine is deterministic modulo coin-change
36+
* Transaction can always be parsed back into SM transitions
37+
* Potential non-deterministic on-chain optimizations
38+
should not affect this principle.
39+
40+
## Potential obstacles
41+
42+
* Some scripts inexpressible by such model (as it happens in PAB)
43+
* Sub-optimal code from determenistic transitions model

0 commit comments

Comments
 (0)