Paul-Henry Kajfasz

@phklive

Ethereum Protocol Fellow Ex Starknet core developer Actively building an Ethereum consensus client in Elixir ™️

Joined on Jul 27, 2023

  • 3cbd59ca-4b4f-4a84-bf1c-89314dae9916 Behind the Mountain Building an Ethereum consensus client is a daunting task. Many have tried and failed before us, but we were determined to make our story different. The learning curve is steep, but the journey is rewarding, transforming you into a better engineer and human being. I had the pleasure of working with an incredible team of highly skilled individuals: Tomas A., Martin P., and Tomas G. Together, we set out to achieve our goal of developing the first Ethereum Consensus Client in Elixir. The first step for me was learning Elixir, a new language that I had only vaguely heard about. It's praised for its backend networking capabilities, but I didn't know much more. Ultimately, I found the process of learning and writing in Elixir enjoyable. Elixir, a niche but mighty language, it's known for its focus on concurrency, availability, fault tolerance, and stability. As a functional language powered by the Erlang VM, it's properties are making it an ideal choice for our client. The second step was understanding how to build a consensus client. There are no step-by-step YouTube videos or books for such an goal. Our first mission involved collecting information from various sources: forums, blog posts, books, tweets, videos, conference notes, specifications, and code from other clients. Understanding what to build is just the first step; understanding why it was built in a particular way and how to replicate and improve this implementation is the next. This research phase was incredibly enjoyable, filled with those "Aha!" moments that every curious individual loves over anything else.
     Like  Bookmark
  • Motivation The strength of the Ethereum ecosystem lies in its reliability through diversity, encompassing both technological and human dimensions. To date, however, the development of Ethereum clients has been predominantly spearheaded by European and North American teams. This has inadvertently centralized knowledge, contributions, and maintenance, which runs counter to Ethereum's foundational ethos of decentralization. Recognizing the critical nature of client diversity—which faces challenges intermittently—we are convinced that our LambdaClass Consensus client can make a significant impact. We aim not just to build, but to build differently, thereby promoting a truly global Ethereum community. In the coming months, our objective is to develop a fully open-source client, led by a passionate team from Latin America—a region where the relevance and need for such technologies have been accentuated by local instabilities. Enhancing diversity not only invites broader participation in Ethereum but also fortifies the protocol's resilience. This is achieved by incorporating a myriad of contexts and legal frameworks of regions where the protocol's core contributors are based, thus mitigating potential regulatory challenges. Our emphasis is on nurturing community involvement. From a technical perspective, we've decided to construct our new consensus client using the Elixir programming language. Renowned for its focus on concurrency, availability, fault tolerance, and stability, Elixir is a functional language powered by the Erlang VM. These attributes make it an ideal candidate for implementing an Ethereum consensus client. Our deep appreciation for Elixir drives our ambition to cultivate a vibrant Ethereum Elixir community, reminiscent of the thriving Rust Ethereum community which we've witnessed flourish and have actively contributed to over recent years. Elixir's emphasis on code readability and its straightforward implementation strategy allow us to set a clear objective: to make our client not only an exemplary piece of technology but also a valuable educational tool. We aim for it to be a comprehensive resource for learning the protocol specifications, understanding Ethereum's inner mechanisms, contributing to the core protocol, and implementing those specifications. Aligned with Ethereum's dedication to open-source collaboration, we envision our client serving as a launchpad for extensive protocol contributions, truly embodying the ethos of "by the people, for the people."
     Like  Bookmark
  • Abstract This report encapsulates the enriching experiences and key learnings from ZuConnect, DevConnect, and the preparations leading to EPF Day. It highlights the importance of networking, the exchange of ideas in blockchain technology, and the personal growth encountered throughout these events. ZuConnect: An Incredible Learning Journey ZuConnect has been a remarkable journey, filled with intense presentations, networking, and learning. It provided an opportunity to delve into a plethora of topics including AI, Network States, Zero-Knowledge Proofs, Cryptography, Blockchain, and Distributed Systems. Keynote speakers, such as Vitalik Buterin, Thor Kamphefner or Juan Benet, offered invaluable insights. This event was not only about gaining knowledge but also about building lasting friendships and professional connections. The experience was nothing short of inspirational, looking forward for future editions of Zuzalu. DevConnect: A Hub of Blockchain Enthusiasm In November, Istanbul transformed into a hub for blockchain enthusiasts. Multiple events created a vibrant ecosystem of learning and exchange. Among these, L2Days, ZK-Accelerate and ProgCrypto, stood out with their engaging content and expert panels. Reconnecting with old friends and meeting new experts, researchers, and engineers added a personal touch to the professional enrichment. The intensity of the 10-day event was balanced by the excitement of new knowledge and opportunities, setting the stage for future Ethereum events. Presentation Preparation: Synthesizing Months into Minutes
     Like  Bookmark
  • Executive Summary Implementation of state transition functions. Onboarding and integration of new contributors. Progress on State Transition Implementation After putting work towards understanding and mapping Ethereum's consensus layer's State Transition function, we have transitioned to the implementation phase. This crucial component involves dozens of functions. State Transition Diagram During these weeks I have been focusing on the implementation of the following functions:
     Like  Bookmark
  • Executive Summary Continuing State Transition implementation. Preparation for the upcoming DevConnect EPF event. Building an impactful EPF presentation. Organizing travel logistics for Istanbul. Continuing work on State Transition The State Transition function of the Ethereum's consensus layer is large and will surely take multiple weeks of hands on implementation. Our efforts are ongoing, the strategy involves: Initially translating Python specifications into Elixir code to establish a foundational implementation.
     Like  Bookmark
  • Abstract During these two weeks the goal has been to implement the checkpoint sync functionality for the consensus client, streamlining the onboarding of new contributors to the project and to continue learning and researching. Next steps will be to enable the automatic fetching of blocks related to the lastest received checkpoint (which is a BeaconState) and storing them in the clients store. Checkpoint sync and further validation Currently, as a proof of concept (POC), we aim to support Ethereum's latest fork, Capella. As a result, we won't be able to sync from the chain's genesis at this time. Implementing synchronization from the genesis would necessitate the inclusion of legacy functions from previous forks and managing fork transitions. These features will be implemented in future milestones. For the time being, we are focusing on implementing syncing from an Ethereum checkpoint that supports Capella. This synchronization approach allows for faster client syncing, relying upon a trust assumption.
     Like  Bookmark
  • Abstract Operations test runner implementation Creation of classes to train people taking part in the LambdaClass Bootcamp Preparation for for ZuConnect, DevConnect & 0xVillage Ensuring Robustness through Rigorous Testing The essence of developing foundational blockchain software lies not just in coding but in comprehending and faithfully translating written specifications into functional implementations. Fortunately, the consensus layer of our project boasts of robust design, precise specification, and comprehensive documentation. Over the past two weeks, I've been immersed in implementing the Operations test runner. A significant facet of the consensus client. These core functions process diverse events, such as on_block, on_attestation, and on_tick, among others.
     Like  Bookmark
  • Abstract During the past two weeks, team members have aimed to specialize in various areas of the consensus layer with the objective of advancing the implementation of the client and facilitating onboarding for new contributors. My primary responsibility has been to gain a deep understanding of the State Transition function within the consensus layer of Ethereum. Throughout this period, I have achieved two main milestones: I authored the "State Transition Handbook" to assist newcomers in grasping the what, why, and how of implementing the State Transition specifications. I created a visual tree diagram illustrating the functional dependencies of the State Transition function. Introduction The State Transition function lies at the heart of blockchains, driving their evolution. It transitions an initial state ( S0 ) into a subsequent state ( S1 ), as defined by: $$S' = f(S, B)$$
     Like  Bookmark
  • Table of Contents Abstract The intricate workings of the Ethereum machine present both a formidable challenge and a riveting learning experience. A deep comprehension of its mechanisms is essential for the successful development of the Ethereum Elixir Consensus Client. Delving into Ethereum's Core Effective comprehension requires both theoretical learning and hands-on experience. Implementing the Ethereum protocol has proven to be an enlightening method to grasp its core concepts. Through repeated study and practical application, I have gained more understanding of the rationale and intricacies behind the protocol's design. My exploration of Ethereum's underpinnings revealed fascinating insights into its core mechanics. A variety of resources, including blogs, YouTube videos, and specification documents, have facilitated this journey. Notably:
     Like  Bookmark
  • Abstract The primary focus of these weeks was to deepen my understanding of Elixir and the intricacies of an Ethereum consensus client. Activities included completing the "Elixir in Action" book, reviewing articles related to Elixir and Erlang, and commencing the reading of Eth2Book by Ben Edgington. From Erlang to Elixir The past weeks have been full of discoveries, diving deep into the intricate workings of the Erlang VM (BEAM). This journey was filled with excitement, learning, and revelations. Elixir, a functional programming language, is built atop the Erlang VM, just as Erlang is. Both, upon compilation, become bytecode interpretable by the VM. Elixir's objective is to provide an abstraction layer over Erlang, a language known for its complexity and low-level programming. Elixir introduces syntactic sugar and enhancements over Erlang, making it simpler and quicker to deploy applications while retaining the characteristics of the Erlang VM. Why Choose the Erlang VM? Erlang and its VM were developed by Ericsson in 1986, thanks to its co-creators Joe Armstrong, Robert Virding, and Mike Williams. The principal intent behind Erlang's creation was to advance the development of telephony applications. This demanded a language equipped with particular properties:
     Like 1 Bookmark
  • Abstract Summary I'm thrilled to join EPF4, a venture that allows me to dedicate my time and effort to understanding the Ethereum protocol and complex blockchain systems more comprehensively. My goal is to make sure that this opportunity allows me to make substantial contributions to the Ethereum protocol. To concentrate entirely on the protocol R&D, I'll be stepping down from my position as Team Leader of the Beerus Starknet Light Client. I'll be collaborating with Lambdaclass, since our discussions have revealed a convergence of interests and goals. Three engineers from Lambdaclass are also participating in EPF. Our primary objective is to develop an Elixir-based consensus client within the framework of EPF, aiming to present a functional Proof of Concept (POC) at Devconnect in November. Glad to be part of the Lambda Familia! Deep Dive into Ethereum For a while, I have been captivated by blockchain systems and eagerly awaiting the chance to delve deeper into this domain. My interest in these revolutionary infrastructures was sparked when I started reading about Bitcoin and Ethereum in 2016 and setup my first nodes. Despite having switched jobs and projects over time (preventing me to make as much progress in protocol research as I would have liked to), my enthusiasm for understanding the intricacies of these systems has only grown. Through this opportunity, I aspire to understand and contribute more substantially to the Ethereum ecosystem. New Opportunities
     Like 1 Bookmark