Current UTXO-based smart contracts face an efficiency bottleneck, requiring any transaction sent to a contract to specify the entire updated contract state. This requirement becomes particularly burdensome when the contract state contains dynamic data structures, such as maps, which are needed in many use cases for tracking users interactions with the contract. The problem is twofold: on the one hand, a large state in transactions implies a large transaction fee; on the other hand, a large centralized state is detrimental to the parallelization of transactions, which should be one of the main selling points of UTXO-based blockchains compared to account-based ones. We propose a technique to efficiently execute smart contracts on an extended UTXO blockchain, which allows the contract state to be distributed across multiple UTXOs. In this way, transactions only need to specify the part of the state they need to access, reducing their size (and fees). We also show how to exploit our model to parallelize the validation of transactions on multi-core CPUs. We implement our technique and provide an empirical validation of its effectiveness.
翻译:当前基于UTXO的智能合约面临效率瓶颈,任何发送至合约的交易均需指定完整的更新后合约状态。当合约状态包含动态数据结构(例如映射表)时,这一要求尤其繁重,而此类结构在许多用例中对于追踪用户与合约的交互至关重要。该问题具有双重性:一方面,交易中的大状态意味着高昂的交易费用;另一方面,集中式大状态不利于交易的并行化处理,而这本应是基于UTXO的区块链相较于基于账户的区块链的主要优势之一。我们提出一种在扩展UTXO区块链上高效执行智能合约的技术,该技术允许合约状态分布至多个UTXO中。通过这种方式,交易仅需指定其需访问的部分状态,从而减小交易规模(及费用)。我们还展示了如何利用该模型在多核CPU上实现交易验证的并行化。我们实现了该技术,并通过实证验证了其有效性。