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.
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.
@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!
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.
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! 🚀
Prerequisites: Before diving in, ensure you have the necessary tools installed. Check out the Prerequisites section for guidance.
Clone the Repository:
git clone [REPO_URL]
cd lambda_ethereum_consensus
Setup: Once you've cloned the repository, follow the steps in the Installing and running section to set up your environment.
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:
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:
Learning Ethereum Consensus:
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.
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, especially those tagged as good first issue
. These are beginner-friendly and a great way to familiarize yourself with our codebase.
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 specification when crafting commit messages.
We believe in fostering an inclusive, welcoming, and respectful community. All contributors are expected to adhere to our Code of Conduct. Please familiarize yourself with its contents before participating.
Open communication is key to the success of any project. We encourage all contributors to join our Telegram chat for real-time discussions, updates, and collaboration.
For more structured discussions or proposals, consider opening an issue or a discussion on the GitHub repository.
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.
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.
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!