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

feat: middleware submission tweaks #23

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

daniel-savu
Copy link

@daniel-savu daniel-savu commented Dec 16, 2024

  • adds txs to gas escalator before any broadcast. If there's an immediate error when broadcasting, the escalator will keep trying to resubmit with a higher gas price
  • resyncs the nonce manager's internal nonce to the one onchain every 10 txs

both are short-term fixes for the issues dicussed in https://www.notion.so/hyperlanexyz/State-of-EVM-provider-middleware-16c6d35200d680d8a6b5f0d32cd8c66b?pvs=4

@daniel-savu daniel-savu force-pushed the dan/wip-escalate-before-broadcast branch from 693f9de to ac7b7c9 Compare January 2, 2025 19:07
@daniel-savu daniel-savu marked this pull request as ready for review January 2, 2025 19:27
@daniel-savu daniel-savu changed the title wip: add tx to escalator before any broadcast feat: middleware submission tweaks Jan 2, 2025
@daniel-savu daniel-savu merged commit f18abe3 into hyperlane Jan 3, 2025
5 of 10 checks passed
daniel-savu added a commit that referenced this pull request Jan 9, 2025
daniel-savu added a commit that referenced this pull request Jan 9, 2025
reevrting so we can deploy other fixes to prod in the meantime
daniel-savu added a commit that referenced this pull request Jan 9, 2025
daniel-savu added a commit that referenced this pull request Jan 10, 2025
re-adds middleware fixes to test on RC context
github-merge-queue bot pushed a commit to hyperlane-xyz/hyperlane-monorepo that referenced this pull request Jan 13, 2025
### Description

Uses the short-term fixes described in this [design
doc](https://www.notion.so/hyperlanexyz/State-of-EVM-provider-middleware-16c6d35200d680d8a6b5f0d32cd8c66b?pvs=4)
and implemented in hyperlane-xyz/ethers-rs#23

These fixes are expected to make the relayer self-recover from nonce
gaps.

An expected drawback is that tx hashes are dropped more often due to the
nonce manager resyncing to nonces that end up being too low by 1, which
can slow down submissions. After 12h of testing, any submit queue spikes
were only 1 min long and the biggest one had 7 messages - so short
enough not to trigger the "rising submit queue" alert which stays
pending for 6min:
https://abacusworks.grafana.net/alerting/de6hwplr7eakgc

### Drive-by changes
- Removes verbosity from a bunch of logs (we had `HyperlaneMessage` in a
single log occur 6-7 times, but wasn't noticeable in `span`s because it
was originating from args named `message` which have a clash with inner
workings of the `tracing` lib)
- rewords some logs because they were misleading

### Related issues
Fixes: #5107

### Backward compatibility
Yes

### Testing
E2E with a gas escalator that randomly dropped every other tx - the
nonce manager was able to recover but was slower to submit. Then
evaluated on RC for 12h as described above.
fmorency pushed a commit to fmorency/hyperlane-agents that referenced this pull request Feb 20, 2025
### Description

Uses the short-term fixes described in this [design
doc](https://www.notion.so/hyperlanexyz/State-of-EVM-provider-middleware-16c6d35200d680d8a6b5f0d32cd8c66b?pvs=4)
and implemented in hyperlane-xyz/ethers-rs#23

These fixes are expected to make the relayer self-recover from nonce
gaps.

An expected drawback is that tx hashes are dropped more often due to the
nonce manager resyncing to nonces that end up being too low by 1, which
can slow down submissions. After 12h of testing, any submit queue spikes
were only 1 min long and the biggest one had 7 messages - so short
enough not to trigger the "rising submit queue" alert which stays
pending for 6min:
https://abacusworks.grafana.net/alerting/de6hwplr7eakgc

### Drive-by changes
- Removes verbosity from a bunch of logs (we had `HyperlaneMessage` in a
single log occur 6-7 times, but wasn't noticeable in `span`s because it
was originating from args named `message` which have a clash with inner
workings of the `tracing` lib)
- rewords some logs because they were misleading

### Related issues
Fixes: hyperlane-xyz/hyperlane-monorepo#5107

### Backward compatibility
Yes

### Testing
E2E with a gas escalator that randomly dropped every other tx - the
nonce manager was able to recover but was slower to submit. Then
evaluated on RC for 12h as described above.
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.

3 participants