scroll-tech / go-ethereum

Scroll's fork of the official Go implementation of the Ethereum protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add call and prestate tracer to l2trace code

lightsing opened this issue · comments

Background

  1. Optimization of Trace Size: Aim to reduce the trace size by eliminating the stack trace of each execution step. Alternative methods are required to ascertain the result of each call, which introduce the need of callTracer.
  2. Issues with AccessSet Implementation: The implementation of AccessSet shows inaccuracies in specific edge cases, which introduce the need of prestateTracer
  3. Consistency Across L1 and L2 Code
  4. l2geth Version Limitation: The present l2geth version lacks the prestateTracer, which is available in the upstream version.

Requirements

  1. Integration of Geth Native Tracers: Implement the geth native tracers, specifically callTracer and prestateTracer (available here).
  2. Resolving Cycle-Import Issues: Address potential cycle-import problems when importing native tracers into the existing trace.go.

Secondary Objectives

  1. Porting Out-Bound Panic Fix: Implement the out-bound-read fix from GetMemoryCopyPadded.
  2. Porting muxTracer: Port the muxTracer to enable simultaneous operation of those three tracers.

Current Progress

  • An ad-hoc implementation is available in Issue #557 for reference and further development.

Next Step

Hands on infra team to decide how to do this.