Skip to content

docs: clarify prestateTracer behavior regarding code inclusion #31873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

samuelarogbonlo
Copy link

This PR improves documentation to clarify the behavior of prestateTracer that was reported in issue #31794.

The prestateTracer captures full account state by default, including code, even when only specific fields like balance are accessed. This behavior is intentional but was not clearly documented. This PR:

  1. Creates a TRACERS.md documentation file explaining prestateTracer behavior
  2. Adds a simple test example in test/prestate-tracer-example demonstrating the behavior with and without the disableCode option

The PR does not change any functionality, only improves documentation to help users understand the expected behavior and how to use the disableCode option when they want to exclude code from the trace output.

Fixes #31794

This improves documentation to clarify that prestateTracer captures
full account state by default, including code, even when only specific
fields like balance are accessed. The trace output can be controlled
using the disableCode configuration option.

Resolves ethereum#31794
@samuelarogbonlo samuelarogbonlo requested a review from s1na as a code owner May 21, 2025 22:55
@jsvisa
Copy link
Contributor

jsvisa commented May 22, 2025

I think our wiki page has already documented the prestate trace options, https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers#prestate-tracer

@samuelarogbonlo
Copy link
Author

I think our wiki page has already documented the prestate trace options, https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers#prestate-tracer

Thank you for pointing this out! You're absolutely right - the official documentation at https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers#prestate-tracer already covers this behavior comprehensively, including the disableCode option and examples.

I was not aware of this existing documentation when I created this PR. Since the information is already well-documented, I'll close this PR.

Thanks for the review and for pointing me to the existing documentation!

@s1na s1na closed this May 30, 2025
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.

The prestate tracer reports that the code was loaded when only the balance is read
3 participants