Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(relayer): add env vars for txmgr configs so they can be used in kube #17152

Merged
merged 2 commits into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading