[Music]
hi everyone I'm David and I work for
protocol apps I'm a software engineer
responsible and focused on the JSI PFS
and the way peer-to-peer projects
throughout this amazing conference we
have been seeing a lot of technologies
and solutions to build decentralized
applications pushing the boundaries to a
complete distributed scenarios however
something that hasn't been covered as
much is the networking level it is
required to do a lot of magic I might
even dare to say black magic to be able
to do these peer-to-peer applications
work in the infrastructure that we have
today things like
Nats firewalls lack of cognitive 'ti
completely offline scenarios sensor
networks are some of the problems that
we peer-to-peer software developers have
to overcome in order to build these
decentralized applications and
it is not by chance that like both ipfs
and it Helium have built fully matured
networking stacks from the ground up to
solve these challenges we peer-to-peer
for the case of ipfs and DEF
peer-to-peer for it here IAM and this is
simply because there was no transport in
your network that offered the primitives
that ipfs and it even needed things like
authentication and encryption being able
to cope with several network topologies
in several different scenarios are some
of the challenges that we must overcome
and like face when we are building these
systems however there is a key small key
difference between the designs of these
networking stacks we peer-to-peer is
modular this modularity gives us the
ability to increase our reach in terms
of devices by using the capabilities
that the system has to offer every
single module in we peer-to-peer exposes
a well-defined interface for peer
discovery for routing for transports
three multiplexing encryption you name
it and we can pick the components that
we want and bake our early peer-to-peer
solution for the device that we want to
run this modularity gives us the
opportunity to keep our primitives for
authenticated process addressing intact
it is a very powerful construct to be
able to address any other process in the
network just by a public key so that we
can find the process in the network and
not only dial to it but also make sure
that we are talking with the right
endpoint so this means that like we can
go from the traditional physical network
to a super connected graph with a
physical and virtual over on physical
and virtual overlay
that is not bound by the capabilities of
the system we can use things like butta
to create some of these channels even
radio or audio can be transports we can
upgrade unreliable channels to become
reliable with reliability upgrades we
can encrypt any channel that we want
with sekai l TLS curve DP and others and
this means that we can also enter in the
ecosystems that don't have the full
networking stacks that we are typically
used to huge cases for this is for
example the browser which is constrained
to just have WebSockets HTTP and WebRTC
or Internet of Things devices that
sometime don't even have TCP stacks you
have you are you have to rely on some
radio protocol in order to be able to
dial out of that device for
example
the one very good example of our reputed
peers of pluggable is that our friends
from open Bazaar needed and wanted to
have a tour transport for their their
use and all they needed to do was to
create a tour transport that fulfill the
same interface as the other transports
only peer-to-peer and they can just plug
it right in and once that is done every
other application that wants to use that
transport can just bring it and you
don't have to change anything from the
codebase of your application the
primitives stay the same it is really
powerful think like having fully team
notes running in every single device
with no limitations
so we think and we see deaf p2p era
peer-to-peer
being able to converge and like to join
efforts to make a way
ecosystem for the community that uses
these networks tax their future pier
offers a lot of primitives that can
augment this ecosystem and
since we
already did the work as one mentioned
earlier of getting ipfs running on the
browser we kind of like went ahead and
asked ourselves
what would we have to do in order to get
any tem node running on the browser so
I'll just show like we started hacking
something
it is very in the beginning a very early
stage it's a humble beginning but we
want to show you the process the
progress I have two demos for you
so
looking for the demo one
so the first challenge is really getting
the etherium vm working on the browser
here basically you might be familiar
with the standard setup of getting a
browser app nowadays running on the
browser you have to physically transpile
everything and then once it's transpiled
we can load it and we prepared this
really nice fresh world so you can see
what's going on and here we are going to
get like simulate d2 in blockchain we
are going to create some blocks and we
are going to process them through the
etherium vm there is always like since
these operations are very CPU intensive
it takes a little bit to warm up but
once it's there you can just run it rest
check country we get helium VM on the
browser running blocks from the GM
blockchain but there is more so now I'm
opening another tab and I'm basically
connecting to the other peer that was
open before and I'm connecting these two
browser tabs so instead of generating
blocks I'm just going to ask that peer
to give me the box so it happens
seamlessly like I just said dial to this
other peer it found the peer and fetch
the blocks from that network so we can
get the TMV I'm running on the browser
and finding blocks from other nodes this
is pretty exciting
but there is more so you can see I can
pop more nodes and like they find each
other very quickly but now like the real
interesting demo is like can we get
these browser nodes
connecting to the real etherium network
let's see demos ooh I already played
awesome okay so same dance getting the
application to run but here we are doing
something extra we are going to run a
gayageum notes patch through the
peer-to-peer so it does an address in
the way peer-to-peer echo system and now
instead of like simulating the
blockchain I'm just going to dial to
that girl with helium note and fetch the
blocks like basically I'm using this
game note that was augmented with the
peer-to-peer to connect to the rest of
the network again the
generating the Genesis block dance takes
a little bit this can be greatly
improved especially with recent work
from marketing on Ella zoom I'm sure but
once that's there we'll start receiving
all of these blocks
there you go and you can see like this
is like fetching from the real live
network it's pulling all the blocks in
into the browser
[Applause]
awesome so let me explain in a graph
what and it keeps going it might take a
while if you have downloaded the
blockchain before you know you might
know that can you go back to the slides
okay
[Music]
okay thank you okay
so what is happening so we know we have
the acuity met work that already exists
and pretty well connected to their field
of view and then we added this Goethe
Leonel patched with
we peer-to-peer so that does like a
presence on double p2p Network and then
we throw the node.js snails
running loop peer-to-peer as well and
then we have our browser that connects
to this node.js know that connects to
the rest of the network to the other
go Jess node good girl just node to go
it through your note so you can see we
already like using multiple transports
here like I'm using TCP to connect girl
between node and then I'm using web
sockets from nodes to the browser next
up like I can connect several browsers
together right so what I'm going to do
is just use WebRTC the peer-to-peer
transport of the browser and I just put
it on top what I can do is I can connect
the browser again to the girl with your
note and this way like any browser that
has a common transport can dial to
another nail that supports we
peer-to-peer this is pretty exciting
like this means like we can have finally
it helium in the browser running like
fully three nodes and it's just a little
browser is basically any device with any
network capabilities the network is not
the problem anymore I would like to give
a huge shout to Martin because Martin
basically did all of the magic of
getting aetherium running on the browser
I
just had to plug the wires together that
was easy thank you so much for all the
wealth and like what you've seen here
was basically like a couple of nights
hacking it was actually very impressive
oh it was so easy to attach we peer to
peer to go with helium and to bring the
blocks to the browser and run them on
the TMJ SVM it's pretty exciting so we
will continue pursuit this endeavor you
can follow the development on the leap
UTP organization on gear the deaf ear to
peer
development on the theorem org and you
can check all of those examples all that
demo on a repo called jazz idiom with
peer-to-peer I can post the links after
in Twitter if someone is interested to
check it out that's awesome thank you so
much
[Music]