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

Blockfrost chain layer #1305

Open
5 tasks
v0d1ch opened this issue Feb 13, 2024 · 0 comments
Open
5 tasks

Blockfrost chain layer #1305

v0d1ch opened this issue Feb 13, 2024 · 0 comments
Assignees
Labels
amber ⚠️ Medium complexity or partly unclear feature 💬 feature A feature on our roadmap

Comments

@v0d1ch
Copy link
Contributor

v0d1ch commented Feb 13, 2024

Why

We think it would be useful to be able to run the hydra-node without the full cardano-node in a more light weight mode and it could provide more insights by dogfooding our product. The feature is also intersting to the BlockFrost people as a first step towards using Hydra for pay-per-use api changes they plan to implement.

What

  • Hydra node can be started with --blockfrost PROJECT_ID (providing an API key as project id) instead of --node-socket (et al)

  • Both options, Blockfrost and Direct, should be available in the same hydra-node release

  • There is documentation on how to run hydra-node using Blockfrost including the related trust assumptions

  • If the API key is invalid (or expires), the hydra-node terminates with a meaningful message

  • The same end-to-end tests we have right now (testing against a cardano-node), we also want to have tested with --blockfrost

  • This means, the blockfrost chain layer needs to be able to

    • Follow the chain
    • Submit Hydra transactions
    • Provide relevant hydra-node internal wallet queries
  • Hydra internal wallet uses DirectChain component to get the information about the available UTxO at the wallet address and query the EpochInfo (in order to estimate the transaction fees). We should be able to get this information from blockfrost also https://blockfrost.dev/api/latest-epoch

How

Next steps:

  • Hydra chain observer run with --blockfrost ... (not available to hydra-node yet, just hydra-chain-observer)
  • Build a variant of hydra-explorer to the blockfrost-enabled hydra-chain-observer (noting that we might need a different way of discovering existing heads, because we can't look at all history; need to go looking explicitly?)

Later:

  • Create and submit transactions
  • Integrate with hydra-node
  • End to end tests would run against a public blockfrost api (not local devnet)

Notes:

Open questions

  • How exactly would the architecture change?
  • What happens on a chain fork? Are there rollbacks?
  • Is there a --start-chain-from when we use --blockfrost?
  • Can we re-use tests between the direct and blockfrost way of running the hydra-node?
@v0d1ch v0d1ch added the 💭 idea An idea or feature request label Feb 13, 2024
@noonio noonio added 💬 feature A feature on our roadmap amber ⚠️ Medium complexity or partly unclear feature labels Aug 6, 2024
@ch1bo ch1bo removed the 💭 idea An idea or feature request label Aug 6, 2024
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 💬 feature A feature on our roadmap
Projects
Status: Next
Development

No branches or pull requests

3 participants