Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bertmiller opened this issue Jul 13, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bertmiller
Copy link
Member

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

@bertmiller bertmiller added enhancement New feature or request help wanted Extra attention is needed labels Jul 13, 2024
@malik672
Copy link

@bertmiller assign me

@ZanCorDX
Copy link
Contributor

ZanCorDX commented Sep 5, 2024

isn't this handled here?

// if we write the same value that we read as the first read we don't have a write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants