Open ch1bo opened 9 months ago
Having looked into this a bit as part of https://github.com/cardano-scaling/hydra-explorer/pull/5 I think it's worth making some notes:
networks.json
and the script outputs from there; from this a ScriptInfo
datatype can be reconstructedI.e. the real limitation is with the chain-observer; so we just need to make that parameterisable by a specific ScriptInfo
parameter; then maybe we just run multiple chain-observers, or (probably better) run a single one that attempts to find all the ScriptInfo
things that it is provided.
Why
The Hydra explorer should be able to report Hydra heads from multiple different protocol versions on all public networks. The explorer can be used to give usage information about each version.
What
The
hydra-explorer
lists heads from all networks and supported versions according tonetworks.json
The
hydra-explorer
does not need to be updated on every script change (e.g. when we switch plutus-tx/GHC versions)The
hydra-explorer
reports a protocol version per head.Can run multiple "(chain) observers", one for each network and
hydra
protocol version, feeding information into onehydra-explorer
instance.hydra-explorer
is decoupled from a specifichydra
versionThe
hydra-explorer
should be deployed from https://github.com/cardano-scaling/hydra-explorer using multiple versions of the mainhydra
repositoryWe should delete the
hydra-explorer
folder from the mainhydra
repoHow
The endpoint is a POST to
/v1/observations/<network>/<version>
with request body of some JSON object enumerating the observationsAdd an observer-side API definition to
hydra-explorer
OpenAPI schemaThe interface should be JSON-based simpler HTTP requests; so that it's easy reason about backwards compatibility and debug, and test
hydra-chain-observers
are HTTP clients sending requests tohydra-explorer
observer-side API whenever a head transition is observedObserver-side API is exposed on separate port so we can host and port configurable on the command-line of
hydra-explorer
Both
hydra-chain-observer
andhydra-explorer
are tested agains theobserver-side
API schemaTBD