Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cocol-project/cocol
Rapid blockchain prototyping
https://github.com/cocol-project/cocol
blockchain crystal crystal-language distributed-ledger distributed-systems experimental miner proof-of-stake proof-of-work test-bed toolkit
Last synced: about 1 month ago
JSON representation
Rapid blockchain prototyping
- Host: GitHub
- URL: https://github.com/cocol-project/cocol
- Owner: cocol-project
- License: mpl-2.0
- Created: 2019-04-12T12:57:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T12:15:01.000Z (over 4 years ago)
- Last Synced: 2024-11-02T13:42:15.766Z (about 1 month ago)
- Topics: blockchain, crystal, crystal-language, distributed-ledger, distributed-systems, experimental, miner, proof-of-stake, proof-of-work, test-bed, toolkit
- Language: Crystal
- Homepage: https://cocol-project.github.io/cocol
- Size: 11.8 MB
- Stars: 19
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - Cocol - A minimal blockchain testbed (Blockchain)
- awesome-crystal - Cocol - A minimal blockchain testbed (Blockchain)
README
# COCOL!
[![Build Status](https://img.shields.io/github/workflow/status/cocol-project/cocol/weekly)](https://github.com/cocol-project/cocol/actions) ![Stability Experimental](https://img.shields.io/badge/Stability-Experimental-orange.svg?style=flat-square) ![Crystal 0.27.2](https://img.shields.io/badge/Crystal-0.32.1-blue.svg?style=flat-square&link=https://crystal-lang.org&link=https://crystal-lang.org/api/0.32.1/) ![License MPL-2.0](https://img.shields.io/badge/License-MPL--2.0-green.svg?style=flat-square)
---
![https://github.com/cocol-project/cocol/blob/master/img/demo2.gif](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](https://crystal-lang.org/), so make sure to follow the [installation instructions](https://crystal-lang.org/reference/installation/) first.After setting up Crystal you can clone the Cocol repository and install the dependencies:
```shell
> 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
```shell
> make
```
The binary `./cocol` offers the following CLI options```text
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
```shell
> ./script/start.sh 66 5
```
First option is the amount of nodes and the second amount of miner.
It will start the master node with the port `3000` and every other node with
`3000 + n`, while all miner have port `4000 + n`Now go ahead and open the explorer in a browser:
```shell
> 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`)
Start creating live fake transactions and watch the network come alive
```shell
> crystal script/live.cr```
## Development π©βπ»π¨βπ»
Cocol is in a very early stage. **Expect changes, bugs and messy code.**
Test coverage sucks atm.## 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](https://github.com/cserb) | twitter: [@cerbivore](http://twitter.com/cerbivore) | Cristian Θerb - creator, maintainer