forked from mlabs-haskell/cem-script
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mlabs-haskell#11 from mlabs-haskell/uhbif19/initia…
…l-docs Initial docs
- Loading branch information
Showing
5 changed files
with
472 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ cabal.project.local | |
cabal.project.local~ | ||
.HTF/ | ||
.ghc.environment.* | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Constraints design | ||
|
||
## Principles | ||
|
||
* Generic compilation across: on-chain code, | ||
offchain Tx construction and indexing backend | ||
* Simple normalization and SMT conversion for: | ||
* Equivalence checking | ||
* Bi-simulation checking | ||
* Constraints determine TxIn/Outs up to UTxO coin-selection | ||
(we call it almost-determinacy) | ||
* Datum properties encoded as class types | ||
* Common on-chain optimizations are performed if possible | ||
* Constraints normalization, and CSE | ||
* Best error short-cutting | ||
* Common security problems prevention | ||
|
||
## Potential obstacles | ||
|
||
* Ease and optimality of backend compilation | ||
* Robustness of SMT conversion and overall normalization | ||
* Possibility for parsing and correct offchain usage | ||
of almost-determinacy | ||
* Having enough information for Tx submit retrying strategies | ||
* Design for using custom Datum properties is not obvious | ||
|
||
# CEM machine design | ||
|
||
As it is done on top of constraints language, | ||
all their principles and obstacles are affecting CEM as well. | ||
|
||
## Principles | ||
|
||
* State-machine is deterministic modulo coin-change | ||
* Transaction can always be parsed back into SM transitions | ||
* Potential non-deterministic on-chain optimizations | ||
should not affect this principle. | ||
|
||
## Potential obstacles | ||
|
||
* Some scripts inexpressible by such model (as it happens in PAB) | ||
* Sub-optimal code from deterministic transitions model |
Oops, something went wrong.