libp2p is transport agnostic and supports many foundational protocols, which are abstractly called trasport protocols (e.g. TCP/IP, UDP, QUIC, etc.)
Two core operations:
Listen: for inbound connection
Dial: for outbound connection
Each transport needs its own address scheme, and libp2p uses
multiaddr to encode many different addressing schemes.
/ip4/126.96.36.199/tcp/6543 // Multiaddr vs tarditional construction 188.8.131.52:6542
Multiaddr construction is explicit about protocols being described.
When dialing, need to also include
PeerId of the peer so as to prevent impersonation. (e.g. authentication)
switch manages transports and coordinates other processes such as protocol negotiation, stream multiplexing, and establishing secure communication, etc. It exposes the connection stack API.
Previous implementations of consensus simulation were light weight and relaxed. This will be a bigger project built from the ground up and part of a lecture series. Better to use the tech iteself