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

Increase gas limit #2048

Merged
merged 4 commits into from
Nov 7, 2023
Merged

Increase gas limit #2048

merged 4 commits into from
Nov 7, 2023

Conversation

sunce86
Copy link
Contributor

@sunce86 sunce86 commented Nov 7, 2023

Description

The point of gas limit factor is to take into consideration possible small changes in gas estimation from block to block during submission.
However, recently seasolver submitted solutions on gnosis chain that have a significant amount of gas refunds. Gas refunds are refunded at the very end of the execution in the EVM, so if the gas limit is set too low, peak gas usage during EVM execution can exceed it and return OutOfGas error.

Setting the factor to 2.0 seems safe, since I don't think nothing catastrophic can happen even if we spend double gas in case of an error.

Changes

Adjusted factor for both submission but also for colocated driver settlement encoding where factor is used to calculate the required eth balance of solver. Although the latter one doesn't seem necessary, I decided to do it anyway for consistency.

@sunce86 sunce86 requested a review from a team as a code owner November 7, 2023 13:24
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Nice! I dreaded debugging this issue. 😬

@sunce86 sunce86 enabled auto-merge (squash) November 7, 2023 20:11
@sunce86 sunce86 merged commit 5bb6b2b into main Nov 7, 2023
7 checks passed
@sunce86 sunce86 deleted the increase-gas-limit branch November 7, 2023 20:31
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants