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:
- make sure db is set (check big dipper repo)
- cd bdjuno
make install - init bdjuno config
bdjuno initit 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
-
bdjuno parse-genesis -
bdjuno parseas 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
- 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
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
bdjuno hasura-actionsas 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 (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 BDJuno, please refer to the docs website.
If you want to test the code, you can do so by running
$ make test-unitNote: Requires Docker.
This will:
- Create a Docker container running a PostgreSQL database.
- Run all the tests using that database as support.