-
Notifications
You must be signed in to change notification settings - Fork 16
feat: speed up transactions if they don't get included initially #636
Conversation
Warning Rate Limit Exceeded@sweexordious has exceeded the limit for the number of files or commits that can be reviewed per hour. Please wait 6 minutes and 34 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the @coderabbitai review command. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe changes involve updates to a Go codebase, likely part of a blockchain or cryptocurrency project interfacing with Ethereum. A new error type for pending transactions has been introduced, and the transaction waiting logic has been refactored into a new method that includes retry capabilities. Additionally, there's a new method for converting transactions to a legacy format, and an Ethereum client dependency has been added. Changes
Poem
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files selected for processing (3)
- evm/evm_client.go (1 hunks)
- relayer/errors.go (1 hunks)
- relayer/relayer.go (3 hunks)
Files skipped from review due to trivial changes (1)
- evm/evm_client.go
Additional comments: 4
relayer/errors.go (1)
- 12-12: The addition of
ErrTransactionStillPending
aligns with the PR objective to enhance transaction handling by introducing a specific error for pending transactions.relayer/relayer.go (3)
4-17: The addition of the
ethclient
import aligns with the PR's objective to enhance transaction handling by interacting with the Ethereum network.378-407: The implementation of
waitForTransactionAndRetryIfNeeded
method is consistent with the PR's objective to handle transactions that are not included in a block within a specified timeout period by re-querying the gas price and resending the transaction.409-421: The addition of the
toLegacyTransaction
method supports the PR's objective to ensure compatibility with legacy transaction formats.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #636 +/- ##
==========================================
- Coverage 25.91% 25.57% -0.35%
==========================================
Files 29 29
Lines 3044 3085 +41
==========================================
Hits 789 789
- Misses 2160 2201 +41
Partials 95 95 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- relayer/relayer.go (3 hunks)
Additional comments: 5
relayer/relayer.go (5)
4-17: The addition of the
ethclient
import aligns with the PR objective to enhance transaction processing flow by re-querying the gas price.378-407: The
waitForTransactionAndRetryIfNeeded
method implements the logic to wait for a transaction to be mined and retry with an updated gas price if necessary, which is in line with the PR objective.409-421: The
toLegacyTransaction
method is a new addition that supports the conversion of transactions to a legacy format, potentially for compatibility reasons as outlined in the PR summary.382-382: The previous comment about making the number of retry attempts configurable is still valid.
397-397: The previous comment about returning the error when sending the speed-up transaction fails is still valid.
Overview
Re-queries the gas price from the network in case the transaction doesn't get including during the provided timeout and resends it with it.
Checklist
Summary by CodeRabbit
New Features
Refactor
Documentation