Five months ago, when I was rehired by David Chapman, I’ve never done any work with blockchains or Golang. I was familiar with the basics of the technology, but nothing intricate. It feels like years ago already. The goal from the start was to eventually end up doing core development but the path to get there was very steep.
At first, it was just reading the Factom white paper and learning Golang while working full time on the Factomize forum, then figuring out how to set up a developer sandbox for my own testing. Some of the solutions for the forum required me to become familiar with interacting with the blockchain via factomd, and so I became familiar with how the system worked overall. Yet factomd was still a black box to me. I knew how to use it but I did not know what actually happened under the hood. Even while working on the enterprise-wallet as a way to cement my Golang skills, the core code was already in my eyes just around the corner.
Now that I started delving into the code base, it feels a little bit like opening a present on Christmas after looking at it wrapped up for weeks. It’s exciting (and challenging) trying to fit all the pieces together.
The scope of the project is a little overwhelming and for the first couple of days, all I did was read code for hours, often following the same process over and over, until basic structures emerged. There are a few materials available, like Factom’s high-level core code walkthrough, which covers broad basics, and comments inside the code itself, but for the most part, I was going in blind.
It turned out to be different from what I expected. My background is mostly object-oriented but Golang is imperative. There is also a lot of legacy code left in the project from several years of organic development. And, of course, the highly intricate nature of an asynchronous, distributed system.
It’s been a little over a week now and I have now reached a point where I feel comfortable saying I know the general way the node works. There are still some large chunks that I need to study, like elections and the finer details of the network protocol, but I’m happy with my progress. The question now is: what to do with my newfound knowledge?
The answer: I want to make this process easier for the next person. Over the coming days and weeks, I’m going to attempt to make the kind of material that I wish I had before going into this. Charts and graphs that detail the architecture of the factomd server, a glossary of terms, a diagram of how packets and messages travel to the individual systems, and anything else I can think of.
I’m not the first outside developer to come into the project and I’m far from done learning about the core code. I’m going to try my best to be as accurate as possible but I hope that those with more experience than me will take a critical look at the material, review it, and where necessary, correct it.