During the 14th week of my involvement in the fourth cohort of the Ethereum Protocol Fellowship, my primary focus was on enhancing the way ETK manages different hardforks.
Initially, my approach involved adding a flag during the compiler run that would specify the instruction set under which the code should be interpreted. For instance:
eas --hardfork london
After some testing, I concluded that it would be best to wrap the set of operations of the different hardforks in an enum and adapt the rest of the code to work with this new abstraction layer.
However, after discussing the proposal on ETK's GitHub with Sam, we decided to incorporate a new macro mechanism. This macro, for now using the syntax %hardfork(">=london,<cancun"), lets developers specify the exact range of hardforks their code is compatible with. For those writing libraries in ETK, this tool is invaluable: it guarantees that their code is interpreted in the intended context, preventing misinterpretations that might arise if a future hardfork alters the semantics of certain instructions.
In summary, my 14th week primarily revolved around developing and refining these concepts, and incorporating the necessary tests to ensure they work correctly.
Additionally, I continue to review previous issues and fine-tune some upcoming implementation ideas, awaiting Sam's feedback on my backend simplification. Also, from my ongoing discussions with Sam over the past months, I've conceived the idea of launching a basic website featuring a playground that compiles ETK code. This would be similar to what's available on evm.codes, but tailored for ETK. Even though this wasn't part of my initial plan for the EPF, I'm looking forward to initiating this project in the coming weeks.
For the upcoming week, my plans are as follows: