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

remove unused deployment detection code #423

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

gballet
Copy link
Owner

@gballet gballet commented Apr 29, 2024

During the geth review of the eip 4762 PR, we identified that IsDeployment was set at a location that was not necessary. This PR cleans it up in kaustinen-with-shapella as well, ahead of a rebase.

@@ -256,7 +254,6 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
// The depth-check is already done, and precompiles handled above
contract := NewContract(caller, AccountRef(addrCopy), value, gas)
contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), code)
contract.IsDeployment = creation
Copy link
Owner Author

Choose a reason for hiding this comment

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

for creation to be true, it means that the account did not exist (check L198). If the account does not exist, then len(code) == 0 on L249. So IsDeployment is never true.

This variable is used when calling (*EVM).create but not (*EVM).Call.

@gballet gballet changed the title remove unused code remove unused deployment detection code Apr 29, 2024
@gballet gballet merged commit 452f22d into kaustinen-with-shapella Apr 29, 2024
3 of 4 checks passed
gballet added a commit that referenced this pull request May 7, 2024
gballet added a commit that referenced this pull request May 8, 2024
gballet added a commit that referenced this pull request May 8, 2024
gballet added a commit that referenced this pull request May 8, 2024
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.

None yet

2 participants