Skip to content

internal/ethapi: don't set sender-balance to maxuint, fixes #16999#20783

Merged
fjl merged 4 commits intoethereum:masterfrom
holiman:no_billionaiers
Mar 23, 2020
Merged

internal/ethapi: don't set sender-balance to maxuint, fixes #16999#20783
fjl merged 4 commits intoethereum:masterfrom
holiman:no_billionaiers

Conversation

@holiman
Copy link
Copy Markdown
Contributor

@holiman holiman commented Mar 19, 2020

This fixes #16999 , but it may cause problem in other areas. Not sure what do do here...

@karalabe
Copy link
Copy Markdown
Member

The fix seems reasonable, we just need to make sure it doesn't touch some strange code path. Btw, can't we get rid of that dafultGasPrice constant? Is that used anywhere?

@fjl fjl changed the title ethapi: don't set sender-balance to maxuint, fixes #16999 internal/ethapi: don't set sender-balance to maxuint, fixes #16999 Mar 19, 2020
@fjl
Copy link
Copy Markdown
Contributor

fjl commented Mar 19, 2020

Please fix the lint error.

@fjl
Copy link
Copy Markdown
Contributor

fjl commented Mar 23, 2020

This change makes eth_call semantics a lot less surprising. I'm pretty something will break, but let's merge anyway.

@fjl fjl merged commit 39f5023 into ethereum:master Mar 23, 2020
@wjmelements
Copy link
Copy Markdown
Contributor

Thank you

@holiman holiman added this to the 1.9.13 milestone Apr 2, 2020
AusIV added a commit to NoteGio/go-ethereum that referenced this pull request Aug 20, 2020
AusIV added a commit to NoteGio/go-ethereum that referenced this pull request Nov 12, 2020
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
…16999 (ethereum#20783)

Prior to this change, eth_call changed the balance of the sender account in the
EVM environment to 2^256 wei to cover the gas cost of the call execution.
We've had this behavior for a long time even though it's super confusing.

This commit sets the default call gasprice to zero instead of updating the balance,
which is better because it makes eth_call semantics less surprising. Removing
the built-in balance assignment also makes balance overrides work as expected.
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.

return address.balance returns strange value

4 participants