Skip to content

docs: annotate Mailbox deprecations and replacements#351

Closed
cryptocake wants to merge 1 commit intovianetwork:mainfrom
cryptocake:docs/issue-347-deprecation-notes
Closed

docs: annotate Mailbox deprecations and replacements#351
cryptocake wants to merge 1 commit intovianetwork:mainfrom
cryptocake:docs/issue-347-deprecation-notes

Conversation

@cryptocake
Copy link
Copy Markdown

Summary

Add explicit deprecation notes in docs for the two Mailbox methods announced in discussion #1147.

Changes

Updated docs to clearly mark legacy method references and point to replacements:

  • requestL2Transaction -> Bridgehub.requestL2TransactionDirect
  • finalizeEthWithdrawal -> L1Nullifier.finalizeDeposit

Files:

  • docs/src/specs/l1_l2_communication/l1_to_l2.md
  • docs/src/specs/l1_smart_contracts.md
  • docs/src/guides/advanced/02_deposits.md
  • docs/src/guides/advanced/03_withdrawals.md

Notes

This PR is docs-only and keeps the existing historical explanations while adding migration guidance.

Linked issues

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several documentation files to mark requestL2Transaction and finalizeEthWithdrawal as deprecated, recommending the use of Bridgehub.requestL2TransactionDirect and L1Nullifier.finalizeDeposit respectively. The review feedback suggests replacing links to a security contest repository with links to the official matter-labs/era-contracts repository for better consistency and reliability. Additionally, it is recommended to adjust the placement of a deprecation note in the smart contracts specification to ensure the technical explanation remains cohesive and readable.

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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation currently links to a security contest repository (code-423n4/2023-10-zksync). For official specifications, it is recommended to link to the primary matter-labs/era-contracts repository to ensure consistency and reliability, as seen in other parts of the documentation (e.g., docs/src/guides/advanced/02_deposits.md).

Suggested change
[`requestL2Transaction`](https://github.com/code-423n4/2023-10-zksync/blob/ef99273a8fdb19f5912ca38ba46d6bd02071363d/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L236)
[`requestL2Transaction`](https://github.com/matter-labs/era-contracts/blob/f06a58360a2b8e7129f64413998767ac169d1efd/ethereum/contracts/zksync/facets/Mailbox.sol#L220)


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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This link should also be updated to point to the official matter-labs/era-contracts repository for consistency and to avoid relying on a contest snapshot.

Suggested change
[appended](https://github.com/code-423n4/2023-10-zksync/blob/ef99273a8fdb19f5912ca38ba46d6bd02071363d/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L369C1-L369C1)
[appended](https://github.com/matter-labs/era-contracts/blob/f06a58360a2b8e7129f64413998767ac169d1efd/ethereum/contracts/zksync/facets/Mailbox.sol#L369)

Comment on lines +104 to +109
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The insertion of the deprecation note breaks the logical connection between the withdraw function call and the explanation of its effects ("This will burn the funds..."). It is better to keep the process description continuous and place the deprecation note as a separate paragraph afterwards to maintain readability.

Suggested change
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.
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 on L1 through the finalize flow.\n\nDeprecation note: `finalizeEthWithdrawal` on `MailboxFacet` is deprecated. The replacement flow is `L1Nullifier.finalizeDeposit`.

@cryptocake
Copy link
Copy Markdown
Author

Closing per author request.

@cryptocake cryptocake closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant