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

Improve SignalService docs #73

Merged
merged 12 commits into from
Mar 18, 2025
Merged

Conversation

ernestognw
Copy link
Member

@ernestognw ernestognw commented Mar 13, 2025

Extends the documentation of the signal service. In particular, it addresses some of the comments in the past PR.

Generalization of signaling

The new version tries to expand on the idea of signaling being general enough. For example, one can build their own app to "fast-track" their own trusted values. This way, the mechanics of doing so are passed to the application developers (i.e. Solidity developers) so that they can incentivize the execution whichever they want.

Preconfirmations

By generalizing the signaling mechanism, it's possible to treat signals differently depending on the context. In the context of preconfirmations, a rollup may decide to condition the inclusion of "fast-tracked" signals in their inbox. I see this as a feature that should be customizable when using the library (e.g. contract TaikoInbox is BaseInbox, EnforcedFastSignalInbox { ... })

@ernestognw ernestognw requested a review from LeoPatOZ March 13, 2025 00:53
@ernestognw ernestognw added the documentation Improvements or additions to documentation label Mar 13, 2025
1. An application on the L1 stores a signal in the SS.
2. The L2 proposer listens to any signal being stored on the L1 SS.
3. After building a block and obtaining a commitment, the L2 proposer submits a transaction batch to their L1 inbox contract. This batch includes an anchor transaction where the proposer injects the L1 state root and the signals that were stored on the L1 SS.
4. The inbox contract verifies that the signals exist in the L1 SS using a storage proof with the L1 state root that was just injected.
Copy link
Collaborator

@LeoPatOZ LeoPatOZ Mar 13, 2025

Choose a reason for hiding this comment

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

Im confused by step 3/4.

The inbox contract verifies that the signals exist in the L1 SS using a storage proof with the L1 state root that was just injected.

The inbox contract doesnt rely on an 'injected L1 state root' to verify signals as the inbox is on the L1 / or a storage proof. It simply reads the signal services storage directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. Inbox is not the best name as it's the one that will go in L2.

Step 3 is done in the L1 and step 4 is done in the L2. However, the misunderstanding relies on when it happened. The L2 transaction is built into an L2 block before published on the L1, where the L1 batch includes the L2 transactions (including the anchor).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think similar comment to before I dont think step 4 occurs, its simply a storage read?

Copy link
Member Author

Choose a reason for hiding this comment

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

Pretty much, yes

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 good, left a few small comments.
One thing I would like to see documented is this use case

@ernestognw
Copy link
Member Author

Looks good, left a few small comments. One thing I would like to see documented is this use case

Are you saying that we should outline the specific use case of a "fast-deposit"? My feeling is that it's already implicit by fast tracking signals to the L2.

@ggonzalez94
Copy link
Collaborator

Are you saying that we should outline the specific use case of a "fast-deposit"?

Yes, I do believe this deserves its own section - but I'm fine with merging this PR and then adding it

@ggonzalez94 ggonzalez94 merged commit 0c5ac86 into main Mar 18, 2025
3 checks passed
@ggonzalez94 ggonzalez94 deleted the docs/extend-signal-service-docs branch March 18, 2025 22:34
@ernestognw
Copy link
Member Author

Are you saying that we should outline the specific use case of a "fast-deposit"?

Yes, I do believe this deserves its own section - but I'm fine with merging this PR and then adding it

Disagree, if we were following a structured approach to the L1Rollup, that becomes just a feature on top. The reason this is not clear and we need to write it is because we don't have a proper abstraction yet.

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

Successfully merging this pull request may close these issues.

4 participants