In today’s episode, I met with Robert to talk about the fundamentals of DFINITY and why it’s one of the most promising blockchain projects.
It’s another beautiful morning. And I’m headed to Zurich to work with Robert from the DFINITY team.
I just finished an essay that I had to send in and I was two days behind the deadline. And I realized there are still moments where I struggle getting stuff done. The number one thing that helps me make progress is if I don’t try to make it perfect but if I just try to make the first draft and then send that to someone for review.
In this case, Elena was a great sparring partner. I wrote an initial version, sent it to her, she did a rewrite and then sent it back to me. And I could do the final rewrite. So having this iterative process really helped me and I think it’s something that can help with any kind of challenge. Whether it’s writing a business plan or coming up with this strategy for how to invest or planning a trip.
I think this MVP thinking – just get a first rough draft out there and then have someone else go through it and then get it back – it’s really powerful.
So this right here is Paradeplatz which is kind of like the center for banking. This new crypto co-working space, it’s just a few hundred meters away from it.
We’re at Trust Square which is a co-working space for blockchain companies or companies that are close to a blockchain or crypto space. It’s on Bahnhofstrasse, one of the most famous streets here in Zurich.
Today I’m here with Robert… who is our researcher here in Zurich. I always enjoy sitting down with him because he has capabilities to really drill down on theory and algorithms and really figure out stuff that I can’t.
What is DFINITY?
I want to use this opportunity to talk a bit about DFINITY – what it is and how it’s different from everything else that’s out there. In general, DFINITY could be described as building a world computer. So it’s not just a currency, it’s not just a token but it’s in first priority a platform to build and run applications. And we’ll talk a bit about what that means and what makes that possible.
How is consensus in DFINITY different from most other platforms?
Robert: So most other platforms are based on a simple chain-based system where miners build blocks and after a certain number of blocks, the transaction that was included in a block that got confirmed, like, 10 times can be considered as final or as probably final.
Whereas in our system, with DFINITY, there are not only miners who build blocks, there are other roles in the system like notaries. The notaries come together and they notarize blocks and once such a common notarization has been produced on a block, the block has higher trust in it. And we can prove in our system that with two notarizations plus a small delay, the block can be considered as final so it cannot be reverted.
Cédric: Among other things, what that means is that wherein Bitcoin finality is “probabilistic” – often people say six blocks is reasonably secure that the transaction is actually final which means anywhere between an hour and about two hours, right? With current block times? In DFINITY, that time is much shorter because after just two confirmations or two blocks we have absolute certainty that the transaction is final.
So DFINITY is not live yet, we’re working towards a launch as we speak. But that’s going to happen within the next few months.
Based on the test net and calculations that we’re currently running, what is a block time that we can expect?
Robert: I think we can expect a block time of around two seconds. We have to test it in the real world but we have already achieved one second block time in our test environment. With two seconds, if we say that we need two confirmations and some delta or some delay after it,
we can achieve finality after five seconds.
So that’s compared to Bitcoin where it’s between one hour and two hours and what’s commonly accepted finality time on ethereum?
Robert: About 10 minutes. They need much more confirmations, they need 40 or 50 confirmations. But they have a much smaller block time than Bitcoin so they are faster than Bitcoin.
Cédric: So Bitcoin is about one to two hours, ethereum is about ten minutes and on DFINITY finality time will be somewhere around five seconds most probably.
What are other big differences? One of them is our consensus mechanism which is considered to be a proof of stake algorithm versus proof of work. Proof of work means that in order to determine who signs the next block and gets the mining reward solves the riddle. Whereas proof of stake is a newer concept and not as easy to achieve.
How does proof of stake work in DFINITY?
Robert: With a proof of stake system, you have the problem of how can you determine who should be the next miner – who should create the next block because that process of choosing the next miner should be unmanipulable. And in DFINITY we have a system called Threshold Relay where we have a random beacon which creates a source of randomness which is unmanipulable, unpredictable and at the same time deterministic. And this allows us to get a list of block producers for every block round which is completely random.
Cédric: When I talk about proof of work, as an example I used something like Sudoku or Rubik’s Cube, meaning it’s just some sort of riddle that a lot of people try to solve at the same time and it’s kind of random who solves it first. Because the assumption is that everyone has similar capabilities and that’s how it randomly chooses this one person that signs the block.
Is there a simple analogy for how this Threshold Relay or random beacon works?
Robert: A group of our nodes – they come together and each of them creates some sort of special signature on the previous output of the random beacon. So these are like some nodes that are pulled together and that are aggregated and at the end, you can create one unique result. 200 of these 400 nodes creator signatures, you can put them together every result is random.
It cannot be foreseen who these 400 or 300 nodes will be because only the first 200 are needed to get to that signature and so it’s not deterministic what that signature will look like? Or it’s not predictable for anyone?
It’s deterministic because it doesn’t matter which 200 or which subset of 200 nodes will create their signature shares. But it’s unpredictable because, unless you control these 200 nodes and their signature shares, you cannot foresee what will be the result.
How is DFINITY able to achieve such a short block time?
Cédric: And that’s a very handy property for DFINITY because it also allows us to run the consensus mechanism only on a subset of all nodes. In this example, up to 400 nodes that are part of this signature group. And that also means that fewer clients are involved in creating the next block than the whole network. And I think that’s one of the reasons why we’re able to achieve such a short block time versus ethereum or Bitcoin where essentially the whole network has a chance at creating the next block.
Robert: There are other systems like the classical Byzantine fault roll and tolerance systems which run a full Byzantine consensus protocol for each block. But they have the problem that they cannot be executed by 400 nodes because it would be too much information that should be sent around. So in our system, we can achieve that much more efficiently with our threshold signature scheme which is very lightweight. And it’s not an interactive protocol with five rounds where everyone has to send a message at a certain time. It can all be sent in a chaotic way and then aggregated together.
Why is DFINITY different to Ethereum and Bitcoin?
Cédric: That’s the number one differentiator of DFINITY – it’s a new consensus mechanism that scales a lot better and it’s a lot faster than what we’ve seen in other proof of work based systems – most dominantly Bitcoin and ethereum.
The other key differentiator of DFINITY is that you can run applications on top of it that are more powerful than what we’ve seen on other systems. What’s one of the key ingredients to making that happen?
Robert: To make the system really scalable we will eventually need to create a sharded blockchain where multiple chains are built at the same time. For that, we will need a system of cross-shard communication which makes sure that shards can securely communicate with each other. And we also need a system where transactions can be executed atomically. That means if you want to book a hotel and a flight, then you would either want to have both booked or neither of them if one of them is fully booked. So we need a system that ensures that even with cross-shard communication. But once you have achieved that, we can scale up to much more computational power than a single-sharded system like Bitcoin.
How do I get my application to run on DFINITY?
Robert: So we have this model called actor model where every smart contract or decentralized application is considered as an actor in the system. And actors can communicate with each other asynchronously by sending messages to each other. Everything can happen in parallel which makes it much faster to execute all these actor codes on a single CPU because they can run on multiple cores at the same time.
So basically you, as a developer, will create an actor, also create ports to other actors that can communicate with you, with your application, and you can also create ports to external actors like end-users or other applications that are not deployed to the blockchain.
Cédric: And maybe the last point that we want to cover is these actors are written in something called WebAssembly.
What is WebAssembly?
Robert: So WebAssembly is a framework that was developed for web browsers like Chrome which allows you to run programs in your browser. The idea is that you can use any high-level language if you have a compiler that compiles your code written in any language to WebAssembly when WebAssembly is also optimized for speed
Cédric: So that means if I’m already proficient in C or in Haskell or any other language that I know really well, as long as there is a compiler from that to WebAssembly, I can write in my existing language and then just compile it to this WebAssembly byte format?
Robert: That’s the idea. You shouldn’t rely on or be restricted to one specific language like in other blockchains. You should have the freedom to choose which language you want to use.
Cédric: Cool! Thanks, Robert, for your inputs and with that I think we’re going to wrap up. So I think there are a few key benefits to DFINITY. Number one is the much faster and scalable consensus mechanism, kind of at the ground layer. And then on the application layer, DFINITY uses WebAssembly which allows you to use your existing programming language to write your applications and then compile them into WebAssembly.
And with we’re back to work.
A framework for how to reflect on your month or year
So now I’m headed over to the Fawkes meeting, to my EO forum. We meet once per month and we always start the meeting with a monthly update where we update each other. How this past month has been. And the way we collect this is on paper. It’s a matrix – personal best and personal worst; business best and business worst; friends & family best and friends & family worst.
And then we collect three columns. Number one is what happened? Why is it significant? And last – emotions. That’s a great way to reflect on your time in your past month, communicate that to others. And from that, the idea is always that it will be your best five percent and your worst five percent. From that, we then become conscious of what our presentations should be about the next time.
So the presentations that we’re going to have today are another part of this forum meeting. Those were decided by the monthly updates that we had last month. And then you go through coaching and so we’ll do the same today. We pick topics that we want to go through next time.
Hosting our monthly EO forum on… a boat
If you’re looking for a way to reflect on your month, I think it’s a pretty simple but effective scheme. And with that, today is a special one – we’re on a boat for this first part of the EO meeting. And we’re going to drive on the boat from Zurich to almost the other end of the Lake of Zurich. Because one of our forum members has a boat and the weather is gorgeous as you can see. And so we’re going to enjoy a nice boat ride.
Beautiful location. The only thing is I my hay fever is starting to kick in again. I’m going to have a quick dinner and then going to head home to have another call at 10 p.m. So roughly an hour from now.
You can listen to the audio version here: