Skip to content
A bitcoin style minimal blockchain implementation in crystal
Crystal JavaScript HTML Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Removing Node namespace for Ledger Apr 24, 2019
explorer Initial commit Apr 12, 2019
img Updating demo Apr 15, 2019
script Using parallel macro for miner and api Aug 9, 2019
spec Adding Logger & BTCPoW Aug 7, 2019
src Moving to crystal 0.30.1 Aug 13, 2019
.gitignore Initial commit Apr 12, 2019
.projectile Retargeting Aug 9, 2019
.tool-versions Moving to crystal 0.30.1 Aug 13, 2019
.travis.yml Formatting and travis support May 29, 2019
LICENSE Initial commit Apr 12, 2019
README.md Update README.md May 29, 2019
cocol.http Initial commit Apr 12, 2019
config.yml Initial commit Apr 12, 2019
shard.lock Moving to crystal 0.30.1 Aug 13, 2019
shard.yml Moving to crystal 0.30.1 Aug 13, 2019

README.md

COCOL!

Stability Experimental Crystal 0.27.2 License MPL-2.0 Build Status


https://github.com/cocol-project/cocol/blob/master/img/demo2.gif


About 🌐

The Cocol Project has the goal to lower the entry barrier for developers interested in building blockchains and dApps. There is still a long way to go and your help is needed.

Installation 🏹

Cocol is written in Crystal, so make sure to follow the installation instructions first.

After setting up Crystal you can clone the Cocol repository and install the dependencies:

> git clone https://github.com/cocol-project/cocol.git
> cd cocol
> shards install

Usage ⚔

Make your changes to the code-base and than build Cocol

> shards build

The binary ./bin/cocol offers the following CLI options

Options:

-p --port            The port your Cocol node is going to run on
-m --master          Making this node a master (there can only be one)
--max-connections    Setting the max-connections for peers.
--miner              Making this node a miner
--update             Triggering an update on launch (will catch up with the current height)

There is also a script that starts multiple nodes and the master for you

> ./script/start.sh 66 5

First number is the amount of nodes and the second max-connections per node. It will start the master node with the port 3000 and every other node with 3000 + n

You can now start one or several miner like this:

> ./cocol -p 4100 --max-connections 5 --miner

Now go ahead and open the explorer in a browser:

> open ./explorer/index.html

You should see 66 nodes and a miner (red border)

Each one of the nodes has a REST API on the corresponding port (e.g. 3001)

You can create transactions or query the current ledger

Development 👨‍💻👩‍💻

Cocol is in a very early stage. Expect changes, bugs and messy code.

Contributing 👷‍♂👷‍♀️

  1. Fork it ( https://github.com/cocol-project/cocol/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • github: cserb | twitter: @cerbivore | Cristian Șerb - creator, maintainer
You can’t perform that action at this time.