{"id":13504284,"url":"https://github.com/spacemeshos/go-spacemesh","last_synced_at":"2025-05-13T20:15:49.983Z","repository":{"id":37291331,"uuid":"108372143","full_name":"spacemeshos/go-spacemesh","owner":"spacemeshos","description":"Go Implementation of the Spacemesh protocol full node. 💾⏰💪","archived":false,"fork":false,"pushed_at":"2025-05-07T13:35:13.000Z","size":152378,"stargazers_count":774,"open_issues_count":235,"forks_count":216,"subscribers_count":38,"default_branch":"develop","last_synced_at":"2025-05-07T13:49:22.717Z","etag":null,"topics":["blockchain","blockmesh","consensus","cryptocurrencies","dag","decentralization","go","golang","p2p","proof-of-space","proof-of-space-time","proof-of-work","spacemesh"],"latest_commit_sha":null,"homepage":"https://spacemesh.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacemeshos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-26T06:43:09.000Z","updated_at":"2025-04-24T10:03:06.000Z","dependencies_parsed_at":"2023-10-14T01:29:45.687Z","dependency_job_id":"802064af-ff96-424f-abcf-f596c44a52b6","html_url":"https://github.com/spacemeshos/go-spacemesh","commit_stats":{"total_commits":4075,"total_committers":92,"mean_commits":44.29347826086956,"dds":0.8674846625766871,"last_synced_commit":"7231d6eb9cfe3615f739ae4b1918a78440adb764"},"previous_names":["unrulyos/go-unruly"],"tags_count":379,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeshos%2Fgo-spacemesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeshos%2Fgo-spacemesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeshos%2Fgo-spacemesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeshos%2Fgo-spacemesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacemeshos","download_url":"https://codeload.github.com/spacemeshos/go-spacemesh/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020640,"owners_count":22000756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","blockmesh","consensus","cryptocurrencies","dag","decentralization","go","golang","p2p","proof-of-space","proof-of-space-time","proof-of-work","spacemesh"],"created_at":"2024-08-01T00:00:27.686Z","updated_at":"2025-05-13T20:15:49.963Z","avatar_url":"https://github.com/spacemeshos.png","language":"Go","funding_links":[],"categories":["Proof of Space Implementations","Go","Others"],"sub_categories":["SpaceMesh"],"readme":"# [Spacemesh: A Programmable Cryptocurrency](https://spacemesh.io)\n\n[![license](https://img.shields.io/packagist/l/doctrine/orm.svg)](https://github.com/spacemeshos/go-spacemesh/blob/master/LICENSE)\n[![release](https://img.shields.io/github/v/release/spacemeshos/go-spacemesh?include_prereleases)](https://github.com/spacemeshos/go-spacemesh/releases)\n![platform](https://img.shields.io/badge/platform-win--64%20|%20macos--64%20|%20linux--64%20|%20freebsd-lightgrey.svg)\n[![go version](https://img.shields.io/github/go-mod/go-version/spacemeshos/go-spacemesh?logo=go)](https://go.dev/)\n[![open help wanted issues](https://img.shields.io/github/issues-raw/spacemeshos/go-spacemesh/help%20wanted?logo=github)](https://github.com/spacemeshos/go-spacemesh/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)\n[![discord](https://img.shields.io/discord/623195163510046732?label=discord\u0026logo=discord)](http://chat.spacemesh.io/)\n[![made by](https://img.shields.io/badge/madeby-spacemeshos-blue.svg)](https://spacemesh.io)\n[![Go Report Card](https://goreportcard.com/badge/github.com/spacemeshos/go-spacemesh)](https://goreportcard.com/report/github.com/spacemeshos/go-spacemesh)\n[![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/22421)\n[![godoc](https://img.shields.io/badge/godoc-LGTM-blue.svg)](https://godoc.org/github.com/spacemeshos/go-spacemesh)\n[![CI: passing](https://img.shields.io/badge/CI-passing-success?logo=github\u0026style=flat)](https://github.com/spacemeshos/go-spacemesh/blob/develop/ci.md#ci-status)\n\n## go-spacemesh\n\n💾⏰💪\n\nThanks for your interest in this open source project. This repo is the go implementation of the\n[Spacemesh](https://spacemesh.io) p2p full node software.\n\nSpacemesh is a decentralized blockchain computer using a new race-free consensus protocol that doesn't involve\nenergy-wasteful `proof of work`.\n\nWe aim to create a secure and scalable decentralized computer formed by a large number of desktop PCs at home.\n\nWe are designing and coding a modern blockchain platform from the ground up for scale, security and speed based on the\nlearnings of the achievements and mistakes of previous projects in this space.\n\nTo learn more about Spacemesh head over to [https://spacemesh.io](https://spacemesh.io).\n\nTo learn more about the Spacemesh protocol [watch this video](https://www.youtube.com/watch?v=jvtHFOlA1GI).\n\n### Motivation\n\nSpacemesh is designed to create a decentralized blockchain smart contracts computer and a cryptocurrency that is formed\nby connecting the home PCs of people from around the world into one virtual computer without incurring massive energy\nwaste and mining pools issues that are inherent in other blockchain computers, and provide a provably-secure and\nincentive-compatible smart contracts execution environment.\n\nSpacemesh is designed to be ASIC-resistant and in a way that doesn’t give an unfair advantage to rich parties who can\nafford setting up dedicated computers on the network. We achieve this by using a novel consensus protocol and optimize\nthe software to be most effectively be used on home PCs that are also used for interactive apps.\n\n### What is this good for?\n\nProvide dapp and app developers with a robust way to add value exchange and other value related features to their apps\nat scale. Our goal is to create a truly decentralized cryptocurrency that fulfills the original vision behind bitcoin\nto become a secure trustless store of value as well as a transactional currency with extremely low transaction fees.\n\n### Target Users\n\ngo-spacemesh is designed to be installed and operated on users' home PCs to form one decentralized computer. It is\ngoing to be distributed in the Spacemesh App but people can also build and run it from source code.\n\n### Project Status\n\nWe are working hard towards our first major milestone - a public permissionless testnet running the Spacemesh consensus protocol.\n\n### Contributing\n\nThank you for considering to contribute to the go-spacemesh open source project!\n\nWe welcome contributions large and small and we actively accept contributions.\n\n- go-spacemesh is part of [The Spacemesh open source project](https://spacemesh.io), and is MIT licensed open source software.\n\n- We welcome collaborators to the Spacemesh core dev team.\n\n- You don’t have to contribute code! Many important types of contributions are important for our project.\n  See: [How to Contribute to Open Source?](https://opensource.guide/how-to-contribute/#what-it-means-to-contribute)\n\n- To get started, please read our [contributions guidelines](https://github.com/spacemeshos/go-spacemesh/blob/master/CONTRIBUTING.md).\n\n- Browse [Good First Issues](https://github.com/spacemeshos/go-spacemesh/labels/good%20first%20issue).\n\n- Get ethereum awards for your contribution by working on one of our [gitcoin funded issues](https://gitcoin.co/profile/spacemeshos).\n\n### Diggin' Deeper\n\nPlease read the Spacemesh [full FAQ](https://github.com/spacemeshos/go-spacemesh/wiki/Spacemesh-FAQ).\n\n### go-spacemesh Architecture\n\n![Architecture](https://raw.githubusercontent.com/spacemeshos/product/master/resources/go-spacemesh-architecture.png)\n\n### Getting\n\n```bash\ngit clone git@github.com:spacemeshos/go-spacemesh.git\n```\n\nor fork the project from \u003chttps://github.com/spacemeshos/go-spacemesh\u003e\n\nSince the project uses Go Modules it is best to place the code **outside** your `$GOPATH`.\nRead [this](https://github.com/golang/go/wiki/Modules#how-to-install-and-activate-module-support) for alternatives.\n\n### Setting Up Local Dev Environment\n\nBuilding is supported on:\n\n- Linux, GLIBC 2.34+ is required\n- MacOS 13 (Intel) and MacOS 14 (Arm) and newer\n- Windows 10 and newer\n\nFreeBSD is not officially supported.\n\nInstall [Go 1.24 or later](https://golang.org/dl/) for your platform, if you haven't already.\n\nOn Windows you need to install `make` via [msys2](https://www.msys2.org/), [MingGW-w64](http://mingw-w64.org/doku.php)\nor [mingw](https://chocolatey.org/packages/mingw).\n\nEnsure that `$GOPATH` is set correctly and that the `$GOPATH/bin` directory appears in `$PATH`.\n\nEnsure that you have installed [git-lfs](https://git-lfs.com/).\n\nBefore building we need to set up the golang environment. Do this by running:\n\n```bash\nmake install\n```\n\nMake sure the environment is set up correctly:\n\n```bash\nmake go-env-test\n```\n\n**CGO_CFLAGS** must be set to \"-I\u003cabsolute_path_to_repo\u003e/go-spacemesh/build/ -DSQLITE_ENABLE_DBSTAT_VTAB=1\"\n\n**CGO_LDFLAGS** must be set to \"-L\u003cabsolute_path_to_repo\u003e/go-spacemesh/build/ -Wl,-rpath,$ORIGIN -Wl,-rpath,\u003cabsolute_path_to_repo\u003e/go-spacemesh/build/\"\n\nMake sure you have **OpenCL** library installed.\n\nTo check if setup was configured successfully, try to run:\n\n```bash\nmake test\n```\n\nThere shouldn't be any build errors, but please note that running the tests will take some time.\n\n### How to run standalone node?\n\nAfter you got a binary standalone fully functional network can be launched\nwith a simple command:\n\n\u003e ./build/go-spacemesh --preset=standalone --genesis-time=2023-06-08T5:30:00.000Z\n\nNetwork will use short epochs (1 minute), and 10 layers within the epoch (each 6s). Poet is launched in the same process\nin this mode. So expect that it will periodically hog 1 core. Minimal smeshing is enabled in order for consensus to work.\n\nPublic GRPC API are launched on 0.0.0.0:9092. Private - 0.0.0.0:9093.\n\n### Building\n\nTo build `go-spacemesh` for your current system architecture, from the project root directory, use:\n\n```bash\nmake build\n```\n\n(On FreeBSD, you should instead use `gmake build`. You can install `gmake` with `pkg install gmake` if it isn't already installed.)\n\nThis will build the `go-spacemesh` binary, saving it in the `build/` directory.\n\nOn linux or mac you can build a binary for windows using:\n\n```bash\nmake windows\n```\n\nBe aware that this will require a cross-platform gcc like `x86_64-w64-mingw32-gcc`. Platform-specific binaries are saved\nto the `build/*target*` directory.\n\n### Using `go build` and `go test` without `make`\n\nTo build or test code without using `make` some golang environment variables\nmust be set appropriately.\n\nThe environment variables can be printed by running either `make print-env` or\n`make print-test-env`.\n\nThey can be set in 3 ways:\n\n_Note: we need to use `eval` to interpret the commands since there are spaces in\nthe values of the variables so the shell can't correctly split them as\narguments._\n\n1. Setting the variables on the same line as the `go` command (e.g., `eval $(make print-env) go build ./...`). This\n   affects the environment for that command invocation only.\n2. Exporting the variables in the shell's environment (e.g., `eval export $(make print-env)`). The variables will\n   persist for the duration of that shell (and will be passed to subshells).\n3. Setting the variables in the go environment (e.g., `eval go env -w $(make print-env)`). Persistently adds these\n   values to Go's environment for any future runs.\n\n---\n\n### Running\n\n_Note: go-spacemesh relies on a gpu setup dynamic library in order to run.\n`make install` puts this file in the build folder, so if you are running\nspacemesh from the build folder you don't need to take any extra action.\nHowever if you have built the binary using `go build` or moved the binary from\nthe build folder you need to ensure that you have the gpu setup dynamic library\n(the exact name will vary based on your OS) accessible by the go-spacemesh\nbinary. The simplest way to do this is just copy the library file to be in the\nsame directory as the go-spacemesh binary. Alternatively you can modify your\nsystem's library search paths (e.g. LD_LIBRARY_PATH) to ensure that the\nlibrary is found.\n\ngo-spacemesh is p2p software which is designed to form a decentralized network by connecting to other instances of\ngo-spacemesh running on remote computers.\n\nTo run go-spacemesh you need to specify the parameters shared between all instances on a specific network.\n\nYou specify these parameters by providing go-spacemesh with a json config file. Other CLI flags control local node\nbehavior and override default values.\n\n#### Joining a Testnet (without mining)\n\n1. Build go-spacemesh from source code.\n2. Download the testnet's json config file. Make sure your local config file suffix is `.json`.\n3. Start go-spacemesh with the following arguments:\n\n    ```bash\n    ./go-spacemesh --listen [a_multiaddr] --config [configFileLocation] -d [nodeDataFilesPath]\n    ```\n\n    **Example:**\n\n    Assuming `tn1.json` is a testnet config file saved in the same directory as go-spacemesh, use the following command\n    to join the testnet. The data folder will be created in the same directory as go-spacemesh. The node will use TCP port\n    7513 and UDP port 7513 for p2p connections:\n\n    ```bash\n    ./go-spacemesh --listen /ip4/0.0.0.0/tcp/7513 --config ./tn1.json -d ./sm_data\n    ```\n\n4. Build the [CLI Wallet](https://github.com/spacemeshos/CLIWallet) from source code and run it:\n5. Use the CLI Wallet commands to setup accounts, start smeshing and execute transactions.\n\n```bash\n./cli_wallet\n```\n\n#### Joining a Testnet (with mining)\n\n1. Run go-spacemesh to join a testnet without mining (see above).\n2. Run the CLI Wallet to create a coinbase account. Save your coinbase account public address - you'll need it later.\n3. Stop go-spacemesh and start it with the following parameters:\n\n    ```bash\n    ./go-spacemesh --listen [a_multiaddr] --config [configFileLocation] -d [nodeDataFilesPath] \\\n        --smeshing-coinbase [coinbase_account] \\\n        --smeshing-start --smeshing-opts-datadir [dir_for_post_data]\n    ```\n\n    **Example:**\n\n    ```bash\n    ./go-spacemesh --listen /ip4/0.0.0.0/tcp/7513 --config ./tn1.json -d ./sm_data \\\n        --smeshing-coinbase stest1qqqqqqp3qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqql50dsa \\\n        --smeshing-start --smeshing-opts-datadir ./post_data\n    ```\n\n4. Use the CLI wallet to check your coinbase account balance and to transact\n\n---\n\n### Smeshing\n\nTo be able to initialize your PoST using your Graphics card you will need to install the tools necessary to enable\nOpenCL support on your system. The exact steps to do this will vary based on your OS and GPU. In general you will\nneed to install the OpenCL runtime for your GPU and ICD loader.\n\nA good starting point to get more info is \u003chttps://wiki.archlinux.org/title/GPGPU\u003e.\n\nIf your system doesn't have a GPU or you can use a generic runtime instead. Be aware that we do not recommend this\nfor initialization of PoST. On Ubuntu you need to install the following packages:\n\n```bash\napt-get update\napt-get install libpocl2\n```\n\non Windows you can use Intel OpenAPI:\n\n```bash\nchoco install opencl-intel-cpu-runtime\n```\n\n#### Using a remote machine as provider for PoST proofs\n\nTo disable the internal PoST service and disable smeshing on your node you can use the following config:\n\n```json\n\"smeshing\": {\n    \"smeshing-start\": false,\n}\n```\n\nor use the `--smeshing-start=false` flag. Additionally rename the `local.key` in your `data/identities` folder to a\nunique name for your node (e.g. `nodeA.key`). This will disable smeshing on your node causing, i.e. it will not generate\nany PoST proofs until a remote post service connects. Be aware that you still need to set your coinbase via:\n\n```json\n\"smeshing\": {\n    \"smeshing-coinbase\": \"your coinbase address\",\n}\n```\n\nor use the `--smeshing-coinbase` CLI parameter, otherwise your node will not be able to receive rewards.\n\nAdditionally you will have to set `grpc-post-listener` to e.g. `0.0.0.0:9094` in your `api` config to allow the remote\npost service to connect to your node.\n\n#### Merging multiple existing nodes into a single one with multiple remote PoST services\n\nTo help in the process of merging multiple nodes into a single one, you can use `merge-nodes` tool. This tool will\ncopy over identities and merge their local states into a single node. Ensure that all nodes are running the latest\nversion of `go-spacemesh` and were started at least once after upgrading. We recommend to back up the `data` directory\nof the nodes you want to merge before running this tool to avoid data loss. Specifically the `local.sql` files and the\n`identities` directories.\n\nStop the two nodes you want to merge and ensure that they have been set up for remote smeshing (i.e. `smeshing-start`\nis false and `local.key` has been renamed). `src` is the node that will be merged into `dst`:\n\n```bash\nmerge-nodes --src /path/to/src/data --dst /path/to/dst/data\n```\n\nThis will copy over the identities from `src` to `dst` and merge the local states of both nodes. The command will tell\nyou if it encounters any issues merging the identities or the local states.\n\nYou can repeat this process with as many nodes as you want to merge into `dst`. After you have completed the merging\nprocess, you can start `dst`. For every identity setup a post service to use the existing PoST data for that identity\nand connect to the node. For details refer to the\n[post-service README](https://github.com/spacemeshos/post-rs/blob/main/service/README.md).\n\n#### Using a remote PoST service over insecure connections\n\nIf you want to allow connections from post services over the internet to your node, we strongly recommend not to connect\nvia `grpc-post-listener` but rather use the `grpc-tls-listener` configuration parameter and setup TLS for the connection.\n\nThis is useful for example if you want to run a node on a cloud provider with fewer resources and run PoST on a local\nmachine with more resources. The post service only needs to be online for the initial proof (i.e. when joining the\nnetwork for the first time) and during the cyclegap in every epoch.\n\nTo setup TLS-secured public connections the API config has been extended with the following options:\n\n```json\n\"api\": {\n  \"grpc-tls-listener\": \"0.0.0.0:9094\",           // listen address for TLS connections\n  \"grpc-tls-ca-cert\": \"/path/to/ca.pem\",         // CA certificate that signed the node's and the PoST service's certificates\n  \"grpc-tls-cert\": \"/path/to/cert.pem\",          // certificate for the node\n  \"grpc-tls-key\": \"/path/to/key.pem\",            // private key for the node\n}\n```\n\nEnsure that remote PoST services are setup to connect to your node via TLS, that they trust your node's certificate and\nuse a certificate that is signed by the same CA as your node's certificate.\n\n### Configuring a remote PoST service\n\nThe post service is at the moment configured exclusively via command line parameters:\n\n- `--dir` specifies the directory containing `postdata_metadata.json` and the `postdata_xxx.bin` files; other files in\n  the post directory need to stay with the node!\n- `--address` specifies the address the post service should connect to\n- `--ca-cert`, `--cert` and `--key` specify the location of the CA certificate, the post services certificate and the\n  post services key respectively. For more information see below.\n- `--threads`, `--nonces` and `--randomx-mode` can be adapted to optimize proof generation. They are analogous to\n`smeshing-opts-proving-threads`, `smeshing-opts-proving-nonces` and `smeshing-opts-proving-randomx-mode` respectively.\n- `-h` or `--help` prints a help message with all available options and more details on their usage.\n\n### Keys and certificates\n\nThe PoST service and the node talk to each other via mTLS and have to authenticate themselves at the opposite end. For\nthis both need keys and certificates.\n\nHere is a script that generates a key \u0026 certificate for a CA, a key for the client (PoST service) and a key for the\nserver (node). Then it uses the CAs key to generate certificates from the keys for both the client \u0026 server.\n\nMake sure to adjust the certificate extensions \u0026 subjects for your setup accordingly.\n\n`ca.crt` needs to be provided to both the PoST service and the node, `server.crt` \u0026 `server.key` are only needed by the\nnode and `client.crt` \u0026 `client.key` are only needed by the PoST service.\n\n```bash\n# create certificate extensions to allow using them for localhost\ncat \u003e server-domains.ext \u003c\u003cEOF\n[v3_req]\nsubjectAltName = @alt_names\n\n[alt_names]\nDNS.1 = node\nIP.1 = 127.0.0.1\nEOF\n\ncat \u003e client-domains.ext \u003c\u003cEOF\n[v3_req]\nsubjectAltName = @alt_names\n\n[alt_names]\nDNS.1 = post\nEOF\n\n# create CA private key and certificate\nopenssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout ca.key -out ca.crt \\\n    -subj \"/C=EN/ST=Spacemesh/L=Tel Aviv/O=Spacemesh/CN=spacemesh.io/emailAddress=info@spacemesh.io\"\n\n# create server private key and CSR\nopenssl req -newkey rsa:4096 -nodes -keyout server.key -out server-req.pem \\\n    -subj \"/C=EN/ST=Spacemesh/L=Tel Aviv/O=Server/CN=server.spacemesh.io/emailAddress=info@spacemesh.io\"\n\n# use CA private key to sign ser CRS and get back the signed certificate\nopenssl x509 -req -in server-req.pem -days 60 -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt \\\n    -extfile server-domains.ext -extensions v3_req\nrm server-req.pem\n\n# create client private key and CSR\nopenssl req -newkey rsa:4096 -nodes -keyout client.key -out client-req.pem \\\n    -subj \"/C=EN/ST=Spacemesh/L=Tel Aviv/O=Client/CN=client.spacemesh.io/emailAddress=info@spacemesh.io\" \\\n\n# use CA private key to sign client CSR and get back the signed certificate\nopenssl x509 -req -in client-req.pem -days 60 -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt \\\n    -extfile client-domains.ext -extensions v3_req\nrm client-req.pem\n```\n\n---\n\n### Testing\n\n_NOTE_: if tests are hanging try running `ulimit -n 400`. some tests require that to work.\n\n```bash\nTEST_LOG_LEVEL=\"\" make test\n```\n\nThe optional `TEST_LOG_LEVEL` environment variable can be set to change the log level during test execution.\nIf not set, tests won't print any logs. Valid values are the error levels of [zapcore](https://pkg.go.dev/go.uber.org/zap/zapcore#Level)\n\nFor code coverage you can run:\n\n```bash\nmake cover\n```\n\nThis will start a local web service and open your browser to render a coverage report. If you just want to\ngenerate a cover profile you can run:\n\n```bash\nmake cover-profile\n```\n\nThe generated file will be saved to `./cover.out`. It can be loaded into your editor or IDE to view which code paths\nare covered by tests and which not.\n\n### Continuous Integration\n\nWe've enabled continuous integration on this repository in GitHub. You can see more details about our CI workflows on\nthe [Actions tab](https://github.com/spacemeshos/go-spacemesh/actions).\n\n### Docker\n\nA `Dockerfile` is included in the project allowing anyone to build and run a docker image:\n\n```bash\ndocker build -t spacemesh .\ndocker run -d --name=spacemesh spacemesh\n```\n\n### Windows\n\nOn Windows you will need the following prerequisites:\n\n- Powershell - included by in Windows by default since Windows 7 and Windows Server 2008 R2\n- [Git for Windows](https://gitforwindows.org/) - after installation remove `C:\\Program Files\\Git\\bin` from\n  [System PATH](https://www.java.com/en/download/help/path.xml) (if present) and add `C:\\Program Files\\Git\\cmd` to\n  System PATH (if not already present)\n- [Make](http://gnuwin32.sourceforge.net/packages/make.htm) - after installation add `C:\\Program Files (x86)\\GnuWin32\\bin`\n  to System PATH\n- [Golang](https://golang.org/dl/)\n- GCC. There are several ways to install gcc on Windows, including Cygwin. Instead, we recommend\n  [tdm-gcc](https://jmeubank.github.io/tdm-gcc/) which we've tested.\n\nClose and reopen powershell to load the new PATH. You can then run the command `make install` followed by `make build`\nas on UNIX-based systems.\n\n### Running a Local Testnet\n\n- You can run a local Spacemesh Testnet with 6 full nodes, 6 user accounts, and 1 POET support service on your computer\n  using docker.\n- The local testnet full nodes are built from this repo.\n- This is a great way to get a feel for the protocol and the platform and to start hacking on Spacemesh.\n- Follow the steps in our [Local Testnet Guide](https://testnet.spacemesh.io/#/README)\n\n### Improved decentralization and P2P diagnostic features\n\n**WARNING! THIS IS EXPERIMENTAL FUNCTIONALITY, USE WITH CARE!**\n\nIn order to make the p2p network more decentralized, the following options are provided:\n\n- `\"enable-routing-discovery\": true`: enables routing discovery for finding new peers, including those behind NAT, ans\n  also for discovering relay nodes which are used for NAT hole punching. Note that hole punching can be done when both\n  ends of the connection are behind an endpoint-independent (\"cone\") NAT.\n- `\"routing-discovery-advertise\": true` advertises this node for discovery by other peers, even if it is behind NAT.\n- `\"enable-quic-transport\": true`: enables QUIC transport which, together with TCP transport, heightens the changes of\n  successful NAT hole punching.\n- `\"enable-tcp-transport\": false` disables TCP transport. This option is intended to be used for debugging purposes\n  only!\n- `\"static-relays\": [\"/dns4/relay.example.com/udp/5000/quic-v1/p2p/...\", ...]` provides a static list of relay nodes for\n  use for NAT hole punching in case of routing discovery based relay search is not to be used.\n- `\"ping-peers\": [\"p2p_id_1\", \"p2p_id_2\", ...]` runs P2P ping against the specified peers, logging the results.\n\nFor the purpose of debugging P2P connectivity issues, the following command can also be used:\n\n```console\n$ grpcurl -plaintext 127.0.0.1:9093 spacemesh.v1.DebugService.NetworkInfo\n{\n  \"id\": \"12D3Koo...\",\n  \"listenAddresses\": [\n    \"/ip4/0.0.0.0/tcp/50212\",\n    \"/ip4/0.0.0.0/udp/59458/quic-v1\",\n    \"/p2p-circuit\"\n  ],\n  \"knownAddresses\": [\n    \"/ip4/127.0.0.1/tcp/50212\",\n    \"/ip4/127.0.0.1/udp/59458/quic-v1\",\n    \"/ip4/192.168.33.5/tcp/50212\",\n    \"/ip4/192.168.33.5/udp/59458/quic-v1\",\n    \"/ip4/.../tcp/37670/p2p/12D3Koo.../p2p-circuit\",\n    \"/ip4/.../udp/37659/quic-v1/p2p/12D3Koo.../p2p-circuit\",\n    \"/ip4/.../tcp/31960/p2p/12D3Koo.../p2p-circuit\",\n    \"/ip4/.../udp/33377/quic-v1/p2p/12D3Koo.../p2p-circuit\"\n  ],\n  \"natTypeUdp\": \"Cone\",\n  \"natTypeTcp\": \"Cone\",\n  \"reachability\": \"Private\"\n}\n```\n\n#### Next Steps\n\n- Please visit our [wiki](https://github.com/spacemeshos/go-spacemesh/wiki)\n- Browse project [go docs](https://godoc.org/github.com/spacemeshos/go-spacemesh)\n- Spacemesh Protocol [video overview](https://www.youtube.com/watch?v=jvtHFOlA1GI)\n\n### Got Questions?\n\n- Introduce yourself and ask anything on [Discord](http://chat.spacemesh.io/).\n- DM [@teamspacemesh](https://twitter.com/teamspacemesh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacemeshos%2Fgo-spacemesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacemeshos%2Fgo-spacemesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacemeshos%2Fgo-spacemesh/lists"}