Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
3ce0ddee
Commit
3ce0ddee
authored
Nov 22, 2022
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint
toc
parent
59b01028
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
withdrawals.md
specs/withdrawals.md
+14
-14
No files found.
specs/withdrawals.md
View file @
3ce0ddee
...
...
@@ -31,7 +31,6 @@ finalization.
<!-- 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**
-
[
Withdrawal Flow
](
#withdrawal-flow
)
...
...
@@ -66,16 +65,17 @@ This is a very simple contract that stores the a hash of the withdrawal data.
must be one for which an L2 output root exists, which commits to the withdrawal as registered on L2.
2.
The
`OptimismPortal`
contract retrieves the output root for the given block number from the
`L2OutputOracle`
's
`getNextProposedOutput()`
function, and performs the remainder of the verification process internally.
3.
If proof verification fails, the call reverts. Otherwise the call is forwarded, and the hash is recorded to prevent it from
from being re-proven. Note that the withdrawal can be proven more than once if the corresponding output root changes.
4.
After the withdrawal is proven, it enters a 7 day challenge period, allowing time for other network participants to challenge
its integrity.
5.
Once the challenge period has passed, a relayer submits the withdrawal transaction once again to the
`OptimismPortal`
contract.
Again, the relayer need not be the same entity which initiated the withdrawal on L2.
6.
The
`OptimismPortal`
contract receives the withdrawal transaction data and verifies that the withdrawal has both been proven
and passed the challenge period.
7.
If the requirements are not met, the call reverts. Otherwise the call is forwarded, and the hash is recorded to prevent it
from being replayed.
3.
If proof verification fails, the call reverts. Otherwise the call is forwarded, and the hash is recorded to
prevent it from being re-proven. Note that the withdrawal can be proven more than once if the corresponding
output root changes.
4.
After the withdrawal is proven, it enters a 7 day challenge period, allowing time for other network participants
to challenge its integrity.
5.
Once the challenge period has passed, a relayer submits the withdrawal transaction once again to the
`OptimismPortal`
contract. Again, the relayer need not be the same entity which initiated the withdrawal on L2.
6.
The
`OptimismPortal`
contract receives the withdrawal transaction data and verifies that the withdrawal has
both been proven and passed the challenge period.
7.
If the requirements are not met, the call reverts. Otherwise the call is forwarded, and the hash is recorded to
prevent it from being replayed.
## The L2ToL1MessagePasser Contract
...
...
@@ -146,11 +146,11 @@ interface OptimismPortal {
uint256
_l2BlockNumber
,
Types
.
OutputRootProof
calldata
_outputRootProof
,
bytes
[]
calldata
_withdrawalProof
);
)
external
;
function
finalizeWithdrawalTransaction
(
Types
.
WithdrawalTransaction
memory
_tx
)
)
external
;
}
```
...
...
@@ -166,7 +166,7 @@ The following inputs are required to prove and finalize a withdrawal:
-
`data`
: Data to send to the target.
-
`gasLimit`
: Gas to be forwarded to the target.
-
Proof and verification data:
-
`l2BlockNumber`
: The L2 block number
corresponding with
the output root.
-
`l2BlockNumber`
: The L2 block number
that corresponds to
the output root.
-
`outputRootProof`
: Four
`bytes32`
values which are used to derive the output root.
-
`withdrawalProof`
: An inclusion proof for the given withdrawal in the L2ToL1MessagePasser contract.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment