Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/verse-lab/toychain
A minimalistic blockchain consensus implemented and verified in Coq
https://github.com/verse-lab/toychain
blockchain consensus coq distributed-systems
Last synced: about 1 month ago
JSON representation
A minimalistic blockchain consensus implemented and verified in Coq
- Host: GitHub
- URL: https://github.com/verse-lab/toychain
- Owner: verse-lab
- License: bsd-2-clause
- Created: 2017-07-20T18:59:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-13T04:13:13.000Z (over 4 years ago)
- Last Synced: 2024-09-30T20:46:37.123Z (about 1 month ago)
- Topics: blockchain, consensus, coq, distributed-systems
- Language: Coq
- Homepage:
- Size: 635 KB
- Stars: 112
- Watchers: 17
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Toychain
[![Build Status](https://travis-ci.org/certichain/toychain.svg?branch=master)](https://travis-ci.org/certichain/toychain)
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://raw.githubusercontent.com/certichain/toychain/master/LICENSE)
[![DOI](https://zenodo.org/badge/97869050.svg)](https://zenodo.org/badge/latestdoi/97869050)A Coq implementation of a minimalistic blockchain-based consensus protocol.
## Building the Project
### Requirements
Coq definitions and proofs:
* [Coq 8.9 or later](https://coq.inria.fr)
* [Mathematical Components](http://math-comp.github.io/math-comp/) (`ssreflect`, 1.10)
* [FCSL PCM library](https://github.com/imdea-software/fcsl-pcm)Executable node:
* [OCaml 4.06.0 or later](https://ocaml.org)
* [OCamlbuild](https://github.com/ocaml/ocamlbuild)
* [cryptokit](https://github.com/xavierleroy/cryptokit)
* [ipaddr](https://github.com/mirage/ocaml-ipaddr)### Building Definitions and Proofs
We recommend installing the Coq requirements via [OPAM](https://opam.ocaml.org/doc/Install.html):
```
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq coq-mathcomp-ssreflect.1.10.0 coq-fcsl-pcm
```Then, run `make clean; make` from the root folder. This will build all
the libraries and check all the proofs.### Building an Executable Node
The additional OCaml dependencies for the executable node can also
be installed via OPAM:
```
opam install ocamlbuild cryptokit ipaddr
```Then, run `make node` from the root folder. This will produce an
executable named `node.native`.## Project Structure
The top-level structure consists of the following folders:
* `Structures` - implementations of block forests and chain properties;
* `Systems` - definition of the protocol, its state, and network semantics;
* `Properties` - proved properties of the protocol, e.g., eventual
consistency for a clique-like network topology;