-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Component
Cast
Describe the feature you would like
solution for #12711
currently we replay the entire block so that we get the proper state for a txs in a block
however, if the provider supports the prestate debug_traceTransaction then we get all the accessed state for that transaction which we can then commit into the db before executing the transaction.
this is similar to quick mode where we can bypass this entirely:
foundry/crates/cast/src/cmd/run.rs
Lines 228 to 229 in d3167db
| // Set the state to the moment right before the transaction | |
| if !self.quick { |
however not everyone has access to the debug_ api or maybe it's not supported by the chain's client
so we could do this optimistically if the trace request succeeds
we like need some helpers for this:
foundry/crates/evm/evm/src/executors/mod.rs
Line 539 in d3167db
| fn commit(&mut self, result: &mut RawCallResult) { |
that operates just on the account->storage map (pre-state)
and ideally this is either opt-in or opt-out
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status