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 blockfrost chain following approach #1880

Open
1 task
noonio opened this issue Mar 7, 2025 · 1 comment
Open
1 task

Improve blockfrost chain following approach #1880

noonio opened this issue Mar 7, 2025 · 1 comment
Labels
amber ⚠️ Medium complexity or partly unclear feature 💭 idea An idea or feature request

Comments

@noonio
Copy link
Contributor

noonio commented Mar 7, 2025

Description

The current implementation Hydra.Blockfrost.ChainObserver is using the following algorithm to "follow" the chain via Blockfrost:

  1. GET /block/{hash}
  2. GET /blocks/{hash}/txs
  3. for each -> GET /txs/{hash}/cbor
  4. process & take maybe nextHash from latest known block (1)
  5. GET /block/{hash}

As part of this general process:
Image

Issues we want to fix

  • Our queries are inefficient as it requires lots of API calls.
  • We do not handle rollbacks at present
    • Test to see what our present code does under rollbacks (may require a bit of hacking/mocking to get this working)

Suggested solution

  • Design the ideal "following" logic for Hydra node
  • Propose and implement changes to the Blockfrost API that are required
  • Implement the logic in Hydra node and check that it functions the same (or better!)

Alternative

  • Leave our logic as-is; it's inefficient but works.

Additional context

No response

Todo

  • Include issues we opened against the blockfrost API ( cc @ffakenz )
@noonio noonio added the 💭 idea An idea or feature request label Mar 7, 2025
@github-project-automation github-project-automation bot moved this to Triage 🏥 in ☕ Hydra Team Work Mar 7, 2025
@noonio noonio added the amber ⚠️ Medium complexity or partly unclear feature label Mar 7, 2025
@noonio noonio moved this from Triage 🏥 to Todo 📋 in ☕ Hydra Team Work Mar 7, 2025
@ch1bo
Copy link
Member

ch1bo commented Mar 7, 2025

@mmahut Let's discuss possible ways to get this done and this would also be a good "entry point" into the hydra code base and is mostly cardano specific!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amber ⚠️ Medium complexity or partly unclear feature 💭 idea An idea or feature request
Projects
Status: Todo 📋
Development

No branches or pull requests

2 participants