Front-running Attack in Sharded Blockchains and Fair Cross-shard Consensus

Front-running Attack in Sharded Blockchains and Fair Cross-shard Consensus
复制标题

DOI:
10.14722/ndss.2024.23197
复制
发表时间:
2023-06
期刊:
Proceedings 2024 Network and Distributed System Security Symposium
影响因子:
--
通讯作者:
Jianting Zhang;Wuhui Chen;Sifu Luo;Tiantian Gong;Zicong Hong;Aniket Kate
Jianting Zhang;Wuhui Chen;Sifu Luo;Tiantian Gong;Zicong Hong;Aniket Kate
中科院分区:
其他
文献类型:
--
作者:
Jianting Zhang;Wuhui Chen;Sifu Luo;Tiantian Gong;Zicong Hong;Aniket Kate

文献摘要

相似文献

分片是扩展区块链的一种重要技术。通过将网络划分为称为分片的较小组件,分片区块链可以并行处理交易,而不会通过分片内和跨分片共识协议的协调引入不一致性。然而,我们观察到分片系统的一个关键安全问题:在协调分片内和跨分片共识协议时,可能会发生事务排序操作,使系统容易受到攻击。具体来说,我们确定了一个新的安全问题,称为终结公平性,可以通过前端运行攻击利用。这种攻击允许攻击者操纵交易的执行顺序,即使受害者的交易已经通过公平的内部分片共识处理并添加到区块链中。为了解决这个问题,我们提供了Haechi,这是一种新颖的跨分片协议,可以免疫前端攻击。Haechi在事务处理和执行之间引入了一个定序阶段,保证事务的执行顺序与处理顺序一致,实现终结公平性。为了适应分片之间不同的共识速度,Haechi采用了一种终结公平算法,以最小的性能损失实现全局公平秩序。通过提供全局顺序,Haechi确保了分片之间的强一致性,从而在处理跨分片的冲突事务时实现更好的并行性。这些功能使Haechi成为支持真实的世界中流行的智能合约的有前途的解决方案。为了评估Haechi的性能,我们使用Tendermint实现了该协议,并在地理分布的AWS环境中进行了广泛的实验。我们的研究结果表明,Haechi实现了最终的公平性与现有的跨分片共识协议相比,几乎没有性能牺牲。
Sharding is a prominent technique for scaling blockchains. By dividing the network into smaller components known as shards, a sharded blockchain can process transactions in parallel without introducing inconsistencies through the coordination of intra-shard and cross-shard consensus protocols. However, we observe a critical security issue with sharded systems: transaction ordering manipulations can occur when coordinating intra-shard and cross-shard consensus protocols, leaving the system vulnerable to attack. Specifically, we identify a novel security issue known as finalization fairness, which can be exploited through a front-running attack. This attack allows an attacker to manipulate the execution order of transactions, even if the victim's transaction has already been processed and added to the blockchain by a fair intra-shard consensus. To address the issue, we offer Haechi, a novel cross-shard protocol that is immune to front-running attacks. Haechi introduces an ordering phase between transaction processing and execution, ensuring that the execution order of transactions is the same as the processing order and achieving finalization fairness. To accommodate different consensus speeds among shards, Haechi incorporates a finalization fairness algorithm to achieve a globally fair order with minimal performance loss. By providing a global order, Haechi ensures strong consistency among shards, enabling better parallelism in handling conflicting transactions across shards. These features make Haechi a promising solution for supporting popular smart contracts in the real world. To evaluate Haechi's performance, we implemented the protocol using Tendermint and conducted extensive experiments on a geo-distributed AWS environment. Our results demonstrate that Haechi achieves finalization fairness with little performance sacrifice compared to existing cross-shard consensus protocols.