-
Notifications
You must be signed in to change notification settings - Fork 419
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
Update IGP gas oracles with new heuristics, get Cosmos gas prices from registry #3662
Conversation
… trevor/oracle-updates
…acus-monorepo into trevor/oracle-updates
… trevor/oracle-updates
… trevor/oracle-updates
… trevor/oracle-updates
… trevor/oracle-updates
… trevor/oracle-updates
… trevor/oracle-updates
… trevor/oracle-updates
|
… trevor/oracle-updates
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3662 +/- ##
=======================================
Coverage 74.28% 74.28%
=======================================
Files 108 108
Lines 1217 1217
Branches 132 132
=======================================
Hits 904 904
Misses 297 297
Partials 16 16
|
… trevor/oracle-updates
Description
The original and main motivation of this PR was to feel confident when running
deploy.ts -m igp
off of main. Prior to this, running it off main could result in misconfiguring gas oracles, particularly when it came to non-EVM remotes. See https://github.com/hyperlane-xyz/issues/issues/1178 for some context.This PR does a number of things:
gasPrices.json
now lets you specify the decimals relating to the amount in there. There are 2 reasons for this: it's easier for us to deal with gwei values for EVM chains (as we often end up manually changing these instead of just relying on the script). The second reason is covered in the next bullet0.0053
. This poses issues because the IGP contracts require the gas price that's configured onchain to be an integer. Simply rounding up from 0.0053 to 1 results in almost 2 orders of magnitude difference :(. So the solution here is to have some logic that accommodates really tiny gas prices by scaling up the configured gas price and scaling down the configured token exchange rate.update-agent-config.ts
will fetch gas prices for Cosmos chains from the Cosmos registry and ensure they're accurateDrive-by changes
Some logging messages when applying IGP gas oracle changes to make it more clear what the change actually does
Related issues
Backward compatibility
Fully backward compatible
Testing
Ran deploy.ts for the IGP on all chains!