-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: add withdrawal network and make withdrawal minimum configurable #5886
contracts-bedrock: add withdrawal network and make withdrawal minimum configurable #5886
Conversation
|
✅ Deploy Preview for opstack-docs canceled.
|
bd1bd8a
to
46006c8
Compare
Hey @dapperscene6! This PR has merge conflicts. Please fix them before continuing review. |
46006c8
to
4f21e80
Compare
@@ -136,19 +136,49 @@ interface RequiredDeployConfig { | |||
proxyAdminOwner: string | |||
|
|||
/** | |||
* L1 address which receives the base fee for the L2 network. | |||
* L1 or L2 address which receives the base fee for the L2 network. |
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.
Local or remote
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.
@tynes could you clarify what you're suggesting? Do you mean changing these comments to be: Local or remote address which receives the base fee for the L2 network.
?
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.
Yes exactly, I think using local or remote is better language because it generalizes to L3+. Its def not consistent throughout the codebase
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.
If I were to read "Local or remote address", personally I think I'd be very confused without context. I think a clearer and still more flexible expression may be something like
L1 or higher (eg L2) address which receives the base fee for the L2 network.
Not your fault but this is way too large of a diff for a change like this. Its the fault of how the codebase is architected. I'm thinking of ways to reduce friction in the future so that diffs can be smaller with these sorts of changes |
I was able to reproduce 7e22976 locally |
fda7c46
to
f9b6e46
Compare
packages/contracts-bedrock/contracts/test/SequencerFeeVault.t.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/contracts/test/SequencerFeeVault.t.sol
Outdated
Show resolved
Hide resolved
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.
Mostly echoing @tynes comments here, otherwise almost there!
@@ -136,19 +136,49 @@ interface RequiredDeployConfig { | |||
proxyAdminOwner: string | |||
|
|||
/** | |||
* L1 address which receives the base fee for the L2 network. | |||
* L1 or L2 address which receives the base fee for the L2 network. |
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.
If I were to read "Local or remote address", personally I think I'd be very confused without context. I think a clearer and still more flexible expression may be something like
L1 or higher (eg L2) address which receives the base fee for the L2 network.
f9b6e46
to
e1037ac
Compare
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.
Just two small corrections and I believe we're gtm
e1037ac
to
af94160
Compare
01442aa
to
87b2819
Compare
This looks good to me! |
/** | ||
* @notice Network which the RECIPIENT will receive fees on. | ||
*/ | ||
WithdrawalNetwork public immutable WITHDRAWAL_NETWORK; |
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.
If we want to upgrade existing fee vault contracts, does this variable need to be moved below the totalProcessed
variable, to preserve storage slots?
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.
Immutables are inlined in the bytecode, it's not in storage so this doesn't change the storage layout
Description
Modify
L1FeeVault
,BaseFeeVault
, andSequencerFeeVault
to have a configurable minimum withdrawal amounts and to be configured to withdraw to L1 or L2.This changes adds deploy-configuration parameters to already deployed chains which leads to said chains current deploy-configurations no longer being able to recreate the genesis state of said already deployed chains.
Hexadecimals were used for
MinimumWithdrawalAmount
configuration indeploy-configuration
for consistency though @smartcontracts and I discussed changing alldeploy-configuration
hexadecimals to decimal to increasedeploy-configuration
readability.Running
make bindings
inop-binding
created a larger diff than expected which I believe is causing some of the CI tests to fail.Tests
I've added solidity tests for the smart contract changes and golang tests for the golang changes.
Invariants
TBD
Additional context
These changes are necessary to enable daily revenue share on L2 as well as to reduce withdrawal fees on L1 by aggregating
FeeVault
earning prior to withdrawing to L1.Metadata
TODOs