Finding a Chainlink VRF callback that exceeds its gas budget
The random word was generated, yet a consumer never recorded a result. An expensive callback path can use more gas than the limit chosen in the request.
Measure the expensive consumer branch
Replay representative callback inputs with production-like storage, including first writes and the largest supported batch. The sample compares measured budgets for three paths with a configured limit. The third path is short by 7,000 gas; passing the first two tests would hide it.
const limit = 100_000;
const samples = [68_000, 83_000, 107_000];
console.log(samples.map(used => limit - used));
Separate entropy capture from distribution
Consider storing the request ID and words during fulfillment, then running variable-cost distribution logic in a separate transaction. Inspect the coordinator fulfillment event and consumer storage to distinguish an attempted callback from a recorded result. A failed callback can still incur charges. Raising the outer transaction budget alone does not change the callback limit embedded in the original request.