Leader Module - Wax rewrite (petri-net model)

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:
Top