Home

Awesome

<p align="center"> <img src="https://user-images.githubusercontent.com/31943163/217985088-cfcf62b3-808f-4ae3-a7f3-8c8486d941c9.png" /> </p>

Optimize Cosmos query calls with this chain syncronized caching layer.

This program sits on top of another server and acts as a middleware between the requesting client and the actual cosmos RPC/API server.

It supports

Public Endpoints

Juno

Akash

CosmosHub

Comdex

Chihuahua

Injective

Pre-Requirements

NOTE In the past, Redis was used. If you wish to use Redis still it can be found in v0.0.8

Where to run

Ideally, you should run this on your RPC/REST Node for localhost queries. However, you can also run on other infra including on your reverse proxy itself, or another separate node. This makes it possible to run on cloud providers like Akash, AWS, GCP, Azure, etc.


Setup

python3 -m pip install -r requirements/requirements.txt --upgrade

# Edit the ENV file to your needs
cp configs/.env .env

# Update which endpoints you want to disable / allow (regex) & how long to cache each for.
cp configs/cache_times.json cache_times.json

# THen run to ensure it was setup correctly
python3 rest.py
# ctrl + c
python3 rpc.py
# ctrl + c

# If all is good, continue on.
# NOTE: You can only run 1 of each locally at a time because WSGI is a pain. Requires Systemd as a service to run both in parallel.

# Then point your NGINX / CADDY config to this port rather than the default 26657 / 1317 endpoints

Running in Production

Documentation