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

eth/client: Replace gas estimates with hardcoded values #1290

Closed
wants to merge 5 commits into from

Conversation

martonp
Copy link
Contributor

@martonp martonp commented Nov 14, 2021

There is no variation in the execution path for initiating swaps, so there's no point in doing gas estimations. The gas estimation happens without any external calls, and on any updates to the geth code which would invalidate the hardcoded values, the harness tests will let us know.

This will come on top of #1262

This diff updates the eth swap contract by removing the original
initiate function which only allows initiating one swap at a
time and renaming initiateBatch to initiate. The gas savings
from initiating a single swap using the old initiate function
are negligible and removing it greatly simplifies the codebase.
There can be no variation in the execution path for initiating
swaps, so there's no point in doing gas estimates.
@martonp martonp marked this pull request as draft November 14, 2021 12:03
@martonp
Copy link
Contributor Author

martonp commented Nov 16, 2021

I incorporated this change into #1248

@martonp martonp closed this Nov 16, 2021
@martonp martonp deleted the hardcodeGas branch December 20, 2022 22:09
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.

1 participant