Skip to content

feat(gas_params): add configurable EIP-7702 auth refund#3366

Merged
rakita merged 1 commit intobluealloy:mainfrom
Himess:feat/configurable-eip7702-auth-refund
Feb 3, 2026
Merged

feat(gas_params): add configurable EIP-7702 auth refund#3366
rakita merged 1 commit intobluealloy:mainfrom
Himess:feat/configurable-eip7702-auth-refund

Conversation

@Himess
Copy link
Copy Markdown
Contributor

@Himess Himess commented Jan 28, 2026

Adds tx_eip7702_auth_refund parameter to GasParams to allow configuring the gas refund amount for EIP-7702 authorizations.

This enables custom hardforks to set different refund values (e.g., 0 for no refund).

Closes #3341

Add `tx_eip7702_auth_refund` parameter to `GasParams` to allow
configuring the gas refund amount for EIP-7702 authorizations
applied to existing accounts.

Previously this was hardcoded as:
  PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST (25000 - 12500 = 12500)

Now it can be configured via `GasParams::override_gas()` for custom
hardforks or chain configurations that need different refund behavior.

Changes:
- Add `GasId::tx_eip7702_auth_refund()` identifier
- Add `GasParams::tx_eip7702_auth_refund()` getter method
- Set default value in PRAGUE fork specification
- Update `apply_auth_list` to accept refund as parameter
- Update `apply_eip7702_auth_list` to read from GasParams

Closes bluealloy#3341
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 28, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing Himess:feat/configurable-eip7702-auth-refund (066fda1) with main (f3b74d4)

Summary

✅ 173 untouched benchmarks

@rakita rakita merged commit 1f6f6d3 into bluealloy:main Feb 3, 2026
31 checks passed
@github-actions github-actions bot mentioned this pull request Feb 3, 2026
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.

Configure gas_params Auth refund amount

2 participants