[论文解读] Concurrency Protocol Aiming at High Performance of Execution and Replay for Smart Contracts
本文提出了一种针对智能合约的新型两阶段并发控制协议,通过采用一种批处理感知的乐观并发控制(OCC)变体和基于图划分的调度日志分解方法,优化了挖矿(执行)和验证(重放)两个阶段。该方法在挖矿者和验证者性能上均实现了最高11倍的加速,同时将通信开销降低了约90%,显著优于现有最先进方案。
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.
研究动机与目标
- 为解决区块链系统中因缺乏高效并发控制而导致的智能合约执行性能瓶颈。
- 克服现有数据库并发控制协议在拜占庭、全副本和图灵完备的区块链环境下的不适用性。
- 设计一种统一的并发控制方案,同时优化执行(挖矿)和重放(验证)阶段,这两个阶段通常被分别处理。
- 通过在保持高并行性的同时对调度日志进行划分,减少挖矿者与验证者之间的通信开销。
- 通过一种新型的DeOCC协议,实现在多核验证者上的确定性、高性能并发重放。
提出的方法
- 为挖矿阶段提出一种批处理感知的乐观并发控制(OCC)变体,提升事务执行的并行性。
- 引入一种贪心反馈点集(FVS)算法以解决冲突图中的冲突,提升调度日志质量。
- 设计一种图划分算法,将调度日志分解为更小、通信效率更高的块,供验证者使用。
- 开发一种确定性的OCC协议——DeOCC,以实现在验证阶段多个核心上独立、并发的重放。
- 采用工作负载阈值τ来控制任务粒度,在划分过程中平衡性能与通信成本。
- 通过使用分区日志的一致性读取集,确保确定性重放,同时最小化数据传输。
实验结果
研究问题
- RQ1如何在智能合约执行的挖矿和验证阶段高效优化并发控制?
- RQ2批处理和冲突图分析在多大程度上能提升区块链系统中智能合约执行的性能?
- RQ3图划分技术是否能在不牺牲并行性的情况下减少挖矿者与验证者之间的通信开销?
- RQ4所提出的DeOCC协议如何实现在多核验证者上的确定性、高性能重放?
- RQ5当调节工作负载阈值τ时,通信成本降低与性能退化之间的权衡关系如何?
主要发现
- 所提出的方案在挖矿和验证阶段均实现了平均11倍的加速,显著优于现有最先进方案。
- 通过图划分算法,通信开销降低了约90%,即使在高数据偏斜情况下(例如偏斜=0.7)依然有效。
- 在不同数据偏斜水平下,加速比保持在约11倍,表明对工作负载偏斜具有强鲁棒性。
- 当每区块事务数超过900时,性能因冲突密度增加而下降,但该方案仍优于串行执行。
- 工作负载阈值τ对性能影响较小:随着τ增大,加速比略有下降,但当τ > 0.015时仍具有效性。
- 划分算法保持了高并行性,在事务数量较低时(例如每区块100笔事务)也能实现接近最优的11倍加速,归因于高效的任务分配。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。