Closed dwasse closed 1 month ago
The changes primarily enhance the transaction submitter functionality within the submitter
package by adding new metrics recording, a mock transaction submitter for testing, and pending transaction limits. Integration with the quoter
component of the relayer service along with updates to relevant tests and configurations has been completed to ensure better handling and monitoring of pending transactions.
File Path | Change Summary |
---|---|
ethergo/submitter/chain_queue.go |
Reordered imports, split a function call into two for metrics recording, added new metric recording operation. |
ethergo/submitter/mocks/transaction_submitter.go |
Added autogenerated mock TransactionSubmitter with mock functions for testing various scenarios. |
ethergo/submitter/queue.go |
Added a method call numPendingTxes.Set to set pending transactions for a specific chain ID. |
ethergo/submitter/submitter.go |
Introduced hashmap , added a method GetNumPendingTxes to the TransactionSubmitter interface and its implementation. |
services/rfq/relayer/quoter/quoter.go |
Added txSubmitter field to the Manager struct, modified NewQuoterManager , and added isNumPendingExceeded method to manage pending transactions. |
services/rfq/relayer/quoter_test.go |
Added functions setNumPendingTxes and setQuoter for testing, and included a new import for submitterMocks . |
services/rfq/relayer/suite_test.go |
Renamed import from fetcherMocks to submitterMocks , added txSubmitter in test setup. |
services/rfq/relayer/relconfig/config.go |
Introduced a new field MaxPendingTxes to the ChainConfig struct. |
services/rfq/relayer/relconfig/config_test.go |
Added MaxPendingTxes field in test configurations for ChainConfig . |
services/rfq/relayer/relconfig/getters.go |
Added the MaxPendingTxes field and a method GetMaxPendingTxes to retrieve the value. |
services/rfq/relayer/service/relayer.go |
Added a new parameter sm to the NewQuoterManager function call in NewRelayer . |
sequenceDiagram
participant Manager
participant txSubmitter
participant Quoter
Manager->>txSubmitter: Check GetNumPendingTxes
txSubmitter-->>Manager: Return number of pending tx
Manager->>Manager: Evaluate if pending tx exceed MaxPendingTxes
alt If exceeded
Manager--x Quoter: Do not generate quote
else If not exceeded
Manager->>Quoter: Proceed with quote generation
end
In the code, where metrics bloom,
Transaction counts dispel the gloom.
Pending tallies rise and fall,
Quoters heed the submitter's call.
Now our tests mock and play,
Limits keep delays at bay.
For in this realm of gears and bytes,
Precision reigns, and all's in sight.
🐇✨
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?
Latest commit: |
1cc152a
|
Status: | ✅ Deploy successful! |
Preview URL: | https://6803e375.sanguine-fe.pages.dev |
Branch Preview URL: | https://feat-pending-quoting.sanguine-fe.pages.dev |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 25.57974%. Comparing base (
a362a16
) to head (1cc152a
). Report is 114 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.
unrelated - think we want to merge?
can we resolve conflicts
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.
Summary by CodeRabbit
New Features
TransactionSubmitter
interface with methods to manage transaction submissions and statuses.Enhancements
QuoterManager
andRelayer
to integrate the newTransactionSubmitter
for better transaction handling.Testing Improvements