You are on page 1of 1

Cerberus - How Radix achieves infinite linear scalability

while preserving atomic composability

Consensus - Emergent Cerberus 12


So far we’ve covered local Cerberus - how nodes come to consensus within a single shard. But as you
know, all transactions are cross-shard. There must therefore be a way for validator sets to come to
consensus with other validator sets, across multiple different shards.
L ocal Cerberus Em g n er e t Cerberus

es
Y ! Y ! es Y !es es
Y ! Y ! es

es
Y ! Y ! es Y !es

ocal Cerberus 3-chain


L

QC Tx QC QC QC ✓
proposal vertex prepare QC pre-commit commit QC
vertex QC vertex vertex

So we previously explained how nodes The vertices provide cryptographic


following local Cerberus form a “3-chain”.

proof that 2f+1 of vote weight had


voted on and agreed with the
Each “chain” represents the hashes that previous vertex.
tie the vertices together.

We now cover emergent


Cerberus.

Tx

So revisting our transaction, a wallet submits our transaction to a


node, and that node then forwards that transaction to the leaders
for each relevant validator set.


As we are covering emergent Cerberus, let’s see what happens


for two shards:

“Shard 1: Shut down Alice’s Token A substate”.



”Shard 2: Bring up Bob’s Token A substate [Index: 0]”

Proposal Vertex

So in the example below, we show the same four nodes In this example, the hashes for the
for Shard 1 (nodes 1-4); and three nodes for Shard 2 proposal vertices for both Shard 1 and
Shard 2 tie back to the same commit QC
(nodes 5-7). The leaders of each respective shard are vertex from the previous transaction.

nodes 1 and 7.

This is because in our example, we are


shutting down substate representing
The key difference between local and emergent Token A in Shard 1, and bringing up
substate representing Token A in Shard
Tx Cerberus, is that in emergent Cerberus, nodes “braid” 2. The input substate for both shards is
consensus across all relevant shards. thus the same.
#

es
Y !
QC 1 Tx 1 1 QC 1 Tx

commit QC vertex proposal vertex 1


es
Y !

2 2 2
Shard 1 es
Y !

3 3 3
N o!
4 4 4

es
Y !

5 5 5

es
Y !

6 6 6

es
Shard 2 Y !

7 Tx 7 7 QC 2 Tx

proposal vertex 2
. roadcast

1 B 2. Vote
3. Proposal Vertices

So for the broadcast Then, when nodes vote, The leaders of each validator set then
step, instead of they are voting on whether collect the votes for their own respective
broadcasting the the transaction:

shards, and create two separate proposal


transaction to only vertices - Proposal Vertex 1 for Shard 1,
nodes within its (i) sent by both leaders is and Proposal Vertex 2 for Shard 2. While
validator set, each identical
the transaction is the same in these
leader broadcasts (ii) is valid as it relates to vertices, the QCs are different, as they
the transaction to all only their own shard.

represent the votes for different shards.

nodes across all


relevant validator This is because nodes only These vertices both tie back to the same
sets.

have data for their own commit QC vertex from the previous
shard, and so they send transaction, as these are the shut down
their vote back to only the and bring up substates for the transfer of
leader for their shard.
ownership for Token A.

Prepare QC Vertex

For the next phase, the process repeats: the leader of each validator set now broadcasts
their proposal vertex to all nodes across all validator sets.

# #

# #

es
Y !
QC 1 QC 1 Tx 1 1 QC 1
commit QC vertex proposal vertex 1 prepare QC vertex 1
es
Y !

2 2 2
Shard 1 es
Y !

3 3 3
N o!
4 4 4

es
Y !

5 5 5

es
Y !

6 6 6

es
Shard 2 Y !

7 QC 2 Tx 7 7 QC 2
proposal vertex 2 prepare QC vertex 2

# #

# #

This means that every node across every


relevant validator set has a copy of both
Proposal Vertex 1 and Proposal Vertex 2 -
they have the QCs for both shards.

QC 1 Tx
Each node can then merge the proposal
vertices and create a “merged proposal proposal vertex 1 QC 1
Tx
vertex”.

QC 2
When nodes vote, they’re then actually merged proposal vertex
QC 2 Tx
voting on whether the merged proposal
vertex is valid. They then send this vote proposal vertex 2
back to their local leader, who packages
those votes into a Prepare QC Vertex -
one for each shard.

Pre-commit QC Vertex and Commit QC Vertex

The exact same process takes place for the last two phases, where vertices are
merged across every phase of consensus.

QC 1 QC 1 QC 1 QC 1 ar
Tx S h d 1

3 c ai
QC 2 QC 2 QC 2 QC 2 - h n

QC 1 QC 1 QC 1 QC 1 ar
Tx S h d 2

3 c ai
QC 2 QC 2 QC 2 QC 2 - h n

merged merged prepare merged pre-commit merged commit


proposal vertex QC vertex QC vertex QC vertex

As you can see, instead of a “3-chain”, we get a “3-braid”, where QCs and hashes
are braided between every shard.

If we then draw shapes around the vertices, we can see how the merged vertices
intersect with each of the 3-chains. And together, a 3-braid forms.

Em g ner e t Cerberus 3-braid



QC 1 QC 1 QC 1 QC 1 ar
Tx S h d 1

3 c ai
QC 2 QC 2 QC 2 QC 2 - h n

3-braid
QC 1 QC 1 QC 1 QC 1 ar
Tx S h d 2

3 c ai
QC 2 QC 2 QC 2 QC 2 - h n

er e
m g d er e prepare
m g d er e pre-commit
m g d er e commit
m g d
proposal ertex v QC ertex
v QC ertexv QC ertex
v

We can see that within each 3-chain Every node in every validator set
above, every node has a copy of every therefore has proof that every other
QC for both Shard 1 and Shard 2, and validator set had obtained and approved
that every vertex and every QC is the previous vertex, for each phase.

chained to all other previous QCs and


vertices across each shard.

Validator sets can thus come to


consensus with other validator sets and
Progress through each phase they write the transaction to relevant
therefore only happens when the shards in the ledger together, atomically.
leader of every shard is able to obtain If any validator set doesn’t agree with
QCs from all shards. Only QCs need to the transaction, at any phase, the whole
be shared - the data in each shard transaction is able to safely fail.

does not need to be passed around.

S ar Shut
h d 1:
To close the loop, we can now see
down Alice’s
Token A substate
ar 2 ring up
that the nodes across both
in Shard 1 Sh d :B
ob s Token A
B ’ validator sets are able to create the
substate in Shard 2 relevant substates across both
Shard 1 and Shard 2 in a single
atomic transaction, as consensus
was braided.

Shard 1 Shard 2 H owever, our example transaction


doesn’t just involve two shards. It
Y !es es
Y ! involves six!

QC 1
To braid consensus across two or more QC 2
shards, all you do is braid more 3-chains
together.

QC 3
So if you were to braid six shards QC 4
together, each merged vertex would QC 5
contain six QCs, as depicted to the right. QC 6

The cross-shard braiding of consensus in emergent Cerberus is


perhaps its single most important innovation. It’s what allows
transactions to be composed across any number of shards
across the entire shardspace, containing any combination of
substates, with validator sets committing or rejecting all the
substates within those transactions atomically - either all
together, or not at all.

G iven that all transactions are composed and settled across


shards, so long as there are enough shards and nodes to serve
them, there will never be a limit to how many transactions the
network can process in parallel. The lack of composability that
results from sharding blockchains is just not a thing in Radix, as
the network has an almost unlimited number of atomically
composable shards right from the very start. Radix therefore
scales linearly with every additional node added to the network,
without ever adding any friction.

M oreover, one of the key concepts that allows this to happen is


that of parallel processing. In a future where Radix has scaled
to fulfill the DeFi needs of billions of people, the vast majority of
transactions will involve completely unrelated substates,
shards, and validator sets. Those transactions will be processed
entirely in parallel across the vastness of the shardspace
without ever being “aware” that the other transactions exist.

But not everything can be processed in parallel. There must still


be some logic that tells Cerberus when substates are related
and must be composed in the same transaction.

We cover this in the next episode - Partial Ordering.

The version of Cerberus described in this infographic series is scheduled to launch as part of the fully
sharded Radix Xi’an release. Please visit www.radixdlt.com for details on the Radix roadmap.

© Copyright Radix Tokens (Jersey) Limited

v1.0 · June 2021

You might also like