bitcoin-dev
Simplicity: An alternative to Script
Posted on: October 31, 2017 20:38 UTC
Russell O'Connor has developed a new alternative to Bitcoin Script called Simplicity.
It is a low-level, typed, functional, native MAST language where programs are built from basic combinators and designed to operate at the consensus layer. The formal denotational semantics of Simplicity have been proven equivalent to formal operational semantics in the Coq proof assistant. O'Connor aims to develop a broad set of useful jets that cover arithmetic operations, elliptic curve operations, hashing, digital signature validation and other cryptographic operations. Simplicity comes with easy-to-compute static analyses that can compute bounds on the space and time resources needed for evaluation. Unused branches of Simplicity programs are pruned at redemption time, enhancing privacy, reducing block weight used, as well as space and time resource costs needed for evaluation. Discounted jets will be explicitly labeled as jets in the commitment, and if a Merkle path can be provided from the root to a node that is an explicit jet but not among the finite number of known discounted jets, then the script is automatically successful, making it anyone-can-spend. When new jets are wanted, they can be soft-forked into the protocol, and the list of known discounted jets grows. Old nodes get a merkle path to the new jet, which they view as an unknown jet, and allow the transaction as an anyone-can-spend transaction. New nodes see a regular Simplicity redemption. The P2P protocol's negotiation process with old nodes has yet to be worked out. The design includes extensions not covered in the paper such as full convent support, allowing access to all transaction data, support for signature aggregation, and delegation. An SDK is expected to be produced, including the formal semantics and correctness proofs in Coq, a Haskell implementation for constructing Simplicity programs, and a C interpreter for Simplicity. After completion of the SDK, Simplicity will be made available in the Elements project for experimentation in sidechains. The work is not intended to delay the consideration of the various Merkelized Script proposals currently ongoing.