Watch 2 Star 3 Fork 1

Bytom Blockchain / vaporGoAGPL-3.0

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
利用Golang实现Bytom的侧链 spread retract

Clone or download
Notice: Creating folder will generate an empty file .keep, because not support in Git


Build Status AGPL v3

Golang implemented sidechain for Bytom.


  • Go version 1.11 or higher, with $GOPATH set to your preferred directory

Get source code

$ git clone $GOPATH/src/

Then, you have two ways to get vapor executable file:

  1. compile source code
  2. build it using Docker


$ cd $GOPATH/src/
$ make install

Run Directly

Firstly, you need initialize node:

$ vapord init --chain_id=vapor --home <vapor-data-path>

For example, you can store vapor data in $HOME/bytom/vapor:

$ vapord init --chain_id=vapor --home $HOME/bytom/vapor

Then, start your node:

$ vapord node --home <vapor-data-path>

Running in Docker

Build the image

$ cd $GOPATH/src/
$ docker build -t vapor .

Enter the iterative mode

$ 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.

Daemon 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


$ 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>



Comments ( 1 )

You need to Sign in for post a comment

Help Search

Gitee_you_jiang_zheng_wen Zheng_wen_close