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

Implement a CacheClient and CacheReader to decrease HTTP requests #57

Open
ImJeremyHe opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@ImJeremyHe
Copy link
Member

Rollups always need to query some data frequently. In a scenario where rollups are waiting for L1 finality, they likely keep doing like this:

  • given a hotshot transaction hash, fetch the transaction data
  • fetch the header regarding the transaction height
  • fetch the snapshot height
  • fetch the vid common and namespace proof and verify
  • fetch merkle proof and verify
  • get the finality

In this flow, rollups often have to wait for getting the correct snapshot height. This means rollup keep fetching hotshot transaction data and header again and again until merkle tree proof is verified. These blockchain data are always the same, and rollups actually don't need to fetch them again and again.

Therefore, a client and reader with cache can definitely help rollup decrease the HTTP requests and keep their code clear and straightfoward.

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

No branches or pull requests

1 participant