hardhat-ignition icon indicating copy to clipboard operation
hardhat-ignition copied to clipboard

Support disable batching

Open L8D opened this issue 10 months ago • 1 comments

Describe the feature

My team is working is working with a specific chain (Autonomys/Subspace’s testnet, known as Taurus) where the eth_estimateGas call is failing when multiple transactions are in a batch. The workaround we found to get this working for us was to patch ignition’s batcher with this logic:

 private static _resolveNextBatch(batchState: BatchState): string[] {
     const allUnvisited = Object.entries(batchState.visitState)
       .filter(([, state]) => state === VisitStatus.UNVISITED)
       .map(([id]) => id);

     const allUnvisitedWhereDepsVisited = allUnvisited.filter((futureId) =>
       this._allDependenciesVisited(futureId, batchState)
     );
 
+     if (process.env.HARDHAT_IGNITION_DEPLOY_BATCHING === 'false') {
+       return [allUnvisitedWhereDepsVisited.sort()[0]];
+     }
+
-     return allUnvisitedWhereDepsVisited.sort();
   }

It would be great if this functionality could be officially supported in Ignition by adding some configuration to the hardhat config. For example:

// hardhat.config.js
module.exports = {
  ignition: {
    batching: false
  },
};

Search terms

disable batching

L8D avatar Jan 29 '25 20:01 L8D

So the suggestion is to include config to force the batches into batches of size 1?

kanej avatar Feb 25 '25 17:02 kanej

We don't have a plan for adding controls on batching in the medium term.

kanej avatar Oct 08 '25 17:10 kanej