flashbots/rbuilder

feat: improve UsedStateEVMInspector by adding other op-codes that read or write

Ouverte

#58 ouverte le 13 juil. 2024

 (3 commentaires) (0 réaction) (0 personne assignée)Rust (207 forks)auto 404
enhancementgood first issuehelp wanted

Métriques du dépôt

Stars
 (559 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

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. 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:

  • balance
  • selfbalance
  • create (balance and nonce is read)
  • create2 (balance and nonce is read)
  • selfdestruct (balance and nonce is read)

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

Guide contributeur