Skip to content
Go Implementation of the Spacemesh protocol full node. 💾💪
Go Python Assembly Shell Makefile Batchfile Other
Branch: develop
Clone or download
gavraz Added test of delayed nodes & implemented new sync flow (#1350)
* Added test_delayed
* Improved and added unsubscribe method to clock
* Fully implemented new sync flow
* Fixed sync automation test
* Fixed handle errAlreadyExist in AddBlockWithTxs
* Fixed (implemented) calculation of hash of layer
* Added UT
* Removed consensus pkg.
* Updated app_test config
Latest commit 458ffaa Aug 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Delete default template Jan 1, 2019
accounts fix names and capitalization so all block fields can be serialized Dec 12, 2018
activation added rpc for get mining status (#1343) Aug 21, 2019
address Startpost rpc (#1312) Aug 15, 2019
amcl Bls for layer vrf (#957) Jun 5, 2019
api reverted rpc delete (#1364) Aug 22, 2019
app/config Main funcs (#637) Mar 10, 2019
cmd Updated app_test config Aug 22, 2019
common Fix mining test (#1025) Jun 23, 2019
config Merge remote-tracking branch 'origin/develop' into test_delayed_nodes Aug 22, 2019
crypto Block oracle improvements (#789) Apr 7, 2019
database ATX syntactic validation on gossip (#1053) Jun 27, 2019
eligibility Hare consensus view (#1153) Jul 24, 2019
events Event tracker (#1342) Aug 21, 2019
filesystem revert comments changes Nov 20, 2018
hare Fix hare algorithm logs (#1362) Aug 22, 2019
log change loggers to not write debug logs to a file. (#1323) Aug 14, 2019
merkle add block proto Nov 19, 2018
mesh Merge remote-tracking branch 'origin/develop' into test_delayed_nodes Aug 22, 2019
metrics added metrics package for p2p and added using it in relevant paths. (#… Feb 12, 2019
miner Merge remote-tracking branch 'origin/develop' into test_delayed_nodes Aug 22, 2019
monitoring Hare memory usage (#1144) Jul 14, 2019
nipst added rpc for get mining status (#1343) Aug 21, 2019
oracle Startpost rpc (#1312) Aug 15, 2019
p2p Update hare and tortoise log messages (#1345) Aug 22, 2019
post node = identity, decoupled local node from swarm, fixed all consequences Jun 25, 2018
rand fixed test to adjust to block reward and penalty (#683) Mar 21, 2019
research Add files via upload Jun 16, 2018
rlp added rlp and crypto into project, transactions processing implemented Dec 16, 2018
scripts check only major and minor versions for env setup (#983) Jun 16, 2019
state Event tracker (#1342) Aug 21, 2019
tests update conf Aug 23, 2019
timesync Added ut to clock Aug 22, 2019
tortoise Update hare and tortoise log messages (#1345) Aug 22, 2019
trie Poet messages (#913) Jun 23, 2019
types Fixed hash Aug 20, 2019
vagrant Vagrant file and provision script Jan 10, 2018
version viper bind flags to config May 29, 2018
.dockerignore Remove data dir from sync (#1150) Aug 4, 2019
.travis.yml Sync auto remote files (#1142) Jul 15, 2019
AUTHORS viper bind flags to config May 29, 2018 Create Dec 27, 2017 finalize switch to go mod, incl. docs Dec 18, 2018
DockerFileTests Add back sync tests to make dockerrun-all (#1319) Aug 15, 2019
Dockerfile faster docker builds (#1231) Aug 1, 2019
LICENSE copy changes May 1, 2018
Makefile Add back sync tests to make dockerrun-all (#1319) Aug 15, 2019 Added localnet info Jul 23, 2019
Vagrantfile Vagrant file and provision script Jan 10, 2018
appveyor.yml add windows setup scripts Jan 3, 2019
config.toml Hdist block voting (#1163) Jul 24, 2019
go.mod Merge remote-tracking branch 'origin/develop' into test_delayed_nodes Aug 22, 2019
go.sum Event tracker (#1342) Aug 21, 2019 Update Aug 26, 2018
main.go Update post (#1321) Aug 14, 2019
old_VERSION added config package May 29, 2018
setup_env.bat Improved installation (#475) Jan 24, 2019 Travis grpc gateway (#981) Jun 16, 2019 Added note about table-driven testing Feb 12, 2018

Spacemesh logo  

A programmable Cryptocurrency

Go Report Card

Browse Gitcoin Bounties


💾💪 Thanks for your interest in this open source project. This repo is the go implementation of the Spacemesh p2p full node software.

Spacemesh is a decentralized blockchain computer using a new race-free consensus protocol that doesn't involve energy-wasteful proof of work.

We aim to create a secure and scalable decentralized computer formed by a large number of desktop PCs at home.

We are designing and coding a modern blockchain platform from the ground up for scale, security and speed based on the learnings of the achievements and mistakes of previous projects in this space.

To learn more about Spacemesh head over to

To learn more about the Spacemesh protocol watch this video.


Spacemesh is designed to create a decentralized blockchain smart contracts computer and a cryptocurrency that is formed by connecting the home PCs of people from around the world into one virtual computer without incurring massive energy waste and mining pools issues that are inherent in other blockchain computers, and provide a provably-secure and incentive-compatible smart contracts execution environment.

Spacemesh is designed to be ASIC-resistant and in a way that doesn’t give an unfair advantage to rich parties who can afford setting up dedicated computers on the network. We achieve this by using a novel consensus protocol and optimize the software to be most effectively be used on home PCs that are also used for interactive apps.

What is this good for?

Provide dapp and app developers with a robust way to add value exchange and other value related features to their apps at scale. Our goal is to create a truly decentralized cryptocurrency that fulfills the original vision behind bitcoin to become a secure trustless store of value as well as a transactional currency with extremely low transaction fees.

Target Users

go-spacemesh is designed to be installed and operated on users' home PCs to form one decentralized computer. It is going to be distributed in the Spacemesh App but people can also build and run it from source code.

Project Status

We are working hard towards our first major milestone - a public permissionless testnet running the Spacemesh consensus protocol.


Thank you for considering to contribute to the go-spacemesh open source project!

We welcome contributions large and small and we actively accept contributions.

Diggin' Deeper

Please read the Spacemesh full FAQ.

go-spacemesh Architecture

High Level Design

Client Software Architecture


git clone

-- or --

Fork the project from

Since the project uses Go 1.11's Modules it is best to place the code outside your $GOPATH. Read this for alternatives.

Setting Up Local Environment

Install Go 1.11 or later for your platform, if you haven't already.

Ensure that $GOPATH is set correctly and that the $GOPATH/bin directory appears in $PATH.

Before building we need to install protoc (ProtoBuf compiler) and some tools required to generate ProtoBufs. Do this by running:

make install

This will invoke which supports Linux and MacOS. On other platforms it should be straightforward to follow the steps in this script manually.


To build go-spacemesh for your current system architecture, from the project root directory, use:

make build

This will (re-)generate protobuf files and build the go-spacemesh binary, saving it in the project root directory.

To build a binary for a specific architecture directory use:

make darwin | linux | windows

Platform-specific binaries are saved to the /build directory.




NOTE: if tests are hanging try running ulimit -n 400. some tests require that to work.

make test


make cover


A Dockerfile is included in the project allowing anyone to build and run a docker image:

docker build -t spacemesh .
docker run -d --name=spacemesh spacemesh


On windows you will need the following prerequisites:

  • Powershell - included by in Windows by default since Windows 7 and Windows Server 2008 R2
  • Git for Windows - after installation remove C:\Program Files\Git\bin from System PATH and add C:\Program Files\Git\cmd to System PATH
  • Make - after installation add C:\Program Files (x86)\GnuWin32\bin to System PATH

You can then run the command make install followed by make build as on unix based systems.

Running a Local Testnet

  • You can run a local Spacemesh Testent with 6 full nodes, 6 user accounts, and 1 POET support service on your computer using docker.
  • The local testnet full nodes are built from this repo.
  • This is a great way to get a feel for the protocol and the platform and to start hacking on Spacemesh.
  • Follow the steps in our Local Testnet Guide

Next Steps...


Please install the Zenhub browser extension to view the go-spacemesh workspaces below.


Sync Protocol

Hare Protocol

Global State

Got Questions?

You can’t perform that action at this time.