Sharding is a promising technique for addressing the scalability issues of blockchain, and this technique is especially important for IoT, edge, or mobile computing. It divides the $n$ participating nodes into $s$ disjoint groups called shards, where each shard processes transactions in parallel. We examine batch scheduling problems on the shard graph $G_s$, where we find efficient schedules for a set of transactions. First, we present a centralized scheduler where one of the shards is considered as a leader, who receives the transaction information from all of the other shards and determines the schedule to process the transactions. For general graphs, where a transaction and its accessing objects are arbitrarily far from each other with a maximum distance $d$, the centralized scheduler provides $O(kd)$ approximation to the optimal schedule, where $k$ is the maximum number of shards each transaction accesses. Next, we provide a centralized scheduler with a bucketing approach that offers improved bounds for the case where $G_s$ is a line graph, or the $k$ objects are randomly selected. Finally, we provide a distributed scheduler where shards do not require global transaction information. We achieve this by using a hierarchical clustering of the shards and using the centralized scheduler in each cluster. We show that the distributed scheduler has a competitive ratio of $O(A_{CS} \cdot \log d \cdot \log s)$, where $A_{CS}$ is the approximation ratio of the centralized scheduler. To our knowledge, we are the first to give provably fast transaction scheduling algorithms for blockchain sharding systems. We also present simulation results for our schedulers and compare their performance with a lock-based approach. The results show that our schedulers are generally better with up to 3x lower latency and 2x higher throughput.
翻译:分片是解决区块链可扩展性问题的关键技术,该技术对于物联网、边缘计算或移动计算尤为重要。它将 $n$ 个参与节点划分为 $s$ 个不相交的组(称为分片),每个分片并行处理交易。我们研究了分片图 $G_s$ 上的批量调度问题,旨在为一组交易寻找高效的调度方案。首先,我们提出了一种集中式调度器,其中一个分片被视作领导者,它接收来自所有其他分片的交易信息并确定处理交易的调度方案。对于一般图(其中交易及其访问对象之间的最大距离为 $d$),集中式调度器提供的调度方案与最优调度相比具有 $O(kd)$ 的近似比,其中 $k$ 是每笔交易访问的最大分片数。接着,我们提出了一种采用分桶方法的集中式调度器,当 $G_s$ 为线图或 $k$ 个对象为随机选择时,该调度器能提供更优的界。最后,我们提出了一种分布式调度器,其中分片无需全局交易信息。我们通过对分片进行层次聚类并在每个聚类中使用集中式调度器来实现这一目标。我们证明该分布式调度器的竞争比为 $O(A_{CS} \cdot \log d \cdot \log s)$,其中 $A_{CS}$ 是集中式调度器的近似比。据我们所知,我们是首个为区块链分片系统提供可证明的快速交易调度算法的研究。我们还展示了调度器的模拟结果,并将其性能与基于锁的方法进行了比较。结果表明,我们的调度器通常表现更优,延迟降低高达3倍,吞吐量提高高达2倍。