-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(protocol): allow multiple Taiko deployments to sync signals #13565
Conversation
Codecov Report
@@ Coverage Diff @@
## major_protocol_upgrade_rebase #13565 +/- ##
=================================================================
- Coverage 38.82% 38.79% -0.03%
=================================================================
Files 113 113
Lines 3480 3482 +2
Branches 400 401 +1
=================================================================
Hits 1351 1351
- Misses 2040 2042 +2
Partials 89 89
*This pull request uses carry forward flags. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Just two storage proofs is a nice reduction in costs!
Imagine two Taiko layer 3s (Taiko-L3A and Taiko-L3B) are deployed on a Taiko-L2 and the layer 3s share the same SignalService instance on L2. The demand to transfer funds (or send signals in general) across these layer 3s will be common.
This change makes sure when Taiko-L3A's signalRoot is sent over to L2, the L2 contract will relay the signalRoot to the shared SignalService as a signal, then when Taiko-L3B gets the L2's signalRoot, that signalRoot carries info about Taiko-L3A's signalRoot. Verifying the signal on Taiko-L3B will require two (partial) Merkle proofs.
This change will increase
verifyBlocks
's gas cost from 14086 to 41325, that's because we always write to new signal slots. But since this feature will only be turned for Taiko layer 3 deployments (their TaikoL1.sol contracts will be on Taiko L2), the extra gas cost shall be fine.