Golang implemented sidechain for Bytom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wz b12c7b5f50 fix log (#388) 5 days ago
accesstoken Small edit (#241) 1 month ago
account Merger utxo (#383) 5 days ago
api add get vote result (#345) 3 weeks ago
asset feat: add build crosschain input (#91) 2 months ago
blockchain modify estimate gas (#304) 1 month ago
cmd Merger utxo (#383) 5 days ago
common filter out known txs (#280) 1 month ago
config log into file (#357) 2 weeks ago
consensus Voter reward (#344) 3 weeks ago
crypto V0.1 pk interface (#58) 3 months ago
dashboard update dashboard. (#325) 1 month ago
database Wallet store test (#326) 1 month ago
docker mv dockerfiles (#377) 2 weeks ago
docs fix (#340) 4 weeks ago
encoding Small edit (#246) 1 month ago
env new repo 8 months ago
equity test (#52) 3 months ago
errors new repo 8 months ago
event init push for roll back in special case (#153) 2 months ago
log fix log (#388) 5 days ago
math/checked new repo 8 months ago
net edit code while reviewing the code (#255) 1 month ago
netsync Peer add announces new block message num limit (#378) 1 week ago
node add clear lock file (#364) 2 weeks ago
p2p fix log (#388) 5 days ago
proposal modify consensusResult for block (#324) 1 month ago
protocol Add protocol state module test case (#380) 6 days ago
test Merger utxo (#383) 5 days ago
testutil Small edit (#241) 1 month ago
toolbar Merger utxo (#383) 5 days ago
util rename vapord (#277) 1 month ago
vendor log into file (#357) 2 weeks ago
version v1.0.0 stable (#336) 4 weeks ago
wallet consensus should be able to change (#300) 1 month ago
.gitignore refatcor(feaderation): use P2WSHProgram for federation program on sidechain (#233) 1 month ago
.travis.yml Dpos process block (#69) 2 months ago
LICENSE new repo 8 months ago
Makefile Change Makefile and directory for vapor 1 month ago
README.md fix log (#388) 5 days ago

README.md

Vapor

Build Status AGPL v3

Golang implemented sidechain for Bytom.

Requirements

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

Get source code

$ git clone https://github.com/Bytom/vapor.git $GOPATH/src/github.com/vapor

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

  1. compile source code
  2. build it using Docker

Installation

$ cd $GOPATH/src/github.com/vapor
$ make install

Run Directly

Firstly, you need initialize node:

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

The default vapor data path (on the host) is:

  • Mac: ~/Library/Application Support/Vapor
  • Linux: ~/.vapor
  • Windows: %APPDATA%\Vapor

Then, start your node:

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

Running in Docker

Build the image

$ cd $GOPATH/src/github.com/vapor
$ 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

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>

Reward distribution tool

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.

Tool usage details

Merger utxo

UTXO has been merged to solve the problem that too much UTXO input causes a failed send transaction to fail. details

License

AGPL v3