Skip to content
D20DAO

Can a D20DAO Callback Retry Use More Gas?

Separate callback allowance from transaction gas on Arc and Robinhood Chain. Size consumer storage work and retry delivery with the same accepted word.

Yes, within the coordinator's retry rules

A contract request has an accepted random word, but its consumer callback failed. Can retrying with more gas help? In D20DAO's current Arc and Robinhood coordinators, retryCallback(requestId, gasLimit) can raise the callback allowance. It delivers the same stored word rather than opening another draw.

Two budgets still matter: the gas the coordinator may forward to the consumer, and the gas available to the outer transaction. Increasing only the transaction limit does not change the allowance selected for that callback attempt. Diagnose which budget or application condition caused the failure before retrying.

The allowance covers the whole consumer call

The original callbackGasLimit is stored when the request is created and used for its first delivery. It covers the external consumer entry point, including authentication, request lookup, state checks, storage writes and any emitted application events. Budgeting only the final assignment leaves out that surrounding work.

The outer transaction also performs coordinator work. EVM call forwarding has its own headroom rule, which the coordinator accounts for before making the bounded call. Setting the transaction limit equal to the callback allowance is insufficient. Estimate the complete transaction path instead of treating the two limits as interchangeable.

Quote the allowance your consumer requests

callbackGasLimit is an input to the service-fee calculation. Choose it for the bounded callback you intend to run, then obtain the matching quote. A consumer contract can call quoteFee with that allowance inside its requesting transaction. Raising the allowance can affect the dynamic fee, although the configured minimum may dominate.

Keep service payment and transaction gas separate in the interface and implementation. More gas on the request transaction does not enlarge the stored delivery allowance. A later delivery retry does not charge another request fee, but the wallet submitting that retry still pays its network transaction gas.

A retry changes the attempt, not the original request

The current randomness retry accepts a gasLimit from 30,000 through 1,000,000, and it must not be below the request's original callbackGasLimit. The request must already be fulfilled and not successfully delivered. Anyone may submit this retry; the consumer still authenticates the coordinator as its callback caller.

A higher retry allowance does not rewrite the original stored limit or replace the accepted word. It also needs sufficient outer transaction gas. Check the deployed implementation and current API before constructing the recovery call, rather than copying a signature or limit from an unrelated refund-notification retry.

A failed callback differs from a reverted transaction

If the consumer call reverts or exhausts its allowance while the outer fulfillment transaction succeeds, the accepted word remains recorded and delivered is false. Inspect that request state and CallbackAttempted before deciding on recovery.

InsufficientCallbackGas is different: the coordinator rejects an attempt without enough remaining gas for its callback budget and reserve. If the enclosing transaction reverts, its writes and events roll back, including proof acceptance attempted earlier in it. A reverted retry does not erase a word accepted in an earlier transaction. A timeout or failed RPC read establishes neither outcome. Confirm the canonical receipt and state rather than assuming every failed transaction left a retryable accepted result.

Measure the expensive state paths locally

A callback that succeeds against an already populated record can give a misleading budget for a fresh request. Storage costs depend on existing values and transaction access state. Include fresh storage, existing records and separate-transaction access patterns in your measurement cases.

Measure the authenticated callback through the intended consumer and coordinator path. Record compiler settings and target-network execution rules, then leave justified headroom above the observed cases. Arc's simulation guidance explains why a generic local fork can miss network-specific behavior. These measurements would support your implementation; this guide reports no completed gas benchmark.

More gas does not repair a logic revert

Keep delivery focused on authenticating the coordinator, resolving the expected request and storing the word. Run expensive application actions separately. Unbounded loops or external calls make a callback's cost and availability harder to control.

A paused consumer, invalid operation state or deliberately reverting dependency may still fail with a larger allowance. Diagnose the failing condition instead of repeatedly increasing gas. After a successful delivery, the coordinator rejects another retry. Application workers must likewise avoid executing an already completed action twice. An accepted result remains the original result throughout recovery.

Use acceptance cases for both limits

Use these cases when implementing your consumer and recovery flow. They are review requirements, not executed test results:

  1. Measure a fresh request record as well as already initialized storage.
  2. Fail the callback allowance, preserve an accepted word and recover that same word with a valid higher retry allowance.
  3. Reject retry gas below the original allowance or outside the current bounds.
  4. Exercise insufficient outer gas and verify that a reverted transaction creates no accepted state or surviving events.
  5. Preserve authentication and completed-operation guards when delivery or application work is repeated.