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 $ git clone https://github.com/Bytom/vapor.git $GOPATH/src/github.com/vapor
18 Then, you have two ways to get vapor executable file:
20 1. compile source code
21 2. build it using Docker
26 $ cd $GOPATH/src/github.com/vapor
32 Firstly, you need initialize node:
35 $ vapord init --chain_id=mainnet --home <vapor-data-path>
38 The default vapor data path (on the host) is:
39 + Mac: `~/Library/Application Support/Vapor`
41 + Windows: `%APPDATA%\Vapor`
43 Then, start your node:
46 $ vapord node --home <vapor-data-path>
54 $ cd $GOPATH/src/github.com/vapor
55 $ docker build -t vapor .
58 ### Enter the iterative mode
61 $ docker run -it --net=host -v <vapor/data/directory/on/host/machine>:/root/.vapor vapor:latest
64 vapor data directory has three config files:
70 Use `exit` to exit Docker's iterative mode.
77 $ docker run -d --net=host -v <vapor/data/directory/on/host/machine>:/root/.vapor vapor:latest vapord node --web.closed --auth.disable
80 To list the running containners and check their container id, image, corresponding command, created time, status, name and ports being used:
92 To execute a command inside a containner, for example:
95 $ docker exec -it <containerId> vaporcli create-access-token <tokenId>
98 To stop a running containner:
101 $ docker stop <containerId>
104 To remove a containner:
107 $ docker rm <containerId>
110 ### Reward distribution tool
112 After the supernode and alternative node receive the reward from the node, they will allocate the reward
114 according to the interest rate.
116 The reward calculation rules:
118 calculate the reward (consensus reward * interest rate * voting weight) according to the weight of votes
120 cast in consensus around, and choose how many rounds of consensus to allocate the reward flexibly.
122 [Tool usage details](./cmd/votereward/README.md)
126 UTXO has been merged to solve the problem that too much UTXO input causes a failed send transaction to fail.
127 [details](./toolbar/merger_utxo/README.md)