4 [![Build Status](https://travis-ci.org/Bytom/vapor.svg)](https://travis-ci.org/Bytom/vapor) [![AGPL v3](https://img.shields.io/badge/license-AGPL%20v3-brightgreen.svg)](./LICENSE)
6 **Golang implemented sidechain for Bytom.**
10 - [Go](https://golang.org/doc/install) version 1.11 or higher, with `$GOPATH` set to your preferred directory
15 $ cd $GOPATH/src/github.com/bytom
16 $ git clone https://github.com/Bytom/vapor.git
19 Then, you have two ways to get vapor executable file:
21 1. compile source code
22 2. build it using Docker
27 $ cd $GOPATH/src/github.com/bytom/vapor
33 Firstly, you need initialize node:
36 $ vapord init --chain_id=mainnet --home <vapor-data-path>
39 The default vapor data path (on the host) is:
40 + Mac: `~/Library/Application Support/Vapor`
42 + Windows: `%APPDATA%\Vapor`
44 Then, start your node:
47 $ vapord node --home <vapor-data-path>
55 $ cd $GOPATH/src/github.com/bytom/vapor
56 $ docker build -t vapor .
59 ### Enter the iterative mode
62 $ docker run -it --net=host -v <vapor/data/directory/on/host/machine>:/root/.vapor vapor:latest
65 vapor data directory has three config files:
71 Use `exit` to exit Docker's iterative mode.
78 $ docker run -d --net=host -v <vapor/data/directory/on/host/machine>:/root/.vapor vapor:latest vapord node --web.closed --auth.disable
81 To list the running containners and check their container id, image, corresponding command, created time, status, name and ports being used:
93 To execute a command inside a containner, for example:
96 $ docker exec -it <containerId> vaporcli create-access-token <tokenId>
99 To stop a running containner:
102 $ docker stop <containerId>
105 To remove a containner:
108 $ docker rm <containerId>
111 ### Reward distribution tool
113 After the supernode and alternative node receive the reward from the node, they will allocate the reward
115 according to the interest rate.
117 The reward calculation rules:
119 calculate the reward (consensus reward * interest rate * voting weight) according to the weight of votes
121 cast in consensus around, and choose how many rounds of consensus to allocate the reward flexibly.
123 [Tool usage details](./cmd/votereward/README.md)
127 UTXO has been merged to solve the problem that too much UTXO input causes a failed send transaction to fail.
128 [details](./cmd/utxomerge/README.md)