# EPF Report - Weeks 6 & 7: Node up and syncing and Genesis of a community [toc] ## 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. ```elixir= @doc """ Syncs the node using an inputed checkpoint """ @spec sync_from_checkpoint(binary) :: any def sync_from_checkpoint(url) do client = Tesla.client([ {Tesla.Middleware.Headers, [{"Accept", "application/octet-stream"}]} ]) full_url = url |> URI.parse() |> URI.append_path("/eth/v2/debug/beacon/states/finalized") |> URI.to_string() case get(client, full_url) do {:ok, response} -> case Ssz.from_ssz(response.body, SszTypes.BeaconState) do {:ok, struct} -> struct {:error, _} -> Logger.error("There has been an error syncing from checkpoint.") :error end _ -> Logger.error("Invalid checkpoint sync url.") :error end end ``` Using this method we enable the fast syncing and testing of our consensus client as of now! ## Genesis of an open community: Contributor Package & Code of conduct The strength of a project lies in the collective capabilities and commitment of its members. Success needs teamwork and perseverance. This drives my passionate belief in the open-source ethos, and it's why I dedicate myself as a full-time open-source contributor. The Lambda Ethereum Consensus Client is entirely open-source, and we're always eager to welcome new contributors. To empower them to contribute effectively, I have built and added a comprehensive contributor package and code of conduct to our documentation. We have curated through our research a large amount of resources related to Erlang, Elixir, Ethereum, and, more specifically, its 2.0 version. For enthusiasts in these areas, I vividly recommend diving in. ## Contributor Package Dream of becoming an Ethereum core developer? Eager to shape the protocol that will underpin tomorrow's world? Want to collaborate with a passionate team, learn, grow, and be a pivotal part of the Ethereum Elixir community? **Then you're in the right place! 🚀** ### Getting Started: #### 1. **Installation**: - **Prerequisites**: Before diving in, ensure you have the necessary tools installed. Check out the [Prerequisites](#prerequisites) section for guidance. - **Clone the Repository**: ```shell git clone [REPO_URL] cd lambda_ethereum_consensus ``` - **Setup**: Once you've cloned the repository, follow the steps in the [Installing and running](#installing-and-running) section to set up your environment. #### 2. **Prerequisite Knowledge**: To contribute effectively, you'll need a foundational understanding of both the Ethereum protocol and the Elixir language, including the Erlang VM (BEAM). If you're new to these areas, we've curated a list of resources to get you started: **Learning Elixir**: - **Videos**: - [Intro to Elixir](https://youtube.com/playlist?list=PLJbE2Yu2zumA-p21bEQB6nsYABAO-HtF2) - [Hitchhiker's tour of the BEAM](https://www.youtube.com/watch?v=_Pwlvy3zz9M) - **Blogs**: - [Zen of Erlang](https://ferd.ca/the-zen-of-erlang.html) - [Where Erlang Blooms](https://ferd.ca/rtb-where-erlang-blooms.html) - [What can I only do in Erlang](https://erlang.org/pipermail/erlang-questions/2014-November/081570.html) - [Stacking theory for systems design](https://medium.com/@jlouis666/stacking-theory-for-systems-design-2450e6300689) - [On Erlang States and Crashes](http://jlouisramblings.blogspot.com/2010/11/on-erlang-state-and-crashes.html) - [How Erlang does scheduling](http://jlouisramblings.blogspot.com/2013/01/how-erlang-does-scheduling.html) - **Books**: - [Elixir in Action](https://www.manning.com/books/elixir-in-action-third-edition) - [Learn You Some Erlang](https://learnyousomeerlang.com/) With this foundation you should have a basic understanding of the Elixir language and the Erlang VM. You can then start (or in parallel) learning about the Ethereum protocol. **Learning Ethereum**: - **Videos**: - [Basic technical details of Ethereum](https://youtu.be/gjwr-7PgpN8) - [Ethereum in 30 minutes](https://youtu.be/UihMqcj-cqc) - [Foundations of Blockchains](https://www.youtube.com/playlist?list=PLEGCF-WLh2RLOHv_xUGLqRts_9JxrckiA) - [Ethereum Foundation youtube channel](https://www.youtube.com/@EthereumFoundation) - [Ethereum youtube channel](https://www.youtube.com/@EthereumProtocol) - **Posts** - [What happens when you send 1 DAI](https://www.notonlyowner.com/learn/what-happens-when-you-send-one-dai) - **Books**: - [Inevitable Ethereum](https://inevitableeth.com/site/content) - **Blogs**: - [Vitalik Buterin's blog](https://vitalik.ca/) - [Ethereum Foundation blog](https://blog.ethereum.org/) - [Ethereum Magicians forum](https://ethereum-magicians.org/) - [Ethresear.ch forum](https://ethresear.ch/) - [EIP's](https://eips.ethereum.org/) - [ACD & Related meetings](https://github.com/ethereum/pm) - **Papers**: - [Ethereum Whitepaper](https://ethereum.org/en/whitepaper/) - [Ethereum Yellowpaper](https://ethereum.github.io/yellowpaper/paper.pdf) - [Yellow paper discussion](https://www.youtube.com/watch?v=e84V1MxRlYs) - [Yellow paper walkthrough](https://www.lucassaldanha.com/ethereum-yellow-paper-walkthrough-1/) - [Ethereum Beige Paper](https://github.com/chronaeon/beigepaper/blob/master/beigepaper.pdf) - [Ethereum Mauve Paper](https://cdn.hackaday.io/files/10879465447136/Mauve%20Paper%20Vitalik.pdf) **Learning Ethereum Consensus**: - **Books**: - [Eth2Book by Ben Edgington](https://eth2book.info). This book is indispensable for understanding the Ethereum consensus protocol. If you can read only one thing, read this. - **Specifications**: - [Consensus specs](https://github.com/ethereum/consensus-specs) - [Vitalik Buterin's annotated specs](https://github.com/ethereum/annotated-spec) - [Eth2Book annotated specs](https://eth2book.info/capella/part3/) While some of the resources listed might appear outdated, it's important to understand that the Ethereum protocol is continuously evolving. As such, there isn't a definitive, unchanging source of information. However, these resources, even if older, provide foundational knowledge that remains pertinent to understanding the protocol's core concepts. Truly mastering the Ethereum protocol is a complex endeavor. The list provided here is just a starting point, and delving deeper will necessitate exploring a broader range of readings and resources. As you immerse yourself in the project, continuous learning and adaptation will be key. If you come across any resource that you find invaluable and believe should be added to this list, please don't hesitate to suggest its inclusion. #### 3. **Dive In**: With your newfound knowledge, explore the various areas of our project. Whether you're interested in the core consensus layer, networking, CLI, documentation, testing, or tooling, there's a place for you. Start by browsing our [issues](https://github.com/lambdaclass/lambda_ethereum_consensus/issues), especially those tagged as `good first issue`. These are beginner-friendly and a great way to familiarize yourself with our codebase. ### Contributing: Found an issue you're passionate about? Comment with `"I'd like to tackle this!"` to claim it. Once assigned, you can begin your work. After completing your contribution, submit a pull request for review. Our team and other contributors will be able to provide feedback, and once approved, your contribution will be merged. Please adhere to the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification when crafting commit messages. ### Code of Conduct: We believe in fostering an inclusive, welcoming, and respectful community. All contributors are expected to adhere to our [Code of Conduct](https://github.com/lambdaclass/lambda_ethereum_consensus#code-of-conduct). Please familiarize yourself with its contents before participating. ### Communication: **Open communication** is key to the success of any project. We encourage all contributors to join our [Telegram chat](https://t.me/lambdaconsensus) for real-time discussions, updates, and collaboration. **For more structured discussions or proposals**, consider opening an issue or a discussion on the GitHub repository. ### Recognition: We value every contribution, no matter how small. All contributors will be recognized in our project's documentation. Additionally, consistent and significant contributors may be offered more formal roles within the project over time. ### Support: If you encounter any issues or have questions, don't hesitate to reach out. Our team and the community are here to help. You can ask questions in our Telegram chat or open an issue on GitHub for technical challenges. ### Conclusion: Lambda Ethereum Consensus is more than just a project; it's a community-driven initiative to bring the power and reliability of Elixir to the Ethereum ecosystem. With your help, we can make this vision a reality. Dive in, contribute, learn, and let's shape the future of Ethereum together!