-
Notifications
You must be signed in to change notification settings - Fork 196
interop: Specify deposit handling #258
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3cad559
interop: Specify deposit handling
Inphi 24110f5
lint
Inphi 5712225
refine spec; include L1Block upgrade
Inphi bf9fc12
chore: rename reset to complete
skeletor-spaceman 04fb109
Merge branch 'main' into inphi/interop-deposits
skeletor-spaceman 1acbb65
fix: fixes lint reference issues
skeletor-spaceman 1009881
fix: missing rename of resetIsDeposit
skeletor-spaceman ed46ecd
fix: mdbook references
skeletor-spaceman 9b1c671
fix: Interop to Isthmus rename
skeletor-spaceman 5915c56
fix: typos
skeletor-spaceman 5e81f8d
fix: reference L1BlockInterop instead of L1Block
skeletor-spaceman c453d23
fix: l1_attributes to -
skeletor-spaceman f94268d
fix: l1-attributes reference to corresponding folder
skeletor-spaceman aea46b9
fix: l1-attributes reference to corresponding folder
skeletor-spaceman 94ec370
Merge branch 'main' into inphi/interop-deposits
skeletor-spaceman f2e2b06
fix: l1-attributes reference to corresponding folder
skeletor-spaceman 04b70a3
fix: l1-attributes reference to corresponding folder
skeletor-spaceman c7c95f6
fix: l1-attributes reference to corresponding folder
skeletor-spaceman 4014e3f
Merge branch 'main' into inphi/interop-deposits
skeletor-spaceman 4f4c30b
fix: remove trailing spaces
skeletor-spaceman cfead3a
feat: merged from main
skeletor-spaceman 47d441a
fix: remove liq-migration
skeletor-spaceman 3a09f87
fix: rename interop to isthmus, remove L1BlockInterop reference
skeletor-spaceman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Derivation | ||
|
|
||
| <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
| <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
| **Table of Contents** | ||
|
|
||
| - [Overview](#overview) | ||
| - [Deposit Context](#deposit-context) | ||
| - [Gas Considerations](#gas-considerations) | ||
| - [Security Considerations](#security-considerations) | ||
|
|
||
| <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
|
||
| ## Overview | ||
|
|
||
| This is an experimental section and may be changed in the future. It is not required | ||
| for the initial release. | ||
|
|
||
| ### Deposit Context | ||
|
|
||
| Derivation is extended to create **deposit contexts**, which signifies the execution of a depositing transaction. | ||
| A deposit context is scoped to a single block, commencing with the execution of the first deposited transaction | ||
| and concluding immediately after the execution of the final deposited transaction within that block. | ||
| As such, there is exactly one deposit context per block. | ||
|
|
||
| A deposit context is created by two operations: | ||
|
|
||
| - An L1 attributes transaction that sets `isDeposit = true` on the `L1Block` contract. | ||
| This instantiates a deposit context for the current block. | ||
| - An L1 attributes transaction that sets `isDeposit = false`. This destroys the existing deposit context. | ||
|
|
||
| These two operations wrap user deposits, such that `isDeposit = true` occurs during the first L1 attributes | ||
| transaction and `isDeposit = false` occurs immediately after the last user deposit, | ||
| if any exists, or after the first L1 attributes transaction if there are no user deposits. | ||
|
|
||
| The order of deposit transactions occurs as follows: | ||
tynes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 1. L1 attributes transaction calling [`setL1BlockValuesInterop()`](../protocol/ecotone/l1-attributes.md). | ||
| 1. User deposits | ||
| 1. L1 attributes transaction calling [`depositsComplete()`](../protocol/ecotone/l1-attributes.md) | ||
|
|
||
| ### Gas Considerations | ||
|
|
||
| There must be sufficient gas available in the block to destroy deposit context. | ||
| There's no guarantee on the minimum gas available for the second L1 attributes transaction as the block | ||
| may be filled by the other deposit transactions. As a consequence, a deposit context may spill into multiple blocks. | ||
|
|
||
| This will be fixed in the future. | ||
|
|
||
| ## Security Considerations | ||
|
|
||
| TODO | ||
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.