-
Notifications
You must be signed in to change notification settings - Fork 204
Description
Summary
When Arbitrum gas briefly spikes, the orchestrator raises its price per pixel (PPP) to match the instantaneous gas price. If PPP exceeds the broadcaster’s configured ceiling (e.g. 1200 wei), all active sessions are dropped, even though gas usually normalizes within seconds.
Root Cause
In pm/recipient.go, faceValue() and txCost() derive PPP directly from the current gas price. The hard-coded fallback avgGasPrice = 3 gwei, tuned for legacy Arbitrum, is inaccurate for Nitro, leading to an incorrect gas estimate. As a result, the calculated PPP can briefly appear to overshoot broadcaster limits and trigger job cancellations even though it should not. If orchestrators have autoAdjustPrice=true enabled it will amplify the issue.
Lines 311 to 313 in 9cbad82
| if faceValue.Cmp(txCost) < 0 && faceValue.Cmp(r.txCostWithGasPrice(avgGasPrice)) < 0 { | |
| return nil, errInsufficientSenderReserve | |
| } |
Impact
- Active streams are interrupted and must reconnect.
- Orchestrators lose revenue during the outage.
Recommended Fix
- Adjust the fallback: Raise the hard-coded
avgGasPriceto a level appropriate for Arbitrum Nitro. - Make it dynamic: Replace the static fallback with a rolling average (e.g., from
eth_feeHistory) to smooth transient spikes (see Use dynamically calculated average gas price over period of time in tx cost check for ticket face value #2078). - Use
maxGasPriceto avoid drops: Update the software so that when gas exceeds the configuredmaxGasPrice, the orchestrator continues transcoding at the fixed pixel price and redeems tickets later once gas falls, preventing session loss (see A sudden peak in gas price for few seconds result in all jobs are canceled. #1966 (comment)). - Optional flag to relax sender-reserve checks: Add a startup flag such as
--ignoreSenderReserveRequirementsso orchestrators can choose to verify only that the broadcaster’s deposit covers the ticket face value, ignoring full sender-reserve requirements.
Related to
- A sudden peak in gas price for few seconds result in all jobs are canceled. #1966
- Use dynamically calculated average gas price over period of time in tx cost check for ticket face value #2078
- Ability to turn off auto ticket redemption and manually redeem winning tickets #1757
- Retry transactions unsent because of too low
maxGasPrice#2118