@kosu/genesis-cli

Simple CLI for snap-shotting Kosu contract system to generate a Kosu network genesis file.


License
MIT
Install
npm install @kosu/genesis-cli@1.2.0

Documentation


This monorepo contains the packages that implement the Kosu protocol, alongside supporting packages and developer tooling.

Documentation for Kosu packages is available in this repository, and hosted at docs.kosu.io.

Contents

Packages

Contract packages

Smart-contract packages (Solidity) including the core Kosu system contracts and SubContract SDK.

Package             Version Description
@kosu/system-contracts npm The core Kosu contract system and test suite, implemented in Solidity.
@kosu/subcontract-sdk npm The Kosu SubContract interface and example implementations.

Client packages

Package Version Description
go-kosu version The reference implementation of the Kosu network in Go, built on Tendermint Core.

Library packages

Client/server libraries for interacting with the Kosu network and contract system.

Package             Version Description
@kosu/kosu.js npm TypeScript library for interacting with the Kosu network and contract system.

Utility/development packages

Package             Version Description
@kosu/dev-images npm Development docker images and supporting scripts for Kosu packages.
@kosu/tslint-config npm TypeScript linter base configuration for Kosu TypeScript projects.
@kosu/tsc-config npm TypeScript compiler base configuration for Kosu TypeScript projects.
@kosu/web-helpers npm Simple web interface for interacting with the Kosu contract system.

Install Instructions

Prerequisites

In order to build the full monorepo, the following is required:

Homebrew

MacOS users can install most required packages with Homebrew package manager.

For other operating systems, see the official install instructions for each required package (linked above).

Yarn

This will also install Node.js if it is not already installed.

brew install yarn

Geth tools

To install the go-ethereum suite with brew:

brew tap ethereum/ethereum
brew install ethereum

Jq

To install jq (JSON parsing binary):

brew install jq

Clone kosu-monorepo

Clone the repository via SSH:

git clone git@github.com:ParadigmFoundation/kosu-monorepo

Or via HTTP:

git clone https://github.com/ParadigmFoundation/kosu-monorepo

Build packages

Install dependencies:

yarn

To build all packages:

yarn build

Run a validator node

After building, go-kosu binaries can be found at packages/go-kosu for your OS and architecture.

To start a single-node Kosu development network as a validator, and initialize a peg-zone with the Kosu Ropsten contract system:

./kosud --init --web3 wss://ethnet.zaidan.io/ws/ropsten

To start the JSON-RPC bridge and interact with kosud use the kosud rpc sub-command. By default the HTTP and WS endpoints are binded to ports 14341 and 14342 repectively.

The command-line interface will also be built (see kosu-cli help for all commands).

./kosu-cli query round

See the go-kosu package for more info about executing transactions, queries, and running a testnet with docker-compose.

Documentation

Generated documentation is published for the following packages with each commit, and published to docs.kosu.io:

  • @kosu/kosu.js: TypeScript library for interacting with the Kosu contract system and network.
  • @kosu/system-contracts: The core Kosu system smart-contracts in Solidity, and TypeScript test suite.

Documentation is also checked in to each package and viewable on GitHub.

Docker images

Various development images used for Kosu CI/CD and development are publicly available on GCR (download with docker pull), and built from each master commit.

kosu-io/node-ci

A custom Node.js (lts) image with additional binaries used to assist in building/testing Kosu packages. Drop-in replacement for node:lts image.

  • GCR URI: gcr.io/kosu-io/node-ci:latest

kosu-io/go-kosu-ci

A custom golang (1.12) image with Tendermint and other binaries pre-installed, used as the CI image for go-kosu (Tendermint is compiled into kosud and not needed for production builds, but used in testing).

  • GCR URI: gcr.io/kosu-io/go-kosu-ci:latest

kosu-io/kosu-geth

Contains geth with PoA consensus in a single-node private network configuration used for testing Kosu system contracts. Note that contracts are not pre-migrated and must be deployed with @kosu/system-contracts (see scripts).

  • GCR URI: gcr.io/kosu-io/kosu-geth:latest

Binaries

Pre-built binaries for go-kosu are available (per-commit CD builds are currently Linux/x86_64 only, build locally for other targets):

kosud

Kosu network client reference implementation, built on Tendermint consensus. Run kosud --help for usage.

wget https://storage.googleapis.com/kosud/linux_amd64/kosud
chmod +x kosud
install kosud /usr/local/bin

kosu-cli

Command-line interface for kosud (run kosu-cli for usage).

wget https://storage.googleapis.com/kosu-cli/linux_amd64/kosu-cli
chmod +x kosu-cli
install kosu-cli /usr/local/bin

Contributing

We strongly encourage all contributions! Read our contribution guidelines and feel free to reach out with any questions.

Issues

To report bugs within a specific Kosu package, please create an issue in this repository (template will auto-populate).

License

Kosu is being developed as free open-source software under an MIT license.