Skip to content

fix(op-reth): normalize CREATE2 DeBank traces - #16

Open
littlehand26 wants to merge 1 commit into
mainfrom
fix/debank-create2-type
Open

littlehand26 wants to merge 1 commit into
mainfrom
fix/debank-create2-type

Conversation

@littlehand26

Copy link
Copy Markdown
Contributor

Summary

  • normalize CREATE and CREATE2 to the DeBank high-level type=create value
  • keep call_type empty for contract creation traces
  • add a regression test for CREATE2 conversion

Test

cargo test -p reth-optimism-rpc -F reth-optimism-chainspec/superchain-configs create2_is_normalized_to_create --lib

@recursion128 recursion128 left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,改动 approve。

与 Go 侧规范实现一致(Chaintable/pipeline tracer/call_tracer.go:118-128、Chaintable/erigon debank/tracer/tracer.go:193-203):vm.CREATE, vm.CREATE2 统一映射为 CallCreateType = "create",CallType 留空。pipeline/docs/protocol.md:307 也是这么定义的。原来发 "create2" 是移植偏差,这里是在恢复与 geth/erigon 节点的一致性。

debank_id() 只用 tx_id/parent_trace_id/pos 计算,trace id 不受影响。新增的 tests 模块依赖(revm-inspectors 为正式 dependency、CallTrace/CallTraceNode 均有 Default)没问题,格式也是干净的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants