We present a new design for blockchain transactions called TxVM, the transaction virtual machine. TxVM seeks to achieve the expressiveness and flexibility of an imperative contract model such as Ethereum’s while maintaining the efficiency, safety, and scalability of a declarative transaction model such as Bitcoin’s. TxVM defines a stack machine for manipulating plain data items like strings, integers, and tuples, but also special types: values, each with an amount and asset type; and contracts, programs that lock up values and other data. Rules governing the handling of these types provide guarantees about integrity and security. Each transaction is a TxVM program evaluated in isolation from the blockchain state, and whose output is a deterministic log of proposed state changes for the blockchain. Transactions can be therefore be validated in parallel. Their logs can be applied to the blockchain in linear time. Our implementation of TxVM is currently used in production in our hosted ledger service, Sequence. The implementation and specification are available as an open-source project on GitHub.
Recommended citation: Bob Glickstein, Cathie Yun, Dan Robinson, Keith Rarick, Oleg Andreev. (2018). "TxVM: A New Design for Blockchain Transactions."