Skip to content

Conversation

@trantienduchn
Copy link
Contributor

@trantienduchn trantienduchn commented Mar 25, 2025

@trantienduchn trantienduchn changed the title WIP 7680 core/state: correct account selfdestruct EIP-6780 Mar 25, 2025
@trantienduchn trantienduchn changed the title core/state: correct account selfdestruct EIP-6780 core/state: correct account selfdestruct EIP-6780 (part of 7702) Mar 26, 2025
This pull request fixes the broken feature where the entire storage set is overridden.

Originally, the storage set override was achieved by marking the associated account
as deleted, preventing access to the storage slot on disk. However, since #29520, this
flag is also checked when accessing the account, rendering the account unreachable.

A fix has been applied in this pull request, which re-creates a new state object with all
account metadata inherited.
Copy link
Contributor

@minh-bq minh-bq left a comment

Choose a reason for hiding this comment

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

With quick review, the PR LGTM.

@trantienduchn
Copy link
Contributor Author

trantienduchn commented Mar 26, 2025

Test TestTracingWithOverrides failed as the SetStorage() changed, the reason is StateObject.fakeStorage was not initialized in test, thus it broke.

	if s.fakeStorage == nil {
		s.fakeStorage = make(Storage)
	}

Doable step: remove fakeStorage?

Related PR: ethereum/go-ethereum#24916

@trantienduchn trantienduchn merged commit 09ce003 into ronin-chain:eip-7702 Mar 27, 2025
1 check passed
trantienduchn added a commit to trantienduchn/ronin that referenced this pull request May 21, 2025
Member PRs:
- ronin-chain#32 `core/types: setcode tx type`
- ronin-chain#33 `core/types: transaction NewMessage() add authList`
- ronin-chain#35 `core/vm: update 7702 EVM resolve code & gas estimation`
- ronin-chain#38 `core: state_transition with AuthList`
- ronin-chain#41 `internal, graphql, test: remaining components of 7702`
- ronin-chain#46 `all: refactor names & singner 7702`
- ronin-chain#47 `core/types, test: correct chainId 7702`
- ronin-chain#49 `core/txpool: support SetCode tx 7702`
- ronin-chain#53 `core/state: correct account selfdestruct EIP-6780 (part of 7702)`
- ronin-chain#55 `core/txpool/legacypool: reject gapped tx from delegated account`

---------

Co-authored-by: sonhv0212 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Shude Li <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: buddho <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: rekyyang <[email protected]>
Co-authored-by: sashabeton <[email protected]>
Co-authored-by: sashabeton <[email protected]>
chiphamskymavis pushed a commit that referenced this pull request May 21, 2025
* pick up ethereum/go-ethereum#29520

* core/state: update test cases

* core/state: fix SetStorage override behavior (#30185)

This pull request fixes the broken feature where the entire storage set is overridden.

Originally, the storage set override was achieved by marking the associated account
as deleted, preventing access to the storage slot on disk. However, since #29520, this
flag is also checked when accessing the account, rendering the account unreachable.

A fix has been applied in this pull request, which re-creates a new state object with all
account metadata inherited.

* fixup! pick up ethereum/go-ethereum#29520

* fixup! core/state: fix SetStorage override behavior (#30185)

---------

Co-authored-by: rjl493456442 <[email protected]>
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