-
Notifications
You must be signed in to change notification settings - Fork 33
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
RFQ Relayer: more speedups #2757
Conversation
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This reverts commit 5fbdfaf.
WalkthroughThe recent updates in the RFQ relayer service's Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant QuoteRequestHandler
participant Quoter
Client ->> QuoteRequestHandler: handleSeen(request)
QuoteRequestHandler ->> Quoter: ShouldProcess(request) (concurrent)
QuoteRequestHandler ->> Quoter: IsProfitable(request) (concurrent)
Quoter -->> QuoteRequestHandler: shouldProcess
Quoter -->> QuoteRequestHandler: isProfitable
QuoteRequestHandler -->> Client: Return response
sequenceDiagram
participant Client
participant StatusHandler
participant OriginChain
participant DestinationChain
Client ->> StatusHandler: checkGasSufficiency()
StatusHandler ->> OriginChain: checkGas() (concurrent)
StatusHandler ->> DestinationChain: checkGas() (concurrent)
OriginChain -->> StatusHandler: gasStatus
DestinationChain -->> StatusHandler: gasStatus
StatusHandler -->> Client: Return response
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2757 +/- ##
===================================================
+ Coverage 25.36072% 25.42623% +0.06550%
===================================================
Files 783 726 -57
Lines 56276 53551 -2725
Branches 80 80
===================================================
- Hits 14272 13616 -656
+ Misses 40533 38532 -2001
+ Partials 1471 1403 -68
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Deploying sanguine-fe with Cloudflare Pages
|
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.
PR Summary
- Parallelized
ShouldProcess
andIsProfitable
checks inhandleSeen
usingerrgroup
for faster quote request processing (services/rfq/relayer/service/handlers.go
) - Parallelized gas sufficiency checks for origin and destination chains using
errgroup
to improve speed (services/rfq/relayer/service/statushandler.go
)
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- services/rfq/relayer/service/handlers.go (3 hunks)
- services/rfq/relayer/service/statushandler.go (2 hunks)
Additional comments not posted (2)
services/rfq/relayer/service/statushandler.go (1)
168-176
: LGTM! But verify the function usage in the codebase.The code changes are approved. Running gas sufficiency checks in parallel improves performance.
However, ensure that all function calls to
gasMiddleware
are correctly handling the new concurrency logic.services/rfq/relayer/service/handlers.go (1)
140-160
: LGTM! But verify the function usage in the codebase.The code changes are approved. Running
ShouldProcess
andIsProfitable
checks in parallel improves performance.However, ensure that all function calls to
handleSeen
are correctly handling the new concurrency logic.
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.
PR Summary
(updates since last review)
- Added
rfqRefund
command tocontrib/opbot/botmd/commands.go
for handling refund requests. - Introduced
UpsertQuotes
method inservices/rfq/api/db/api_db.go
for bulk quote handling. - Enhanced
services/rfq/relayer/quoter/quoter.go
to processShouldProcess
andIsProfitable
checks concurrently. - Added new configuration options in
services/rfq/relayer/relconfig/config.go
for enabling API withdrawals and embedded guard. - Updated
services/rfq/relayer/relapi/server.go
to include new routes for withdrawing and getting requests by transaction ID.
116 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Addresses #2743
Summary by CodeRabbit
ShouldProcess
andIsProfitable
checks concurrently.