Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

feat: add AUTHCALL instruction #18

Merged
merged 3 commits into from
Mar 29, 2024
Merged

Conversation

fgimenez
Copy link
Member

@fgimenez fgimenez commented Mar 18, 2024

Towards: #5

Implements AUTHCALL as described in EIP-3074. The logic is mostly the same as in the regular CALL, but it checks for the context variable authorized (set by AUTH) and, if present, is used as the caller in the subsequent call.

CALL's gas calculation requires a generic SPEC argument, in order to provide it for AUTHCALL we use spec_to_generic!, which sets it up using evm's Spec Id. For this to work I needed to properly setup the optimism feature for all the dependencies.

Base automatically changed from fgimenez/auth-authcall-instructions to main March 20, 2024 11:47
@fgimenez fgimenez added C-enhancement New feature or request A-instruction Related to an alphanet instruction labels Mar 22, 2024
@fgimenez fgimenez force-pushed the fgimenez/authcall-instruction branch from f778062 to 4d258ee Compare March 25, 2024 17:39
@fgimenez fgimenez changed the base branch from main to fgimenez/use-stateful-instruction-in-auth March 25, 2024 17:39
@fgimenez fgimenez force-pushed the fgimenez/authcall-instruction branch 3 times, most recently from c280839 to 1bb9343 Compare March 26, 2024 15:57
@fgimenez fgimenez changed the base branch from fgimenez/use-stateful-instruction-in-auth to main March 26, 2024 16:55
@fgimenez fgimenez force-pushed the fgimenez/authcall-instruction branch from 1bb9343 to 33dffda Compare March 26, 2024 18:50
@fgimenez fgimenez force-pushed the fgimenez/authcall-instruction branch from 33dffda to e162990 Compare March 27, 2024 08:33
@fgimenez fgimenez marked this pull request as ready for review March 27, 2024 15:45
@fgimenez fgimenez requested review from Rjected and mattsse March 27, 2024 15:45
Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

nice!

Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

nice, looks good to me!

@fgimenez fgimenez merged commit 0d4d8f0 into main Mar 29, 2024
12 checks passed
@fgimenez fgimenez deleted the fgimenez/authcall-instruction branch March 29, 2024 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-instruction Related to an alphanet instruction C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants