-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving on the basis that merging will proceed once comments have been resolved.
Co-authored-by: smartcontracts <kelvin@optimism.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once CI is green
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
SystemConfig
contract. Now when users do a deposit, theOptimismPortal
will make a call to theSystemConfig
to 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
SystemConfig
emit an event when the resource config is updated, this would allow theop-node
to 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-node
so that the expensive calculations happen offchain and then allow the user to pay for the gas on L2.Closes CLI-3704
TODOs