Sparrow: Expediting Smart Contract Execution for Blockchain Sharding via Inter-Shard Caching
- 26 December 2024
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Parallel and Distributed Systems
- Vol. 36 (3) , 377-390
Abstract
Sharding is a promising solution to scale blockchain by separating the system into multiple shards to process transactions in parallel. However, due to state separation and shard isolation, it is still challenging to efficiently support smart contracts on a blockchain sharding system where smart contracts can interact with each other, involving states maintained by multiple shards. Specifically, existing sharding systems adopt a costly multi-step collaboration mechanism to execute smart contracts, resulting in long latency and low throughput. This paper proposes SPARROW, a blockchain sharding protocol achieving one-step execution for smart contracts. To break shard isolation, inspired by non-local hotspot data caching in traditional databases, we propose a new idea of inter-shard caching, allowing a shard to prefetch and cache frequently accessed contract states of other shards. The miner can thus use the inter-shard cache to pre-execute a pending transaction, retrieve all its contract invocations, and commit it to multiple shards in one step. Particularly, we first propose a speculative dispersal cache synchronisation mechanism for efficient and secure cache synchronization across shards in Byzantine environments. Then, we propose a multi-branch exploration mechanism to solve the rollback problem during the optimistic one-step execution of contract invocations with dependencies. We also present a series of conflict resolution mechanisms to decrease the rollback caused by inherent transaction conflicts. We implement prototypes for SPARROW and existing sharding systems, and the evaluation shows that SPARROW improves the throughput by 2.44× and reduces the transaction latency by 30% compared with the existing sharding systems.Keywords
Funding Information
- National Natural Science Foundation of China (62172453)
- National Natural Science Foundation of Guangdong Province (2022A1515010154)
- Major Key Project of PCL (PCL2023AS7-1)
- Guangdong Provincial Pearl River Talents Program (2019QN01X130)
This publication has 29 references indexed in Scilit:
- A survey of Layer-two blockchain protocolsJournal of Network and Computer Applications, 2022
- Blockchain Scaling Using Rollups: A Comprehensive SurveyIEEE Access, 2022
- The Fault-Tolerant Cluster-Sending Problem2022
- Jenga: Orchestrating Smart Contracts in Sharding-Based Blockchain for Efficient Processing2022
- Meepo: Sharded Consortium Blockchain2021
- Comparison of Decentralization in DPoS and PoW Blockchains2020
- On Sharding Open Blockchains with Smart Contracts2020
- An adaptive multi-level caching strategy for Distributed Database SystemFuture Generation Computer Systems, 2019
- Accelerating Concurrent Workloads with CPU Cache Partitioning2018
- The Information Dispersal Algorithm and its Applications1990