Leader Module - Wax rewrite (petri-net model)

Matt York

Factom Inc.
Core Committee
Core Developer
Working on Factomd rewrite 'Wax' in this branch https://github.com/FactomProject/factomd/tree/FD-1225_wax_rollup

During this phase of the project - we've been installing an internal pub/sub mechnism to allow different parts
of the application to scale independently. (as a step on the roadmap toward sharding)

I've been working on moving the work that a Leader does into a threaded process.
The code thus far has resembed a state machine, and so it is pretty easy to model as a Petri-Net diagram

Here's a screenshot of the work-in-progress - below we can see boxes (transitions) for each event in the sytem
and circles (places) that model the state that the leader thread is currently running in.

Notice that only while ProcessingMinute is happening - can the leader send Acks.

Additionally, note that 'BalanceChanged' and 'DBLockCreated' can happen in either order, but both are required to 'SendDBSig'
I
1579101438506.png
 
Last edited:

Matt York

Factom Inc.
Core Committee
Core Developer
An updated on refactor of leader behavior:

Currently: the Initial module was scaffolded and can demonstrate basic behavior.

Long term objective: Extract leader behavior from its entanglement with the globally abused 'state' object.

Several other modules need to be extracted/refactored in this way to complete the long term objective.

Clay has a few of the other dependencies in progress here: https://github.com/FactomProject/factomd/tree/FD-1265_NewDependentHolding3 which will need to be integrated.
 
Top