blockchain-sim

module
v0.0.0-...-36603ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: MIT

README

blockchain consensus simulate

A simple demo to simulate blockchain consensus algorithms(pos and dpos) with p2p network.

build

go build -o build/simulate main/simulate.go

run

cd build

# simulate cmd help
./simulate --help

# run simulate cmd
# -l option is to set log_level, now support error,warn,info,debug
./simulate.go

# sub cmd help
simulate » help

# sim sub cmd help
simulate » sim --help

# simulate blockchain with pos consensus, 3 nodes and run 2 rounds
simulate » sim pos 3 2

# simulate blockchain with dpos consensus, 3 nodes and run 2 rounds
simulate » sim dpos 3 2

Directories

Path Synopsis
implement a simple p2p blockchain
implement a simple p2p blockchain

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL