Try   HackMD

Deep dive into the code - working with the network configuration

The main focus during the last two weeks was exploring how exactly Lighthouse processes and further works with the configuration data. My goal is to integrate the concept of Ephemery into the process as seamlessly as possible without rewriting any code that already exists or changing the little tasks that need to be performed in the process of setting Ephemery up and have already been extensively thought out and programmed. There is quite a complex process regarding this part of the code, partly because the clients are written in Rust, which is a compiled language and there is not a lot of space for working with the files directly.

I already have some overview about what happens where in the code, so now I started with looking into the codebase even more in depth and I started with the new functionality that came with Holesky implementation - the possibility of downloading the genesis state from a server. I looked into how this downloaded state is stored and that led me to the specific structures, what happens with them when the network is launched for the first time opposed to when the network is launched again, the database already exists and the storage already has some configuration loaded (that we need to check and possibly change after each launch of Ephemery in this case).

The goal now is to find the right place where to dive into this storage that contains our genesis and configs, without "reinventing the wheel" in the process. All this exploration caused me to have to go back to the genesis :) with a few ideas about how things work and should work, but now I'm pretty confident that I'm hopefully quite close to some progress in integrating the changes while respecting the already existing infrastructure.