Skip to content

Commit

Permalink
improve: Reduce transaction submission retries (#2128)
Browse files Browse the repository at this point in the history
Because there are multiple providers for each chain, reduce the number
of retries on transaction submission to speed-up the case where a
transaction is actually unable to be submitted.

There are two layers of transaction submission at play - one at the 
quorum provider level, and one above. The quorum provider ensures that
transactions are submitted successively to each provider until success
or failure. For most chains, this means that transactions are submitted
to 2 - 3 providers per retry. The upper layer then implements its own 
retry mechanism, currently at 2 retries. In cases where the transaction
is ultimately unable to be submitted (i.e. underpriced replacement),
this results in multiple futile submission attempts.
  • Loading branch information
pxrl authored Feb 26, 2025
1 parent c688c3d commit 3a0db47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function runTransaction(
value = bnZero,
gasLimit: BigNumber | null = null,
nonce: number | null = null,
retriesRemaining = 2
retriesRemaining = 1
): Promise<TransactionResponse> {
const { provider } = contract;
const { chainId } = await provider.getNetwork();
Expand Down

0 comments on commit 3a0db47

Please sign in to comment.