Skip to content

Better EIP-7702 ergonomics#325

Merged
sorpaas merged 3 commits intorust-ethereum:v0.xfrom
moonbeam-foundation:manuel/better-eip7702-ux
Jun 26, 2025
Merged

Better EIP-7702 ergonomics#325
sorpaas merged 3 commits intorust-ethereum:v0.xfrom
moonbeam-foundation:manuel/better-eip7702-ux

Conversation

@manuelmauro
Copy link
Copy Markdown
Contributor

Description

Using a Option<H160> for the authorization address allows to send a None value when the signature (r, s, y_parity) is invalid and the authorization needs to be skipped as described in step 3 of EIP-7702.

Copy link
Copy Markdown
Contributor

@RomarQ RomarQ left a comment

Choose a reason for hiding this comment

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

Not sure it matches with the following description. Will try to have a better look a it later today

If any step above fails, immediately stop processing the tuple and continue to the next tuple in the list. When multiple tuples from the same authority are present, set the code using the address in the last valid occurrence.

Copy link
Copy Markdown
Member

@sorpaas sorpaas left a comment

Choose a reason for hiding this comment

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

Looks right. It's also just equivalent if we just remove the item from authorization_list if signature verification fails.

@RomarQ
Copy link
Copy Markdown
Contributor

RomarQ commented Jun 26, 2025

Ye, I think it is better to skip the item when building the authorization_list if the signature is invalid, since this check will be redundant

@manuelmauro
Copy link
Copy Markdown
Contributor Author

Looks right. It's also just equivalent if we just remove the item from authorization_list if signature verification fails.

You're both right, that would be equivalent. However, removing items at the frontier level (in our case) would miscalculate gas costs, and filtering within evm still requires iteration.

I think the current approach is as efficient and better follows EIP-7702 specs given these constraints.

@sorpaas sorpaas merged commit 4d7b194 into rust-ethereum:v0.x Jun 26, 2025
2 checks passed
manuelmauro added a commit to moonbeam-foundation/evm that referenced this pull request Jul 14, 2025
* feat: ✨ make authorizing_address in authorization list optional

* test: ✅ test None authorizing_address

* style: 🎨 fmt
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.

3 participants