Callisto (shorthand for BigDipper Juno) is the Juno implementation for BigDipper.
It extends the custom Juno behavior by adding different handlers and custom operations to make it easier for BigDipper showing the data inside the UI.
All the chains' data that are queried from the RPC and gRPC endpoints are stored inside a PostgreSQL database on top of which GraphQL APIs can then be created using Hasura.
To know how to setup and run Callisto, please refer to the docs website.
If you want to test the code, you can do so by running
$ make testNote: Requires Docker.
This will:
- Create a Docker container running a PostgreSQL database.
- Run all the tests using that database as support.
-
Create
.callistodirectory in the root of the repo and put there next two files:config.yamlwhich you can copy fromconfig-sample.yaml. Do next change there:- Replace
YOUR_CHAIN_ACC_PREFIXwith your account prefix(coredevis an example for devnet, you can use it too). This will let you have separate accounts with the same private keys for different chains. - Replace
YOUR_NODE_IPwithcoredaddress.
- Replace
genesis.jsonwhich you can find at cored/genesisendpoint(http://127.0.0.1:26557/genesis?for example). Take nested object:{ "genesis": {this object} }
-
Build and start
make images
docker-compose up- Open hasura UI and check that it works correctly. The password is defined in docker-compose.yaml and set to "myadminsecretkey" by default.
In case you run the callisto with the connection to old-running node you might face the error in the logs
error while getting staking pool: rpc error: code = Internal desc = UnmarshalJSON cannot decode empty bytes
This is expected since the node doesn't store all staking pool for all heights.
In case you want to integrate the indexing if the custom types, for example parameters, that PR can be taken as a reference implementation.
The GraphQL schema is located here. It describes all supported queries.
In order to export it you can run the hasura locally and execute script
npm install -g graphqurl # install the gq
gq http://localhost:8080/v1/graphql -H "X-Hasura-Admin-Secret: myadminsecretkey" --introspect > schema.graphql # export schema
Pay attention that myadminsecretkey is the secret set for this repo local environment, and can be different for
others.