Skip to content

A toy implementation of the bitcoin protocol in ocaml.

License

Notifications You must be signed in to change notification settings

aalekseyev/btc-ocaml

 
 

Repository files navigation

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.

About

A toy implementation of the bitcoin protocol in ocaml.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 100.0%