Factomd Overview

One of the major goals of me learning the core codebase is leaving behind as much documentation of my process as I can. These documents, blogs, graphs, whatever are meant to help the next person to come along.

The first diagram I made for this endeavor is a very broad overview of the elements inside a Factomd node:


(direct link)

How to interpret this:

Normal nodes only run FNode0, the other FNode# copies are only for simulations.
Each FNode has its own State, DB, logger, election process etc.
State is where almost all of the data is held, particularly the message channels
There's a ProcessList at every height and inside each PL are VMs. VMs are representations of what the other Fed Servers want to write to the chain. (There is one VM per federated server) The Leader generates the new blocks from the contents of those VMs. Chains/Entries are distributed over these VMs and the responsibility for a VM index rotates after every minute.
The NetworkController is responsible for reading and sending from/to the Peers.

The Peers are the connections in the network. Sim connections bypass the network entirely, using Go channels.
Regular peers hold a TCP connection they read and write.
The p2p proxy turns network messages into FactomMessages.

The control panel and webapi point to FNode0 by default but can be switched for simulations.

Thank you @PaulSnow @Paul Bernier and @Steven Masley for your input on making this.
Last edited: