feat(relayer): additional evm tx submission reliability mechanisms #1560
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.52) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1560"
general
weight: 0.35
dhfang
<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for creating a PR! ✰
v Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
v Also: make sure that you are familiar with the contribution guidelines: https://github.com/cosmos/.github/blob/main/CONTRIBUTING.md
v Failure to do this can result in your PR getting closed without further discussion (we receive a lot of PRs, and it takes a lot of time to respond to everyone who doesn't read this)
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
Description
<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->
While transaction submission currently has a timeout based retry mechanism, it is missing mitigations for several reliability issues. This pr addresses the following gaps:
Alternative Implementations Considered
Similar EVM based relayers have more complex transaction replacement and fee escalation mechanisms where they persist the original transaction in the database and have separate worker threads reprice and resubmit the original transaction if it stalls for too long. This is the direction I initially went with but it increased the complexity excessively. It required logic tracking the lifecycle of a transaction and persisting that state to the database. There were multiple tricky edge cases introduced around reconciling database state with chain state in a robust way. The choice that makes this complexity largely unnecessary in our implementation is that we do not try and reprice a previously submitted transaction if it stalls for too long, we just reclaim the nonce it used for the next transaction the TxSubmitter receives which may not have any overlap in the packets it relays with the original transaction.
The tradeoff is that this relies on the caller to monitor transactions they've previously submitted and resubmit any transactions that get dropped or replaced. Thankfully the relayer already did this. This is probably not ideal separation of concerns as retry logic is something the TxSubmitter should own but currently is a responsibility of the caller. Solving this with the alternative design was considered to be not worth the complexity introduced, but it can be considered in the larger relayer redesign which we are deferring for now.
---
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/) if anything is changed.godoccomments if relevant.Files changedin the GitHub PR explorer.<!-- This repository uses conventional commits, and the PR title is validated by the PR Lint workflow.
Example commit messages:
fix(cli): reconcile deployment config without losing custom settings
feat(relayer): add metrics
chore(deps): bump go.opentelemetry.io/otel
ci: update golangci-lint
docs: cli walkthrough updates
feat(e2e): add e2e dump
feat(api)!: this is an api breaking feature
-->