Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shyam-patel-kira committed Sep 16, 2024
2 parents 81e7140 + eb84058 commit d28f090
Show file tree
Hide file tree
Showing 23 changed files with 1,010 additions and 127 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
**/.vscode
.idea/
node_modules/

package-lock.json
package.json

145 changes: 72 additions & 73 deletions development-updates.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion notes/AdityaGupta.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ These are my weekly EPF updates:
- [Week 4](https://hackmd.io/@adigupta/rJ2y2koDR)
- [Week 5](https://hackmd.io/@adigupta/rym-4nXdR)
- [Week 6](https://hackmd.io/@adigupta/H139c34KA)
- [Week 7](https://hackmd.io/@adigupta/S1m6RhVFC)
- [Week 7](https://hackmd.io/@adigupta/S1m6RhVFC)
- [Week 8](https://hackmd.io/@adigupta/Sy09KtDqC)
- [Week 9](https://hackmd.io/@adigupta/SklJd9P5A)
- [Week 10](https://hackmd.io/@adigupta/rySsqDniA)
- [Week 11](https://hackmd.io/@adigupta/H1fJpPniC)
9 changes: 6 additions & 3 deletions notes/Bastin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ I'm looking forward to this EPF and I will try my best to produce value.

## My EPF Journey

Here in [this note](https://hackmd.io/@Bastin/r1oxkeNVR) I write down my thoughts and plans in an unorganized manner. this can be considered my thought process through out this program, and these notes are what will later on turn to the development updates.
Here in [this note](https://hackmd.io/@Bastin/r1oxkeNVR) I write down my thoughts and plans in an unorganized manner. this can be considered my thought process through out this program, and these notes are what will later on turn to the development updates. (I stopped using this very soon.)

After researching some potential projects, I started with [Light Client Server Support in Prysm](https://github.com/eth-protocol-fellows/cohort-five/blob/main/projects/project-ideas.md#prysm-light-client-support).

Expand All @@ -19,10 +19,13 @@ For this project the goal is to implement the needed functions for light clients
Here you can see my weekly updates as well in the [`development-updates.md`](https://github.com/eth-protocol-fellows/cohort-five/blob/main/development-updates.md):

- [Project Proposal](https://github.com/eth-protocol-fellows/cohort-five/blob/main/projects/light-client-support-in-prysm.md)
-
-
- [Week 0](https://hackmd.io/@Bastin/HJ6hOLQHC)
- [Week 1](https://hackmd.io/@Bastin/HyM3AmnrA)
- [Week 2](https://hackmd.io/@Bastin/H1JgDZLU0)
- [Week 3](https://hackmd.io/@Bastin/By8UVwlPA)
- [Week 5](https://hackmd.io/@Bastin/HyqHfO9OR)
- [Week 5](https://hackmd.io/@Bastin/HyqHfO9OR)
- [Week 6](https://hackmd.io/@Bastin/Hke55_9dR)
- [Week 9](https://hackmd.io/@Bastin/B1Ja58D9C)
- [Week 11](https://hackmd.io/@Bastin/SyNqyCdoA)
- [Week 13](https://hackmd.io/@Bastin/S1n5EXoh0)
15 changes: 7 additions & 8 deletions notes/EkaterinaRiazantseva.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ Draft: [EIP-7594: PeerDAS - Peer Data Availability Sampling](https://eips.ethere
## Consensus clients
The overview of the consensus clients:

| Client | Lang | Team | Docs | Repo |
|------------|------------|---------------|-----------------------------------------------------------------|--------------------------------------------------------------|
| Lighthouse | Rust | Sigma Prime | [Lighthouse Book](https://lighthouse-book.sigmaprime.io/) | [Github](https://github.com/sigp/lighthouse) |
| Lodestar | TypeScript | ChainSafe | [Lodestar Docs](https://chainsafe.github.io/lodestar/) | [Github](https://github.com/ChainSafe/lodestar/tree/v1.19.0) |
| Nimbus | Nim | Status | [Nimbus Guide](https://nimbus.guide/) | [Github](https://github.com/status-im/nimbus-eth2) |
| Prysm | Go | Offchain Labs | [Prysm Docs](https://docs.prylabs.network/docs/getting-started) | [Github](https://github.com/prysmaticlabs/prysm) |
| Teku | Java | ConsenSys | [Teku Docs](https://consensys.io/teku) | [Github](https://github.com/Consensys/teku) |

| Client | Lang | Team | Docs | Repo |
| -------- | -------- | -------- | -------- | -------- |
| Lighthouse | Rust | Sigma Prime | [Lighthouse Book](https://lighthouse-book.sigmaprime.io/) | [Github](https://github.com/sigp/lighthouse) |
| Lodestar | TypeScript | ChainSafe | [Lodestar Docs](https://chainsafe.github.io/lodestar/) | [Github](https://github.com/ChainSafe/lodestar/tree/v1.19.0) |
| Nimbus | Nim | Status | [Nimbus Guide](https://nimbus.guide/) | [Github](https://github.com/status-im/nimbus-eth2) |
| Prysm | Go | Offchain Labs | [Prysm Docs](https://docs.prylabs.network/docs/getting-started) | [Github](https://github.com/prysmaticlabs/prysm) |
| Teku | Java | ConsenSys | [Teku Docs](https://consensys.io/teku) | [Github](https://github.com/Consensys/teku) |
4 changes: 4 additions & 0 deletions notes/Kira.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ I'll posting my weekly updates and notes on my [hackmd](https://hackmd.io/@kira5
* [Week 5](https://hackmd.io/@kira50/epf-week-5)
* [Week 6](https://hackmd.io/@kira50/epf-week-6)
* [Week 7](https://hackmd.io/@kira50/epf-week-7)
* [Week 8 & 9](https://hackmd.io/@kira50/epf-week-8-and-9)
* [Week 10 & 11](https://hackmd.io/@kira50/epf-week-10-and-11)
* [Week 12 & 13](https://hackmd.io/@kira50/epf-week-12-and-13)

15 changes: 15 additions & 0 deletions notes/Nilav.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Introduction

Hey everyone, I am Nilav. I am looking forward to do open-source contributions, dive deeper into the protocol and learn about recent research going on.
I will be contributing to the Nimbus codebase and Constantine library during the cohort, related to peerDAS implementation.

These are my twitter and github handles:
- [Twitter](https://x.com/gerceboss_21)
- [Github](https://github.com/gerceboss)

# Project Proposal
This is my project proposal for the EPF: [peerdas-nimbus](../projects/peerdas-nimbus.md)

Project presentation slides: [Slides](https://docs.google.com/presentation/d/13nqyNGN1vUl6KAB2Ogmp5X7qwUY7tpfphIomVOV_fJw/edit?usp=sharing)

Project Presentation Video link : [Presentation Video](https://youtu.be/NTsfIiPBM6U)
8 changes: 7 additions & 1 deletion notes/RupamDey.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ I'll posting my weekly updates on my [hackmd](https://hackmd.io/@rupam-04)
* [Week 4](https://hackmd.io/@rupam-04/Week4)
* [Week 5](https://hackmd.io/@rupam-04/Week5)
* [Week 6](https://hackmd.io/@rupam-04/Week6)
* [Week 7](https://hackmd.io/@rupam-04/Week7)
* [Week 7](https://hackmd.io/@rupam-04/Week7)
* [Week 8](https://hackmd.io/@rupam-04/Week8)
* [Week 9](https://hackmd.io/@rupam-04/Week9)
* [Week 10](https://hackmd.io/@rupam-04/Week10)
* [Week 11](https://hackmd.io/@rupam-04/Week11)
* [Week 12](https://hackmd.io/@rupam-04/Week12)
* [Week 13](https://hackmd.io/@rupam-04/Week13)
8 changes: 7 additions & 1 deletion notes/hangleang.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@ Lastly, thanks to @ghili. I'm permissionlessly fork your note, cause we have som
- [consensus-specs/v1.5.0-alpha.3](https://github.com/ethereum/consensus-specs/releases/tag/v1.5.0-alpha.3)
- [pectra-devnets repo](https://github.com/ethpandaops/pectra-devnets) by EthPandaOps Team
- [peerdas-devnet-1 specs](https://notes.ethereum.org/@ethpandaops/peerdas-devnet-1) by EthPandaOps Team
- [libp2p-pubsub Peer Discovery with Kademlia DHT](https://medium.com/rahasak/libp2p-pubsub-peer-discovery-with-kademlia-dht-c8b131550ac7)
- [libp2p-pubsub Peer Discovery with Kademlia DHT](https://medium.com/rahasak/libp2p-pubsub-peer-discovery-with-kademlia-dht-c8b131550ac7)
- [DAS and Danksharding](https://a16zcrypto.com/posts/article/an-overview-of-danksharding-and-a-proposal-for-improvement-of-das)

### Tools
- [ENR Viewer](https://enr-viewer.com/): decoding ENR to inspect `csc` field (custody subnet count), maintained by ChainSafe
- [PeerDAS Custody](https://jimmygchen.github.io/peerdas-custody/): compute custody subnets and columns from node ID or peer ID, maintained by [jimmygchen](https://github.com/jimmygchen) from Lighthouse
- [My fork with config updates](https://hangleang.github.io/peerdas-custody/)
4 changes: 2 additions & 2 deletions program-guide/repo-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ You should:

The cohort coordination using a public repository is also meant to give you an experience of real-world collaboration in free open-source software (FOSS) development using [Git](https://git-scm.com/video/what-is-version-control). Git tracks changes to code, making collaboration on projects seamless, especially in FOSS where public repositories are the norm. Consider using the Git command line interface (CLI) over using GitHub's web interface. It's an important skill you can learn during the cohort that will serve you well throughout your career. Check out the resources on [using git in the epf.wiki](https://epf.wiki/#/wiki/dev/cs-resources?id=terminals-shell-scripting-and-version-control).

#### 1. Setting up your local repository
#### 1. Forking the repository and setting up your local environment

Install [git](https://git-scm.com/) using a preferred method on your machine and set it up with your github SSH key. You need to [setup ssh](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and [add the generated key to your github account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) if you haven't done so yet. With your git setup complete, fork the repo to your github account (by clicking the Fork button) and clone the fork locally, for example:
Install [git](https://git-scm.com/) using a preferred method on your machine and set it up with your github SSH key. You need to [setup ssh](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and [add the generated key to your github account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) if you haven't done so yet. With your git setup complete, **fork the repo** to your github account (by clicking the Fork button) and clone the fork locally, for example:

```
git clone [email protected]:taxmeifyoucan/cohort-five.git
Expand Down
86 changes: 86 additions & 0 deletions projects/Prysm_libP2P_Implementation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Custom golang implementation of libp2p in Prysm
An in-house implementation of the necessary parts of the libp2p protocol in the Prysm client

## Motivation
The project aims to develop an in-house implementation of p2p communication library and leverage some of the core components from the existing [go-libp2p](https://github.com/libp2p/go-libp2p) libraries. go-libP2P library(and its variants in other languages) are used by almost all consensus clients for p2p network communications among beacon chain nodes. The scope of the project enables the Prysm team to be independent of any third party for the integral components. It also allows for elimination of redundant components from go-libp2p which are not actively used, while achieving the same performance. Implementing the project also involves incorporating a deep understanding of libP2P and networking layer.

## Project Description
The libP2P protocol has several components for example: Noise, multiplexer, pubsub, ping etc. Not all these components are used by Prysm, hence the major tasks or the solution for the problem at hand are:
* Segregate the components in libP2P which are used in Prysm, this involves a clear marking of:
* the individual elements which can be used as-it-is
* the elements which need refactoring to incorporate only the segments used by libP2P
* the components which can be eliminated completely.
* Thanks to @MaxDav for noting some required changes in his [notes](https://hackmd.io/zIWLqRzWT76I5T_sPbJ0KA).
* Implement a package with the necessary components of libP2P used by Prysm, in sync with [p2p specs for CL](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md).
* Extensively test the package.
* Switch the current libP2P implementation in Prysm to the new package developed.
* Performance analysis and optimizations of the in-house version compared to the Protocol Labs' implementation on Holesky network.

## Specification

We'll will following the [CL specs](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md) for the development of this new package.

Major components used in Prysm:
* `devp2p/discv5` (outside the project scope)
* `tcp/quic` connection protocols
* `NOISE` protocol negotiation, can be used as-it-is
* [`multistream-select`](https://github.com/multiformats/multistream-select/)
* [`mplex`](https://github.com/libp2p/specs/tree/master/mplex)
* [`yamux`](https://github.com/libp2p/specs/blob/master/yamux/README.md)
* [`gossipsub`](https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.0.md)
* [`ssz`](https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md) encoding


## Roadmap

**Month 1: Design and Initial Development**
- Deep dive into the p2p-interface.md from the consensus specs. Understand the theoretical aspects thoroughly.
- Start examining the existing libp2p components used in the Ethereum beacon chain. Identify which components are utilized by Prysm and which are not necessary.
- Begin the design of the new libp2p for Prysm based on the specs studied. Outline the architecture and identify all dependencies and external libraries needed.
- Start implementing the basic framework of the custom libp2p. Focus on integrating core components that are essential for Prysm’s functionality.

**Month 2: Development Continuation**
- Continue building out the libp2p implementation, adding more complex functionalities and integrating with Prysm’s existing systems.
- Begin internal testing of individual components. Use the guidelines from the [Prysm’s end-to-end development tools]( https://docs.prylabs.network/docs/devtools/end-to-end) and [Golang principles](https://docs.prylabs.network/docs/contribute/golang-principles) for coding and testing standards.

**Month 3: Testing and Documentation**
- Develop and implement an extensive testing plan. Test each component individually, followed by integrated testing with the Prysm beacon node.
- Start writing documentation for the new implementation. Ensure all features and modifications are well-documented.

**Month 4: Deployment and Performance Tuning**
- Integrate the new libp2p implementation into the Prysm beacon node, hidden behind a feature flag.
- Conduct comprehensive performance tests on the Holesky testnet, comparing the new in-house implementation with the external libp2p version. Gather and analyze performance data to identify any issues or potential improvements.

## Possible Challenges
Since libP2P is already in use among several consensus clients, one key challenge for us would be maintaining the same performance as provided by libP2P. Further the project involves a deep understanding in networking and implementation and refactoring of several components, it might not be that easy to do.
## Goal of the project
* Understand libP2P networking package and its components within the beacon chain.
* Develop and integrate a simplified package tailoring to Prysm's specific requirements of libP2P, while including some of the core dependencies as it-is.
* Performance analysis.

### Non-goals
* Re-implementing core-dependencies which can be used as-it-is.

## Collaborators
### Fellows
* [Rose Jethani](https://github.com/rose2221)
* [Richa](https://github.com/Richa-iitr)
* [MaxDav](https://github.com/MaximeDavin)
* [kira](https://github.com/shyam-patel-kira)

### Mentors
* [manunlp](https://github.com/nalepae)

## Resources
Relevant codebases:
* [prysm/beacon-chain/p2p](https://github.com/prysmaticlabs/prysm/tree/develop/beacon-chain/p2p)
* [prysm/beacon-chain/sync](https://github.com/prysmaticlabs/prysm/tree/develop/beacon-chain/sync)
* [prysm/cmd/prysmctl/p2p](https://github.com/prysmaticlabs/prysm/tree/develop/cmd/prysmctl/p2p)
* [prysm/tools/enr-calculator](https://github.com/prysmaticlabs/prysm/tree/develop/tools/enr-calculator)
* [go-libP2P](https://github.com/libp2p/go-libp2p/tree/master)

Specs:
* https://github.com/libp2p/specs

Others:
* https://docs.libp2p.io/concepts/introduction/overview/
Loading

0 comments on commit d28f090

Please sign in to comment.