Skip to content

[2/2] Decouple ETH Bridge from signal service #113

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

Merged
merged 50 commits into from
May 8, 2025

Conversation

LeoPatOZ
Copy link
Collaborator

@LeoPatOZ LeoPatOZ commented Apr 30, 2025

PR solves:

  • Generalise the ETH bridge to handle multiple rollups.

@LeoPatOZ LeoPatOZ changed the base branch from main to simplify-commitment-store April 30, 2025 11:35
fix

fix test

fix test
@LeoPatOZ LeoPatOZ force-pushed the simplify-commitment-store branch from 0cb33a0 to 6626f47 Compare April 30, 2025 15:31
@LeoPatOZ LeoPatOZ force-pushed the simplify-commitment-store branch from 6626f47 to 290de34 Compare April 30, 2025 15:35
LeoPatOZ and others added 7 commits April 30, 2025 18:32
The previous comment was ambiguous about whether we support full state roots.
I think `StateProofNotSupported` as an error is unclear, and might actually state the opposite of the error.

For context
- the `LibSignal` library attempts to prove a storage location inside a root.
- we expect this to be a state root. The proof is multi-step: first prove the account's storage root within the state proof, then prove the storage location against the storage root.
- the library also supports skipping step 1 and treating the root as a storage root directly. The signal service does not.

At some point we will have to generalise the commitment and storage proof mechanism to support block hashes as commitments (which is natural for rollups) and arbitrary state for appchains. In the mean time we are being opinionated that the commitment is a state root.
@LeoPatOZ LeoPatOZ force-pushed the simplify-commitment-store branch from 7645b16 to 7448d95 Compare May 6, 2025 13:46
Copy link

github-actions bot commented May 6, 2025

Changes to gas cost

Generated at commit: a389c8da0996b137f208702d5ff0f37f8e2ea5de, compared to commit: a5ad6175f1b4a9790883b7416f07052d5580ee66

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
SignalService commitmentAt -22 ✅ -0.70%
CheckpointTracker getProvenCheckpoint -22 ✅ -0.24%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
SignalService 2,859,995 (-53,338) commitmentAt 3,118 (-22) -0.70% 3,118 (-22) -0.70% 3,118 (-22) -0.70% 3,118 (-22) -0.70% 3 (0)
CheckpointTracker 931,202 (-22) getProvenCheckpoint
proveTransition
9,221 (-22)
96,741 (-44)
-0.24%
-0.05%
9,221 (-22)
96,741 (-44)
-0.24%
-0.05%
9,221 (-22)
96,741 (-44)
-0.24%
-0.05%
9,221 (-22)
96,741 (-44)
-0.24%
-0.05%
2 (0)
1 (0)
ProverManager 2,854,874 (0) prove 103,368 (-22) -0.02% 125,426 (-22) -0.02% 127,303 (-22) -0.02% 139,984 (-22) -0.02% 6 (0)

Copy link
Collaborator

@ggonzalez94 ggonzalez94 left a comment

Choose a reason for hiding this comment

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

Looks great! My only big question is if we should use the same address for the EthBridge on both chains or keep the counterpart variable.
I also complete the TODO by making claimDeposit nonReentrant using transient storage

Base automatically changed from simplify-commitment-store to signal-service May 8, 2025 11:11
Copy link
Collaborator

@ggonzalez94 ggonzalez94 left a comment

Choose a reason for hiding this comment

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

LGTM! I haven't reviewed the tests, but I think we can start merging these PRs and I'll take a look at tests before we merge the big one into main

@LeoPatOZ LeoPatOZ merged commit 56f28ae into signal-service May 8, 2025
4 of 6 checks passed
@LeoPatOZ LeoPatOZ deleted the decouple-eth-bridge branch May 8, 2025 13:33
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