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

Convert SignalService into a library consumed by a CommitmentSyncer #45

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

ernestognw
Copy link
Member

@ernestognw ernestognw commented Feb 24, 2025

Turned the SignalService into a library so that applications can use it to signal values. The meaning of such values depend completely on the application.

image

Also, a CommitmentSyncer is added, who's in charge of syncing the most recent commitment per chain id by using storage proofs. The only condition is that a trusted state root is required.

@ernestognw ernestognw marked this pull request as draft February 24, 2025 18:16
@ernestognw ernestognw changed the base branch from main to signal-service February 24, 2025 18:16
Base automatically changed from signal-service to main February 25, 2025 09:25
LeoPatOZ and others added 8 commits February 25, 2025 17:37
commit 17f509f
Author: Ernesto García <[email protected]>
Date:   Tue Feb 25 17:24:57 2025 +0800

    Simpler Signal Service (#43)

    Co-authored-by: Nikesh Nazareth <[email protected]>
    Co-authored-by: Daniel Wang <[email protected]>
    Co-authored-by: Gustavo Gonzalez <[email protected]>
    Co-authored-by: Daniel Wang <[email protected]>

commit c97e1cc
Author: nikeshnazareth <[email protected]>
Date:   Tue Feb 25 00:28:13 2025 +0800

    Parallel Verifications (#42)

    Co-authored-by: Daniel Wang <[email protected]>

commit 85eabde
Author: Daniel Wang <[email protected]>
Date:   Mon Feb 24 14:20:05 2025 +0800

    Some TaikoInbox improvements (#39)

    Co-authored-by: Nikesh Nazareth <[email protected]>
    Co-authored-by: Gustavo Gonzalez <[email protected]>
@nikeshnazareth
Copy link
Collaborator

I did the renaming and a little bit of cleanup.

I think there are still some build problems associated with the Signal Service that I am ignoring.

I'm not quite clear on what verifyCommitment (previously verifyState) achieves. As I understand it, the relevant signal will be created in syncCommitment (previously syncState) on the relevant chain, and it will be included in the Signal Service on that chain.

We're then checking that the signal exists in that chain's commitment, which I guess makes sense because it will be a record in that chain. But where do we get that chain's commitment from? Is that solved at a higher level by whoever calls this contract?

@nikeshnazareth
Copy link
Collaborator

I modified verifyCommitment so that it includes both a commitment and a state root. The thought is:

  • a commitment is a generic item that represents everything the rollup needs to care about at some point in time.
  • at the moment we treat it like the L2 state root but it could be the L2 block hash, or a combination of L2 block hash / and embedded rollup hash / L1 state / whatever
  • whoever is calling verifyCommitment is checking that the commitment signal is somewhere inside the state represented by the commitment. They should be responsible for retrieving the state corresponding to the commitment (which in our cases is identical to the commitment)

@ernestognw ernestognw changed the title [DRAFT] Add StateSyncer that signals state roots syncs Convert SignalService into a library consumed by a CommitmentSyncer Feb 26, 2025
@ernestognw ernestognw marked this pull request as ready for review February 26, 2025 06:53
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.

4 participants