Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.