Skip to content

eth/tracers/logger: add create addresses to struct logs - #35561

Open
xternet wants to merge 1 commit into
ethereum:masterfrom
xternet:agent/create-address-vmlog
Open

eth/tracers/logger: add create addresses to struct logs#35561
xternet wants to merge 1 commit into
ethereum:masterfrom
xternet:agent/create-address-vmlog

Conversation

@xternet

@xternet xternet commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Adds the projected createAddr to CREATE and CREATE2 struct-log entries. Because the tracer hook runs before opcode execution, the address is still emitted if contract creation later fails, matching the behavior discussed in #28375.

CREATE uses the caller address and current nonce. CREATE2 uses the caller, salt, and selected init-code bytes. The field is exposed by both struct and streaming JSON loggers, legacy JSON, and human-readable output.

Tests:

  • go test ./eth/tracers/logger -count=1
  • go test ./cmd/evm -run "^TestEvmRun$" -count=1
  • GOMAXPROCS=20 GOFLAGS=-p=20 make all
  • go run ./build/ci.go test
  • go run ./build/ci.go lint
  • go run ./build/ci.go check_generate
  • go run ./build/ci.go check_baddeps

Fixes #28375

Expose the projected destination for CREATE and CREATE2 before opcode execution. The address remains useful when contract creation later fails.

Fixes ethereum#28375
@rjl493456442

Copy link
Copy Markdown
Member

Will discuss with team. I think this feature request is valid due to the following reasons:

  • stack can be disabled throughout the execution
  • for create2, the init code must be obtained from the memory which is usually disabled

Therefore, it's probably easier just exposing the address directly.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add CREATE2/CREATE destination address to vmlogs

2 participants