Remove gas limits in forc test
#7495
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR increases gas limits in
forc testtou64::MAX, essentially removing it.The motivation for the change was the need to benchmark heavy gas consuming algorithms. E.g., a brute force prime factorization of the number 9223372021822390277 took 21_474_836_627 gas units.
Note that other max parameters like script length, script data length, number of transaction parameters etc. are already set to
u64::MAX. Therefore, I don't see a drawback for this change.Checklist
Breaking*orNew Featurelabels where relevant.Note
Sets
with_max_gas_per_tx(u64::MAX)andblock_gas_limit = u64::MAXinmaxed_consensus_paramsforforc test.forc-test/src/lib.rs:TxParameters::DEFAULT.with_max_size(u64::MAX).with_max_gas_per_tx(u64::MAX).ConsensusParametersV1.block_gas_limit = u64::MAX.Written by Cursor Bugbot for commit 9e79bbb. This will update automatically on new commits. Configure here.