Cambridge CST Part II Project - Building a Blockchain Library for OCaml
Logan is a blockchain library for OCaml. It allows you to create and run blockchain applications with custom datatypes. It uses Irmin as a backend and a leader-based consensus protocol.
To build the project, navigate to the root of the repository and type...
There are a few helper executables in the
/Code/Tests directory which can be build with
To remove any blockchain or mempool without removing generated executables:
To remove everything, including executables, logs and blockchains:
Setting up Logan
logan in the
/Utils directory can be used to access the executables that come with Logan.
make test to build these and then it is recommended that you add the following directories to your path:
Now you should be able to run
logan --help to see what subcommands you can run.
If you are ever unsure of how to use a subcommand, then
logan subcommand --help should help you out!
Using a Config File
In order to save time, you can set up a config file in whatever directory you run in with the following contents
leader=leaderuser@leaderhost #Leader machine in the format user@host id=5 #Your machnine id - an integer participants=(user1@host1 user@host2)#list of participants in the format user@host. Must go within brackets separated by spaces