Coder Social home page Coder Social logo

gamechangerfinance / gc_node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from koios-official/lite-node

0.0 0.0 0.0 498 KB

In heavy development. Aiming to became a modular Dandelion node strongly based on the great Koios-Lite project

License: MIT License

Shell 45.19% PLpgSQL 52.05% Dockerfile 1.52% JavaScript 1.25%

gc_node's Introduction

Example Image

GC Node

GC Node is based on Koios Lite.

Koios Lite is a streamlined version of the Koios ecosystem, designed for efficient data synchronization and querying on the Cardano blockchain. This setup uses Docker to create a local environment that mirrors the production setup, making it ideal for development and testing.

Components

This setup includes several key components:

  • cardano-node: Runs the Cardano node, connecting to either the mainnet or a testnet.
  • cardano-db-sync: Synchronizes the blockchain data to a PostgreSQL database.
  • postgres: The PostgreSQL database, storing the synchronized blockchain data.
  • postgrest: Serves a RESTful API for querying the blockchain data stored in PostgreSQL.
  • haproxy: A high-performance proxy to distribute network traffic among various components.

Each service is containerized and managed via Docker, ensuring easy deployment and scalability.

Local Testing

For local testing:

  1. Clone the repository to your local machine.
  2. Make sure Docker and Docker Compose are installed.
  3. Configure the environment variables in a .env file based on the provided env.example.
  4. Run docker compose up -d to start the services.
  5. Access the local endpoints as needed for testing.

Deployment

To deploy Koios Lite:

  1. Ensure all environment variables are correctly set for the production environment.
  2. Use the command docker compose up -d to start all the services in detached mode.
  3. Use Admin tool to browse to Tools > gLiveView to monitor that node has reached tip and Docker > Docker Status to ensure none of the containers are DOWN or UP (unhealthy) state.
  4. Execute Setup > Initialise Postgres to deploy custom RPCs and test via PostgREST/HAProxy endpoints using curl:
# PostgREST tip check
curl http://127.0.0.1:8050/rpc/tip

# HAProxy tip check
curl http://127.0.0.1:8053/api/v1/tip

Remember to secure your deployment according to best practices, including securing your database and API endpoints.

Admin tool

A simple script to interact with the all the components of a Koios Lite Node: Admin Tool Documentation

>scripts/koios-lite.sh --help

Koios Administration Tool Help Menu:
------------------------------------

Welcome to the Koios Administration Tool Help Menu.

Below are the available commands and their descriptions:

--about: 			     Displays information about the Koios administration tool.
--install-dependencies:  Installs necessary dependencies.
--check-docker: 		 Checks if Docker is running.
--handle-env-file: 		 Manage .env file.
--reset-env: 			 Resets the .env file to defaults.
--docker-status: 		 Shows the status of Docker containers.
--docker-up: 			 Starts Docker containers defined in docker compose.yml.
--docker-down: 			 Stops Docker containers defined in docker compose.yml.
--enter-node: 			 Accesses the Cardano Node container.
--logs-node: 			 Displays logs for the Cardano Node container.
--gliveview: 			 Executes gLiveView in the Cardano Node container.
--cntools: 			     Runs CNTools in the Cardano Node container.
--enter-postgres: 		 Accesses the Postgres container.
--logs-postgres: 		 Displays logs for the Postgres container.
--enter-dbsync: 		 Accesses the DBSync container.
--logs-dbsync: 			 Displays logs for the DBSync container.
--enter-haproxy: 		 Accesses the HAProxy container.
--logs-haproxy: 		 Displays logs for the HAProxy container.

gc_node's People

Contributors

stakelovelace avatar rdlrt avatar cardadad avatar reqlez avatar gregbgithub avatar zxpectre avatar redoracle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.