13 December 2022 in IEEE Transactions on Parallel and Distributed Systems
Sharding has been considered as a prominent approach to enhance the limited performance of blockchain. However, most sharding systems leverage a non-cooperative design, which lowers the fault tolerance resilience due to the decreased mining power as the consensus execution is limited to each separated shard. To this end, we present Benzene, a novel sharding system that enhances the performance by cooperation-based sharding while defending the per-shard security. Firstly, we establish a double-chain architecture for function decoupling. This architecture separates transaction-recording functions from consensus-execution functions, thereby enabling the cross-shard cooperation during consensus execution while preserving the concurrency nature of sharding. Secondly, we design a cross-shard block verification mechanism leveraging Trusted Execution Environment (TEE), via which miners can verify blocks from other shards during the cooperation process with the minimized overheads. Finally, we design a voting-based consensus protocol for cross-shard cooperation. Transactions in each shard are confirmed by all shards that simultaneously cast votes, consequently achieving an enhanced fault tolerance and lowering the confirmation latency. We implement Benzene and conduct both prototype experiments and large-scale simulations to evaluate the performance of Benzene. Results show that Benzene achieves superior performance than existing sharding/non-sharding blockchain protocols. In particular, Benzene achieves a linearly-improved throughput with the increased number of shards (e.g., 32,370 transactions per second with 50 shards) and maintains a lower confirmation latency than Bitcoin (with more than 50 shards). Meanwhile, Benzene maintains a fixed fault tolerance at 1/3 even with the increased number of shards.
18 March 2024 in IEEE Transactions on Services Computing
Sharding technologies allow the Internet of Things (IoT) to deploy blockchains in large-scale applications with good scalability. However, conventional sharding strategies in IoT blockchain are highly restricted because most IoT devices are dynamic and heterogeneous. They fail to partition and reconfigure shards with a fine-balanced tradeoff between throughput and security. Therefore, we propose SmartChain, which is a dynamic and self-adaptive sharding framework devised for making sharding decisions on the IoT blockchain featured with dynamics and heterogeneity. Specifically, we elaborate on how SmartChain performs reconfiguration and provide a quantitative analysis of shard performance. We then formulate the long-term tradeoff of throughput and security as a Markov decision process. Considering the nature of time-varying devices (e.g., amount of computing power, location), we develop a Transferable Proximal Policy Optimization (PPO) with Demonstrations algorithm, namely TPPOD, to help quickly reconfigure shards when the environment changes. Thus, based on current state, SmartChain can adaptively and dynamically select shard number, partition structure, and primary selection mode. Evaluations show that SmartChain enables high throughput and low risk of security, and reduces 70% of the training time averaged over baselines. Our implementation of TPPOD is 8.3 times of average system reward compared with the PPO-based sharding strategy with uniform sampling.
14 February 2024 in IEEE Transactions on Computers
Sharding is a promising solution to enhance the scalability of blockchain. However, previous sharding systems adopt the lock-based cross-shard protocol to exclusively handle one-shot cross-shard transactions, leading to low-efficiency executions and unavailable calls when handling complex cross-shard contracts that introduce multi-shot cross-shard transactions to invoke multiple contracts managed by different shards. In this paper, we aim to enable efficient execution of arbitrarily complex cross-shard contracts in blockchain sharding systems. First, we perform a calling-flow analysis on Ethereum contracts with more than 180 million real-world transactions and find that about $30\%$ transactions invoke complex contracts. Then, motivated by the properties of these complex contracts, we propose an off-chain execution model, called ShardCon, to achieve efficient executions for complex cross-shard contracts by decoupling the contract execution from the cross-shard consensus. Next, we introduce a cross-shard contract execution engine and a contract-driven deployment rule to the overheads introduced by off-chain executions. Moreover, to adapt to the multi-chain property of a sharding system, we introduce an off-chain state atomic commit protocol. Finally, we implement a prototype and evaluate it with concrete cross-shard contracts, showing that ShardCon can achieve more than 10x increase in throughput and 2x decrease in confirmation latency than the state-of-the-art sharding systems.
26 December 2024 in IEEE Transactions on Parallel and Distributed Systems
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.