feat(contracts-bedrock): scale ResourceConfig to fit smaller gasLimits (v7.0.0)#20925
Open
maurelian wants to merge 1 commit into
Open
feat(contracts-bedrock): scale ResourceConfig to fit smaller gasLimits (v7.0.0)#20925maurelian wants to merge 1 commit into
maurelian wants to merge 1 commit into
Conversation
Production chains (gasLimit >= 21M) are unaffected. Below that, the deploy script derives a ResourceConfig whose maxResourceLimit + systemTxMaxGas matches the requested gasLimit, so small chains (e.g. 5M) can deploy without callers having to supply their own ResourceConfig.
5d52df0 to
ba86f94
Compare
JosepBove
approved these changes
May 20, 2026
stevennevins
approved these changes
May 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## proposal/op-contracts/v7.0.0 #20925 +/- ##
===============================================================
+ Coverage 76.4% 82.6% +6.2%
===============================================================
Files 186 131 -55
Lines 10695 6660 -4035
===============================================================
- Hits 8171 5502 -2669
+ Misses 2380 1158 -1222
+ Partials 144 0 -144
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #20919 to
proposal/op-contracts/v7.0.0.DeployOPChain.s.solnow derives theResourceConfigfrom_input.gasLimitvia a_resourceConfigForGasLimit(uint64)helper instead of hardcodingConstants.DEFAULT_RESOURCE_CONFIG(). ForgasLimit >= 21Mthe default is returned unchanged (every production chain), and below thatmaxResourceLimitis scaled down to fit while preservingsystemTxMaxGasand the EIP-1559 parameters. Enables small-chain deploys (e.g. 5M) without adding any new inputs to op-deployer.Cherry-pick was a clean auto-merge with no conflicts.