Official Go implementation of the Nebulas protocol
Branch: feature/nbredev
Clone or download
Latest commit 5ebe6eb Feb 19, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
account test: fix test error Jan 2, 2019
cmd v8 js lib upgrade Jun 2, 2018
common rpc:log_interceptor.go add params log May 21, 2018
conf nbre: nbre config adapter Nov 16, 2018
consensus nbre: add nbre for neb Oct 10, 2018
core update nbre test Jan 22, 2019
crypto nvm: add crypto methods Jun 6, 2018
docker update docker config Feb 14, 2019
keydir merge "develop" branch. Mar 27, 2018
mainnet/conf conf: update mainnet conf Aug 21, 2018
metrics metrics: fix metrics loop not stoped bug Nov 19, 2018
native-lib update rocksdb t0 v5.17.2 Jan 24, 2019
native update docker build Jan 29, 2019
nbre add fflib Feb 19, 2019
neblet test: fix test error Jan 2, 2019
nebtestkit fix test script Jan 2, 2019
net merge testnet to develop May 21, 2018
nf update rocksdb t0 v5.17.2 Jan 24, 2019
nip/dip dip: update dip delay time Jan 29, 2019
nr rpc: add ext fields for nr and dip Jan 28, 2019
rpc rpc: add ext fields for nr and dip Jan 28, 2019
storage storage: update log file num Jan 9, 2019
sync test: fix test error Jan 2, 2019
util test: fix test error Jan 2, 2019
.dockerignore update docker build Jan 29, 2019
.gitignore update build script Jan 29, 2019
.gitmodules nbre: update zstd version to linux default Oct 24, 2018
.travis.yml travis: restore config to build rocksdb from src. Mar 15, 2018
Gopkg.lock update dep config Nov 1, 2018
Gopkg.toml update rocksdb to v5.15.10 Feb 13, 2019
LICENSE Initial commit Sep 13, 2017
Makefile update build script Jan 29, 2019 update vendor download url. Jan 21, 2019 page move to wiki. Sep 16, 2017 guideline: add makefile based guideline. Sep 14, 2017
docker-compose.yml update docker build Jan 29, 2019 travis: dump GLIBCXX symbol of Nov 14, 2017
lib cmd: neb/. add keydir & lib soft link. Nov 3, 2017 cmd: update Oct 17, 2017


[NOTE] Please make sure you're checking out master branch for production purpose. The current branch is still under development.

Official Go implementation of the Nebulas protocol.

Build Status

For the roadmap of Nebulas, please visit the roadmap page.

For more information of Nebulas protocol, design documents, please refer to our wiki.

TestNet is released, please check here for more details.

Mainnet is released, please check here for more details.

Building from source


Components Version Description
Golang >= 1.9.2 The Go Programming Language
Dep >= 0.3.1 Dep is a dependency management tool for Go.


  1. Checkout repo.
cd $GOPATH/src
go get -u -v

The project is under active development. Its default branch is develop.


New users may want to checkout and use the stable mainnet release in master.

git checkout master

Or use the stable testnet release in testnet.

git checkout testnet
  1. Install rocksdb.
  • OS X:

    • Install via homebrew.
    • run brew install rocksdb
  • Linux - Ubuntu

    • Install Dependencies
      apt-get update
      apt-get -y install build-essential libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev
    • Install rocksdb by source code:
      git clone
      cd rocksdb && make shared_lib && make install-shared
  • Linux - Centos

    • Install Dependencies
      yum -y install epel-release && yum -y update
      yum -y install gflags-devel snappy-devel zlib-devel bzip2-devel gcc-c++  libstdc++-devel
    • Install rocksdb by source code:
      git clone
      cd rocksdb && make shared_lib && make install-shared
  1. Install dependencies packages.

    • all golang dependencies will be stored in ./vendor.
    • run make dep to install dependencies.
    • If you failed to run this, please download our vendor.tar.gz directly.
  2. Install v8 libraries.

    • run make deploy-v8
  3. Build the neb binary.

    • run make build


Run seed node

Starting a Nebulas seed node is simple. After the build step above, run a command:

./neb [-c /path/to/config.conf]

tips: more details about configuration, please refer to template.conf

You will see log message output like:

INFO[2018-03-30T01:39:16+08:00] Setuped Neblet.                               file=neblet.go func="neblet.(*Neblet).Setup" line=161
INFO[2018-03-30T01:39:16+08:00] Starting Neblet...                            file=neblet.go func="neblet.(*Neblet).Start" line=183
INFO[2018-03-30T01:39:16+08:00] Starting NebService...                        file=net_service.go func="net.(*NebService).Start" line=58
INFO[2018-03-30T01:39:16+08:00] Starting NebService Dispatcher...             file=dispatcher.go func="net.(*Dispatcher).Start" line=85
INFO[2018-03-30T01:39:16+08:00] Starting NebService Node...                   file=node.go func="net.(*Node).Start" line=96
INFO[2018-03-30T01:39:16+08:00] Starting NebService StreamManager...          file=stream_manager.go func="net.(*StreamManager).Start" line=74
INFO[2018-03-30T01:39:16+08:00] Started NewService Dispatcher.                file=dispatcher.go func="net.(*Dispatcher).loop" line=93
INFO[2018-03-30T01:39:16+08:00] Starting NebService RouteTable Sync...        file=route_table.go func="net.(*RouteTable).Start" line=91
INFO[2018-03-30T01:39:16+08:00] Started NebService StreamManager.             file=stream_manager.go func="net.(*StreamManager).loop" line=146
INFO[2018-03-30T01:39:16+08:00] Started NebService Node.                      file=net_service.go func="net.(*NebService).Start" id=QmP7HDFcYmJL12Ez4ZNVCKjKedfE7f48f1LAkUc3Whz4jP line=65 listening address="[/ip4/ /ip4/ /ip4/ /ip4/]"
INFO[2018-03-30T01:39:16+08:00] Started NebService.                           file=net_service.go func="net.(*NebService).Start" line=74
INFO[2018-03-30T01:39:16+08:00] Starting RPC GRPCServer...                    file=server.go func="rpc.(*Server).Start" line=87
INFO[2018-03-30T01:39:16+08:00] Started RPC GRPCServer.                       address="" file=server.go func="rpc.(*Server).Start" line=95
INFO[2018-03-30T01:39:16+08:00] Started NebService RouteTable Sync.           file=route_table.go func="net.(*RouteTable).syncLoop" line=123
INFO[2018-03-30T01:39:16+08:00] Starting RPC Gateway GRPCServer...            file=neblet.go func="neblet.(*Neblet).Start" http-cors="[]" http-server="[]" line=212 rpc-server=""
INFO[2018-03-30T01:39:16+08:00] Starting BlockChain...                        file=blockchain.go func="core.(*BlockChain).Start" line=194
INFO[2018-03-30T01:39:16+08:00] Starting BlockPool...                         file=neblet.go func="neblet.(*Neblet).Start" line=219 size=128
INFO[2018-03-30T01:39:16+08:00] Starting TransactionPool...                   file=neblet.go func="neblet.(*Neblet).Start" line=220 size=327680
INFO[2018-03-30T01:39:16+08:00] Started BlockChain.                           file=blockchain.go func="core.(*BlockChain).loop" line=208
INFO[2018-03-30T01:39:16+08:00] Starting EventEmitter...                      file=neblet.go func="neblet.(*Neblet).Start" line=221 size=40960
INFO[2018-03-30T01:39:16+08:00] Started BlockPool.                            file=block_pool.go func="core.(*BlockPool).loop" line=232
INFO[2018-03-30T01:39:16+08:00] Started TransactionPool.                      file=asm_amd64.s func=runtime.goexit line=2362 size=327680
INFO[2018-03-30T01:39:16+08:00] Started EventEmitter.                         file=event.go func="core.(*EventEmitter).loop" line=156
INFO[2018-03-30T01:39:16+08:00] Starting Dpos Mining...                       file=dpos.go func="dpos.(*Dpos).Start" line=136
INFO[2018-03-30T01:39:16+08:00] Started Sync Service.                         file=sync_service.go func="sync.(*Service).startLoop" line=150
INFO[2018-03-30T01:39:16+08:00] Started Dpos Mining.                          file=dpos.go func="dpos.(*Dpos).blockLoop" line=619
INFO[2018-03-30T01:39:16+08:00] Enabled Dpos Mining...                        file=dpos.go func="dpos.(*Dpos).EnableMining" line=155
INFO[2018-03-30T01:39:16+08:00] This is a seed node.                          file=neblet.go func="neblet.(*Neblet).Start" line=247
INFO[2018-03-30T01:39:16+08:00] Resumed Dpos Mining.                          file=dpos.go func="dpos.(*Dpos).ResumeMining" line=296
INFO[2018-03-30T01:39:16+08:00] Started Neblet.                               file=neblet.go func="neblet.(*Neblet).Start" line=259

From the log, we can see the binary execution starts neblet, starts network service, starts RPC API server, and starts consensus state machine.



  • pull from dockerhub directly
    docker pull bkbabydp/go-nebulas
  • build locally
    docker-compose up


  • edit [your conf path] in docker-compose.yml
  # node:
  #   image: bkbabydp/go-nebulas
  #   build:
  #     context: ./docker
  #   ports:
  #     - '8680'
  #     - '8684'
  #     - '8685'
  #     - '8888'
  #     - '8086'
  #   volumes:
  #     - .:/go/src/
  #   environment:
  #     - TZ=Asia/Shanghai
  #     - NEBULAS_BRANCH=master
  #   command: bash docker/scripts/neb.bash -c [your conf path]
  • start the node
    cd /path/to/go-nebulas
    docker-compose up node


We are glad to release Nebulas Testnet here. You can use and join our TestNet right now.


We are glad to release Nebulas Mainnet here. You can use and join our MainNet right now.


Nebulas provides a block explorer to view block/transaction information. Please check Explorer.


Nebulas provides a web wallet to send transaction and deploy/call contract. Please check Web-Wallet


Please check our Wiki to learn more about Nebulas.


We are very glad that you are considering to help Nebulas Team or go-nebulas project, including but not limited to source code, documents or others.

If you'd like to contribute, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our slack channel to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.

Please refer to our contribution guideline for more information.



The go-nebulas project is licensed under the GNU Lesser General Public License Version 3.0 (“LGPL v3”).

For the more information about licensing, please refer to Licensing page.