In primary-backup replication, consensus latency is bounded by the time for backup nodes to replay (re-execute) transactions proposed by the primary. In this work, we present Ira, a framework to accelerate backup replay by transmitting compact \emph{hints} alongside transaction batches. Our key insight is that the primary, having already executed transactions, possesses knowledge of future access patterns which is exactly the information needed for optimal replay. We use Ethereum for our case study and present a concrete protocol, Ira-L, within our framework to improve cache management of Ethereum block execution. The primaries implementing Ira-L provide hints that consist of the working set of keys used in an Ethereum block and one byte of metadata per key indicating the table to read from, and backups use these hints for efficient block replay. We evaluated Ira-L against the state-of-the-art Ethereum client reth over two weeks of Ethereum mainnet activity ($100,800$ blocks containing over $24$ million transactions). Our hints are compact, adding a median of $47$ KB compressed per block ($\sim5\%$ of block payload). We observe that the sequential hint generation and block execution imposes a $28.6\%$ wall-time overhead on the primary, though the direct cost from hints is $10.9\%$ of execution time; all of which can be pipelined and parallelized in production deployments. On the backup side, we observe that Ira-L achieves a median per-block speedup of $25\times$ over baseline reth. With $16$ prefetch threads, aggregate replay time drops from $6.5$ hours to $16$ minutes ($23.6\times$ wall-time speedup).
翻译:在主备份复制中,共识延迟受限于备份节点重放(重新执行)主节点提出的事务所需的时间。本文提出Ira框架,通过随事务批次一起传输紧凑的"线索"来加速备份重放。我们的核心洞见是:已执行过事务的主节点掌握未来访问模式的信息,而这恰好是最优重放所需的关键数据。我们以以太坊为案例研究,在该框架内提出具体协议Ira-L,以改进以太坊区块执行的缓存管理。实现Ira-L的主节点提供包含两类信息的线索:以太坊区块中使用的工作键集合,以及每个键对应一个字节的元数据(指示读取目标表)。备份节点利用这些线索实现高效的区块重放。我们针对以太坊主网上两周的活动数据(包含$100,800$个区块,涉及超过$2400$万笔交易),将Ira-L与当前最先进的以太坊客户端reth进行对比评估。我们的线索具有紧凑性,每个区块压缩后中位数仅增加$47$ KB(约占区块负载的$5\%$)。尽管顺序线索生成与区块执行给主节点带来$28.6\%$的挂钟时间开销(其中线索直接成本占执行时间的$10.9\%$),但这些开销在生产部署中可通过流水线与并行化处理消除。在备份端,Ira-L相较基线reth实现中位数每区块$25\times$的加速。使用$16$个预取线程时,总重放时间从6.5小时降至16分钟(挂钟时间加速$23.6\times$)。