gczhou / cita

A fast and scalable blockchain for production.

Home Page:http://cita.readthedocs.io/zh_CN/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Join the chat at https://gitter.im/cryptape/cita

prerequirement

Build dependencies

sudo apt-get install --force-yes libsnappy1v5 libsnappy-dev  capnproto  libgoogle-perftools-dev  \
    libssl-dev  libudev-dev  rabbitmq-server  google-perftools jq

Install rust

CITA requires Rust nightly, We recommend installing Rust through rustup

curl https://sh.rustup.rs -sSf | sh

after had installed rustup, Please let it become effective

source ~/.cargo/env

switch to specify rust nightly version

rustup toolchain install nightly-2017-06-29
rustup show      #show the version of nightly-2017-06-29
rustup default nightly-2017-06-29-x86_64-unknown-linux-gnu

Speed up by mirrors creates toolchain

Build CITA

make setup
please select the way of building CITA, debug or release
make debug   or   make release

Setup CITA

Install admintool

cd admintool
./setup.sh

Generate node configuration with admintool

cd admintool
./admintool -h  #see usage
./admintool     #generate configuration for demo

Nodes files were generated in admintool/release/node{...}

Run CITA

If Demo configuration, open four Terminal at

admintool/release/node0
admintool/release/node1
admintool/release/node2
admintool/release/node3

Operation with node

./cita           #see usage
./cita setup 0   #setup node0
./cita start 0   #start node0
./cita stop 0    #stop node0

Scripts to start/stop all Demo nodes

./tests/integrate_test/cita_start.sh
./tests/integrate_test/cita_start.sh debug
./tests/integrate_test/cita_stop.sh

If node configuration is customized, just copy admintool/release/node* to the customized server, then same as above.

unit test

make test

integrate test

./tests/integrate_test/cita_basic.sh
./tests/integrate_test/cita_transactiontest.sh
./tests/integrate_test/cita_byzantinetest.sh

bench

make bench

coverage

make cov

It will open the result html file using your browser.

About

A fast and scalable blockchain for production.

http://cita.readthedocs.io/zh_CN/latest/

License:GNU General Public License v3.0


Languages

Language:Rust 97.4%Language:Shell 1.5%Language:Python 0.4%Language:Cap'n Proto 0.3%Language:Protocol Buffer 0.2%Language:Makefile 0.2%