Dan Hughes Profile picture
27 Mar, 15 tweets, 5 min read
Throughout the day a few folks have correctly noted that there are indeed hybrid consensus platforms such as $dot #symbol #eth2 & others.

However there's a subtle but important difference in #cassandra that perhaps warrants "hybrid" as the incorrect term.

Clarification then...
As far as I understand, these solutions are essentially two separate consensus mechanisms.

Probabilistic to perform state transitions, with deterministic to finalise the best version of the former.

It works & does the job required, so why is #cassandra different?

....
Think of a hybrid car. There is a petrol engine & electric motor working together to move the car.

They are 2 separate systems & are open loop, one way. The engine if needed can generate electricity for the motor, but the motor doesn't produce anything useful for the engine...
#cassandra is #petric (or #electrol whatever) & is not two system, but one with the best of both in the true sense. It also NEEDS to be as will become clear which hopefully results in a nuanced #headplosion on the realisation.

So what's going on?
First we need to understand what a typical transaction flow looks like.

1. A transaction is presented
2. The transaction is executed
3. The transaction is final (whether success or failure)

The produced primitives are state & atom certificates, remember these!

...
Our transaction is in the network & validators are producing a tree of blocks. They are also voting on the best branch of that tree. The blocks contain atoms & atom certificates.

When a branch has 2/3 vote power it is committed. Here is the first subtle difference...
Say our transaction is in block 2 of a 4 block branch being committed. No state referenced by our transaction has changed yet. It has simply been agreed that the network will attempt to process the state transitions in our transaction.

Let's call this consensus step A

...
Step B is where the state transitions are executed & produce state certificates. State certificates are formed from the state output votes from validators. A state certificate also needs 2/3 agreement.

Step B is super special as we'll see later.

...
At step C our transaction is executed & an atom certificate is formed from all the state certificates.

At the point of atom certificate creation there exists a contradiction proof which ensures safety (important later) but our transaction is NOT final yet... Why?
Remember blocks contain atoms AND atom certificates. The atom certificate for our transaction isn't yet in a block, nor can it be considered committed even though there are 2/3 agreement.

Let's assume that the certificate is included in block 6...
Upon there being 2/3 agreement on block 6, aside from that being an agreement of which atoms to process, it also provides evidence that 2/3 of all validators have seen our atom certificate and will commit to the state transitions.

...
As you can see, the probabilistic phase (generating blocks) & the deterministic phases (agreement on things) are dependent closed loops. Which makes #cassandra a very different beast.

So why all this effort? I refer back to step B & the state certificates.

...
In a sharded ledger state will live in different shards & until it is agreed in the local shard what will be processed next, the local validators don't know what state they will need.

Further, because other shards may be latent or currently busy, step B MUST be asyncronous

...
Other shards will also be sending state certificates to each other at step B & an atom certificate can not be created by any shard until all state certificates are received.

Step B is where #cerberus lives.

#headplosion right?

Wait there's more...
The fact that step B is asyncronous & that there exists a contradiction proof for atom certificates means that all shards can commit the atom certificate at step A at different times but remain atomic.

Pheew!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dan Hughes

Dan Hughes Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @fuserleer

27 Mar
One key area of research I'm doing with #cassandra is testing hybridization of deterministic & probabilistic consensus models.

Successfully doing so would provide an almost "best of both worlds" type model.

...
Probabilistic (#nakamoto) has strong liveness guarantees but is never really safe.

Deterministic (classical) guarantees safety but is difficult to resolve both liveness and safety issues. Usually requiring some #godmode
The #cassandra approach has 2-phases.

The 1st phase is probabilistic promoting liveness to a strong guarantee.

The 2nd phase receives the output of the 1st phase and produces a classical 2f+1 safety threshold.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!