[论文解读] Lockless Blockchain Sharding with Multiversion Control
本文提出了一种无锁区块链分片协议,采用多版本并发控制以消除锁争用并提高事务吞吐量。通过将事务拆分为跨分片的子事务,并使用版本化的账户状态检测冲突,该协议实现了高并发性和接近理想性能,实验结果表明其执行时间显著低于基于锁的方法,且吞吐量更高。
Sharding is used to address the performance and scalability issues of the blockchain protocols, which divides the overall transaction processing costs among multiple clusters of nodes. Shards require less storage capacity and communication and computation cost per node than the existing whole blockchain networks, and they operate in parallel to maximize performance. However, existing sharding solutions use locks for transaction isolation which lowers the system throughput and may introduce deadlocks. In this paper, we propose a lockless transaction method for ensuring transaction isolation without using locks, which improves the concurrency and throughput of the transactions. In our method, transactions are split into subtransactions to enable parallel processing in multiple shards. We use versions for the transaction accounts to implement consistency among the shards. We provide formal proof for liveness and correctness. We also evaluate experimentally our proposed protocol and compare the execution time and throughput with lock-based approaches. The experiments show that the transaction execution time is considerably shorter than the lock-based time and near to the ideal (no-lock) execution time.
研究动机与目标
- 解决传统区块链系统因全量复制和高共识开销导致的可扩展性限制。
- 克服现有分片解决方案中因基于锁的并发控制导致的性能瓶颈,此类控制会降低吞吐量并存在死锁风险。
- 设计一种无锁事务隔离机制,确保在分片区块链环境中保持一致性和原子性。
- 通过使用版本化共享对象实现跨分片的子事务并行执行,实现高并发性和更高的系统吞吐量。
- 形式化证明所提出协议的安全性(正确性)和活性(进展性),确保在拜占庭容错环境下的可靠性。
提出的方法
- 根据事务访问的账户,将每个事务拆分为在多个分片上并行执行的子事务。
- 使用多版本并发控制(MVCC)跟踪共享账户的版本化状态,以检测并发子事务之间的冲突。
- 实现冲突解决机制,其中冲突的事务将被重启并重新执行,从而在无需锁的情况下确保可串行化。
- 在每个分片内使用BFT共识(例如PBFT)以确保一致性和容错性,假设每个分片可容忍拜占庭故障。
- 采用基于快照的版本控制,允许读操作无阻塞执行,而写操作则与最新提交版本进行验证。
- 应用形式化验证,证明在所提协议下安全性(可串行化)和活性(最终提交)的成立。
实验结果
研究问题
- RQ1与基于锁的分片方案相比,无锁分片协议是否能在区块链系统中实现更高的事务吞吐量和更低的延迟?
- RQ2多版本并发控制如何在分片区块链环境中实现无锁的冲突检测与解决?
- RQ3增加分片数量对所提无锁协议中事务吞吐量和执行时间有何影响?
- RQ4所提协议在执行时间和可扩展性方面,与理想(无锁)系统相比,接近程度如何?
- RQ5在多个分片中并发子事务访问共享账户的情况下,所提协议能否维持安全性和活性保证?
主要发现
- 所提无锁协议在事务约束数量增加时,平均事务执行时间显著低于基于锁的方法。
- 吞吐量随分片数量增加而提升,表现出强水平可扩展性,并接近理想无锁系统的性能。
- 在1500笔事务的场景下,协议的吞吐量超过基于锁的方法,并接近理论上的无锁基线。
- 实验结果表明,基于锁的协议因锁持有时间过长而产生更高开销,尤其在具有多个条件的复杂事务中更为明显。
- 协议在形式化证明下保持了正确性和活性,并通过重启机制有效解决了冲突,而非通过阻塞。
- 在高竞争环境下性能提升最为显著,此时基于锁的系统因序列化瓶颈而性能下降。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。