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

Build and deploy a Hydra heads explorer #696

Closed
5 of 6 tasks
abailly-iohk opened this issue Feb 2, 2023 · 4 comments · Fixed by #1333 or #1235
Closed
5 of 6 tasks

Build and deploy a Hydra heads explorer #696

abailly-iohk opened this issue Feb 2, 2023 · 4 comments · Fixed by #1333 or #1235
Labels
green 💚 Low complexity or well understood feature 💬 feature A feature on our roadmap
Milestone

Comments

@abailly-iohk
Copy link
Contributor

abailly-iohk commented Feb 2, 2023

Why

  • To measure the progress and success of Hydra we need some tools that provide insights about uses of Hydra on various networks. We could of course use existing tools like cardanoscan.io but they are not aware of the specificities of Hydra lifecycle so we would need to do some legwork to identify the various events happening to heads
  • As exemplified by mithril and of course Cardano itself, visualising the system we built, in an attractive way, providing good user experience, helps increasing the visibility of the project
  • Being able to track the lifecycles of Heads easily is a great motivator for the team and also potential builders that will be able to see the growth of the system

What

  • Create a hydra-explorer that can track all heads on-chain

    • which networks / which versions?

    • what information?

      • Total number of heads
      • List of all heads and their current state (Initializing, Open, Closed, Final) on network
      • Head parameters and participants (keys) of a Head
      • Locked value per Head, locked value overall
  • Create a simple, representable and informative Hydra Explorer UI #1330

  • Host the explorer at http://explorer.hydra.family

    • continuous, automated deployment on release
    • easy to run locally as well
  • Reach out to 2 explorer creators about our plans and how to integrate Hydra data in their platform.

How

Discussion

we have built a proof-of-concept tool deployed at http://explorer.hydra.family/, with code available in a branch: https://github.com/input-output-hk/hydra/tree/abailly-iohk/head-observer This PoC has been built without proper testing, as a standalone and side project, and would require proper engineering from the team to be production-ready.

  • Explorer creators would know best how to do it best

    • Can we integrate what we build with their UI and/or backend stack?
    • Rather have them maintain a 24/7 service than us
    • More visibility on their website
    • Let's add a first inquiry in scope here, but not block progress on this because of them
  • There are explorers currently in development -> potential customer to drive this feature

  • Create statistics over a timeline using the information of the explorer?

    • out of scope and follow-up
  • How do we get the chain data?

    • do something similar (or re-use) as the hydra-chain-observer we introduced lately
    • use existing chain indexing services like blockfrost?
  • How do we maintain "exploring" heads (interpreting chain data) vs. changing the protocol over time?

    • Right now, many things are implicitly given from the fact how we compile hydra-plutus and how datums/redeemers are serialized in there
    • Explorer clearly depends on how things are represented on chain
    • Metadata could contain versioning information to guide support of multiple versions of Hydra Head protocols
    • Maybe have a hydra-explorer (backend serving an API) that uses version-specific hydra-chain-observer binaries as a dependency?
    • Decision: we target only one version now - ignore the above in this increment.
@abailly-iohk abailly-iohk added the 💭 idea An idea or feature request label Feb 2, 2023
@ch1bo ch1bo added this to the Mainnet milestone Feb 9, 2023
@pgrange pgrange modified the milestones: 0.10.0, 1.0.0 Apr 6, 2023
@ch1bo
Copy link
Member

ch1bo commented Apr 11, 2023

Is re-using our code the only option? Isn't there a simpler way (keep it simple) by just relying on existing systems and APIs like Blockfrost.

What exactly is the data which needs to be produced? Brainstorming for some basic information:

  • List of all heads and their current state (Initializing, Open, Closed, Final) on network
  • Head parameters and participants of a Head
  • Locked value per Head, locked value overall
  • Historic information of the same
    • Open heads over time
    • TVL over time
    • Average lifetime of a Head

Current data is definitely in-scope, while historic information is out of scope of this feature right now.

@pgrange
Copy link
Contributor

pgrange commented Apr 11, 2023

Draft sketches of what it could look like: https://miro.com/app/board/uXjVMA_OXQ0=/?moveToWidget=3458764556623238382&cot=14

@abailly-iohk
Copy link
Contributor Author

Grooming discussion: Seems like this feature would help moving forward stateless observation which would help #199 and #1057

@ch1bo ch1bo added 💬 feature A feature on our roadmap green 💚 Low complexity or well understood feature and removed 💭 idea An idea or feature request labels Jan 2, 2024
@ffakenz ffakenz linked a pull request Jan 5, 2024 that will close this issue
11 tasks
@ch1bo ch1bo modified the milestones: 1.0.0, 0.16.0 Jan 17, 2024
@ch1bo
Copy link
Member

ch1bo commented Feb 29, 2024

Three cardano explorers we could collaborate with / reach out to:

https://beta.explorer.cardano.org/en/
https://cardanoscan.io/
https://cexplorer.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
green 💚 Low complexity or well understood feature 💬 feature A feature on our roadmap
Projects
Status: Done
4 participants