-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFQ Relayer: concurrent request processing (#2739)
* Feat: set max open conns to 50 for relayer mysql * Feat: process each quote request in parallel * Feat: add GetDBStats to store and processDB span * Feat: add backoffs to relayer contract calls * Feat: do screener calls in parallel * Feat: add immediate handler forwarding * Fix: set should_relay=true if relayer addresses match * Fix: test * Fix: new goroutine for every reqeuest * Fix: immediately call Handle() vs underlying handler * Feat: add semaphore to limit max requests handled at once * Feat: add relayMtx and mutexMiddleware * Feat: process pre-relay and post-relay requests separately * Cleanup: coalesce processDB funcs, run two dbSelectors * Feat: use Lock() instead of TryLock() * Feat: check shouldProcess() and isProfitable() in parallel * Feat: run post-relay requests in serial * Feat: double wrap db selectors * Feat: get rid of MaxOpenConns * Feat: bump max concurrent requests * Feat: don't use semaphore in serial * Feat: use TryLock() instead of Lock() on sem and mtx * Fix: don't bubble up errors from forwarding * Nit: fix fix #2689 #2690 #2691 #2692 #2693 #2694 from #16 Co-authored-by: Daniel Wasserman <[email protected]> Co-authored-by: Trajan0x <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
80aa943
commit 28499ba
Showing
40 changed files
with
740 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.