-
Notifications
You must be signed in to change notification settings - Fork 89
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
interop: Specify deposit handling #258
Conversation
9c80a82
to
3cad559
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.
I like the idea of the deposit context, offers a pretty clean separation.
Wondering how we can lift this outside of explicit actions, though - having each deposit (or the beginning/last deposit) hook into a call to L1Block
seems expensive over time.
Maybe prior to executing the L1 info transaction, the block executor can set the transient isDepositing
variable to true
in L1Block
, and then manually clear it after all deposits have been processed? This would ensure there's no gas impact on the downstream depositors, and it becomes a consensus rule.
specs/interop/predeploys.md
Outdated
#### `isDeposit` | ||
|
||
```solidity | ||
function isDeposit() (return bool) |
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.
Would fit very well as a transient storage variable.
We out of band decided on a sandwich approach where the L1 attributes tx sets |
I'm realizing that we need stronger guarantees on the cumulative gas usage of the L1 attributes tx and user deposits. Otherwise, the
The issue still occurs even if there aren't any user deposits as the first L1 info tx may be enough to fill the entire block (in theory, though unlikely in practice). We could re-examine the
Right now this isn't the case on mainnet. As the Other options as we've discussed earlier that don't have this problem:
We could also simply live with the possibility of interop being disabled temporarily. While this may be OK for a devnet, it shouldn't happen on mainnet. |
This 100% is a valid concern, I think we should:
We shouldn't have to think about this, its left over from old decisions and I think that we can solve this problem using a deposit queue which i made a draft spec for here: #82 |
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.
renaming resetIsDeposit
in favor of depositsComplete
Looks like this needs a rebase now @skeletor-spaceman, happy to review again when its ready |
@tynes merge ready :) |
@skeletor-spaceman The CI is failing |
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.
Solid spec! Left few suggestions and a question
Co-authored-by: Disco <[email protected]>
Co-authored-by: Disco <[email protected]>
Description
Add early specification of deposits for interop. Introduces a "deposit context" to derivation as a useful model for thinking about deposits in the EVM.