Skip to content
An implementation of the Chord lookup protocol verified in Coq using the Verdi framework
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
config
core
deps
doc
extraction
lib
proofalytics
script
systems
.gitignore
.hook.yaml
.travis-ci.sh
.travis.yml
Capfile
LICENSE
Makefile
Makefile.detect-coq-version
README.md
build.sh
chord-serialized.install
chord-serialized.opam
chord.install
chord.opam
configure
verdi-chord-checkproofs.opam
verdi-chord.opam
words10.txt
words100.txt
words50.txt

README.md

Verdi Chord

Build Status

An implementation of the Chord distributed lookup protocol in Coq using the Verdi framework.

Requirements

Definitions and proofs:

Executable code:

Building

We recommend installing the dependencies of Verdi Chord via OPAM:

opam repo add coq-released https://coq.inria.fr/opam/released
opam repo add distributedcomponents-dev http://opam-dev.distributedcomponents.net
opam install coq-mathcomp-ssreflect verdi StructTact InfSeqExt cheerios

Then, run ./configure in the root directory, and then run make.

By default, the scripts look for StructTact, InfSeqExt, and Verdi in Coq's user-contrib directory, but this can be overridden by setting the StructTact_PATH, InfSeqExt_PATH, and Verdi_PATH environment variables. For example, the following shell command will build Chord using a copy of StructTact located in ../StructTact.

StructTact_PATH=../StructTact ./build.sh

Running chord on a real network

First, be sure to install the specific dependencies for executable code; we recommend doing this via OPAM:

opam install ocamlbuild verdi-runtime cheerios-runtime

Then, execute make chord from the root of this repository. This will produce the executables chord.native and client.native in ./extraction/chord. To start a ring of n nodes, run the following command:

extraction/chord/scripts/demo.py n

If you have a running node N at 127.0.0.2:6000 and no node at 127.0.0.1, you can query N with client.native as follows.

client.native -bind 127.0.0.1 -node 127.0.0.2:6000 -query get_ptrs

This will print out the predecessor and successor pointers of N. The following query will ask N for its successor closest to the ID md5("rdoenges").

client.native -bind 127.0.0.1 -node 127.0.0.2:6000 -query lookup 66e3ec3f16c5a8071d00b917ce3cc992
You can’t perform that action at this time.