-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Description
We have EVM-level hooks (CaptureStart
, CaptureEnd
) and call-level hooks (CaptureEnter
, CaptureExit
). I'm proposing adding something like CaptureTxStart
and CaptureTxEnd
.
Why should this feature exist?
This feature makes the following information easily available to tracers: start gas (or intrinsic cost), refund values, any pre-check errors and if we want tx fields.
edit: actually it's not possible to accurately compute the intrinsic cost now in tracers because they don't have access to the access list.
What are the use-cases?
Main reason I started thinking about this is in some of the tracers we have to compute the intrinsic cost & refund value (e.g. in the logger).
Implementation
Invoke the hooks here:
go-ethereum/core/state_transition.go
Line 275 in 8fddf27
func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { |