Discover and read the best of Twitter Threads about #libp2p

Most recents (3)

1/20🧵
Let's take a deep dive into the intricacies of Internet Protocols (IPs) like TCP/IP, their history, and how these systems parallel to the Ethereum blockchain ecosystem.

This thread is technical - buckle up! #InternetProtocols #Ethereum
2/20
TCP/IP, the backbone of the internet, has its roots in the ARPANET project of the 1960s-70s.

It's a suite of protocols for data transmission and routing. TCP/IP is layered, each with its specific tasks:

Network Interface, Internet, Transport, and Application. #TCP_IP
3/20
The Network Interface layer (eg, Ethernet) takes care of the physical transmission of data.

Internet layer (eg, IP) ensures data packets are routed correctly

Transport layer (eg, TCP) guarantees reliable transmission

Application layer (eg, HTTP) is for user interactions
Read 20 tweets
Curious what goes on inside an #eth2 client? Let's take a look at some colourful boxes loosely depicting the @ethnimbus implementation..
#eth2 uses #libp2p to establish a peer-to-peer network - each node opens encrypted connections to other nodes using chronos and nim-libp2p, purpose-built networking libraries in @nim_lang, and multiplex several protocols like gossip and eth2/sync over that link using `mplex`
On top of #libp2p, we build the #eth2 network core - protocol details, serialization, peer scoring, discv5 to feed it with fresh peers etc - we get a little playful here with @nim_lang, using some of its niche features to good performance and readability advantage
Read 7 tweets
Small thread about a #rustlang #libp2p design mistake I made.

When you write, for example an HTTP server, each connection is handled on its own, and all of them are handled concurrently.

If multiple connections need mutable access to something, you lock a mutex.
Using a mutex is not a problem, because you don't care in which order requests in multiple different connections are being handled, and therefore you don't care whether connection A locks the mutex first or connection B.

But in a peer to peer environment, it's different.
In peer to peer systems, you want to handle the network as a whole. When you receive a pubsub message from a node, you want to relay it to the others.
When you receive a peer discovery query, you need to return the nodes you're connected to, and so on.
Read 11 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!