Hi, I'm Neeraj Murarka CTO and co-founder of Bluzelle Networks
And today we're gonna be demoing Bluezelle databases' Tendermint consensus algorithm and how it works.
With me here, is Richard Nistuk.
On to you Richard!
Thanks Neeraj!
For this demo, I've created a swarm of four nodes on AWS
and I have SSH into each of the servers here,
so we'll start with C00.
I will show you that I've created four validators each with equal voting power,
And we can see that each of our validators:
One per node has a voting power of 100
That means that they have equal stake in the proof of stake algorithm.
That is correct. (Okay)
I'm gonna go over to the fourth Node, which I've called the C03.
(Okay). I am gonna create over there. I'm just going to grab this
and this is our CRUD create command cut using the Bluzelle Client.
(Mm-hmm)
This is the account. I'm using to create the commit or to create my key value pair.
(Okay) Let's called it (a) validator.
It's also it also happens to be the validator for this node.
So it's just a check. It's just simplicity, (and) it could have been any account really
Yes do the to do to create. Yeah. (Sure)
All right. So that is the client telling me what is going to send to the blockchain.
I like that, so I'll say it I'll say yes (validator approves of it and gives the command)
And give it the correct password
It has successfully sent it to the blockchain. I'm gonna grab the hash
(enters) BLZCOI, I'm gonna make sure that everything is ok, just like that (by pasting the hash)
and
Since it uses up all of the screen I'll just take less (to hide some lines)
I'll pipe it to less and I'm looking for "success = true" line. (Okay) I've created a value,
like key value pair.
Now I'm going to show you the incorrect way of removing a node from the swarm,
(Okay) I go over here
I've now SSH into our curium 01 server
And I'm gonna look at the log or I'm gonna look at where I started the daemon
There it is and then go control C
So this is one of the four validators and what you've done is you've turned off the node.
It's not validating anymore It's still expected as a validator.
This node is no longer validating.
So let's go over to another node here and just re-run the validator set
The consensus algorithm thinks that it's still there.
I have not removed it from the validator from the set of validators.
(Mm-hmm)
Okay interesting. Yeah,
and that's only, (that) the node is down. It doesn't mean it's no longer validator.
That's right. (Okay) So let's go over here and let's update
I'm sorry (he clicked wrongly)
Let's go back here (that particular function line) and update
Okay
(Whoops)
Using the same UUID in the same key and I'm gonna say my new value
(Okay) I like that
Alright, we've successfully sent it (Yeap)
we can double check
(Mm-hmm)
(Go to) "Query transaction" (and) grab the hash
Fire it in there (where the function line is)
Remember that it takes up most of the screen there we go, and I've got "success =true"(as a result)
(Okay)
It's on though. It's on the blockchain now. (All right)
Now
So even though the even though we've knocked out one of the validators, one of four of the validators
We still had three validators with a power of 300 (which makes) a total power of 300 out of 400.
The blockchain still works.
Yeap, and that's because you still have your 75% of the validators voting which is more than the minimum required,
which is 66% for
Tendermint's Byzantine fault tolerant supermajority to be reached right?
That's correct. (Okay)
So now I'm gonna SSH into c02 curium 02 (Yeap)
I'm gonna have a look at where I started be BLZD
there
There we go
There we go
And I'm going to shut down this daemon as well.
(Okay)
All right
So these two name is here they've been shut down, (Yeap) leaving Curium C00 and
and C03 (Yes)
All right. Let's have a look one more time at the validator set.
Of course, the validator set still has 4 validators.
It doesn't, (you know) it doesn't tell us that those two have been shut down. (Okay)
Let's go back here and
redo our update .
(Okay) Well just change the value
Okay
So it thinks that the message has been sent correctly,
let's go ahead and query the transaction
Ah, something went wrong.
Let's have a look at the
(At the) the logs here,
Okay, so the network has been stalled
and if I go over to C00
We see the network is still stalled.
(Okay) so these are the two nodes that are still running but their networks not creating any blocks because
They now there's only two out of the four nodes, which is 50% which is not enough for a super majority
That is correct. And so
Blockchain is stalled. (Okay) Then I'm gonna go back to C01
(Mm-hmm)
and I'm just gonna go BLZD, Start.
I'm gonna restart
this node only
(Yeap)
And look at that. He's catching up very quickly
Yes
(All right) That was the first node. You took down?
That was the first note I took down, (and while that node was down)
so he caught up when all our larges was down. (Yeap)
We did a we did a transaction which went through. (Yeah)
So this node now has to catch up. (Yeap)
I am NOT gonna turn this node back on. (Okay)
I'm gonna go over here
I'm going to SSH back into C03.
I'm gonna update it again. (Okay)
Now did that previous update even go through?
Yes, actually, let's check that out.
Let's do a read.
Query, CRUD, Read
and I'm gonna grab (the hash)
That UUID from there
And my underscore key.
This is not a transaction. It's just a query
And there it is, my better value!
Oh wow!
So, actually, the transaction, even though it didn't get confirmed right away because the network had stalled
(It) was in queue and it eventually went through when the network came back.
That's really great
Right, and in fact, let's go back and rerun
that trend that
transaction to see
(after we) redo this cache. There we go.
And we have "success=true" there. Before we've got an error.
Yeah. Fantastic
Okay, cool
so
That's actually really interesting so it sounds like, just to summarize,
we ran the swarm,
we took a node down,
Everything (still) works.
We took another node down, everything stopped.
We tried to do a transaction
(but) it didn't go through.
You brought one node back.
You got back your supermajority and the transaction went through and everyone's happy
So we we can see how consensus works and how that super majority is so critical
Yes,
Well, that's great Rich. I think it's a great demo,
and I hope our viewers have enjoyed seeing this.
It's really revealing.
All right. Thanks very much
