GithubHelp home page GithubHelp logo

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.

Koinos Blockchain's Projects

as-bignum icon as-bignum

Fixed length big numbers for AssemblyScript 🚀

as-proto icon as-proto

Protobuf implementation in AssemblyScript

assets icon assets

A comprehensive, up-to-date collection of information about several thousands (!) of crypto tokens.

embeddedproto icon embeddedproto

Embedded Proto is a C++ Protocol Buffers implementation specifically suitable for ARM Cortex-M microcontrollers. It is small, reliable and easy to use.

eos-vm icon eos-vm

A Low-Latency, High Performance and Extensible WebAssembly Backend Library

fizzy icon fizzy

Fizzy aims to be a fast, deterministic, and pedantic WebAssembly interpreter written in C++.

go-prompt icon go-prompt

Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.

hunter icon hunter

CMake driven cross-platform package manager for C/C++.

hunter-cache icon hunter-cache

The C++ Hunter dependency cache for Koinos applications.

koinos icon koinos

Official home of the Koinos Blockchain. Use this umbrella repository to launch a Koinos cluster using Docker.

koinos-account-history icon koinos-account-history

The account history microservice saves transaction history and provides an API to the Koinos cluster via RPC over AMQP.

koinos-as-gen icon koinos-as-gen

Protoc plugin to generate AssemblyScript code based on a proto file

koinos-block-producer icon koinos-block-producer

The block producer microservice constructs blocks using pending transactions in the mempool for submission to the chain.

koinos-block-store icon koinos-block-store

The block store microservice saves blocks to disk and provides an API to the Koinos cluster via RPC over AMQP.

koinos-branding icon koinos-branding

A library of assets, color schemes, and press kits used in Koinos branding.

koinos-chain icon koinos-chain

The chain microservice is responsible for the application of blocks, running of smart contracts, and applying transactions.

koinos-cli icon koinos-cli

A command line utility used for key management and to interact with the Koinos blockchain.

koinos-cmake icon koinos-cmake

A suite of CMake modules used in building Koinos C++ projects.

koinos-contracts-as icon koinos-contracts-as

This suite of system contracts provides core functionality for the Koinos blockchain including consensus algorithms and tokenomics.

koinos-contracts-cpp icon koinos-contracts-cpp

This suite of system contracts provides core functionality for the Koinos blockchain including consensus algorithms and tokenomics.

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.