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$倍的加速。通过$16$个预取线程,总重放时间从$6.5$小时降至$16$分钟(获得$23.6$倍的墙上时间加速)。