All Projects → spacemeshos → Go Spacemesh

spacemeshos / Go Spacemesh

Licence: mit
Go Implementation of the Spacemesh protocol full node. 💾⏰💪

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Spacemesh

Go Vite
Official Go implementation of the Vite protocol
Stars: ✭ 257 (-33.93%)
Mutual labels:  blockchain, dag, p2p
Awesome Blockchain Rust
Collect libraries and packages about blockchain/cryptography in Rust
Stars: ✭ 251 (-35.48%)
Mutual labels:  blockchain, consensus, p2p
Blockchain
Compilation of useful documents and scientific papers about Blockchain & cryptocurrencies.
Stars: ✭ 751 (+93.06%)
Mutual labels:  blockchain, cryptocurrencies, dag
Chainspace Prototype
Chainspace is a distributed ledger platform for high-integrity and transparent processing of transactions within a decentralized system.
Stars: ✭ 41 (-89.46%)
Mutual labels:  blockchain, consensus, decentralization
Unstoppable Wallet Android
A secure and decentralized Bitcoin and other cryptocurrency wallet for Android phones. Supports Bitcoin, Ethereum, EOS, Binance Chain, Bitcoin Cash, DASH, ...
Stars: ✭ 165 (-57.58%)
Mutual labels:  blockchain, p2p, decentralization
Particl Desktop
The GUI application for Particl Markeplace and PART coin wallet. A decentralized peer to peer marketplace –free, secure, private, untraceable.
Stars: ✭ 131 (-66.32%)
Mutual labels:  blockchain, cryptocurrencies, p2p
Nkn
Official Go implementation of NKN full node.
Stars: ✭ 287 (-26.22%)
Mutual labels:  blockchain, p2p, decentralization
Awesome Substrate
A curated list of awesome projects and resources related to the Substrate blockchain development framework.
Stars: ✭ 228 (-41.39%)
Mutual labels:  blockchain, consensus, decentralization
Space Daemon
The Space Daemon packages together IPFS, Textile Threads/Buckets, and Textile Powergate (Filecoin*) into one easy to install Daemon to make it easy to build peer to peer and privacy focused apps.
Stars: ✭ 151 (-61.18%)
Mutual labels:  blockchain, p2p, decentralization
Hive
Fast. Scalable. Powerful. The Blockchain for Web 3.0
Stars: ✭ 142 (-63.5%)
Mutual labels:  blockchain, p2p, decentralization
Unstoppable Wallet Ios
A secure and decentralized Bitcoin and other cryptocurrency wallet for iPhone. Supports Bitcoin, Ethereum, EOS, Binance Chain, Bitcoin Cash, DASH, ...
Stars: ✭ 180 (-53.73%)
Mutual labels:  blockchain, p2p, decentralization
Agregore Browser
A minimal browser for the distributed web
Stars: ✭ 229 (-41.13%)
Mutual labels:  blockchain, p2p, decentralization
nconnect
Securely connect to remote machines without the need of any server, public IP address, or publicly exposed ports.
Stars: ✭ 38 (-90.23%)
Mutual labels:  p2p, decentralization
apollo
An experimental distributed ledger platform based on a sea of DAG Nodes
Stars: ✭ 33 (-91.52%)
Mutual labels:  consensus, dag
FISCO-BCOS
FISCO BCOS是由微众牵头的金链盟主导研发、对外开源、安全可控的企业级金融区块链底层技术平台。 单链配置下,性能TPS可达万级。提供群组架构、并行计算、分布式存储、可插拔的共识机制、隐私保护算法、支持全链路国密算法等诸多特性。 经过多个机构、多个应用,长时间在生产环境中的实践检验,具备金融级的高性能、高可用性及高安全性。FISCO BCOS is a secure and reliable financial-grade open-source blockchain platform. The platform provides rich features including group architecture, cross-chain communication protoc…
Stars: ✭ 1,603 (+312.08%)
Mutual labels:  p2p, consensus
go-pdu
Parallel Digital Universe - A decentralized social networking service
Stars: ✭ 39 (-89.97%)
Mutual labels:  p2p, dag
Tangram.Bamboo
Tangram Bamboo CLI Wallet
Stars: ✭ 14 (-96.4%)
Mutual labels:  cryptocurrencies, dag
Iwant
Commandline tool for searching and downloading files in LAN network, without any central server
Stars: ✭ 268 (-31.11%)
Mutual labels:  p2p, decentralization
Nano Node
Nano is a cryptocurrency
Stars: ✭ 3,336 (+757.58%)
Mutual labels:  blockchain, cryptocurrencies
Axe
decentralized cryptocurrency
Stars: ✭ 273 (-29.82%)
Mutual labels:  blockchain, p2p

Spacemesh logo  

A Programmable Cryptocurrency

Go Report Card Bors enabled CI

Browse Gitcoin Bounties

go-spacemesh

💾⏰💪 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 https://spacemesh.io.

To learn more about the Spacemesh protocol watch this video.

Motivation

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.

Contributing

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

Getting

git clone [email protected]:spacemeshos/go-spacemesh.git

-- or --

Fork the project from https://github.com/spacemeshos/go-spacemesh

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

Setting Up Local Dev Environment

Building is supported on OS X, Linux, FreeBSD, and Windows.

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

On Windows you need to install make via msys2, MingGW-w64 or [mingw] (https://chocolatey.org/packages/mingw)

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

Before building we need to set up the golang environment. Do this by running:

make install

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

Building

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

make build

(On FreeBSD, you should instead use gmake build. You can install gmake with pkg install gmake if it isn't already installed.)

This will build the go-spacemesh binary, saving it in the build/ directory.

To build a binary for a specific architecture directory use:

make darwin | linux | freebsd | windows

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


Running

go-spacemesh is p2p software which is designed to form a decentralized network by connecting to other instances of go-spacemesh running on remote computers.

To run go-spacemesh you need to specify the parameters shared between all instances on a specific network.

You specify these parameters by providing go-spacemesh with a json config file. Other CLI flags control local node behavior and override default values.

Joining a Testnet (without mining)

  1. Build go-spacemesh from source code.
  2. Download the testnet's json config file. Make sure your local config file suffix is .json.
  3. Start go-spacemesh with the following arguments:
./go-spacemesh --tcp-port [a_port] --config [configFileLocation] -d [nodeDataFilesPath]
Example

Assuming tn1.json is a testnet config file saved in the same directory as go-spacemesh, use the following command to join the testnet. The data folder will be created in the same directory as go-spacemesh. The node will use TCP port 7152 and UDP port 7152 for p2p connections:

./go-spacemesh --tcp-port 7152 --config ./tn1.json -d ./sm_data
  1. Build the CLI Wallet from source code and run it:

  2. Use the CLI Wallet commands to setup accounts, start smeshing and execute transactions.

./cli_wallet

Joining a Testnet (with mining)

  1. Run go-spacemesh to join a testnet without mining (see above).
  2. Run the CLI Wallet to create a coinbase account. Save your coinbase account public address - you'll need it later.
  3. Stop go-spacemesh and start it with the following params:
./go-spacemesh --tcp-port [a_port] --config [configFileLocation] -d [nodeDataFilesPath] --coinbase [coinbase_account] --start-mining --post-datadir [dir_for_post_data]
Example
./go-spacemesh --tcp-port 7152 --config ./tn1.json -d ./sm_data --coinbase 0x36168c60e06abbb4f5df6d1dd6a1b15655d71e75 --start-mining --post-datadir ./post_data
  1. Use the CLI wallet to check your coinbase account balance and to transact

Joining Spacemesh (TweedleDee) Testnet

Find the latest Testnet release in the releases and download the precompiled binary for your platform of choice (or you can compile go-spacemesh yourself, from source, using the release tag). The release notes contain a link to a config.json file that you'll need to join the testnet.

Note that you must download (or build) precisely this version (latest Testnet release) of go-spacemesh, and the compatible config file, in order to join the current testnet. Older versions of the code may be incompatible with this testnet, and a different config file will not work.


Testing

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

make test

or

make cover

Continuous Integration

We've enabled continuous integration on this repository in GitHub. You can read more about our CI workflows.

Docker

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

Windows

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 (if present) and add C:\Program Files\Git\cmd to System PATH (if not already present)
  • Make - after installation add C:\Program Files (x86)\GnuWin32\bin to System PATH
  • Golang
  • GCC. There are several ways to install gcc on Windows, including Cygwin. Instead, we recommend tdm-gcc which we've tested.

Close and reopen powershell to load the new 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 Testnet 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...

Got Questions?

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].