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.
Paladz cc3526dc33
Merge pull request #467 from Bytom/fix
1 week ago
accesstoken rename (#465) 1 week ago
account rename (#465) 1 week ago
api rename (#465) 1 week ago
application/mov rename (#465) 1 week ago
asset rename (#465) 1 week ago
blockchain rename (#465) 1 week ago
cmd rename (#465) 1 week ago
common rename (#465) 1 week ago
config rename (#465) 1 week ago
consensus rename (#465) 1 week ago
crypto rename (#465) 1 week ago
dashboard dashboard: update chain transactions (#414) 1 month ago
database rename (#465) 1 week ago
docker update 1 week ago
docs Issuance length (#460) 1 week ago
encoding rename (#465) 1 week ago
env new repo 1 year ago
equity rename (#465) 1 week ago
errors new repo 1 year ago
event rename (#465) 1 week ago
log rename (#465) 1 week ago
math/checked new repo 1 year ago
net rename (#465) 1 week ago
netsync rename (#465) 1 week ago
node rename (#465) 1 week ago
p2p rename (#465) 1 week ago
proposal rename (#465) 1 week ago
protocol rename (#465) 1 week ago
test rename (#465) 1 week ago
testutil rename (#465) 1 week ago
toolbar rename (#465) 1 week ago
util rename (#465) 1 week ago
vendor rename (#465) 1 week ago
version change version v1.0.4 (#420) 1 month ago
wallet rename (#465) 1 week ago
.gitignore feat: add node discovery and status check (#374) 3 months ago
.travis.yml rename (#465) 1 week ago
LICENSE new repo 1 year ago
Makefile rename (#465) 1 week ago
README.md rename (#465) 1 week 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

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

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/bytom/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/bytom/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