Skip to content

Conversation

@0xKarl98
Copy link
Contributor

@0xKarl98 0xKarl98 commented Nov 19, 2025

This aims at resolving issues mentioned in #382 , typically this one :
image

To fix this , what i did was :

  • Keep track of addresses that are marked as Create and were truly empty in the database snapshot. Only these addresses are filtered from the prestate diff so prefunded contract deployments remain visible.

  • Introduce account_was_empty helper to avoid re-computing the emptiness check and add a regression test (prestate_diff_keeps_prefunded_created_accounts) that covers a prefunded creation vs. a true empty-address creation.

cc @mattsse Please check it out if it resolves

should close this one paradigmxyz/reth#19703

Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

sorry for the delay, smol suggestion

Comment on lines 339 to 340
if changed_acc.is_created() && account_was_empty(&db_acc) {
created_on_empty_accounts.insert(addr);
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this equivalent to mapping to AccountChangeKind::Modify in this check

https://github.com/paradigmxyz/revm-inspectors/blob/main/src/tracing/builder/geth.rs#L328-L330

like we did in #382
then we don't need two maps

Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

tysm

@mattsse mattsse merged commit fd4cf14 into paradigmxyz:main Nov 28, 2025
12 checks passed
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