Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pinax-network/antelope-reliability-service

gRPC service for querying the number of missing blocks on the Antelope chain.
https://github.com/pinax-network/antelope-reliability-service

Last synced: about 2 months ago
JSON representation

gRPC service for querying the number of missing blocks on the Antelope chain.

Awesome Lists containing this project

README

        

# Antelope Reliability Query Service

gRPC service for querying the number of missing blocks on the Antelope chain.

## Setup

Make sure to have the [`substreams-sink-kv`](https://github.com/streamingfast/substreams-sink-kv) tool installed and available in your `$PATH`.

**Populate the kv-store with data from the remote endpoint**
```bash
./inject.sh
```

You can install the [`kvdb`](https://github.com/streamingfast/kvdb) tool to inspect the data stored in the *kv-store* locally:
```bash
go install github.com/streamingfast/kvdb/cmd/kvdb@develop
```

**To count missing blocks between a starting date and an ending date data**
```bash
kvdb read prefix kdate --dsn "badger3://$(pwd)/badger_data.db" --decoder="proto://./proto/[email protected]_block_meta.v1.AntelopeBlockMeta"
```

## Running the service

**Serve the data from localhost through badgerDB**
```bash
./serve.sh
```

**Service query examples (make sure the `serve` script is running)**
```bash
$ grpcurl -plaintext -proto ./proto/service.proto -d '{"start_date": "2023-07-26T11:36:37.500Z", "end_date": "2023-07-26T11:36:39.000Z"}' localhost:7878 pinax.service.v1.AntelopeReliability.CountMissingBlocks

```