-
Notifications
You must be signed in to change notification settings - Fork 534
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
Skip account balance check for eth_call #1949
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw what should happen in the TraceCall
, TraceTxn
, and TraceBlock
functions in the server.go
? Should those executions be payable, since those are related to debug_*
JSON RPC endpoints. I'm afraid that currently, they are payable, but it probably should not be from a logical standpoint. WDYT?
@Stefan-Ethernal re debug endpoints. The logic inside those endpoints implies using an already existing state stored within a block. If a transaction was mined into the block, it means there were no issues with the balance. In this case, it just does not make sense to switch on this flag since a tx sender had enough balance within a specific block so the balance check is going to pass when tracing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Btw would be awesome if we could include some e2e test (e.g. have dummy contract, account with 0 balance and make sure it is able to query the state of SC). We can do it through a separate PR if that makes sense to you.
@Stefan-Ethernal added e2e test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have estimateGas and maybe even debugTransaction calls inside e2e test?
Approved
@igorcrevar added e2e tests for those two endpoints. |
Description
No needed to check an account balance for eth_call. Accounts with zero balance still should be able to execute smart contract functions.
Changes include
Breaking changes
Please complete this section if any breaking changes have been made, otherwise delete it
Checklist
Testing