flashbots/rbuilder

feat: improve UsedStateEVMInspector by only storing writes when they change state

開放

#57 建立於 2024年7月13日

 (2 則留言) (0 個反應) (0 位負責人)Rust (207 個分叉)auto 404
enhancementhelp wanted

倉庫指標

星標
 (559 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

During simulation we use an EVM inspector to get state that is used by a transaction by looking at the storage slots that a transaction reads and writes from. However, a large % of transactions write to some slots such that they don't end up changing the slot at the end of the transaction. As an example, for reentrancy locks a storage slot goes from 0 -> 1 -> 0, such that although the transaction has written to the slot it would not actually change it at the end.

For both analytics purposes and future bundle merging algorithms we should change how this works to only store writes if there is a change at the end of the slot.

Here is the evm inspector: https://github.com/flashbots/rbuilder/blob/develop/crates/rbuilder/src/building/evm_inspector.rs

貢獻者指南