Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

[feat] add call tracer and prestate tracer#1043

Merged
lispc merged 14 commits into
developfrom
feat/more-tracer
Jan 25, 2024
Merged

[feat] add call tracer and prestate tracer#1043
lispc merged 14 commits into
developfrom
feat/more-tracer

Conversation

@lightsing
Copy link
Copy Markdown

@lightsing lightsing commented Nov 23, 2023

This pr belongs to task: Remove heap allocation from GethExecStep/ExecStep

This sub pr:

  • adds callTracer and prestateTracer to l1/l2geth and use them in bus mapping
  • removes the deprecated access builder code

This sub pr depends on #1038

Note

This pr upgrade l1geth to v1.13.5, due to a bug of prestateTracer (see ethereum/go-ethereum#27691), which includes cankun upgrade (see also #1005).
The closest release of geth include this fix is v1.12.1, which already includes 0x5c and 0x5e opcode.
Upgrades l1geth breaks the unit-test of invalid-opcodes, since 0x5c and 0x5e are assigned by cankun.

@lightsing lightsing self-assigned this Nov 23, 2023
@lightsing lightsing changed the title [feat] add call tracer and prostate tracer [feat] add call tracer and prestate tracer Nov 24, 2023
# Conflicts:
#	eth-types/src/l2_types.rs
#	testool/src/utils.rs
@lightsing lightsing marked this pull request as ready for review November 24, 2023 08:25
@lightsing lightsing mentioned this pull request Nov 24, 2023
@lightsing lightsing requested a review from DreamWuGit November 25, 2023 06:43
# Conflicts:
#	eth-types/src/l2_types.rs
@lightsing lightsing force-pushed the feat/more-tracer branch 2 times, most recently from 442be5e to 00f6015 Compare November 27, 2023 06:13
@github-actions github-actions Bot added the CI label Nov 27, 2023
# Conflicts:
#	bus-mapping/src/circuit_input_builder/tracer_tests.rs
#	geth-utils/l2geth/go.mod
#	geth-utils/l2geth/go.sum
#	go.work.sum
#	zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs
@lispc
Copy link
Copy Markdown

lispc commented Jan 24, 2024

i think in this PR, both the local CGO linked l1-tracer and l2-tracer will include "mux" tracing results. My question is, inside integration/mainnet.rs, this tool uses ETH node rpc to fetch traces in multi steps. (Fetch traces first, then collect StateAccess, then fetch states and fill statedb). Do you think the integration/mainnet.rs will still work after this PR ?

Another questions is, we have a lot of existed trace files, after merging this PR, can they still be used as test inputs? In theory, zkevm-circuit can run in 2 mode: (1) StructLog without stack + PreStateTrace + CallTrace or (2) old style, StructLog with stack. Can we still support mode (2) with some config changes or it is totally broken?

@lispc
Copy link
Copy Markdown

lispc commented Jan 24, 2024

this is a big change PR. worth testool

@lispc
Copy link
Copy Markdown

lispc commented Jan 24, 2024

\b run testool

@lispc lispc merged commit e31fe3f into develop Jan 25, 2024
@lispc lispc deleted the feat/more-tracer branch January 25, 2024 09:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants