Skip to content
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

core: check if sender is EOA #23303

Merged
merged 8 commits into from Aug 7, 2021
Merged

core: check if sender is EOA #23303

merged 8 commits into from Aug 7, 2021

Conversation

@holiman
Copy link
Contributor

@holiman holiman commented Jul 30, 2021

This is a rebased version of #23002. Some commits are dropped, and I didn't want to squash-delete those until I'm sure they're not needed, hence the new PR.

@holiman holiman force-pushed the sender-no-eoa-2 branch from 4e80452 to e9d8359 Jul 30, 2021
@holiman holiman added this to the 1.10.7 milestone Jul 30, 2021
Copy link
Contributor

@rjl493456442 rjl493456442 left a comment

LGTM!

@holiman holiman merged commit 0658712 into ethereum:master Aug 7, 2021
2 checks passed
@@ -220,6 +223,11 @@ func (st *StateTransition) preCheck() error {
st.msg.From().Hex(), msgNonce, stNonce)
}
}
// Make sure the sender is an EOA
if codeHash := st.state.GetCodeHash(st.msg.From()); codeHash != emptyCodeHash && codeHash != (common.Hash{}) {
Copy link
Member

@karalabe karalabe Aug 11, 2021

Why did you check against the zero hash? That should never happen.

@holiman
Copy link
Contributor Author

@holiman holiman commented Aug 12, 2021

sidhujag added a commit to sidhujag/go-ethereum that referenced this issue Aug 15, 2021
This adds a check to verify that a sender-account does not have code, which means that the codehash is either `emptyCodeHash` _OR_ not present. The latter occurs IFF the sender did not previously exist, a situation which can only occur with zero cost gasprices.
reds pushed a commit to reds/go-ethereum that referenced this issue Aug 28, 2021
This adds a check to verify that a sender-account does not have code, which means that the codehash is either `emptyCodeHash` _OR_ not present. The latter occurs IFF the sender did not previously exist, a situation which can only occur with zero cost gasprices.
i-norden added a commit to vulcanize/go-ethereum that referenced this issue Sep 10, 2021
This adds a check to verify that a sender-account does not have code, which means that the codehash is either `emptyCodeHash` _OR_ not present. The latter occurs IFF the sender did not previously exist, a situation which can only occur with zero cost gasprices.
atif-konasl added a commit to lukso-network/pandora-execution-engine that referenced this issue Oct 15, 2021
This adds a check to verify that a sender-account does not have code, which means that the codehash is either `emptyCodeHash` _OR_ not present. The latter occurs IFF the sender did not previously exist, a situation which can only occur with zero cost gasprices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants