-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Describe the feature
Description
Enhance the EVM relayer logic to better manage transaction submission flow and network load by introducing tracking of the last mined transaction and configurable control over simultaneous in-flight transactions.
This optimization will prevent the relayer from submitting too many transactions at once, which often leads to entering the resubmission flow where gas prices must be bumped repeatedly before transactions can be mined.
By controlling simultaneous submissions, the system will improve reliability and stability during periods of network congestion or sudden gas price spikes.
Proposed Changes:
-
Track Last Mined Transaction
Maintain and update metadata of the last successfully mined transaction per relayer.
Use this information to assess network conditions and decide when to submit new transactions. -
Transaction Submission Logic
Before submitting a new transaction check how many transactions are currently in-flight (submitted but not yet mined).
If the number exceeds the configured threshold, delay submission until one or more transactions are confirmed.
For pending transactions periodically check how many inflight transactions there are.
If conditions allow, number of inflight less than configured, submit transaction. -
Configurable Maximum In-Flight Transactions
Introduce a configuration parameter: max_inflight_transactions.
This setting defines the maximum number of transactions that can be submitted simultaneously per relayer or per network.
The relayer must not submit new transactions if this limit is reached until existing ones are confirmed.