►
Description
The Baseline Protocol team takes you through the code of the v0.1 update.
Previous video: https://youtu.be/0vXoSb5bVks
Next video: https://youtu.be/R0AEww6fKLk
Go to https://baseline-protocol.org for more information.
A
Welcome
back
to
the
version
0.1
baseline
protocol
code
code
walk
we're
here
with
kyle
thomas,
and
we
are
now
into
the
last
of
our
big
sessions
on
understanding
the
baseline
protocol.
V0.1
implementation.
A
To
walk
us
through,
hey
kyle,
we're
going
to
walk
through
our
the
bri
one,
that
is
the
baseline
reference
implementation.
One
code
base
and
specifically
we're
gonna,
go
through
the
base
applicator.
The
base
example
in
that,
so
that
we
can
see
how
you
put
the
the
baseline
protocol
together
baseline
app
or
the
allison
bob
app.
I
think
we've
called
it
before
the
the
official
naming
of
that
is
bri
one
and
that's
where
you'll
find
it
in
the
repo
so
kyle.
Won't
you
take
it
away
and
show
us
show
us
how
this.
B
In
the
baseline
repo
under
examples
bri1
under
example,
you
see
radish
34
and
you
see
bri
one
dri.
One
now
contains
a
directory
called
lib
and
a
directory
called
base.
Example.
Lib
has
a
couple
of
of
directories
in
it
from
previous
erp
connector
demos.
More
on
those
later
base,
example
contains
what
was
formerly
referred
to
as
baseline
app
and
the
allison
bob
demo.
The
baseline
app
class,
as
previously
discussed,
is
now
called
participant,
stack.
A
This
is
alice
and
bob
right
that
that
you
know
so,
in
this
case,
alice
and
bob
are
going
to
be
setting
up
a
work
group
doing
you
know
a
simple
no-op
workstep,
and
so
this
is
kind
of
like
hello
world,
for
where.
B
A
B
If
you
do
that,
if
you
fork
it
straight
up,
you're
going
to
end
up
building
on
on,
what's
called
the
provide
stack
and
the
documentation,
the
bria
implementation
of
the
core
packages
and
the
core
interfaces
provided
by
the
0.1.
A
So
this
is
a
a
point
of
view
on
use
on
baseline,
each
of
the
reference
implementations
and
that's
why
we
number
them
right.
You
have
bri
one
bri,
two,
where
different,
it's
kind
of
like
the
the
ver,
the
difference
between
a
yellow
paper
and
geth
right
death
would
be
an
implementation
of
the
ethereum
yellow
paper.
B
It's
a
little
opinionated
in
that,
like
you
know,
it
provides
gnats,
and
the
implementation
of
the
core
packaging
and
baseline
spec,
essentially
is
is
provided
by
a
couple
of
different
containers
that
that
exist
in
the
provide
stack.
A
B
We'll
take
a
we'll
take
a
look
at
this
at
this
interface
and
we'll
say:
hey
how
do
we,
you
know?
How
do
we
really,
you
know,
you
know,
create
a
standard
around
this,
like
you
know
which
bits
of
this
you
know.
A
But
we're
starting
with
nats
and
and
also
this
happens,
to
be
using
nether
mind
right
as
the
client.
B
You'd
have
to
implement
the
ibaseline
rpc
interface
on
the
client,
which.
B
Yep
and
yep
absolutely
so,
and
then
yes,
you
basically
have
this
docker
compose.
B
That
provides
the
the
stack,
the
containers
that
you
that
are
you
know
that
implement
the
the
core
packaging
and
it
also
provides
another
mine
than
another,
my
client,
so
you
would,
if
you
know,
if
your
code,
if
you
decided
to
implement
in
your
client
the
the
I
baseline,
rpc
interface,
you
could
you
could
you
could
use
your
own
image
here
and
if
it,
if
it
was
compliant
with
the
baseline
spec,
it
would
just
work.
A
And
there's
nothing
wrong
with
this.
In
fact,
you
know
the
bri
one.
Implementation
is
definitely
centric
to
to
provides
implementation
management
tools
that
right.
B
A
Reason
we
should
say
that,
strictly
speaking,
folks
could
could
again,
you
know,
make
another
reference
implementation
that
didn't
include
that,
but,
but
you
guys
did
such
a
great
job
on
it
for
people
that
are
implementing
it.
It's
important
to
note
that
it's
not
there's
nothing
about,
provide
that.
You
know
nothing
about
baselining
that
requires
provide.
A
B
So
if
you
know,
for
example,
if
you
wanted
to
say,
create
another,
create
another
application
before
we
get
into
the
actual
details
of
the
application,
if
you
wanted
to
create
an
you
know,
an
additional
you
know
app.
If
you
wanted
to
create
an
additional
example
or
your
own
app
like
your
own
implementation,
that's
based
on
bri
one
and
how
it
uses
the
provide
stack.
B
You
know
you
could
basically
call
call
it
my
app
and
then
with
I'm
in
the
within
the
I'm
in
the
bri
one
package.
So
now
I'm
in
bri
one
slash
my
app.
I
can
then
do
npm
init,
for
example,.
A
So
now
you're
you're
incl,
that
that's
that's!
That's
a
library
from
the
core.
A
B
Exactly
so
now,
if
I,
if
I
wanted
to
include
the
provide
stack
as
the
other
base
example,
does,
I
could
copy
the
docker
compose
file.
A
A
B
Yeah,
so
basically
now
we've
got
you
know:
we've
stood
up
this
new
project
that
used
that's
imported,
the
baseline,
the
baseline
protocol,
the
api
package
from
the
0.1
release
of
the
protocol,
and
I
and
I've
just
copied
over
the
the
docker
compose,
which
provides
the
the
implementation.
A
And
what,
if
I
wanted
to
use,
say
my
my
own
messaging
service
or
or
a
different
client?
What
what
would
I
do
now
to
to
change
that.
A
To
that
I
should,
I
should
say
you
know
my
own,
my
own
blockchain
or
ethereum
client
right
so.
B
Before
before,
no
it's
the
messaging
package
from
the
baseline
protocol,
however,
before
you
before
you
do
that
you
know,
you'll
you'll
actually
want
to
contribute
a
provider
implementation
so
like
kafka,
for
example,
or
whatever
that
might
be.
You
would
add
that
provider
to
the
core
package
submit
a
pull
request
and
then
that
would
be
included
in
a
release
of
the
messaging
package
and
then
you
would
import
that
package
and
use
it
so
like
basically
like
we
skipped
a
step
here
of
actually
writing
the
kafka
implementation
of
the
imessaging
for
the
imessaging
services.
A
Wanna
would
would
at
would
contribute
that
new,
that
new
code
to
the
core
and.
B
Then
there
would
be
a
new
provider
right,
yeah,
a
new
provider
would
exist
and
then
a
new
like
you
would
basically
add
that
provider
to
the
factory
and
then
you
would
use.
Then
you
would
use
the
factory
in
in
your
in
your
new
package
to
makes.
B
So
then,
now
the
second
question
about
the
the
ethereum
client,
if
you
you
know
you
would
literally
it's
just,
it
would
be
as
simple
as
changing
the
docker
compose
you
know,
nether
mind
is
big.
Partner,
provides
full
disclosure.
B
B
A
So
in
a
client,
baseline,
compatible
or
capable
or.
B
Yeah
and
the
reason
why
it's
just
all
you've
got
to
do
is
swap
out
the
the
image
in
the
docker
compose
is
because
the
rpc
json
rpc,
you
know
it's
it's
just
so
it's
just
json
rpc,
so.
A
B
Two-Party
baseline,
you
know
an
in-memory
baseline
record.
You
have
this
participant
stack
now.
B
Each
participant,
bob
and
alice
in
this
in
this
example
has
a
an
instance
of
the
participant
stack
these
and
if
you
look
at
the
docker
compose,
you
will
see
each
like.
You
will
see
alice's
stack.
B
After
you
see
alice's
stack,
you
will
see
bob
and
bob
stack,
and
so
each
participant
has
a
full
running
set
of
containers.
That
includes
the
containers
that
are
documented.
This
is
an
end-to-end
test,
suite
yeah.
This
has
been
an
indian
suite
that
illustrates
how
both
parties
are
setting
up.
B
You
know
the
stack
and,
and
you
can
see
it
all
in
one
place
it
you
know,
and
so
that's
sort
of
yes,
the
introduction
you
would
set
up
your
own
participant
stack,
so
what
it
does
is
it
essentially
creates
a
couple
of
users.
Bob
and
alice
have
actual
users
within
the
idit
container,
and
then
the
item
container
is
essentially
the
you
know:
an
implementation
of
the
the
registry
of
the
local
registry
interface
and
essentially
like
when,
when
you
register
your,
you
know
your
organization
items
it
automatically.
B
It
uses
vault
to
sign
transactions
for
you
that
end
up
putting
your
organization
in
the
word
registry
contract
on
the
blockchain
once
alice
and
bob
have
users
and
tokens
in
items.
If
they
say,
faucet
is
deconfigured
in
the
on
the
in
f
runtime,
using
an
environment,
variable
called
faucet,
faucet,
private
key
and
faucet
address
are
the
two,
the
two
environment
variables.
If
those
are,
if
those
are
present
at
runtime,
faucet
will
be
configured
which
will
basically
just
subsidize
all
the
all
the
all
the
gas
on
the
on
the
network.
B
B
You
you
could
use
other
networks
very
easily,
but
we've
chosen
robson
because
it
most
closely
resembles
the
the
public.
You
know
maintenance.
So
currently
we
are
using
robson
and
and
if
a
faucet
is
configured
properly,
then
you
will
then
alice
and
bob
won't
have
to
worry
about
having
ether
on
the
rocks
and
test
net.
They
will
just
they
will
just
the
transactions
will
just
be
subsidized
automatically.
A
B
After
the
the
faucets
are
configured,
we
we
configure
each
participant,
so
alice's
participant
is
created,
and
we
can
look
at
that.
B
Maybe
there
we
go
so
it's
just
there's
just
a
utility
director
utils.tf,
underneath
the
test
package
that
that
you
know
allows
us
to
to
bootstrap
a
participant
stack
instance,
and
so,
when
they're,
when
each
is
created,
it's
created
with
a
flag
called
initiator,
and
this
was
done
to
as
a
to
work
around
the
race
condition
in
the
actual
like
syntax
of
of
mocha,
and
how
those
you
know
the
the
tests
are.
B
Actually
you
know
interpreted
if
and
so
that
this
means
that
we
can,
instead
of
waiting
to
initiate
alice
like
when
we,
when
we
invite
her,
we
we
just
initiate
her
with
the
initiate
we,
we
bootstrapped
the
participants
that
her
participants
back
with
the
initiator
set
to
false,
and
what
that
does.
Is
it
just
means
that
that
it's
not
going
to
automatically
set
up
the
work
group
that
will
be
bob's
job
bob's,
like
the
designated
initiator
in
our
example,.
A
You
what,
if
you
put
accidentally
put
true
in
both
of
those
cases,
what
would
happen.
B
B
So
once
we've
once
we've
bootstrapped
the
bob
stack
and
the
the
bob
and
the
alice
participants
back
with
bob
being
designated
as
the
initiator
of
the
work
group
and
alice
being
basically
like
just
having
an
instance,
you
know
set
up
so
what
you
know
waiting
for
bob.
You
know
to
invite
her.
The
actual
the
actual
tests
are.
You
know,
starting
to
start
start
running,
and
so
what
we're
doing
here
is
here.
We
can
go
ahead
and
kick
that
off.
B
You
want
to
run
npm
test,
but
you
want
to
run
it
with
a
couple
of
you
want
to
run
it
with
those
environment
variables
such
that
the
such
that
you
know
the
the
transactions
will,
the
faucet
will
be
configured,
transactions
will
be
subsidized
and
you
will
see
them
on
rousten
all
right.
So
we're
going
to
run
that
you're
going
to
see
the
provide
stack
and
the
nethermine
client
start
go
ahead
and.
B
B
B
So
what
what
we
do
now
is
we
hurry
up
and
wait
for
the
the
transactions,
the
deployment
of
the
work
group?
So
what
we've
done
is
we've
created
a
work
group
in
bob's
local
registry
and
we've
we've
authorized.
You
know
a
a
bearer
to
a
bear
off
a
bearer
token
to
interact
with
that
local
registry
and
that
is
is
affecting
affecting
the
deployment
of
the
org
registry
contracts
of
the
robson
test
that,
but
let
me
pull
up.
A
This
is
a
particularly
big
deployment
to
the
main
to
the
main
net
right,
so
this
work
steps
are
much
smaller,
but
you
know
setting
up
your
initial
work.
Group
is
probably
the
biggest
you
know
biggest
load
right.
B
Yeah,
so
what
you
see
here
like
one
minute
ago,
we
have
a
a
subsidy
transaction
that
was
sent
like
a
0.1
ether
subsidized
transaction
that
was
sent
to
to
bob
and
bob
has
is
now
you
see
this
contract
creation
transaction
that
bob
is
sitting,
that's
actually
it's
actually
the
books,
that's
deploying
it's
actually
deploying
a
contract
that
will
that's
the
order
registry
is
more
or
less
than
being.
You
know,
that's
being
deployed.
B
Yeah,
so
what
you'll
actually
see
is
yeah.
This
is
actually
a
a
contract.
That's
going
to
deploy
the
erc
1820,
and
so
what
you'll
see
is
some
assertions
happening
over
here
around
that
the
erc
1820
registry
was
deployed
and
that
then
the
the
erc
1824
registry
was
deployed,
and
then
you
will
then
it'll
it'll
move
on
to
the
next
part
of
the
test.
B
So
not
not
as
part
of
this
initial
work
group
setup,
because
the
you
know
the
the
evolution
of
the
design
here
is
that
you
may
have
more
than
there's
no
coupling
of
of
the
shield
contract
to
the
work
group
or
the
org
registry
at
all,
and
so
so
it's
actually
not
deployed.
Yet.
As
part
of
this,
you
know
as
part
of
this
initial
work
group
setup.
So
it's
deployed
and.
A
B
A
To
create
different
work,
different
work
groups
right,
so
you
could
create
a
different
workflow
or
different
workflows
right
for
with
with
different
participants,
but
you've
just
got
one
big
phone
book
for
all
the
counterparties.
B
Yep
absolutely
and
then
none
of
those
the
addresses
that
are
stored
in
that
phone
book
are
tied
to
any
on-chain
work
step.
Executions.
B
That's
another
reason
why
the
you
know
right
and
that's
another
reason
why
this
reference
implementation
is
useful,
because
it
follows
that
pattern
very
well.
So
you
see
here
like
we
just
asserted
that
the
erc
1820
registry
contract
for
the
work
group
was
deployed,
and
that
is
something.
A
B
So
it's
a
it's
a
default.
It's
a
default
ethereum
public
address
that
was
created
in
the
vault
with
you
know,
by
vault.
If
you
look
in
those
these
logs
you'll
see
that
vault
created
a
couple
of
you'll,
see
that
that
you
know
a
couple
of
things
happened
inside
of
them.
B
The
default
k1
key
pair
right
here
that
bob
was
created
for
bob
right
here.
This
is
the
this
default
k1
key
pair
it
you
know
the
the
the
public
ethereum
address.
Representation
of
that
key
pair
is
is
the
is
it
becomes
the
primary
key,
as
you
would
consider
like
you
know,
or
as
you
think
of
that
term,
in
the
context
of
like
a
traditional
relational
database
that
that
becomes
a
primary
key
in
the
org
registry
contract
for
bob
corp.
That's.
B
Yeah,
but
no
transactions
you
know
are
ever
should
ever
be
signed
with
that
with
that
key
or
you
will
immediately
be
leaking.
You
know:
identity,
information
on
the
public
function.
A
B
And
that's
that's
another
thing
that
our
vault
implementation
provides.
Is
the
ability
to
prevent
signing
of
transactions
with
certain
keys,
as
well
as
automatically
increment
the
account
like
the
the
non-specifically
or
the
account
index
on
an
hd
wallet,
for
example?
So
that's
another.
Combining
these
two
approaches
is
a
way
to
eliminate
your
leaking
of
information
in
in
the
context
of
the
baseline,
critical.
B
We're
starting
we're
asserting
that
these
keys
were
created,
we're
asserting
that
that
we've
deployed
you
know
so.
Bob
deploys
workflow
privacy.
A
B
B
Once
alice
is
invited
to
the
phone
book,
you
know,
alice
basically
gets
an
invitation.
You
know
that
looks.
This
is
what
the
invite
looks
like
that
alice
receives
after
you,
like
it's
a
jwt.
You
know
signed
by
bob
once
you
decode
that
jwt.
This
is
what
the
invite
looks
like
and
it.
B
This
is,
this
is
just
like
you
could
just
drop
this
in
an
email
and
and
alice
can
click
on
the
link
and
if
you
have
like
some
sort
of
handler
for
that,
alice
can
like
just
any
anyone
any
citizen,
any
citizen
or
or
product
owner,
or
anyone
at
the
organization
could
accept
the
invite
and
the
invite
contains.
You
know
all
of
the
all
of
the.
B
All
the
information
you
need
to
look
up
bob
in
the
org
registry
as
well
as
in
this
case
it
actually
shows
it
actually
says
hey
which,
where
is
the
org
registry,
and
so
now
we
can
say:
oh
there,
it
is.
A
A
That's
a
whole
different
kettle
of
fish
right,
but
we're
in
that
to
come.
Yeah
there's
a
lot.
There's
a
lot
of
work
going
on
in
that
area
for
making
sure
that
you're
you
have
an
attested
and
and
validated
and
you're
confident
that
you're
dealing
with
the
other
the
right
counterparty,
but
in
this.
B
B
Yeah
yeah
and
so-
and
so
here
you
know,
here's
what
you're
seeing
over
here
now
so
like.
Basically,
what
we
saw
was
alice
getting
that
in
you
know,
an
invite
that
looked
like
that.
Getting
and
basically
you
know
accepting
the
invite
setting
up
her
local
instance
of
ident,
based
on
based
on
the
you
know,
based
on
the
details
she
she
got
over
here.
She
was
able
to
understand.
B
Oh
here's,
here's
how
I
connect
to
bob
and
bob
also
has
given
you
know,
given
alice
a
signed
token,
that
alice
can
go,
look
bob's,
messaging
and
point
up
in
the
phone
book
dial
it
up
just
like
point
to
point
and
connect,
and
so
what
you
see
here
is
you
know,
a
connection
where
the
baseline
dot
inbound
that
subject
is,
is
explicitly
allowed
in
the
signed,
bearer
authorization
token,
and
so
there's,
actually
all
you
know,
there's
enterprise
grade
security
happening
in
this.
B
You
know
it
right
right
here
in
terms
of
alice,
presenting
a
assigned
token
that
bob
has
issued
for
her
alice
can
then
pull
down
the
state
like,
like
the
off-chain
sync
of
what
the
work
group
looks
like
store
that
in
her
local
item
database
or
her
local
item
instance
and
on
hers
on
her
version
on
her
stack,
her
participants
back
and
then
begin
interacting
with
the
baseline
protocol,
and
you
see
here
like
here's,
a
protocol
message,
that's
being
exchanged
like
there's
the
b-line,
and
you
know
b-line
protocol
message
being
being
passed
around
between
between
the
parties.
B
Another
exciting
development
will
be
around
when
this
is
is
actually
implemented
as
like
something
that
looks
like
protocol
buffers
or
similar,
and
so
we've
gone
through.
You
know:
we've
gone
through
the
the
test
suite
here.
We
you
know
say
one
other
thing:
maybe
that
was
it
so,
oh,
so,
basically
you
know
here's
here's
where
here's
the
assertions
where
alice's
is
a
local
local
participant
stack
has
the
proper
references
to
all
of
the
contracts
that
she
needs
to.
B
You
know
to
interact
with
the
baseline
protocol,
including
you
know
the
that
an
assertion
that
alice
has
tracked
the
work
group
shield
that
or
that
that
she
has
I'm
sorry,
has
a
reference
to
the
local
work.
The
work
group
field
and
has
tracked
it
and
also.
B
Yeah,
so
so
in
in
the
on
the
ethereum
client,
this
this
off
chain
merkle
tree
database.
You
know
the
the
I
baseline
rpc
method.
Implementation
allows
you
to
call
baseline
track
on
a
specific
address,
and
so
that's
that's,
basically
asserting
that
alice
is
now
tracking
that
contract.
A
B
That
yeah,
and
so
so
alex,
is
basically
what
this
this
this
set
of.
This
set
of
tests
is
asserting
is
that
alice
is
ready.
You
know
to
interact
with
bob,
and
then
this
is
asserting
very
similarly
to
how
bob
you
know.
Alice
has
her
set
her.
Her
keys
set
up
alice,
has
been
registered
in
the
org
registry
contract.
You
see
how
these
on
chain,
these
tests,
that
are
that
are
asynchronous
and
are
sort
of
non-deterministic
in
terms
of
robson's
actual
current.
B
You
know
the
current
block
time
on
robson
you'll,
see
like
you'll,
see
like
a
red
number
of
milliseconds
that
it
took
to
confirm
the
transaction
actually
had
had.
You
know
shown
up
on
chain.
A
Okay,
understood
and
so
now
you're
gonna
yeah.
So
now
you
can
basically
refer
to
the
main
net
or
or
to
the
client
that
that
everybody
is
loaded
up
now.
A
Is
the
question
comes
to
my
mind
that
might
be
instructed
for
people?
What,
if
you
want
didn't
want
to
what,
if
you
wanted
to
be
sure
that
nobody
that
stumbled
across
this
work
group
1820,
could
add
themselves
without
permission,
saying.
B
Yeah,
so
I
don't
think
that's
really
a
problem
to
have
additional
organizations
in
the
registry
contract
they're
just
spending
their
own
money
they're
just
like.
A
B
B
A
A
B
Just
to
add
one
more
one
more
thing
to
that,
like
you
know
as
this
evolves
and
we
and
we
had,
you
know,
identify
a
mainnet
and
like,
for
example,
if
the
ethereum
public
blockchain
is
used
for
the
phone
book,
you
can
see
that
being
like
a
singleton,
and
you
can
see
that
becoming
quite
large
in
terms
of
the
number
of
people
that
are
in
that
in
that
singles
red.
You
know,
contract.
A
B
So
inside
the
org
registry
inside
the
contra
core
slash
contracts
package,
the
org
registry,
the
org
registry
contract-
exists
in
here.
You
know
this
would
be.
This
could
be
like
where
this
is
the
phone
book
right.
So
you
know
you
could
come
in
here
and
and
you
could
make
make
additions.
B
Yep
and
so
one
more
one
more
thing
to
note
here
like
in
the
in
the
actual
code
of
the
test,
suite
is
basically
how
there's
a
shared.
You
know
a
shared
context,
a
couple
of
a
couple
of
them
actually
there's
like
a
behave
like
a
work
group
organization,
so
both
alice
and
bob's
participant
instance,
like
their
participant
stack
instance,
basically
gets
gets
evaluated
here
and
so
like
that's
that's
where
that
is
where
you
see
this
running
right
here.
So
that's,
that's!
B
That's
basically
exercising
both
of
the
participants
and
then
should
behave
like
an
initial
work
group
organization
that
that's
that's
the
initiator,
so
bob.
That's
that's
bob
just
being
being
evaluated
here,
bob's
participants
back
and
since
it
is
and
then
should
be,
like
an
invited,
work.
Group
organization
that
shared
context
is
only
is
only
mr
alice.
B
So
you
see
here
when
we
most
of
the
work
happens
in
the
test
suite
around
these
two,
like
when
you're,
when
we're
actually
exercised
like
we're,
calling
that
into
that
shared
context
and
passing
in
bob
and
bob's
participant
is
back
and
when
we
do
the
same
for
alice,
you
know
and
we're
saying,
hey
alice
should
behave
like
she
got
invited
and
you
know
bob
should
behave
like
the
initiator
and
so
like
that's
when
we
talked
earlier
about
you
know
if
you,
what,
if
you
changed
the
initiator,
you
know,
and
they
had
two
initiators
how
like
how
like
you,
would.