Skip to content
forked from dedis/tlc

Threshold Logical Clocks and Que Sera Consensus

Notifications You must be signed in to change notification settings

ChiralBehaviors/tlc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains multiple prototype implementations of Threshold Logical Clocks (TLC) and Que Sera Consensus (QSC), as described in the following papers:

The following prototype implementations of TLC and QSC are available in multiple languages:

  • erlang/model contains a minimalistic model implementation of the QSC, TLCB, and TLCR algorithms detailed in the new QSC preprint. This model implements QSC using Erlang processes and communication on a single machine for illustrative simplicity, although distributed Erlang should make it straightforward to extend this model to true distributed consensus. Erlang's selective receive is particularly well-suited to implementing TLCR concisely. The model consists of only 73 lines of code as measured by cloc, including test code, or only 37 lines comprising the consensus algorithm alone.

  • go/model contains a minimalistic model implementation in Go of TLC and QSC as described in the original TLC preprint. This model illustrates the key concepts using goroutines and shared memory communication for simplicity. It is not useful in an actual distributed context, but being less than 200 code lines long as measured by cloc, it is ideal for studying and understanding TLC and QSC.

  • go/model/qscod contains a model implementation in Go of QSCOD, the client-driven "on-demand" consensus algorithm outlined in the new QSC preprint. This formulation of QSC consumes no bandwidth or computation when there is no work to be done (hence on-demand), and incurs only O(n2) communication complexity per client-driven agreement.

  • go/dist contains a simple but working "real" distributed implementation of TLC and QSC in Go for a fail-stop (Paxos-like) threat model. It uses TCP, TLS encryption and authentication, and Go's native Gob encoding for inter-node communication. At less than 1000 code lines long as measured by cloc, it is still probably one of the simplest implementations of asynchronous consensus around.

  • spin contains a simple Promela model of the core of TLC and QSC for the Spin model checker. Although this implementation models TLC and QSC only at a very high, abstract level, it captures the basic logic enough to lend confidence to the correctness of the algorithm.

All of this code is still extremely early and experimental; use at your own risk.

Build Status

About

Threshold Logical Clocks and Que Sera Consensus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 82.0%
  • Promela 13.2%
  • Erlang 4.2%
  • Shell 0.6%