Skip to content
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

Feb2024 Bridge Updates #1 #163

Merged
merged 9 commits into from
Feb 7, 2024
Merged

Feb2024 Bridge Updates #1 #163

merged 9 commits into from
Feb 7, 2024

Conversation

dghelm
Copy link
Collaborator

@dghelm dghelm commented Feb 1, 2024

Initial updates notifying of Sepolia bridge update and the upcoming mainnet update.

Should not be pushed to prod until the article is published and links are updated.

Additional Follow-ups:

  • Revisit Spanish contracts page
  • Assess if we need to disable zh for prod
  • Add method-specific documentation for L2 Gas Oracle methods
  • Once live, update graphics, replace notices with fully updated content and deprecation notices where appropriate.

Copy link

netlify bot commented Feb 1, 2024

Deploy Preview for scroll-documentation ready!

Name Link
🔨 Latest commit f6697bc
🔍 Latest deploy log https://app.netlify.com/sites/scroll-documentation/deploys/65c4147d97ca920008318e2e
😎 Deploy Preview https://deploy-preview-163.docs.scroll.xyz/en/technology/overview/scroll-upgrades
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dghelm
Copy link
Collaborator Author

dghelm commented Feb 6, 2024

Need to adjust for modification where Router will use ETHGateway.

@dghelm dghelm marked this pull request as ready for review February 7, 2024 20:37
isabellewei
isabellewei previously approved these changes Feb 7, 2024
@@ -8,6 +8,7 @@ whatsnext: { "Withdraw Gateways": "/technology/bridge/withdraw-gateways/" }
---

import ClickToZoom from "../../../../../components/ClickToZoom.astro"
import Aside from "../../../../../components/Aside.astro"
Copy link
Contributor

Choose a reason for hiding this comment

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

stray unused import?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good eye!

- We will now use constants to store some companion contract addresses, instead of using storage variables. This is possible since these values should (almost) never change. With this change we can save on a few storage load operations.
- We updated the intrinsic gas estimation in `L1MessageQueue` to use a simple upper bound instead of an exact calculation. The two results will be similar for most bridge transactions but the new implementation is significantly cheaper.
- We merged two contracts `L1MessageQueue` and `L2GasPriceOracle` to save on call costs from one contract to the other.

Copy link
Contributor

Choose a reason for hiding this comment

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

should we also mention that the Gateway Router contract will directly call the Scroll Messenger contract instead of ETH Gateway for ETH deposits?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(This change was reverted after OZ audits)


When messaging from L1 to L2, the user pays all transaction fees on L1. The user pays L1 gas fees, but because of this, doesn't need to pay Scroll an L1 Data Fee. They will need to account for L2 Execution Fees in their L1 transaction though, and will need to know how much L2 gas to pay.

Contracts on L1 can use an L2 Gas Price Oracle deployed to the L1 to get the gas fee for a given transaction. The oracle also exposes the current l2BaseFee and estimated cross-domain message fee for a given gas limit.
Copy link
Contributor

Choose a reason for hiding this comment

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

could be helpful to add that you can estimate the gas limit with eth_estimateGas

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

adjusted!

@dghelm dghelm merged commit 5c30b92 into develop Feb 7, 2024
6 checks passed
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.

3 participants