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

feat(protocol): allow multiple Taiko deployments to sync signals #13565

Merged
merged 24 commits into from
Apr 8, 2023

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Apr 7, 2023

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.

@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #13565 (3f07519) into major_protocol_upgrade_rebase (624a4b5) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@                        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              
Flag Coverage Δ *Carryforward flag
bridge-ui 94.20% <ø> (ø) Carriedforward from 624a4b5
eventindexer ∅ <ø> (∅) Carriedforward from 624a4b5
protocol 0.00% <0.00%> (ø)
relayer 62.55% <ø> (ø) Carriedforward from 624a4b5
ui 100.00% <ø> (ø) Carriedforward from 624a4b5

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
packages/protocol/contracts/L1/TaikoConfig.sol 0.00% <ø> (ø)
packages/protocol/contracts/L1/TaikoL1.sol 0.00% <ø> (ø)
...ckages/protocol/contracts/L1/libs/LibVerifying.sol 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dantaik dantaik requested review from Brechtpd, cyberhorsey and davidtaikocha and removed request for Brechtpd April 7, 2023 04:24
@dantaik dantaik marked this pull request as ready for review April 7, 2023 04:25
Base automatically changed from 1559params to major_protocol_upgrade_rebase April 7, 2023 05:53
Copy link
Contributor

@Brechtpd Brechtpd left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants