-
Notifications
You must be signed in to change notification settings - Fork 62
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 adding other op-codes that read or write #58
Comments
I'd like to work on this.
|
To have all the balance information we might need I believe it would be better to have something like this:
What do you think? |
The names we already had were not the best, read_set/write_set are not very meaningful. |
## 📝 Summary Rename `read_set/write_set` to `read_slot_values/written_slot_values` ## 💡 Motivation and Context As discussed in #58, we renamed the fields to make it more descriptive and clear with the coming fields we are going to add. --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Added support for SELFBALANCE, BALANCE, CALL, CREATE, and SELFDESTRUCT op-codes in UsedStateEVMInspector. New test cases for evm inspector have been added. ## 💡 Motivation and Context Related discussion in #58. For opcodes like EXTCODECOPY, EXTCODEHASH, and EXTCODESIZE, I thought we could add them in the future with a concrete use case, so that we can properly design the datastruct for it. --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary Added support for SELFBALANCE, BALANCE, CALL, CREATE, and SELFDESTRUCT op-codes in UsedStateEVMInspector. New test cases for evm inspector have been added. ## 💡 Motivation and Context Related discussion in #58. For opcodes like EXTCODECOPY, EXTCODEHASH, and EXTCODESIZE, I thought we could add them in the future with a concrete use case, so that we can properly design the datastruct for it. --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
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. We could supplement this by adding other op-codes that read or write state. A few off the top of my head that we should add:
Do we need to support EXTCODECOPY, EXTCODEHASH, or EXTCODESIZE too? Not sure but I think so because some transactions might condition their execution on these and others might deploy contracts.
The goal would be to improve our coverage of what state is being used and how.
https://github.com/flashbots/rbuilder/blob/develop/crates/rbuilder/src/building/evm_inspector.rs
The text was updated successfully, but these errors were encountered: