You are here: Home » NewsFeeds » Show HN: Legion, an as-simple-as-possible blockchain server written in Haskell

Show HN: Legion, an as-simple-as-possible blockchain server written in Haskell

README.md

An as-simple-as-possible blockchain server inspired by naivechain, but written in Haskell. Spinning up several
Legion nodes creates a peer to peer network that syncronizes the block chain across the network.
Prereqs: To compile from source, you’ll need stack.
Alternatively, you can get a precompiled pre-release binary. Note: if you download the binary
from github, you’ll need to mark it executable by running:
$ chmod +x legion-exe

Usage:
$ stack exec legion-exe [http port] [p2p port] [optional: `seedhost:seedP2PPort`]

Examples:
$ stack exec legion-exe 8001 9001

By default, legion will log what it’s doing to standard out. In another terminal window:
$ stack exec legion-exe 8002 9002 localhost:9001

Alternatively, you grab the binaries from the github releases, and run that directly rather than via stack exec
The 3rd argument tells the node where a seed node can be found to bootstrap the connection to the
peer to peer network. The current state of the (valid) blockchain will be fetched from all servers,


 

Original article