-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Gas escalator middleware (#4211)
### Description Follow up to #3852 and #4098. This PR brings major fixes to the escalator: - A revamped escalator implementation, that was forked from ethers-rs and had various fixes applied to it. The most notable bug caused "infinite" gas price escalations to occur within a very short timespan, until the max configured gas price was reached. Full diff here: hyperlane-xyz/ethers-rs@950dd34...edf703a - Support for escalating EIP-1559 txs, in addition to the existing Legacy tx type support - Memory leak fix. Since each escalator instance spawns a thread and we create transient providers for each message, this created a memory leak of escalator tasks that would build up over time - on RC, memory usage had reached 27gb before we noticed. This PR merges in the changes from #4208 to stop the leak. Profiling results: - before the fix (62mb peak usage): ![Screenshot_2024-07-29_at_12 19 26](https://github.com/user-attachments/assets/5b52fecb-6733-481c-96fb-10f505b9bf8a) - after the fix (16mb peak usage): ![Screenshot_2024-07-29_at_12 19 53](https://github.com/user-attachments/assets/a78b9452-78cb-4b5b-9aa6-fe7f3a6ac683) ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues - Fixes #4108 ### Backward compatibility Yes ### Testing Manual testing using the unit test setup from ethers-rs, and using it on RC to observe it in the wild. Prom chain returns a `could not replace existing tx` error when a tx is resubmitted so the escalator won't be effective there, but this can be fixed later --------- Co-authored-by: Trevor Porter <tkporter4@gmail.com>
- Loading branch information
1 parent
9e9465e
commit d0e53f5
Showing
6 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters