Skip to content

Golang implementation of KardiaChain Decentralize Network

License

Notifications You must be signed in to change notification settings

jseun/go-kardia

Repository files navigation

Go-Kardia

version Go version License: LGPL v3 CircleCI codecov

Official Golang implementation of KardiaChain following the specs in Technical Paper

alt text

The codebase has been audited by Certik (view article)

KardiaChain Mainnet 1.0

  • Coming soon (follow our progress here)

KardiaChain Public Testnet [Fengari 3.0]

KardiaChain Private Devnet

Quickstart

Run Local Testnet with docker

Join Public Testnet

Join Mainnet (coming soon)

Development

Go environment setup

Install Go to $HOME directory. Sets environment vars:

export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

  • Recommend go build version: 1.14.12 (stable), 1.15.5 (unstable)
  • Recommend go test ./... >= version: 1.14.12

Installation Prerequisites

Build

cd $GOPATH/src/github.com/kardiachain/go-kardia/cmd
go install

Directory structure

Most of the top-level directories are self-explanatory. Here are the core directories:

  • consensus - consensus engine
  • config - default network configs
  • dualchain - dual node's blockchain and service
  • dualnode - interface layer to external blockchains, e.g. Ethererum, Neo, etc.
  • kai - shared libraries specific to KardiaChain
  • kvm - Kardia virtual machine
  • lib - third-party libraries
  • node - Node service
  • rpc - RPC server
  • mainchain - Kardia blockchain core and service
  • proto - protobuf messages definition
  • types - Kardia objects types

Unit tests

cd $GOPATH/src/github.com/kardiachain/go-kardia
go test ./...

Start Kardia network

Mainnet

(Coming soon)

Testnet Fengari 3.0

./cmd --network testnet --node <path/to/kai_config_testnet.yaml>

Devnet

./cmd --network devnet --node <path/to/kai_config_devnet_node1.yaml>
./cmd --network devnet --node <path/to/kai_config_devnet_node2.yaml>
./cmd --network devnet --node <path/to/kai_config_devnet_node3.yaml>

Monitor network with KardiaChain Explorer