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

Update EIP-7069: Extend rationale about gas costs #8506

Merged
merged 1 commit into from
May 8, 2024

Conversation

chfast
Copy link
Member

@chfast chfast commented Apr 29, 2024

No description provided.

@chfast chfast requested a review from eth-bot as a code owner April 29, 2024 16:11
@github-actions github-actions bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Apr 29, 2024
@chfast chfast marked this pull request as draft April 29, 2024 16:11
@eth-bot
Copy link
Collaborator

eth-bot commented Apr 29, 2024

✅ All reviewers have approved.

Copy link
Contributor

@pdobacz pdobacz left a comment

Choose a reason for hiding this comment

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

One minor remark (pls double check), otherwise looks good!

EIPS/eip-7069.md Outdated
@@ -121,6 +121,25 @@ The 63/64th rule is still applied, but
- At least `MIN_RETAINED_GAS` gas is retained prior to executing the callee,
- At least `MIN_CALLEE_GAS` gas is available to the callee.

The `MIN_CALLEE_GAS` rule is a replacement for stipend: it simplifies the reasoning about the gas costs and is applied uniformly for all introduced `*CALL` instructions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The `MIN_CALLEE_GAS` rule is a replacement for stipend: it simplifies the reasoning about the gas costs and is applied uniformly for all introduced `*CALL` instructions.
The `MIN_CALLEE_GAS` rule is a replacement for stipend: it simplifies the reasoning about the gas costs and is applied uniformly for all introduced `EXT*CALL` instructions.

EIPS/eip-7069.md Outdated

- **Caller required gas**: the minimum amount of gas a caller is required to have to execute a call instruction, lower value causes caller's OOG,
- **Caller cost (burned gas)**: the amount of gas deducted from the caller to execute the instruction, this amount is not available to the callee,
- **Caller min retained gas**: the minimum amount of gas the caller is guaranteed to have after the call, if this cannot be guaranteed the call fails with 0 without even reaching the callee,
Copy link
Contributor

Choose a reason for hiding this comment

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

"fails with 0" would apply to old CALL instructions. EXT*CALL return 1 on the stack (EXTCALL_REVERT in evmone)

@chfast chfast marked this pull request as ready for review May 8, 2024 14:03
@chfast chfast closed this May 8, 2024
@chfast chfast reopened this May 8, 2024
@eth-bot eth-bot enabled auto-merge (squash) May 8, 2024 14:13
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit c695b67 into ethereum:master May 8, 2024
25 checks passed
@chfast chfast deleted the eip7069_rationale_gas_costs branch May 8, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-update Modifies an existing proposal s-draft This EIP is a Draft t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants