►
From YouTube: CSCON1 - Mina Rust
Description
This is ChainSafe's talk "Mina Rust" from ChainSafe's 3-day virtual summit called CSCON[1] presented on December 1st, 2021.
ChainSafe is a global leader in blockchain protocol and infrastructure development for Web 3.0.
ChainSafe's website: https://chainsafe.io
Get into the code: https://github.com/ChainSafe
Join our Discord: https://discord.gg/CprJHjrWG6
Stay up-to-date on Twitter: https://twitter.com/ChainSafeth
Read through our Medium: https://medium.com/chainsafe-systems
A
A
B
B
Let
me
just
share
my
screen
and
get
set
up
all
right,
so
I
guess
I'll
start
so
my
name
is
lerna.
I'm
the
project
manager
for
the
mina,
rust
implementation
and
I'm
going
to
start
out
by
maybe
giving
you
guys
sort
of
like
what
we're
going
to
cover.
So
if
we
can
yeah
go
to
the
next
slide
a
bit
hard
to
see,
but
basically
I'm
gonna
give
a
quick
intro
of
the
team.
B
Then
I'll
talk
a
little
bit
about
mina
their
history
and
give
you
guys
some
facts,
then
I'll
get
into
the
actual
implementation
that
we're
doing.
Why
we're
doing
this,
and
maybe
why
we're
doing
it
in
rust?
We'll
talk
a
little
bit
about
the
milestones
and
we'll
also
talk
in
detail
about
milestone,
one
which
is
serialization
and
milestone,
two,
which
is
block
selection
logic.
So
those
are
the
ones
we've
been
working
on
this
year.
B
So
I
can
give
you
guys
a
lot
more
insights
on
what's
been
going
on,
and
then
we
can
sort
of
end
it
with
some
questions
and
comments
so
yeah
to
introduce
our
wonderful
team.
We
have
elizabeth
who
is
in
charge
of
implementation,
and
next
we
have
raul.
Who
is
our
team
lead,
there's
willem
who's,
part
of
our
amazing
solutions,
team
here
at
chainsafe
and
two
of
our
newer
devs,
who
have
been
hitting
the
ground
running
high
long
and
shin
went
next
like
this
yeah.
B
So
this
is
a
maybe
like
a
brief
history
for
mina,
so
it
was
founded
in
2017
by
long-time
friends,
evan
shapiro
and
isaac
meckler,
so
they
were
called
code
on
the
beginning,
as
I
mentioned
earlier,
it
sounded
too
much
like
another
blockchain.
So
to
avoid
confusion,
they
switched
it
and
became
known
as
mina
protocol.
B
B
So
if
you're
wondering
how
that's
possible
it's
because
they
use
something
that
we
call
zero
knowledge,
proofs
or
zk
snarks,
so
what
the
zk
snarks
will
do
is
basically,
instead
of
having
the
whole
history
of
the
block.
It'll
take
a
snapshot
which
makes
it
super
lightweight
and
small
they're
consensus.
So
again
they
touched
on
this
earlier
today,
but
it's
called
aurabor
so
mesico.
B
So
it
is
based
off
of
our
boris
genesis,
which
was
the
successor
to
aurovor
sprouse,
and
this
was
created
by
the
cardano
team.
So
I
believe
for
them
it
kind
of
checked.
The
right
boxes
would
have
the
right
decentralization
properties,
but
because
mina
is
sort
of
the
first
of
its
kind
being
such
a
succinct
and
lightweight
blockchain.
There
was
still
a
lot
that
they
had
to
change,
so
they
sort
of
made
their
own
and
then
called
it
samasika,
because
it
means
small
or
succinct
in
sanskrit.
B
A
couple
of
the
roles
I
want
to
mention
is
probably
because
it
sounds
different
in
other
blockchains
and
you
probably
won't
see
something
like
a
snark
worker,
so
there's
block
producers,
which
are
the
equivalent
of
the
validators
and
the
snark
worker
is
the
person
that
provides
that
snapshot
for
you
that
you
need
and,
of
course,
their
source
code
was
written
in
ocam,
so
this
is
sort
of
where
we
come
in
and
why
we're
reimplementing
everything
in
rust.
So,
yes,
thank
you
for
that
slide.
So
I'll
talk
a
little
bit
more
about
that.
B
B
So
it
was
definitely
a
great
choice
and
having
more
people
that
can
read
and
comprehend
the
code
is
great,
because
you
know
there's
more
chances
of
people
contributing
as
well,
so
something
else
that
we're
working
on
this
project
is
enabling
in
browser
environments,
so
rust
again,
is
a
great
choice
because
it
can
easily
target
web
browser
platforms.
It's
also.
It
has
great
tooling,
to
support
syncing
mina
nodes
in
a
browser
with
the
mena
nodes
on
the
network
and
the
the
last
piece
of
work
that
we're
doing
is
we're
building
out
non-validator
nodes.
B
You
can
also
call
these
nodes
non-block
producing
nodes,
so
we're
sort
of
laying
down
that
foundation
and
groundwork
for
when
they
will
at
a
point
want
to
make
block
producing
nodes
and
yeah.
As
I
mentioned,
there
are
five
milestones,
and
one
and
two
are
the
ones
we've
been
focusing
on
this
year
and
we'll
do
the
rest
in
2022,
so
I'll
just
go
through
them
quickly,
so
you
guys
can
understand
what
they're
about
so
milestone.
B
One
is
serialization
so
in
this
milestone,
basically,
we
are
using
something
called
binprod,
which
is
a
serialization
library,
and
this
comes
to
us
from
jane
street,
which
is
a
training
firm,
and
what
we're
doing
is
we're
basically
allowing
two
nodes
to
communicate
with
each
other.
Next,
there
is
milestone
two
milestone.
Two
is
a
block
selection
logic.
So,
basically,
you
are
allowing
the
network
to
know
which
chain
to
choose
when
there's
a
long
range
or
short
range
fork,
milestone
three
block
verification.
B
We
would
be
building
pieces
to
verify
how
to
validate
blocks
and
how
to
I
guess,
verify
transaction
proofs
on
the
mina
blockchain
milestone.
Four
mastermind
four
is
where
we
would
sort
of
store
and
update
the
account
database.
So
all
the
data
will
be
stored
securely,
so
we'd
be
building
out
the
pieces
to
allow
the
mina
nodes
to
persist,
blockchain
states
and
ledger
information
in
a
database.
B
B
So
this
would
also
support
the
submission
of
transactions
via
a
gossip
system
validate
and
support
compatibility
for
those
browser
environments
that
I
mentioned
earlier,
which
would
allow
mina
to
be
accessed
easily
from
pretty
much
anywhere.
So,
let's
jump
to
the
next
slide.
B
Thank
you
so
much
on
one
like
I
said
I'll
start
by
maybe
seeing
what
serialization
and
deserialization
is
so
with
computers
when
we're
talking
about
serialization,
we're,
taking
or
converting
objects
into
bytes,
which
then
can
be
stored
or
transmitted,
and
when
we
say
deserialization
we're
doing
the
opposite,
where
we're
reconstructing
an
object
from
bytes,
so
how
we
actually
did
this
for
our
project.
As
I
said,
we
use
binprod
which
jane
street
developed.
B
So
this
is
coming
to
us
from
the
high
frequency
trading
world.
So
you
know
that
it
was
something
that
needed
to
be
fast
and
robust,
and
what
we
did
is
we
tried
as
much
as
possible
to
stick
as
closely
as
we
can
to
the
reference
implementation
and
make
a
perfect
recreation
of
that
in
rust.
So
we
went
through
a
lot
of
challenges
because
you
know
having
such
a
complex
type
that
has
to
be
bite.
Perfect
is
incredibly
challenging,
so
our
next
step
was
to
use
something
that
we
call
cerde.
B
You
have
to
first
make
sure
that
you
have
all
the
types
already
implemented
and
annotated
with
this
macro.
So
what
we
were
trying
to
do
at
the
time
was
to
implement
the
types
to
match
the
old
camel
implementation,
and
it
had
to
be
perfect
again
because
if
it's
not,
then
your
round-trip
test
would
all
fail.
So
it
was
like
this
massive
challenge
to
have
to
re-implement
everything
in
rust
from
ocamo,
in
a
way
that
the
serialization
would
be
exactly
the
same.
B
B
B
So
there
are
long
range
and
short
range
forks,
so
you
have
to
be
able
to
find
a
way
to
figure
out
which
one
would
be
the
correct
one.
So
we
have
three
main
pieces
for
this.
The
first
one
would
be
storing
and
buffering
the
blocks
received
from
their
peers.
This
helps
in
choosing
the
right
chain
by
sort
of
seeing
what's
being
broadcast
on
the
network,
and
for
this
we
implemented
a
library
that
we
call
the
block
tree.
B
So
the
block
tree
library
will
help
in
storing
the
blocks
that
are
received
from
the
nodes
on
the
network.
Next
thing
we
did,
and
we
are
still
doing,
is
implementing
the
checkpointing
functionality.
So
checkpointing
is
basically
how
mina
figures
out
whether
a
fork
in
the
chain
is
a
long
range
fork
or
a
short
range
fork.
B
So
if
the
fork
falls,
let's
say
within
the
range
of
the
starter:
to
lock
checkpoint
it'll
be
considered
a
short
range
fork,
but
anything
before
the
lock
checkpoint
will
consider
a
long
range
fork
and
in
this
case
you'd
have
to
use
something
that
they
call
chain
density
to
figure
out
which
one
is
the
correct
chain.
B
So,
oh
not
yet
so
the
next
thing
I
will
mention
is
chain
density.
So
that's
the
last
big
piece
of
work
that
we're
doing
so.
What
chain
density
is
there's
a
few
components
to
it,
so
there's
something
that
we
call
the
critical
window.
So
when
you
have
an
epoch,
there
are
different
sections
and
the
critical
window
is
maintained
by
the
chain
and
that's
what
helps
you
calculate
the
chain
density.
B
So
when
we're
talking
about
calculating
chain
density,
what
we're
seeing
is
there
are
different
slots
in
an
epoch
and
there's
something
that
we
call
a
sliding
window.
So
the
sliding
window
will
move
from
slot
to
slot
and
it
will
calculate
the
chain
density
at
a
given
point
in
time
and
storing
the
minimum
window
density
is
what
allows
me
not
to
figure
out
which
chain
to
choose
if
it's
a
long
range
fork
and
the
way
to
do
that
is
the
valid
chain
will
always
have
a
higher
chain
density
than
the
malicious
one.
B
So
that's
pretty
much
what
we
covered
in
milestone,
two,
I
just
you
can
go
on
to
the
next
slide.
I
want
to
sort
of
end
the
presentation
by
saying
thank
you
to
the
mina
foundation
and
omon
labs,
and
particularly
the
people
that
we
work
more
closely
with
that
are
on
this
list.
So
something
that
comes
up
in
our
conversations
is
how
easy
to
work
with
and
collaborative
everybody
is
so
just
want
to
say
a
big
thanks
to
everybody
and
that's
it
for
me.
Jimmy.
A
Awesome
stuff
super
great,
thank
you
for
the
presentation
and
thank
you
tim
for
stepping
up
and
sharing
your
slides.
That
was
greatly
appreciated,
and
so
we
have
a
couple
questions
that
I
want
to
run
by
you.
The
first
from
dante,
is:
were
there
other
other
languages
that
you
considered
like
like,
for
instance,
go?
How
did
you
land
on
rust.
B
I'm
not
sure
if
the
client
considered
other
languages,
but
I
would
say
looking
at
all
the
different
ones.
Rust
is
definitely
like
the
clear
winner
because
of
some
of
the
stuff
that
I
pointed
out.
It's
just
a
really
popular
language,
if
not
the
most
popular
one
in
the
space,
and
it
also
has
really
great
features
for
what
we're
trying
to
build
with
this
project.
A
Sweet
yeah
rust
is
awesome.
We
love
rust.
I
also
love
go-to,
so
we
also
like
that.
So
the
next
question
would
be
do
you
believe
mina
will
be
lightweight
enough
to
run
a
node
on
mobile
devices.
B
Well,
that's
that's
the
idea
actually,
so
there
are
many
different.
I
guess
like
phrases
you'll
see
on
their
website,
one
of
them
is
powered
by
participants
and
I
believe
one
of
them
is
like
a
blockchain
that
you
can
put
in
your
pocket.
So
yeah.
That's
the
idea
to
have
people
access
mina
through
a
phone
and
it
wouldn't
even
need
to
be
a
really
high-end
one.
It
could
be
just
a
regular
phone,
so
yeah
definitely.
A
That's
that's
sweet.
I
love
that
vita
is
I
find
mina
particularly
exciting,
so
I
I
love
this.
Let's
see.
Okay,
we
have
one
more
question
that
I
see
and
it's
do
you
plan
to
have
the
node
work,
both
in
and
outside
of
the
browser.
A
B
B
No,
we
don't.
We
actually
went
through
a
lot
of
different
ones,
but
I
don't
think
we
landed
on
one
so
yeah
fellow
chain
safers
I'll
open
it
up,
see
you
guys
but
nah.
We
don't
have
one
yet,
not
one
that
we
liked
and
also
there
are
a
lot
of
really
amazing
rust
projects
out
there.
So
a
lot
of
the
ones
that
we
wanted
to
use
already
existed
so
so
far
we
do
not
have
a
formal
name.
A
And
also
if
anyone
in
the
community
has
thoughts
on
what
we
should
name
it
hit
us
up.
Let
us
know
we
are
open
to
suggestions.
Well,
lerna.
It
was
awesome
having
you
on
here.
Thank
you.
So
much
for
presenting
I
mean
is
amazing.
You
guys
do
amazing
work,
I'm
stoked
to
see
what
the
future
holds.
So
thank
you.