Breaking down Tangram’s consensus mechanism: Part 2

In the first part of this series we examined BFT and pBFT, describing on a high-level what a distributed consensus algorithm is. In addition we discussed how Tangram will be using pBFT and its mechanisms, while touching lightly on Byzantine Clock Synchronization and more. In this second part, we will be looking at Interval Tree Clocks and how Tangram uses this mechanism to causally order transactions / block(s).

Interval Tree Clocks — Determining the partial ordering of events

When active nodes on a network interact, it is difficult to efficiently track the order of events as they progress. As the number of participating nodes increases, this becomes increasingly hard. Because such distributed setups are dynamic and rather unpredictable, designing a system able to track the history of events can be rather intricate. Global clocks are limited in their ability to accurately represent the version of events, and as such are not suited for application. Rather, causal history is employed. Tangram employs Interval Tree Clocks as its causality tracking mechanism.

Proposed in a 2008 paper by Almeida, Baquero and Fonte, Interval Tree Clocks offer a novel way of causality tracking which “can be used in scenarios with a dynamic number of participants, allowing a completely decentralized creation of processes or replicas without need for global identifiers”. Members on the network are however able to create, retire or reuse ids as applicable without the need for global management. This makes ITC suitable for practical usage where space and scale are critical factors. To gain better knowledge of Interval Tree Clocks (ITC), it is advisable to read the paper which describes the model.

In the aforementioned paper, ITC is described as the first model for dynamic systems which ignores the need for globally unique ids, does not reuse ids of retired participants, nor requires the global coordination of ids. It manages causal tracking of events in dynamic systems by creating and retiring processes or replicas in a decentralised manner. Like other causality tracking mechanisms, it is modelled by a set of fork-event-join operations which act on stamps structured as a pair of an id and an event, (i , e). However, unlike many other classic mechanisms which may suffer from a bloated size as a result of the use of fixed, predefined functions for ids, ITC allows the manipulation of the id component of a stamp in order to make room for a dynamic number of participants. This allows it to shrink or expand the number of nodal entities as applicable, thereby improving its ability to efficiently manage space and scale requirements.

Fork-Event-Join Model