►
From YouTube: Bitswap: Who has my blocks? - Dirk McCormick
Description
With the new Bitswap, people who are using IPFS can expect to get faster transfer speeds and less duplicate information coming across the network. Bitswap expert Dirk McCormick explains how in this lightning talk from the 0.5 Release Meetup.
For more information
+ read the go-ipfs 0.5 release announcement: https://blog.ipfs.io/2020-04-28-go-ipfs-0-5-0/
+ visit the project website: https://ipfs.io
+ or follow IPFS on Twitter: https://twitter.com/IPFS
Sign up to get IPFS news, including releases, ecosystem updates, and community announcements in your inbox, each Tuesday: http://eepurl.com/gL2Pi5
A
So
this
is
going
to
describe
the
old
it
swap
and
then
I'll
I'll
talk
about
the
new
updates,
so
in
the
old
bit
swap
the
way
the
discovery
works
was
when
ipfs
asked
bit
swap
for
a
file.
The
first
block
that
I
asked
for
is
called
the
root
block
of
the
dag
and
so
bit
swap
words
send
out
a
request
to
all
of
the
peers
that
it's
connected
to
and
say,
hey,
give
me
the
root
block
and
then,
if
none
of
them
have
the
root
block,
then
it
would
go
out
and
ask
the
DHT.
A
A
So
once
we
have
some
peers
in
our
session
and
for
subsequent
requests,
we
send
out
one
message
to
peers
sort
of
selectively
and
I'll
talk
you
in
a
minute
how
we
do
that
and
the
peers.
Remember:
okay!
This
guy
wants
these
blocks.
So
if
I
come
across
those
blocks
or
if
I
have
them
in
my
data
store,
I'm
going
to
send
them
through
so
in
the
old
bit
swap
way
we
would
decide
which
wants
to
send
to
which
P
is.
A
Is
we
would
kind
of
split
up
the
wants
into
groups
and
we
would
send
a
whole
group
to
several
peers,
and
so,
of
course,
if
several
peers
have
that
particular
block,
they
would
all
send
it
back
and
we
have
a
lot
of
duplicates.
So
we
would
kind
of
like
adjust
the
the
number
of
once
in
each
group
to
try
to
maintain
a
balance
between
getting
too
many
duplicates
versus
getting
a
decent
transfer
ratio.
A
A
So,
basically,
in
order
to
choose
which
appear
to
send
that
one
block
to
we
prioritize
peers
that
have
told
us
they
have
the
block
and
if
there
are
no
peers
or
if
they
all
tell
us
that
they
have
it,
then
we
select
the
peer
probabilistically
according
to
whichever
peer
has
sent
us
the
most
blocks
in
the
past
for
this
session.
So
that
sort
of
optimizes
for
peers
who
have
the
lowest
latency
in
the
highest
bandwidth.
A
Three
minutes
so
I
sort
of
race
very
quickly,
but
just
to
talk
about
some
results,
so
Steven
showed
some
of
these
slides
earlier
on.
Basically,
you
can
see
on
the
left
hand,
side.
We
have
the
time
to
fetch
on
the
y-axis.
This
is
the
file
size
on
the
x-axis
and
that
each
line
is
asking
it's
when
one
bit
swap
here
is
asking
either
one
seed,
two
seeds
or
four
seeds
for
a
file.
A
So
the
blue
lines
are
the
old
bit
swap
and
you
can
see
that
they're
much
higher
than
the
red
lines,
which
are
the
new
bit
swap,
meaning
that
the
new
bit
swap
is
able
to
retrieve
blocks
faster
on
the
right
hand,
sides
we
have
some
graphs
of
duplicate
blocks
and
I
Steven
mentioned
earlier.
The
old
bit
swap
used
to
get
quite
a
lot
of
duplicate
blocks,
but
there
are
actually
no
red
lines
on
the
graph
because
there's
essentially
no
duplicate
blocks
in
most
scenarios.