@@ -21,9 +21,9 @@ contract AuctionDosTest is AuctionBaseTest {
2121
2222 // This test is quite slow so only fuzz 100 times. We hardcode most of the params for simplicity anyways
2323 /// forge-config: default.isolate = true
24- /// forge-config: default.gas_limit = 18446744073709551615
24+ /// forge-config: default.gas_limit = 9223372036854775807
2525 /// forge-config: ci.isolate = true
26- /// forge-config: ci.gas_limit = 18446744073709551615
26+ /// forge-config: ci.gas_limit = 9223372036854775807
2727 /// forge-config: default.fuzz.runs = 100
2828 /// forge-config: ci.fuzz.runs = 100
2929 function test_forceIterateOverTicks_preventsDoS (FuzzDeploymentParams memory _deploymentParams )
@@ -46,6 +46,7 @@ contract AuctionDosTest is AuctionBaseTest {
4646 _deploymentParams.auctionParams.endBlock = uint64 (_deploymentParams.auctionParams.startBlock + 1e7 );
4747 _deploymentParams.auctionParams.claimBlock = uint64 (_deploymentParams.auctionParams.endBlock + 1 );
4848 _deploymentParams.auctionParams.auctionStepsData = AuctionStepsBuilder.init ().addStep (1 , 1e7 );
49+ _deploymentParams.auctionParams.validationHook = address (0 );
4950
5051 auction = new ContinuousClearingAuction (
5152 address (token), _deploymentParams.totalSupply, _deploymentParams.auctionParams
@@ -75,7 +76,7 @@ contract AuctionDosTest is AuctionBaseTest {
7576 uint128 bidAmount = uint128 (FixedPointMathLib.fullMulDivUp (auction.totalSupply (), maxPrice, FixedPoint96.Q96));
7677
7778 // Move the auction up to the highest tick
78- auction.submitBid {value: bidAmount, gas: FUSAKA_TX_GAS_LIMIT }(maxPrice, bidAmount, alice, prevPrice, bytes ('' ));
79+ auction.submitBid {value: bidAmount}(maxPrice, bidAmount, alice, prevPrice, bytes ('' ));
7980
8081 vm.roll (block .number + 1 );
8182 // This should revert due to OOG
@@ -88,6 +89,9 @@ contract AuctionDosTest is AuctionBaseTest {
8889 emit ITickStorage.NextActiveTickUpdated (untilTickPrice);
8990 auction.forceIterateOverTicks {gas: FUSAKA_TX_GAS_LIMIT}(untilTickPrice);
9091
92+ emit log_named_uint ('gasleft ' , gasleft ());
93+ require (gasleft () > FUSAKA_TX_GAS_LIMIT, 'Gas left is not greater than FUSAKA_TX_GAS_LIMIT ' );
94+
9195 // Now you should be able to checkpoint
9296 auction.checkpoint {gas: FUSAKA_TX_GAS_LIMIT}();
9397 }
0 commit comments