contracts-bedrock: modularize deposit resource config#5233
Conversation
|
✅ Deploy Preview for opstack-docs canceled.
|
|
Semgrep found 2 Unchecked type assertion. Created by unchecked-type-assertion. |
refcell
left a comment
There was a problem hiding this comment.
Nice; lovingly grated, tastefully made
a28336f to
0ed8dca
Compare
packages/contracts-bedrock/contracts/deployment/SystemDictator.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/contracts/echidna/FuzzOptimismPortal.sol
Outdated
Show resolved
Hide resolved
|
Marking do-not-merge while review happens |
|
seems like the majority of comments are around documentation |
maurelian
left a comment
There was a problem hiding this comment.
Approving on the basis that merging will proceed once comments have been resolved.
Co-authored-by: smartcontracts <kelvin@optimism.io>
|
removed |
The gas limit must be set to 30 million to ensure that the default deposit gas market config is safe to use. This was missed when #5233 was merged.
Description
Modularize the deposit resource config so that the source of truth is the
SystemConfigcontract. Now when users do a deposit, theOptimismPortalwill make a call to theSystemConfigto get the params instead of reading them from constant variables. This will not impact the amount of gas users spend when depositing because it tracks the gas usage of the computations required to determine how much gas will be burnt and will burn the difference between the gas used to compute how much gas needs to be burnt and the actual amount of gas to be burnt.A future PR may have the
SystemConfigemit an event when the resource config is updated, this would allow theop-nodeto track the config for the deposit gas market pricing. Right now it would be a no-op, but in the future we could move the computations that currently happen on L1 to make the 1559 curve into theop-nodeso that the expensive calculations happen offchain and then allow the user to pay for the gas on L2.Closes CLI-3704
TODOs