Skip to content

Commit

Permalink
feat(relayer): add env vars for txmgr configs so they can be used in …
Browse files Browse the repository at this point in the history
…kube (#17152)
  • Loading branch information
cyberhorsey authored May 14, 2024
1 parent 0b95ca7 commit ec8a90e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/relayer/cmd/flags/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,86 @@ var (
Usage: "Number of confirmations which we will wait after sending a transaction",
Value: 1,
Category: txmgrCategory,
EnvVars: []string{"TXMGR_NUM_CONFIRMATIONS"},
}
SafeAbortNonceTooLowCount = &cli.Uint64Flag{
Name: "tx.safeAbortNonceTooLowCount",
Usage: "Number of ErrNonceTooLow observations required to give up on " +
"a tx at a particular nonce without receiving confirmation",
Value: 3,
Category: txmgrCategory,
EnvVars: []string{"SAFE_ABORT_NONCE_TOO_LOW_COUNT"},
}
FeeLimitMultiplier = &cli.Uint64Flag{
Name: "tx.feeLimitMultiplier",
Usage: "The multiplier applied to fee suggestions to put a hard limit on fee increases",
Value: 10,
Category: txmgrCategory,
EnvVars: []string{"FEE_LIMIT_MULTIPLIER"},
}
FeeLimitThreshold = &cli.Float64Flag{
Name: "tx.feeLimitThreshold",
Usage: "The minimum threshold (in GWei) at which fee bumping starts to be capped. " +
"Allows arbitrary fee bumps below this threshold.",
Value: 100.0,
Category: txmgrCategory,
EnvVars: []string{"FEE_LIMIT_THRESHOLD"},
}
MinTipCap = &cli.Float64Flag{
Name: "tx.minTipCap",
Usage: "Enforces a minimum tip cap (in GWei) to use when determining tx fees. 1 GWei by default.",
Value: 1.0,
Category: txmgrCategory,
EnvVars: []string{"MIN_TIP_CAP"},
}
MinBaseFee = &cli.Float64Flag{
Name: "tx.minBaseFee",
Usage: "Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 GWei by default.",
Value: 1.0,
Category: txmgrCategory,
EnvVars: []string{"MIN_BASE_FEE"},
}
ResubmissionTimeout = &cli.DurationFlag{
Name: "tx.resubmissionTimeout",
Usage: "Duration we will wait before resubmitting a transaction to L1",
Value: 48 * time.Second,
Category: txmgrCategory,
EnvVars: []string{"RESBUMISSION_TIMEOUT"},
}
TxSendTimeout = &cli.DurationFlag{
Name: "tx.sendTimeout",
Usage: "Timeout for sending transactions. If 0 it is disabled.",
Value: 0,
Category: txmgrCategory,
EnvVars: []string{"TX_SEND_TIMEOUT"},
}
TxNotInMempoolTimeout = &cli.DurationFlag{
Name: "tx.notInMempoolTimeout",
Usage: "Timeout for aborting a tx send if the tx does not make it to the mempool.",
Value: 2 * time.Minute,
Category: txmgrCategory,
EnvVars: []string{"TX_NOT_IN_MEMPOOL_TIMEOUT"},
}
ReceiptQueryInterval = &cli.DurationFlag{
Name: "tx.receiptQueryInterval",
Usage: "Frequency to poll for receipts",
Value: 12 * time.Second,
Category: txmgrCategory,
EnvVars: []string{"RECEIPT_QUERY_INTERVAL"},
}
TxGasLimit = &cli.Uint64Flag{
Name: "tx.gasLimit",
Usage: "Gas limit will be used for transactions (0 means using gas estimation)",
Value: 0,
Category: txmgrCategory,
EnvVars: []string{"GAS_LIMIT"},
}
RPCTimeout = &cli.DurationFlag{
Name: "rpc.timeout",
Usage: "Timeout in seconds for RPC calls",
Category: commonCategory,
Value: 12 * time.Second,
EnvVars: []string{"RPC_TIMEOUT"},
}
)

Expand Down

0 comments on commit ec8a90e

Please sign in to comment.