flashbots / flashbots/rbuilder

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

Open
#57 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Rust
Stars
567
Forks
209
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.