cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
262 stars 104 forks source link

Clarify compatible and dependencies #604

Closed magick93 closed 3 years ago

magick93 commented 3 years ago

Hello

On https://github.com/input-output-hk/cardano-graphql/releases/tag/5.1.0 it states:

Compatible with: cardano-node: 1.29.0 cardano-ogmios: v4.0.0-beta.9 cardano-db-sync: 11.0.0 - Note: The database must be recreated using the new version. hasura/graphql-engine: 1.3.3

However, the docker-compose.yml file does not use any version of cardano-node. See https://github.com/input-output-hk/cardano-graphql/blob/5.1.0/docker-compose.yml.

It is using something called cardano-ogmios.

Should the docker-compose file also contain an instance of cardano-node? If not, what, in docker-compose, is replacing it?

CyberCyclone commented 3 years ago

cardano-ogmios runs on top of cardano-node and therefore contains cardano-node.

magick93 commented 3 years ago

Thanks for the reply @CyberCyclone

Based on https://github.com/CardanoSolutions/ogmios/blob/v4.0.0-beta.9/docker-compose.yml it seems that cardano-node and cardano-ogmios are two separate containers.

CyberCyclone commented 3 years ago

Correct. cardano-node is still used regardless, but the communication to it from graphql is handled by ogmios.

magick93 commented 3 years ago

Yeah, so to clarify my confusion (forgive me, I'm growing old...),

the docker-compose file in this repo does no include the cardano-node. But in the ogmios repo, there are two separate containers, and one is the cardano-node.

Does this mean, the docker-compose file in this repo is using a vastly different version and build of ogmious that has the cardano-node embedded in it?

CyberCyclone commented 3 years ago

I'm not sure what you mean. cardano-graphql and ogmios are different projects.

Basically cardano-node is used for all data extraction, but ogmios is an "API standard" to make it easier to communicate.

The docker-compose file in graphql references / imports ogmios, and then uses that to communicate with cardano-node.

magick93 commented 3 years ago

Ah, cardanosolutions/cardano-node-ogmios contains both cardano-node and `ogmios, encapsulated in the one image.

rhyslbw commented 3 years ago

but ogmios is an "API standard" to make it easier to communicate.

Think of it as a translator that enables non-Haskell applications to talk directly to cardano-node. For example, we're submitting transactions using Ogmios, whereas before it had to be submitted via cardano-cli in a sub-shell.

Ah, cardanosolutions/cardano-node-ogmios contains both cardano-node and ogmios, encapsulated in the one image.

Yes, more info here: https://ogmios.dev/getting-started/docker/. The docker-compose.json in the Ogmios repo is there for the multi-container use-case, which suits internal development.

Also, you can see which version of cardano-node is bundled in the particular version here: https://github.com/CardanoSolutions/ogmios/blob/v4.0.0-beta.9/Dockerfile#L9