@chrispacia - Lead backend dev OpenBazaar

Slides:



Advertisements
Similar presentations
Lecture 7 Transport Layer
Advertisements

Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
JXTA P2P Platform Denny Chen Dai CMPT 771, Spring 08.
Peer to Peer Discovery Nate Thrasher. Peer to Peer Discovery ● 2 Basic Categories – Hardware Discovery – Information Discovery ● JXTA (
CS 582 / CMPE 481 Distributed Systems Communications.
EE 4272Spring, 2003 Protocols & Architecture A Protocol Architecture is the layered structure of hardware & software that supports the exchange of data.
P2P Over MANET An Introduction to Mobile Resource Sharing.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
1 Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
© Oxford University Press 2011 Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.
Protocols COM211 Communications and Networks CDA College Olga Pelekanou
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
The goal of XML Protocol Develop technologies allowing peers to communicate…....in a distributed environment......using XML as encapsulation language.
1 NSIS: A New Extensible IP Signaling Protocol Suite Myungchul Kim Tel:
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Lecture 3 : Network Architectures 1.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Application Layer Functionality and Protocols Abdul Hadi Alaidi
Introduction to Networks
SFS-HTTP: Securing the Web with Self-Certifying URLs
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
A quick intro to networking
Peer to peer Internet telephony challenges, status and trend
Computer Networks.
Quick UDP Internet Connections
Scaling the Network: The Internet Protocol
Local Area Networks Chapter 4.
© 2003, Cisco Systems, Inc. All rights reserved.
Introduction.
Introduction and Overview of Network and Telecommunications (contd.)
CCSDS Message Bus Comparison
PART 5 Transport Layer Computer Networks.
Understand the OSI Model Part 2
COMP3220 Web Infrastructure COMP6218 Web Architecture
How data travels through a network The Internet
LOCSER + HIP draft-hautakorpi-p2psip-peer-protocol-00
TCP Transport layer Er. Vikram Dhiman LPU.
Working at a Small-to-Medium Business or ISP – Chapter 7
The Open System Interconnection (OSI) Model & Network Protocols.
Introduction to Networks
NT2640 Unit 1 Activity 1 Handout
Working at a Small-to-Medium Business or ISP – Chapter 7
Chapter 2 Introduction Application Requirements VS. Transport Services
Protocols and the TCP/IP Suite
Chapter 4 Core TCP/IP Protocols
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Chapter 3: Open Systems Interconnection (OSI) Model
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
I. Basic Network Concepts
Stream Control Transmission Protocol (SCTP)
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Working at a Small-to-Medium Business or ISP – Chapter 7
CSCI {4,6}900: Ubiquitous Computing
Securing the CASP Protocol
HTTP/2.
Transport Protocols An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
COMPUTER NETWORKS CS610 Lecture-35 Hammad Khalid Khan.
CPEG514 Advanced Computer Networkst
Lecture #13: Example Data Link Protocols.
CSCD 330 Network Programming
Chapter 2 Network Models
Network Models CCNA Instructor Training Course October 12-17, 2009
Building A Network: Cost Effective Resource Sharing
Scaling the Network: The Internet Protocol
Process-to-process delivery UDP TCP SCTP
Protocols and the TCP/IP Suite
Chapter 3 Transport Layer
Network Basics and Architectures Neil Tang 09/05/2008
Presentation transcript:

@chrispacia - Lead backend dev OpenBazaar How to Leverage Libp2p for blockchain applications @chrispacia - Lead backend dev OpenBazaar

What

Common Needs Identity Peer discovery Routing Wire encryption/authentication Multi-transport Nat traversal Stream/protocol multiplexing Relaying Common Needs

Languages

Architecture Transport agnostic transports: TCP, UDP, SCTP, UDT, uTP, QUIC, SSH, etc. authenticated transports: TLS, DTLS, CurveCP, SSH Architecture

Multiaddr Support addresses for any network protocol. Are self-describing. Conform to a simple syntax, making them trivial to parse and construct. Have human-readable and efficient machine-readable representations. Encapsulate well, allowing trivial wrapping and unwrapping of encapsulation layers. /ip6/fe80::8823:6dff:fee7:f172/tcp/4001 /ip4/162.246.145.218/udp/4001/utp /onion/erhkddypoy6qml6h:4003 /ip6/2601:9:4f81:9700:803e:ca65:66e8:c21/udp/1234/quic Multiaddr

Multihash Format Examples <varint hash function code><varint digest size in bytes><hash function output> Examples # sha1 - 0x11 - sha1("multihash") 111488c2f11fb2ce392acb5b2986e640211c4690073e # sha1 in hex CEKIRQXRD6ZM4OJKZNNSTBXGIAQRYRUQA47A==== # sha1 in base32 5dsgvJGnvAfiR3K6HCBc4hcokSfmjj # sha1 in base58 ERSIwvEfss45KstbKYbmQCEcRpAHPg== # sha1 in base64 # sha2-256 0x12 - sha2-256("multihash") 12209cbc07c3f991725836a3aa2a581ca2029198aa420b9d99bc0e131d9f3e2cbe47 # sha2-256 in hex CIQJZPAHYP4ZC4SYG2R2UKSYDSRAFEMYVJBAXHMZXQHBGHM7HYWL4RY= # sha256 in base32 QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk # sha256 in base58 EiCcvAfD+ZFyWDajqipYHKICkZiqQgudmbwOEx2fPiy+Rw== # sha256 in base64 Multihash

Architecture Multiplexing can multiplex multiple listen network interfaces can multiplex multiple transport protocols can multiplex multiple connections per peer can multiplex multiple client protocols can multiplex multiple streams per protocol, per connection (SPDY, HTTP2, QUIC, SSH) has flow control (backpressure, fairness) encrypts each connection with a different ephemeral key Architecture

Protocol Muxing

Architecture Encryption Communications on libp2p may be: encrypted signed (not encrypted) clear (not encrypted, not signed) Architecture

Architecture Nat Traversal / Relay Multiaddr Format [<relay peer multiaddr>]/p2p-circuit/<destination peer multiaddr> Examples /p2p-circuit/p2p/QmVT6GYwjeeAF5TR485Yc58S3xRF5EFsZ5YAF4VcP3URHt - Arbitrary relay node /ip4/127.0.0.1/tcp/5002/p2p/QmdPU7PfRyKehdrP5A3WqmjyD6bhVpU1mLGKppa2FjGDjZ/p2p- circuit/p2p/QmVT6GYwjeeAF5TR485Yc58S3xRF5EFsZ5YAF4VcP3URHt - Specific relay node Architecture

Routing Kademlia DHT Supernode MDNS Other Architecture

Routing Lightning Network Libp2p 02212d3ec887188b284dbb7b2e6eb40629a6e14fb049673f22d2a0aa05f902090e@162.246.145.218 Libp2p QmYMR9kDCSF3yBVVyhsRepJC4Byx6TrYGbjZsBgzVP9rG2 [ “/ip4/127.0.0.1/tcp/4001”, “/ip4/127.0.0.1/tcp/9005/ws” “/ip4/10.0.0.8/tcp/4001”, “/ip4/10.0.0.8/tcp/4001/ws”, “/ip6/::1/tcp/4001”, “/ip6/::1/tcp/9005/ws”, “/ip6/Fe80::8823:6dff:fee7:f172/tcp/9005/ws”, “/onion/erhkddypoy6qml6h:4003” ] Routing

Pubsub Propagate information throughout the network in a structured manner, with or without guarantees like: order, delivery, efficiency, fault tolerance and so on. floodsub multicast Architecture

Identity DHT Protocol multiplexing Wire encryption Pubsub Example

Further Reading https://libp2p.io/ https://github.com/libp2p @chrispacia ctpacia@gmail.com Further Reading