►
Description
Originally recorded during the Lisbon Hack Week from May 21-25, 2018.
A
So
this
is
really
a
tool
for
for
low
p2p
meant
for
low
p2p
and
for
debugging
some
protocols
nub
of
it.
So
I'll
start
with,
like
the
general
idea
that
visualizing
distributed
protocols
is
a
hard
thing
and
there's
all
been
a
bunch
of
like
interesting
work
on
this.
It's
like
how
do
you
reason
about
some
like
really
complicated.
A
You
know
thing
going
on
with
a
whole
bunch
of
like
different
machines
and
different
roles
and
messages
going
through,
and
so
you
know
for
a
long
time.
The
conventional
wisdom
was
hey.
You
just
need
to
look
at
log
traces
to
understand,
what's
going
on
and
and
maybe
if
you
could
actually
like,
take
those
block,
traces
and
visualize,
and
maybe
you
could
find
the
bug
in
like
seconds
not
not
days,
so
not
only
that,
but
you
could
explain
how
a
protocol
should
function
to
people
in
much
simpler
ways.
A
A
A
So
what's
going
on
here,
so
you
see
five
nodes
and
here's
the
internal
raft,
timers
they're
gonna
expire
and
then
they're
gonna
try
to
get
elected
leaders
this
one
kind
of
went
first,
so
that
was
kind
of
a
failed
round,
because
multiple
tried
to
get
elect
at
the
same
time.
But
now
the
clocks
kind
of
like
got
reshuffled
so
it
looks
like
s4
is
gonna
win
the
next
election.
B
A
Gonna
run
Oh
yep
there
we
go
so
now.
Those
votes
are
are
correct
and
now,
as
for
is
starting
to
replicate
content.
For
some
reason
this
is
a
little
bit
buggy.
It
might
be
a
quick
time
run
quick
time,
and
this
at
the
same
time
is
unhappy,
but
this
is
now
starting
to
like
replicated
the.
This
is
now
like
the
proper
leader,
so
I
think
at
this
point,
I
could
enter
a
value
or
something
and
remember
how
to
use
this.
A
A
I
think
at
this
point,
I
should
be
able
to
enter
values-
maybe
not
anyway,
this
this
is
supposed
to
be
an
interactive
tool
that
allows
you
to
do
play
with
the
protocol
and
to
understand
it.
So
you
can
kill
nodes
and
and
define
start
adding
values
to
see
how
the
state
machine
replication
works.
Oh
there
we
go
stop
so
I
just
stopped
that
node.
Maybe
it
stopped
the
whole
thing
play
yeah
so
now
s2
is
dead
and
then
I
can
bring
it
back
and
so
on.
A
Anyway,
so
this
is
like
a
live
full
implementation
of
the
protocol
and
allows
you
to
kind
of
think
about
it
and
debug
it.
So
what
I
would
like
is
to
be
able
to
do
that
with
not
just
a
different
implementation
of
the
protocol
in
JavaScript,
but
with
the
actual
implementation.
So
the
protocols
as
they
are
in
live
nodes,
whether
it's
go
or
JavaScript
or
whatever,
and
the
way
to
do
this
is
we
can
take
the
protocols
themselves
and
take
the
event
logs
from
the
protocols
and
take.
A
You
know,
extract
that
trace,
combine
all
the
event
logs
from
all
of
the
different
nodes
and
then
use
that
to
then
show
a
visualization
and
we
could
either
collect
all
these
traces
and
keep
them
and
then
play
back
the
visualization
whenever
or
we
could
do
it
real
time
like
we
could
actually
like
visualize
something
live
so
I'm
gonna
show
you
a
version
of
this
implemented,
and
this
is
an
old
idea.
So
this
was
like
discussed
years
ago
and
yeah
doesn't
15
and
I
think
this
was
like
a
very
first
implementation
of
this.
A
Yeah,
so
this
is
actually
going
to
to
spawn
a
visualization,
so
the
depth
depth
chart
over
there
is
it's
kind
of
broken.
Actually,
let
me
I
have
a
bug,
so
I
have
to
like
star
with
a
minor
instead
of
a
client.
Otherwise
he
won't
work,
no
whoops
roll
again.
What's
that
yeah
I
know
I'm
seriously
serious,
like
I
should
just
fix
my
damn
bug.
I
would
like
to
revert
the
last
change.
That
I
did
that
introduced
us
great
great,
so
so
that's
a
that's!
A
A
minor
ignore
the
depth
chart
that's
wrong,
and
so
now
these
are
each
of
these
is
a
live
file.
Coin
node
in
my
machine
and
they're
set
to
like
a
second
block
time,
so
they're
going
really
fast,
and
so
this
is
each
one
of
the
like
that
the
the
money
moving
is
an
actual
transaction
being
being
propagated.
A
A
It
so
the
whole
thing
is
like
there
we
go
so
what's
happening
here.
Is
that
there's
a
process?
It's
simulator
that
is
picking
randomly
between
a
set
of
choices,
and
you
know
it
might
spawn
a
node
that
joins
the
network.
So
you
know
every
two
seconds
it
like
randomly
spawns
a
node
and
then
it
connects
it
to
the
network
and
then
every
so
many
seconds
it'll
like
throw
a
random
action
and
it
chooses
from
a
number
of
actions.
So
there's
like
yeah,
it's
asks
at
bids
cents.
A
A
transaction
reminds
a
block
so
again
like
that
depth
chart
is
all
totally
wrong.
This
is
a
work
in
progress,
but
what's
going
on
here
is
those
are
actual
nodes
and
what's
getting
parsed
here
is
the
event
logs
as
they
come
out
of
go
file
coin
and
those
event
logs
are
then
transformed
into
something
that
this
visualization
can
consume.
So
I'm
gonna
want
to
kind
of
walk
through
that,
so
I
think
so.
A
A
A
So
I
think
about
do
this,
so
this
is
what's
pumping
out
of
the
Falkor
nodes
themselves,
and
so
maybe
that
note
is
not
getting
so.
I
got
like
two
messages
out
so
every
once
in
a
while,
like
things
are
happening,
and
this
is
pumping
out
logs,
these
are
all
JSON.
This
is
the
exact
same
kind
of
event,
log
structure
that
is
in
Go
ipfs.
A
So
it's
the
same
idea
and
all
that
go--let
p2p
code
is
full
of
this
stuff,
so
you'll
notice
that
some
of
these
events
are
actually
the
same
thing
that
go
up
if
s
emits
maybe
most
of
these
are
specific,
but
a
bunch
of
these
are
are
like
dials
and
so
on.
I
guess,
maybe
I
silenced
those,
but
what
what
this
simulator
does
is
then
take
that
event,
log
and
then
parse
it
into
into
this.
So
these
logs
are
what
the
the
web
visualization
receives.
So
what's
going
on.
A
Is
that
we're
letting
the
program
define
its
own
event?
Log,
however,
it
wants
because
it's
gonna,
you
know
that's
gonna
change
over
time
and
people
are
gonna,
make
decisions
about
how
that
should
be
based
on
what
makes
sense
for
that
program,
and
then
we
write
the
visualization
and
we
want
to
create
an
event
trace.
That
makes
sense
for
the
visualization,
with
events
that
make
sense
for
what
we
actually
want
to
see.
A
So
in
this
case,
it's
like
nodes
entering
and
leaving
it's
like
a
block
being
propagated,
a
transaction
going
through
and
so
on,
and
so
you
know,
you
might
notice
that
these
are
like
a
lot
shorter
than
the
other
ones,
and
so
in
that
transformation,
a
bunch
of
logs
are
being
being
dropped
out
and
then
they're
they're
getting
transformed
into
something
that
the
JavaScript
can
consume.
They're,
also
getting
aggregated.
A
A
A
Maybe
not
what
is
so
I
think,
like
that's
d3,
choking
on
like
all
of
the
animation
sequences,
but
now
it's
back
to
its
caught
up
right,
and
so
ideally
there
would
be
like
a
you
know,
bar
that
would
you
know,
allow
you
show
you
allow
you
to
kind
of
stop
and
play
back,
and
you
know
rewind
and
so
on,
but
but
yeah
this
is
like
hooking
into
like
a
live.
You
could
hook
this
into
a
live
network
and
then
you
know
you
could
with
ipfs.
A
We
could
use
this
to
view
our
our
nose
and
our
gateways
and
see
what
they're
up
to
and
what
kind
of
messages
they're
they're
showing
and
the
cool
idea
is
that
we
should
be
able
to
generate
a
bunch
of
different
end
visualizations.
That
show
us
different
things
that
we
want
to
want
to
see
like.
In
some
cases,
we
want
to
just
see
the
DHT
and
just
focus
on
a
DHT
protocol,
and
it's
not
ipfs
specific.
It's
just
let
p2p
DHT
specific
and
that's
it.
In
other
cases.
A
A
Ford
III
right
where
people
would
just
write
a
gist,
and
then
you
could
see
kind
of
like
real
d3
magic
happening,
ideally,
would
be
as
easy
to
to
write
one
of
these
like
visualization
plugins
and
then
run
it
like
have
both
like
collect
some
traces
and
then
write,
run
this
visualization
over
a
trace
and
then
see
see
something
about
it
and
both
help.
This
helps
debug.
This
helps
understand
these
protocols.
It
helps
you
teach
about
the
tissue
what's
going
on
and
so
on.
So
that's
kind
of
the
goal
of
that
of
that
tool.
Yeah.
A
Yeah,
it's
it's
so
final.
That
sim
is
both
it's
a
single
program
that
is
issuing
all
the
commands
and
spinning
them
up,
collecting
the
event
logs
and
then
aggregating
them
and
buffering
some
of
them,
because
you
actually
want
to
keep
a
buffer
a
certain
size.
So
you
can
refresh
the
page
easily
and
then
exposing
them
over
HTTP,
so
that
serves
the
assets
themselves
and
and
the
aggregate
it
logs.
But
but
all
of
this
could
change.
This
was
just
kind
of
a
hack
to
to
get
it
together.
A
If
we
wanted
to
do
this
pretty
generally
for
the
p2p,
what
we
would
want
is
that
central
thing
to
be
generic
and
be
a
single
program,
and
then
you
would
probably
write
another
program
that
either
uses
that
one
as
a
library
or
or
is
invoked
by
that
one
that
you
know
sends
the
commands
and
Trent
converts
the
logs.
But
we
only
need
to
write
that
one
thing
that
controller
and
output,
our
logs
and
so
on.
A
We
just
need
to
write
that
one
one
time
and
then
what
a
single
visualization
would
do
is,
it
would
say,
I
want
to
filter
for
these
event,
logs
and
I
want
to
transform
in
this
way,
and
so
what
that
could
looks
like
it's
pretty
simple
so
in
this
visualization.
Is
this
part
where
I
just
have
like
this
huge
switch
statement
where,
whenever
I
see
you
know,
I
I
ingest,
the
aggregated
logs
from
all
the
different
nodes
and
then,
whenever
I
see
an
event,
I
convert
it
into
a
different
event.
A
I
go
from
like
the
event
specific
to
the
to
the
program,
to
the
events
specific
to
the
visualization,
and
so
just
by
applying
each
of
these
filters.
I
go
from.
You
know
the
implementation
specific
thing
to
the
thing
that
my
visualization
wants
and
then
we
would
have
to
also
write
the
visualization,
but
that's
I,
think
kind
of
unavoidable,
because
you
you
end
up
wanting
a
lot
of
different
things.
We
might
have
some
like
reusable
components
like
if
we
have
the
ability
to
stop
playback
and
so
on.
A
A
Yeah,
but
so
this
allows
us
to
the
simulator
and
the
visualization
can
be
like
not
running
and
as
long
as
you're
capturing
the
event
logs
from
the
original
process,
which
is
just
standard
logging
procedure
as
long
as
you're
capturing
those
logs.
You
can
then
sift
those
through
this
simulator
whenever
you
want,
and
so
you
can
replay
them
in
the
future.
You
know
whatever
you
want,
so
this
could
also
work
for
test
Suites.
A
So
you
could
run
a
test
suite
and
then
test
files,
and
one
of
its
outputs
is
not
just
like
the
standard
route,
but
also
all
of
the
event
logs,
and
then
you
can
take
the
event
logs,
throw
them
into
simulator
and
then
see
what's
up
yeah,
and
so
we
could.
We
could,
you
know
automate
a
lot
of
a
lot
of
that.
So
and-
and
you
know
this
is
like
a
this-
is
a
virtualization
that
we
that
we
wrote
and
I
think
it
like
choked
for
some
reason
and
like
not
killing
process
he's.
A
So
a
bunch
of
processes
hang
so
I
have
probably
had
like
hundreds
of
outgoing
processes
or
thousands,
but
I
mean
this
is
like
pretty
simple.
You
could
you
could
see
something
much
more
sophisticated
like
a
3d
glow
and
like
all
the
things
on
it
or
you
know
some
other
kind
of
some
other
ways
to
visualize
a
visual
icing
things,
especially
for
pops
up
with
aggregating
trees
and
so
on.
You
could
play
around
with
the
latency
stand.
A
Latencies
could
show
you
like
the
distance
on
between
two
nodes
and
then
you
can
see
the
messages
propagating
through,
and
so
you
could
see
whether
the
like
it's
the
algorithm
forming
the
tree
correctly.
Is
the
algorithm
propagating
correctly.
Oh,
like
this
message
is
getting
through,
but
like
it
through
this
node,
but
not
this
one.
What's
going
on,
you
know
it
would
allow
us
to
do
a
lot
of
that
kind
of
kind
of
debugging,
but
yeah
so
cool.
Any
other
questions.
C
A
Yeah,
exactly
and
and
sometimes
your
model
is
actually
wrong.
So
so
you
think
that
something
is
going
on,
because
you've
you've
thought
about
this
protocol
a
lot
and
you
have
something
going
on,
but
something
changed
and
now
something
else
is
going
on
and
now
not
only
are
you
like
trying
to
simulate
it
in
your
mind,
you're
trying
to
debug
yourself
and
make
sure
that,
like
your
mental
model,
still
correct
so
yeah,
actually
using
a
real
visualization
would
be
probably
better.
A
And,
and
even
in
a
third
case,
which
is,
this
is
a
great
visualization
of
Raft,
designed
by
somebody
else
who-
which
is
so
this
might
be
a
little
bit
more
extreme,
but
part
of
this
is
is
what
we
could
do
like
that.
This
shows
this
walks
you
through
the
entire
algorithm,
and
it
demonstrates
how
it
might
work.
A
Some
of
the
components
here
could
be
used
where
you
could
generate
a
specific
trace
and
then
play
it
back
into
the
simulation
and
then
that
that
way
you
can
explain
how
an
algorithm
works
right
so
for
a
DHD
and
in
helping
to
understand
how,
like
the
DHT
traversal
would
work.
This
would
be
super
nice
because
you
can
just
write
that
and
then
play
it
for
the
person.
Learning
right,
so
it'd
be
a
way
way
simpler
to
understand
how
a
lot
of
these
these
protocols
work.