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

refactor: extract stateless service #670

Closed
sergey-melnychuk opened this issue Jun 10, 2024 · 0 comments · Fixed by #676
Closed

refactor: extract stateless service #670

sergey-melnychuk opened this issue Jun 10, 2024 · 0 comments · Fixed by #676
Assignees

Comments

@sergey-melnychuk
Copy link
Collaborator

sergey-melnychuk commented Jun 10, 2024

Get rid of syncing concept - it makes no sense completely in a stateless setup. Instead each request must be resolved to the currently latest block (queried from L1 or L2, according to the selected trust mode: #657). Then all processing and proof validation must happen respectful of this current block.

Using properly extracted Ethereum (#668) and Starknet (#669) clients, such implementation should be rather straightforward:

  1. Lookup if there is a cached latest block that is still fresh enough (timeout).
  2. If not: lookup latest block & state root according to the selected trust mode.
  3. Make the updated block & state root available for state proofs validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant