by Animats · 9y ago · 0 comments
Making Etherium contracts a full byte code execution engine was a big mistake. That form is too bug-prone and led to the DAO debacle. It should have been something simpler, such as a decision table.[1] That simple declarative form can handle most useful business logic, but can't loop. It's always decidable and is easy to hand-check.
full byte code execution
engine was a big mistake
An even better scheme would have been proof-carrying code: a contract should have been a pair (c, p) where c is the program expressing the contract (in a Turing complete language) together with a proof p in a suitable program logic (for total correctness) that proves that c does not do a bad thing (e.g. consume too many resources). It's easy to check that the proof p is valid for c.The proofs could be auto-generated for decision table based contracts, so a decision table could be a convenient DSL for simple contracts, without preventing more complicated contracts. The average contract writer would never need to see the full language or be exposed to proofs.