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

Immutable gas refunder #150

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

shotaronowhere
Copy link
Contributor

@shotaronowhere shotaronowhere commented Feb 22, 2024

This immutable gas refunder is intended specifically as an optimization for the sequencer inbox. The immutable refunder is ~10k gas cheaper. Since the sequencer inbox now has a batch poster manager, the batch posters can change. To accommodate this, the immutable gas refunder no longer maintains a refundee allow list, only a single immutable allowed contract.

The other notable deviation from the mutable gas refunder is a small refactor of an event from

event RefundedGasCosts( address indexed refundee, address indexed contractAddress, bool indexed success, uint256 gas, uint256 gasPrice, uint256 amountPaid);

to

event SuccessfulRefundedGasCosts( uint256 gas, uint256 gasPrice, uint256 amountPaid);

and

event FailedRefundedGasCosts( uint256 gas, uint256 gasPrice, uint256 amountPaid);

which saves about 1000 gas.


There are ideas to avoid using a gas refunder all together, but whilst we still use a gas refunder, atleast an immutable version will cut costs.

@cla-bot cla-bot bot added the s label Feb 22, 2024
@gzeoneth gzeoneth self-requested a review March 5, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant