8000 GitHub - faddat/bdjuno
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

faddat/bdjuno

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
< 8000 div class="react-directory-filename-cell">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BDJuno

GitHub Workflow Status Go Report Card Codecov

BDJuno (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 LCD and RPC endpoints are stored inside a PostgreSQL database on top of which GraphQL APIs can then be created using Hasura.

Installation

Install the binaries

To install the binary simply run make install.

Note: Requires Go 1.13+.

Database

Before running the parser, you need to:

  1. Create a PostgreSQL database.
  2. Run the SQL queries you find inside the schema folder inside such database to create all the necessary tables.

Running the parser

To parse the chain state, you need to use the following command:

bdjuno parse <path/to/config.toml>

# Example
# bdjuno parse config.toml 

The configuration must be a TOML file containing the following fields:

[cosmos]
prefix = "desmos"
modules = []

[rpc]
address = "<rpc-ip/host>:<rpc-port>"

[grpc]
address = "<grpc-ip/host>:<grpc-port>"
insecure = true

[api]
address = "<client-ip/host>:<client-port>"

[cosmos]
prefix = "desmos"
modules = []

[database]
type = "postgresql"

[database.config]
host = "<db-host>"
port = 5432
name = "<db-name>"
user = "<db-user>"
password = "<db-password>"

Example of a configuration to parse the chain state from a local Cosmos full-node:

Open here
[cosmos]
prefix = "desmos"
modules = []

[rpc]
address = "http://localhost:26657"

[grpc]
address = "localhost:9090"
insecure = true

[api]
address = "http://localhost:1317"

[cosmos]
prefix = "desmos"
modules = [
    "auth",
    "bank",
    "consensus",
    "distribution",
    "gov",
    "mint",
    "modules",
    "pricefeed",
    "slashing",
    "staking"
]

[database]
type = "postgresql"

[database.config]
host = "localhost"
port = 5432
name = "bdjuno"
user = "user"
password = "password"

Testing

If you want to test the code, you can do so by running

make test-unit

Note: Requires Docker.

This will:

  1. Create a Docker container running a PostgreSQL database.
  2. Run all the tests using that database as support.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 94.5%
  • PLpgSQL 4.3%
  • Makefile 1.2%
0