Skip to content

Add EIP: Revamped CALL instructions#7069

Merged
eth-bot merged 19 commits intoethereum:masterfrom
ipsilon:calls2
Jun 5, 2023
Merged

Add EIP: Revamped CALL instructions#7069
eth-bot merged 19 commits intoethereum:masterfrom
ipsilon:calls2

Conversation

@axic
Copy link
Member

@axic axic commented May 25, 2023

No description provided.

@axic axic requested a review from eth-bot as a code owner May 25, 2023 13:50
@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels May 25, 2023
@eth-bot
Copy link
Collaborator

eth-bot commented May 25, 2023

✅ All reviewers have approved.

@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels May 25, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label May 25, 2023
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels May 25, 2023
@github-actions
Copy link

The commit bc83e6f (as a parent of c9d3ac9) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label May 25, 2023
EIPS/eip-7069.md Outdated

The new instructions do not allow specifying a gas limit, but rather rely on the "63/64th rule" ([EIP-150](./eip-150.md)) to limit gas. An important improvement is the rules around the "stipend" are simplified, and callers do not need to perform special calculation whether the value is sent or not.

Furthermore, the obsolete functionality of specifying output buffer address is removed, because it is predominantly unused and implementers prefer to use `RETURNDATACOPY` instead. One exception is the case when the expected return size is known (i.e. non-dynamic return values), Solidity still uses the output buffer.
Copy link
Contributor

@charles-cooper charles-cooper May 25, 2023

Choose a reason for hiding this comment

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

vyper always uses the output buffer, and only uses returndatacopy to bubble up revert data. removing the output buffer parameters would result in slightly more (1-2 bytes) bytecode per external call. however, if this proposal also introduced a RETURNDATALOAD instruction it could be a net savings because we could perform ABI decoding directly from returndata, and therefore skip certain returndatasize checks due to returndatacopy oob semantics.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was moved to rationale and included Vyper's case.

@axic axic requested review from SamWilsn and lightclient May 28, 2023 07:26
delaaxe
delaaxe previously approved these changes May 29, 2023

Lastly, instead of returning a boolean for execution status, an extensible list of status codes is returned: `0` for success, `1` for revert, `2` for failure.

We expect most new contracts to rely on the new instructions (for simplicity and in order to save gas), and some specific contracts where gas limiting is required to keep using the old instructions (e.g. [ERC-4337](./eip-4337.md)).
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
We expect most new contracts to rely on the new instructions (for simplicity and in order to save gas), and some specific contracts where gas limiting is required to keep using the old instructions (e.g. [ERC-4337](./eip-4337.md)).

should also be moved to motivation/rationale

Copy link
Member Author

@axic axic Jun 5, 2023

Choose a reason for hiding this comment

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

Ok perhaps fine to move to motivation, but rationale? The reason it was put into the abstract to raise awareness, since 4337 is a hot topic.

@axic
Copy link
Member Author

axic commented Jun 5, 2023

@g11tech @SamWilsn @lightclient is this closer to merging now?

@axic axic requested review from SamWilsn and g11tech June 5, 2023 13:44
Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

looks good from my side, leaving to @SamWilsn for final review

@eth-bot eth-bot enabled auto-merge (squash) June 5, 2023 17:34
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 131bc90 into ethereum:master Jun 5, 2023
@axic axic deleted the calls2 branch June 5, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants