diff --git a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryBase2_2.sol b/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryBase2_2.sol index 704b809749b..1edef74d571 100644 --- a/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryBase2_2.sol +++ b/contracts/src/v0.8/automation/dev/v2_2/AutomationRegistryBase2_2.sol @@ -48,10 +48,10 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner { // Next block of constants are only used in maxPayment estimation during checkUpkeep simulation // These values are calibrated using hardhat tests which simulates various cases and verifies that // the variables result in accurate estimation - uint256 internal constant REGISTRY_CONDITIONAL_OVERHEAD = 55_000; // Fixed gas overhead for conditional upkeeps + uint256 internal constant REGISTRY_CONDITIONAL_OVERHEAD = 60_000; // Fixed gas overhead for conditional upkeeps uint256 internal constant REGISTRY_LOG_OVERHEAD = 110_400; // Fixed gas overhead for log upkeeps - uint256 internal constant REGISTRY_PER_SIGNER_GAS_OVERHEAD = 7_500; // Value scales with f - uint256 internal constant REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD = 16; // Per perform data byte overhead + uint256 internal constant REGISTRY_PER_SIGNER_GAS_OVERHEAD = 7_000; // Value scales with f + uint256 internal constant REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD = 22; // Per perform data byte overhead // The overhead (in bytes) in addition to perform data for upkeep sent in calldata // This includes overhead for all struct encoding as well as report signatures // There is a fixed component and a per signer component @@ -62,8 +62,7 @@ abstract contract AutomationRegistryBase2_2 is ConfirmedOwner { // tx itself, but since payment processing itself takes gas, and it needs the overhead as input, we use fixed constants // to account for gas used in payment processing. These values are calibrated using hardhat tests which simulates various cases and verifies that // the variables result in accurate estimation - // TODO re-adjust overheads - uint256 internal constant ACCOUNTING_FIXED_GAS_OVERHEAD = 22_500; // Fixed overhead per tx + uint256 internal constant ACCOUNTING_FIXED_GAS_OVERHEAD = 20_000; // Fixed overhead per tx uint256 internal constant ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD = 6_000; // Overhead per upkeep performed in batch LinkTokenInterface internal immutable i_link; diff --git a/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts b/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts index 3e30631bcd9..55097de8b1a 100644 --- a/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts +++ b/contracts/test/v0.8/automation/AutomationRegistry2_2.test.ts @@ -1879,7 +1879,7 @@ describe('AutomationRegistry2_2', () => { }, ) - describe.skip('Gas benchmarking conditional upkeeps [ @skip-coverage ]', function () { + describe('Gas benchmarking conditional upkeeps [ @skip-coverage ]', function () { const fs = [1, 10] fs.forEach(function (newF) { it( @@ -1999,7 +1999,7 @@ describe('AutomationRegistry2_2', () => { ), 'Gas overhead calculated is too high, decrease account gas variables (ACCOUNTING_FIXED_GAS_OVERHEAD/ACCOUNTING_PER_SIGNER_GAS_OVERHEAD) by at least ' + chargedGasOverhead - .sub(chargedGasOverhead) + .sub(actualGasOverhead) .sub(gasCalculationMargin) .toString()