Skip to content

Re-create empty account#9180

Merged
damian-orzechowski merged 7 commits into
masterfrom
feature/arb-legacy-empty-account
Sep 18, 2025
Merged

Re-create empty account#9180
damian-orzechowski merged 7 commits into
masterfrom
feature/arb-legacy-empty-account

Conversation

@damian-orzechowski

@damian-orzechowski damian-orzechowski commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Changes

  • Allows to re-create selected empty account directly at IWorldState level.

Update:
Tested multiple approach to achieve this functionality, but unfortunately nothing works without modifying directly StateProvider. The goal is to be able to re-create an empty account, which normally is not allowed to be created with eip-158 enable.

  • Disabling eip-158 doesn't work as it then applies to all accounts, but it only needs to be applied to selected accounts (determined during transaction processing)
  • A similar approach is currently done in SystemTransactionReleaseSpec where a selected account is exempt from eip-158, but in this case, none of the accounts is known up-front
  • Tried implementing a decorator over IWorldState which reimplements eip-158 with an option to exempt selected accounts (on per block basis), which partially works. However, disabling eip-158 also modifies VirtualMachine, so it would also have to be re-implemented to achieve the goal (see ClearEmptyAccountWhenTouched).

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

@LukaszRozmej

LukaszRozmej commented Aug 21, 2025

Copy link
Copy Markdown
Member

Maybe use same pattern we do with SystemUser for AuRa where it is just exempted from Eip158 deletion?
Then if you create it on genesis (or when it is created) it won't be deleted.

@damian-orzechowski

damian-orzechowski commented Aug 21, 2025

Copy link
Copy Markdown
Contributor Author

Maybe use same pattern we do with SystemUser for AuRa where it is just exempted from Eip158 deletion? Then if you create it on genesis (or when it is created) it won't be deleted.

Is it only SystemUser which is exempt from EIP158? Looking at SystemTransactionReleaseSpec seems that it's just disabled for aura. Either way, could be an option - I need to confirm it was actually deleted in earlier blocks.

@MarekM25 MarekM25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we discuss it with Geth team?

@damian-orzechowski damian-orzechowski force-pushed the feature/arb-legacy-empty-account branch from ae7f243 to fae8593 Compare September 12, 2025 07:35
@damian-orzechowski damian-orzechowski changed the base branch from feature/arbitrum-setup to master September 12, 2025 07:36
Comment thread src/Nethermind/Nethermind.State/StateProvider.cs Outdated
Comment thread src/Nethermind/Nethermind.State/StateProvider.cs Outdated
@damian-orzechowski damian-orzechowski marked this pull request as ready for review September 18, 2025 07:30
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.

4 participants