Git Product home page Git Product logo

hunter's Introduction

Koinos

The Koinos Blockchain consists of multiple interdependent microservices that communicate via AMQP. Each microservice has been dockerized and can easily be run as a unit with Docker Compose.

Images are automatically uploaded to Docker Hub. latest tracks master on each microservice repo. Feature branches are uploaded with their branch name as the image tag.

Install Docker Compose

Koinos requires Compose V2. The latest version of Docker Deskop on Linux, Mac, and Windows all support Compose V2.

Depending on your Linux distribution, you may need to install the compose plugin for Compose V2 support (Ubuntu 22.04 requires this).

All installation instructions for Docker Desktop and the Compose plugin for all platforms can be found here.

Configure Koinos

Koinos is a blockchain framework and can be used to launch an infinite number of unique blockchains. In order to run a specific blockchain, the Koinos node must first be configured. config-example and env.example contain suitable defaults to connect to the Koinos mainnet. Copy config-example to config and env.example to .env to use the defaults. If you are updating your node, the examples will always contain updated defaults that you can copy in to our config at your discretion.

Inside the config directory are four config files, config.yml, genesis_data.json, koinos_descriptors.pb, and rabbitmq.conf. Below are descriptions of each.

config.yml directly configures the Koinos microservices. Options in the global namespace apply to all microservices. Options under a specific microservice apply just to that microservice. Many options, such as log, are the same across all microservices to allow configuration in the global namespace as well as microservice specific overrides.

genesis_data.json is the initial genesis state of the blockchain (block 0). This sets important system variables such as the genesis public key to boot the blockchain. The hash of all the genesis data is called the Chain ID. The Chain ID is used to quickly differentiate between different blockchains. This file should never be changed.

koinos_descriptors.pb is an encoded representation of all Koinos Protocol Buffers definitions. It is used by the JSON RPC microservice to service API calls. This file should be updated with new versions but not manually editted.

rabbitmq.conf is the configuration file for the AMQP microservice. It can be modified, but is recommended only advanced users modify this file.

By default, each container will use ~/.koinos on the host as their base directory. This can be changed by setting BASEDIR in .env, or exporting BASEDIR as an environment variable, to a different location on the host machine.

Different images can be run by setting environment variables or setting them in .env. For each microservice, append _TAG (e.g. export P2P_TAG=64-auto-gossip).

By default the node will only run core required microservices (chain, block_store, mempool, and p2p).

You can run optional microservices by enabling the associated docker compose profiles:

  • block_producer to enable the block production.
  • jsonrpc to enable JSON-RPC API handling.
  • transaction_store to enable transaction history tracking.
  • account_history to enable account history tracking.
  • contract_meta_store to enable tracking of smart contract metadata.

These profiles can be set with the --profile options (i.e. docker compose --profile api up ) or by setting the COMPOSE_PROFILES environment variable during invocation or in .env.

For more information on docker compose profiles, please read the official documentation.

Running Koinos

Once docker compose is installed and the node configured, run docker compose up -d to start the node as a daemon.

To check on the node run docker compose logs --tail 1 --follow to display logs for the node.

The node will automatically start upon system restart. To stop the node, run docker compose down.

hunter's People

Contributors

aadityakalsi avatar alamaison avatar bjoe avatar caseymcc avatar chfast avatar craffael avatar cyberunner23 avatar daminetreg avatar dan-42 avatar drodin avatar dvirtz avatar elisemorysc avatar headupinclouds avatar hjmallon avatar ikliashchou avatar isaachier avatar jhs67 avatar kgeorgiev93 avatar knitschi avatar lsolanka avatar neroburner avatar oliverdaniell avatar pretyman avatar rbsheth avatar riegl-gc avatar ruslo avatar tatraian avatar ubiquite avatar wheybags avatar xsacha avatar

Stargazers

 avatar

Watchers

 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.