Open dwasse opened 2 weeks ago
The recent updates in the RFQ relayer service's handlers.go
and statushandler.go
focus on optimizing concurrent processing. Specifically, handleSeen
in QuoteRequestHandler
was refactored to concurrently run ShouldProcess
and IsProfitable
checks using errgroup
, improving efficiency. Similarly, gas sufficiency checks on origin and destination chains have been refactored to run in parallel, reducing latency.
File | Change Summary |
---|---|
handlers.go (.../service ) |
Refactored handleSeen in QuoteRequestHandler to use errgroup for concurrent ShouldProcess and IsProfitable |
statushandler.go (.../service ) |
Refactored gas sufficiency checks to be performed concurrently using errgroup.WithContext |
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
In a realm of Go's fine dance,
Concurrency took its chance,
Quote checks leap in parallel flight,
Gas sufficiency joins the light.
Swiftly now, our code does prance,
For speed and grace, we'd gladly enhance.
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?
Attention: Patch coverage is 0%
with 43 lines
in your changes missing coverage. Please review.
Project coverage is 25.42623%. Comparing base (
1e61249
) to head (1232964
). Report is 2 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
services/rfq/relayer/service/statushandler.go | 0.00000% | 25 Missing :warning: |
services/rfq/relayer/service/handlers.go | 0.00000% | 18 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Latest commit: |
1232964
|
Status: | ✅ Deploy successful! |
Preview URL: | https://2c8ac2b3.sanguine-fe.pages.dev |
Branch Preview URL: | https://feat-rfq-more-speedups.sanguine-fe.pages.dev |
Addresses #2743
Summary by CodeRabbit
ShouldProcess
andIsProfitable
checks concurrently.