What would it take to build a minimal but functional cryptocurrency modelled on Bitcoin? ClarkeCoin is an attempt to answer this question and, in the process, hopefully make some of the concepts in Bitcoin more accessible to a wider range of developers.
A couple of the design choices we make to achieve this include:
- A simple data-structure spec described using JSON
- A P2P interface which uses simple HTTP endpoints to communicate between nodes
- A swagger-based HTTP API which provides clear documentation and even auto-generated clients for various languages
- A transaction model which focuses on the most straightforward payment cases from Bitcoin, avoiding the complexity of the transaction Script language
Additionally, the project aims to be fairly “pluggable” from the outset. Because each full node implements a straightforward HTTP API, it’s easy for newer developers to get started by building smaller projects (wallet clients, blockchain browsers, dedicated external miners, etc) that plug into the network directly but don’t have to deal with the complexity of implementing a full node.
A few of the projects working with clarke coin include:
- The Clarke Coin full node (this repository)
- clarke-dns - A simple DNS server for tracking and discovering available nodes
- clarke-wallet - An electron-based desktop wallet for creating keys and sending transactions
- clarke_coin_web - A sinatra-based web frontend for browsing data in the block chain
- erinnachen/all_the_coins - Ruby implementation of a full node
- pindell-matt/clarkecoin - Ruby wallet implementation
- jdliss/clarkebase - Coinbase-style webapp for creating and managing user wallets
There are a lot of ways to get involved in working with clarke coin – here are a few ideas:
- Web-based graphical block browser, similar to https://blockexplorer.com/
- Independent miner using the
/unmined_block
API endpoint - Mobile or Desktop wallet client
- Web-based ClarkeCoin “bank” in the vein of https://www.coinbase.com
- Alternative “Full Node” implementations – produce, accept, validate, and store blocks and transactions
OS X (With docker-machine)
docker-machine start default docker build -t clarke-coin . docker run -v /var/lib/clarke-coin:/var/lib/clarke-coin -p 3000-3000:3000-3000/tcp 69cdd323db31
With this running you can connect to the docker-machine VM and check out the data directory:
docker-machine ssh ls /var/lib/clarke-coin
docker exec -it <Container-ID> lein repl :connect 7889
First, make sure you are logged in to docker hub
sudo docker login
sudo docker build -t worace/clarke-coin . sudo docker push worace/clarke-coin:latest ssh [email protected] # these will be run on the host machine docker pull worace/clarke-coin:latest docker ps -q --filter ancestor=worace/clarke-coin | xargs docker stop docker run -d -v /var/lib/clarke-coin:/var/lib/clarke-coin -p 3000-3000:3000-3000 worace/clarke-coin:latest
Except you would need to replace worace
with your dockerhub username
and replace IP addrs with your IP.
Copyright © 2016 Horace Williams
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.