All Projects → LaurentMazare → btc-ocaml

LaurentMazare / btc-ocaml

Licence: other
A toy implementation of the bitcoin protocol in ocaml.

Programming Languages

ocaml
1615 projects
Nix
1067 projects
1. Overview
-----------
btc-ocaml is a toy implementation of the bitcoin p2p protocol. For now it just connects to the bitcoin network and downloads the block headers for the full blockchain.
Note that this is very experimental so bugs should be expected and in particular the downloaded blockchain should not be considered as the consensus blockchain as there is no proper check for this!

2. Building
-----------
btc-ocaml can be built using opam on a linux platform as follows.
  A. Install the following dependencies using opam as well as ocaml 4.02.2:
    - cryptokit (1.10)
    - core (113.00.00)
    - async (113.00.00)
  B. Build btc.native via the following command line:
    corebuild btc.native -pkgs core -pkgs async -pkgs cryptokit

3. Running
----------
The -blockchain flag is used to specify a file where the blockchain can be stored and accessed.
  ./btc.native -blockchain ./blockchain.bin

4. License
----------
btc-ocaml is distributed under the terms of GNU LGPL version 2.1 with ocaml linking exception. See the LICENSE.txt file for the full text.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].