hardhat-ignition
hardhat-ignition copied to clipboard
Support disable batching
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
So the suggestion is to include config to force the batches into batches of size 1?
We don't have a plan for adding controls on batching in the medium term.