Skip to content
forked from forbole/callisto

BDJuno is the official Juno implementation for BigDipper, the open-source block explorer for Cosmos

License

Notifications You must be signed in to change notification settings

Baseledger/bdjuno

 
 

Repository files navigation

Baseledger

BDJuno needs a reference to baseledger package. Currently it is not published, so this is targeting local package (check go.mod). If we go with that, we need to clone plateau on node running explorer.

To run this it is same as docs, steps:

  1. make sure db is set (check big dipper repo)
  2. cd bdjuno make install
  3. init bdjuno config bdjuno init it will be in ~/.bdjuno/config.yaml

This is how it looks like modified for our needs:

chain:
    bech32_prefix: baseledger
    modules: 
        - modules
        - messages
        - auth
        - bank
        - staking
node:
    type: remote
    config:
        rpc:
            client_name: juno
            address: http://localhost:26657
            max_connections: 20
        grpc:
            address: http://localhost:9090
            insecure: true
parsing:
    workers: 1
    listen_new_blocks: true
    parse_old_blocks: true
    parse_genesis: true
    start_height: 1
    fast_sync: true
database:
    name: bigdipper
    host: localhost
    port: 5432
    user: user
    password: password
    schema: public
    max_open_connections: 10
    max_idle_connections: 10
logging:
    level: debug
    format: text
telemetry:
    port: 5000
pruning:
    keep_recent: 100
    keep_every: 500
    interval: 10

  1. bdjuno parse-genesis

  2. bdjuno parse as service:

$ sudo tee /etc/systemd/system/bdjuno.service > /dev/null <<EOF
[Unit]
Description=BDJuno parser
After=network-online.target

[Service]
User=$USER
ExecStart=$GOPATH/bin/bdjuno parse
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

$ sudo systemctl enable bdjuno
$ sudo systemctl start bdjuno

  1. run hasura docker-compose in big dipper should run, but also hasura-cli needs to be installed:

curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash

  1. hasura metadata apply --endpoint <your-endpoint> --admin-secret <hasura_password>

admin secret is configured in docker-compose, endpoint is localhost:8080, or configured in docker-compose

  1. bdjuno hasura-actions as service
$ sudo tee /etc/systemd/system/hasura-actions.service > /dev/null <<EOF
[Unit]
Description=BDJuno Hasura Actions
After=network-online.target

[Service]
User=$USER
ExecStart=$GOPATH/bin/bdjuno hasura-actions
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

BDJuno

GitHub Workflow Status Go Report Card Codecov branch

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

Usage

To know how to setup and run BDJuno, please refer to the docs website.

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

BDJuno is the official Juno implementation for BigDipper, the open-source block explorer for Cosmos

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.3%
  • Other 1.7%