面向智能合约高性能执行和重放的并发协议
Concurrency Protocol Aiming at High Performance of Execution and Replay for Smart Contracts
摘要:
虽然可编程智能合约的出现使得区块链系统可以轻松地涵盖更广泛的行业领域,但如何高效地执行智能合约成为当今的一大挑战。由于Byzantine节点的存在,智能合约的执行机制与数据库系统中的执行机制有很大的不同,使得现有成功的并发控制协议不能直接应用于数据库系统中。此外,尽管智能合约执行遵循两阶段风格,即矿工节点在第一阶段执行一批智能合约,验证者在第二阶段重放它们,但现有的并行解决方案只关注第一阶段的优化,而不包括第二阶段。在本文中,我们提出了一个新的有效的并发控制计划,这是第一个做优化的两个阶段。具体来说,(i)在第一阶段,我们给出了一个基于{ \em队列}特性的OCC(乐观并发控制)协议的变体,以提高矿工的并发执行效率,并为验证器生成具有高并行度的调度日志。此外,设计了一种图划分算法,将原始调度日志划分为小块,进一步降低通信成本;(ii)在第二阶段,我们给出了一个确定性OCC协议,可以在多核验证器上有效地重放所有智能合约,其中所有核都可以独立重放智能合约。理论分析和大量的实验结果表明,该方案优于国家的最先进的解决方案显着。
英文摘要:
Although the emergence of the programmable smart contract makes blockchain systems easily embrace a wider range of industrial areas, how to execute smart contracts efficiently becomes a big challenge nowadays. Due to the existence of Byzantine nodes, the mechanism of executing smart contracts is quite different from that in database systems, so that existing successful concurrency control protocols in database systems cannot be employed directly. Moreover, even though smart contract execution follows a two-phase style, i.e, the miner node executes a batch of smart contracts in the first phase and the validators replay them in the second phase, existing parallel solutions only focus on the optimization in the first phase, but not including the second phase. In this paper, we propose a novel efficient concurrency control scheme which is the first one to do optimization in both phases. Specifically, (i) in the first phase, we give a variant of OCC (Optimistic Concurrency Control) protocol based on {\em batching} feature to improve the concurrent execution efficiency for the miner and produce a schedule log with high parallelism for validators. Also, a graph partition algorithm is devised to divide the original schedule log into small pieces and further reduce the communication cost; and (ii) in the second phase, we give a deterministic OCC protocol to replay all smart contracts efficiently on multi-core validators where all cores can replay smart contracts independently. Theoretical analysis and extensive experimental results illustrate that the proposed scheme outperforms state-of-art solutions significantly.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。