Golang implemented sidechain for Bytom.
$GOPATH
set to your preferred directory$ cd $GOPATH/src/github.com/bytom
$ git clone https://github.com/Bytom/vapor.git
Then, you have two ways to get vapor executable file:
$ cd $GOPATH/src/github.com/bytom/vapor
$ make install
Firstly, you need initialize node:
$ vapord init --chain_id=mainnet --home <vapor-data-path>
The default vapor data path (on the host) is:
~/Library/Application Support/Vapor
~/.vapor
%APPDATA%\Vapor
Then, start your node:
$ vapord node --home <vapor-data-path>
$ cd $GOPATH/src/github.com/bytom/vapor
$ docker build -t vapor .
$ docker run -it --net=host -v <vapor/data/directory/on/host/machine>:/root/.vapor vapor:latest
vapor data directory has three config files:
config.toml
federation.json
node_key.txt
Use exit
to exit Docker's iterative mode.
For example,
$ docker run -d --net=host -v <vapor/data/directory/on/host/machine>:/root/.vapor vapor:latest vapord node --web.closed --auth.disable
To list the running containners and check their container id, image, corresponding command, created time, status, name and ports being used:
$ docker container ls
or
$ docker ps
To execute a command inside a containner, for example:
$ docker exec -it <containerId> vaporcli create-access-token <tokenId>
To stop a running containner:
$ docker stop <containerId>
To remove a containner:
$ docker rm <containerId>
After the supernode and alternative node receive the reward from the node, they will allocate the reward
according to the interest rate.
The reward calculation rules:
calculate the reward (consensus reward * interest rate * voting weight) according to the weight of votes
cast in consensus around, and choose how many rounds of consensus to allocate the reward flexibly.
UTXO has been merged to solve the problem that too much UTXO input causes a failed send transaction to fail. details
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。