Skip to content

tracers: tx-level hooks #24502

@s1na

Description

@s1na

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:

func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions