-
Notifications
You must be signed in to change notification settings - Fork 3
docs: annotate Mailbox deprecations and replacements #351
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,10 +18,15 @@ between system and user logs. | |||||
|
|
||||||
| ### Initiation | ||||||
|
|
||||||
| A new priority operation can be appended by calling the | ||||||
| [requestL2Transaction](https://github.com/code-423n4/2023-10-zksync/blob/ef99273a8fdb19f5912ca38ba46d6bd02071363d/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L236) | ||||||
| method on L1. This method will perform several checks for the transaction, making sure that it is processable and | ||||||
| provides enough fee to compensate the operator for this transaction. Then, this transaction will be | ||||||
| Historically, a new priority operation was appended by calling | ||||||
| [`requestL2Transaction`](https://github.com/code-423n4/2023-10-zksync/blob/ef99273a8fdb19f5912ca38ba46d6bd02071363d/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L236) | ||||||
| on Mailbox. | ||||||
|
|
||||||
| Deprecation note: `requestL2Transaction` is deprecated. New integrations should use | ||||||
| `Bridgehub.requestL2TransactionDirect`. | ||||||
|
|
||||||
| This flow performs several checks for the transaction, making sure that it is processable and provides enough fee to | ||||||
| compensate the operator. Then, this transaction is | ||||||
| [appended](https://github.com/code-423n4/2023-10-zksync/blob/ef99273a8fdb19f5912ca38ba46d6bd02071363d/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L369C1-L369C1) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This link should also be updated to point to the official
Suggested change
|
||||||
| to the priority queue. | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -101,9 +101,12 @@ applying address aliasing leaves room for future EVM compatibility. | |||||||||||||||
|
|
||||||||||||||||
| The L1 -> L2 communication is also used for bridging ether. The user should include a `msg.value` when initiating a | ||||||||||||||||
| transaction request on the L1 contract. Before executing a transaction on L2, the specified address will be credited | ||||||||||||||||
| with the funds. To withdraw funds user should call `withdraw` function on the `L2EtherToken` system contracts. This will | ||||||||||||||||
| burn the funds on L2, allowing the user to reclaim them through the `finalizeEthWithdrawal` function on the | ||||||||||||||||
| `MailboxFacet`. | ||||||||||||||||
| with the funds. To withdraw funds user should call `withdraw` function on the `L2EtherToken` system contracts. | ||||||||||||||||
|
|
||||||||||||||||
| Deprecation note: `finalizeEthWithdrawal` on `MailboxFacet` is deprecated. The replacement flow is | ||||||||||||||||
| `L1Nullifier.finalizeDeposit`. | ||||||||||||||||
|
|
||||||||||||||||
| This will burn the funds on L2, allowing the user to reclaim them on L1 through the finalize flow. | ||||||||||||||||
|
Comment on lines
+104
to
+109
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The insertion of the deprecation note breaks the logical connection between the
Suggested change
|
||||||||||||||||
|
|
||||||||||||||||
| More about L1->L2 operations can be found | ||||||||||||||||
| [here](https://github.com/code-423n4/2023-10-zksync/blob/main/docs/Smart%20contract%20Section/Handling%20L1→L2%20ops%20on%20zkSync.md). | ||||||||||||||||
|
|
||||||||||||||||
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.
The documentation currently links to a security contest repository (
code-423n4/2023-10-zksync). For official specifications, it is recommended to link to the primarymatter-labs/era-contractsrepository to ensure consistency and reliability, as seen in other parts of the documentation (e.g.,docs/src/guides/advanced/02_deposits.md).