Skip to content
🕸️ Gossamer: The Golang Polkadot Runtime Environment Implementation (WIP)
Branch: development
Clone or download
noot Elizabeth/p2p sim (#145)
* initialize libp2p host

* update Start() and TestStart

* implement startDHT and test

* commit before switching branches

* create Service type and begin Start

* implement buildOpts

* begin startDHT discovery

* implement buildOpts test; go fmt and lint

* add string to peerInfo functions

* implement generateKey

* add bootstrapConnect to Start

* change Start to use channel so it runs forever

* add test for StringToPeerInfo

* implement new swarm in bootstrap connect

* begin simulator to test connections

* create NewSwarm and add dht.FindPeer to sim

* working on messaging

* simulator working, messages being sent

* sending messages tested and working

* attempt to add ipfs node bootstrap

* working on go-ipfs node

* add test for bootstrap connect

* go fmt and add comments

* comment out part of generate key test

* go fmt

* remove unneeded comments

* add random messaging to simulator

* complete 2 node sim

* completed message passing simulation

* remove unneeded comments

* add go.mod to simulator package

* remove dead code

* remove err shadowing

* update logging to use log15

* move common p2p functions to p2p/common.go

* remove unneeded simulator code

* remove unneeded code

* disable ping tests

* go fmt

* go fmt simulator

* remove gologging
Latest commit 090fc95 Jun 20, 2019

gossamer logo

Golang Polkadot Runtime Environment Implementation

GoDoc Go Report Card Build Passing Maintainability Test Coverage License: GPL v3 standard-readme compliant

gossamer is an implementation of the Polkadot Runtime Environment written in Go. The Polkadot Runtime Environment is a modular, customizable framework for building blockchains. It has a swappable WASM runtime (ie. state transition function) that can be replaced even after the blockchain has launched without hard forks. It also has a generic extrinsic and block format which are specified in the runtime. The runtime can be written in any language that compiles to WASM.

Our packages:

package description
cmd command-line interface for gossamer
codec SCALE codec; used for encoding and decoding
common commonly used types and functions
config client configuration
dot wraps other packages to allow a complete client
internal internal RPC functions
p2p peer-to-peer service using libp2p
polkadb database implemenation using badgerDB
rpc RPC server
runtime WASM runtime integration using the life interpreter
trie implementation of a modified Merkle-Patricia trie


go 1.12


go get -u


make gossamer
gossamer --config config.toml


To start Gossamer in a docker container, run:

make docker

Running Manually

To build the image, run this command:

docker build -t chainsafe/gossamer -f

Start an instance with:

docker run chainsafe/gossamer


go test -v ./...



Our work on gossamer is funded by grants. If you'd like to donate, you can send us ETH or DAI at the following address: 0x764001D60E69f0C3D0b41B0588866cFaE796972c


GNU General Public License v3.0

You can’t perform that action at this time.