Skip to content

Tracing API v2 #30793

@fjl

Description

@fjl

This is the tracking issue for defining tracing API v2. The v2 API will not be backwards-compatible because we want to perform a major cleanup of the API. A backwards-compatibility adapter for v2 -> v1 could be provided, though we'll have to see if it's possible.

In general, it seems our initial goal of 'forever' backwards compatibility of the tracing API is not realistic. EVM changes can make certain hooks impossible to implement. So we need to figure out a deprecation cycle for hooks. A realistic goal is to support the last 3 or 4 versions. The registry could panic when a tracer with an unsupported hook is registered.

List of change ideas for v2:

  • move tracer registry into core/tracing
  • VMContext should be an interface (@karalabe request)
  • StateDB methods should not have Get* prefix (@karalabe request)
  • chain events need to be cleaned up
    • this goes back to core.ChainEvent vs. core.ChainHeadEvent. One of them delivers all heads, the other one will only be delivered occasionally for the latest head. We need to decide how that works.
  • reorg method in API with some kind of iterator over the blocks, like in @karalabe exex prototype
  • OnTxEnd should not have types.Receipt parameter. Use a custom, tracing-specific receipt type instead, so we do not have to fill in all the receipt fields.
  • bring back tx effective gas price (removed in core: switch EVM tx context in ApplyMessage #30809)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions