Day 2: Christian Cachin (IBM Research)
Crypto Valley Conference 2018 · 21 Jun 2018 · 27:02
Christian Cachin of IBM Research speaks on Day 2 of the 2018 Crypto Valley Conference in Zug, drawing on his distributed computing and cryptography research that helped shape Hyperledger Fabric's consensus design. The talk addresses the cryptographic and distributed-systems foundations underpinning enterprise blockchain platforms. It reflects the conference's academic track pairing corporate research with industry practice.
Speakers
Topics
From Crypto Valley Conference 2018, hosted by Crypto Valley Association.
Transcript
[Music] next up we have dr. Christian kasha he was a cryptographer and computer scientist at IBM Research Christian good afternoon everybody thank you very much for the invitation it's my pleasure to talk to you today about hyper lecture fabric as a platform for distributed trust in fact for my background I'm a cryptographer I've done research in cryptographic protocols for almost 20 years at IBM research I've been researchers here in Zurich located halfway between Zurich and
Zook so halfway between the traditional finance world and the excitement of the startup world here at the crypto Valley and in much of the same spirit we at IBM research we're also bridging between the traditional enterprise finance world that has been running hyping computers since there were computers and the modern distributed decentralized world of blockchains yeah I'm not often talking in the CEO track here because I will CEO is leading an enterprise of 350,000 people but in that sense I will
still I'll talk about the way to get these the technology out into the real life before we start with high pledge of fabric I would like to share some thoughts about how to design and engineer systems how the planes that brought some of you here how the trains that brought us here and the cars how they are made safe and how they are built because it's not a coincidence that these systems work so well they don't come out of nowhere in fact they are built based on a sound body
of knowledge how do we build a mechanical system there is of course analytics and analytical theory that this explains how the world works how mechanics work but there also has to be validation empirical validation of your concepts through experiments yeah and even if an experiment looks as badly as the takumin Tacoma Narrows Bridge disaster in the 1940s it's valuable to learn things from empirical experiments in the real life and if you are a mechanical engineer usually you make your system safer by adding by doubling
the weight or by adding another layer of steel or something like this now this is not always possible in the crypto space how do we design rocks this is a similar development we rely on scientific insight and discoveries about the real world how things work but then we need to turn this around into systems into drugs that work that are actually safe to use and for this we need also empirical validation and this is a part of science now medicine has gone beyond snake oil that was another way where people proposed pure oils in the late 19th century because there was no corresponding certification and
validation of the of the standards and the drugs and in that sense medicine has already gone and come along a long way how do we design crypto systems after about several hundred years or even thousands of years of government monopolies in secret dark chambers or black chambers where cryptography was practiced it has become a modern science nowadays since about 40 years where mathematical arguments proofs and sophisticated designs and discussions about designs prevail but interestingly the history of cryptography also has its
snake-oil time in the sense of that in the late 90s when the internet boom was in its full full flux there was a list of frequently asked questions about cryptographic snake-oil software because there were so many vendors who just proposed their own unbreakable crypto system that was so much better than any other crypto system but for experts it was easy to spot why it didn't work out and in fact bruce schneier who's an authority on this kind of thing started to collect a blog and in a blog post in blog posts started to collect many of those examples and as you can see the date on the website there it's a while ago so how do we design a blockchain and I guess you know
the answer that I'm going to give you but I also hear that some of you want to say well Satoshi is white paper it dropped from the sky and it was right from the start and it started the revolution however bitcoin is not technology that came out of nowhere it actually has a huge academic pedigree of methods and techniques that were developed by cryptographers in the 90s it is that Bitcoin showed how to actually use them and it did use them but the safety or security of Bitcoin was shown first empirically because initially people wouldn't really trust
it it's only much later that scientific proofs were constructed for the security of the protocol underlying Bitcoin and so I want to just before we go into high plateau fabric and consortium block chains versus other block chains I would like to just remind you that block chains should also be constructed according to sound engineering principles according to standards according to broad validation of protocols to scientific understanding and to assumptions where we have those assumptions because the security system is kind of difficult to validate you will not even see when it fails yeah it's just that your money will be gone from today or your secrets are going to
be exposed and so in that sense block chains all like crypto systems you can't really design your own system and be secure or sure that it's so much better than that it actually works and it's so much better than other papal systems just because you think it's so much better you need an argument that should convince you and also your users of why the system is secure under certain assumptions and of course you have to talk about the assumptions that underlie this system because if the system fails it only fails once and it's too late and as I said already there are multiple ways to achieve security and to quote Schneider again from the $19.99 website the problem with bad security is that it
just it looks just like good security you can't tell the difference by looking at the product you have to look inside so let's look inside a bit before we go into this there is a paper published in a scientific conference where some of that reasoning is collected and some of the consortium consensus protocols or looked at under this viewpoint blockchain consensus protocols that you are certainly familiar with they are they coming to in to families yeah yeah there are the so-called permissionless protocols or decentralized block chains where everyone can participate
originally the vision of bitcoin was that one CPU had one vote as if was as if every user had only one CPU now it's turned into a huge mining business that keeps the Bitcoin blockchain and all the other proof-of-work block chains secure and indeed you invest work to vote in those systems and to govern the system as well and if you can't reach consensus well then what happens more recently is that these block chains split it's not based on the traditional voting protocols because it has this very interesting feature that everyone can
participate so in that sense it survives censorship there was all the original gold such that nobody could be there to turn off the system and it scales the protocols themselves had a nice feature that they scale to thousands of nodes that they are resilient to particular influence of individual nodes but on the other hand as a drawback they will take minutes seconds to minutes in order to make to reach a decision in a consensus instance and that is actually a drawback for your blockchain if you want to scale it it also requires a huge energy investment
because the interest in the system that's usually coupled with a coin has brought prices up such that many people are interested in in contributing to it and so today live recent estimate that I checked was that the Bitcoin blockchain alone consumed more like more electricity than all of Switzerland and it's only rising I mean the Bitcoin energy consumption so these protocols are the one hand they are usually coupled to cryptocurrencies they were constructed with the traditional more traditional Byzantine fault tolerant protocols that go on to this name because they were studied in computer science as abstract items for
decades where voting is based on votes by nodes who in this in the internet world they need an a public key that identifies them so in blockchain world we usually talk about a defined group of validators that makes these decisions and they these protocols follow the established design principles that we have developed in the literature on distributed systems and crypto sand cryptography many variations of this thing is possible because some people object to those systems that there is one person who set this all up this is not the case it's just that the incentive to participate has to be
resolved differently has to be organized differently instead of a coin that is inherent in the other protocols here it's usually a more traditional organization that sets this up but once such a system runs you can change your influence through the protocol you can change the group you can admit new members you can kick out members just like a group in real life would do these protocols have also been studied as I said for a long time and it's instructed to look at the research history of those of such protocols in the 80s from the 80s until about 2000 there were lots of theory papers on the
problem but no implementations whatsoever the only theory tissues looked at this at this problem some systems made it to the real world but not the ones that tolerated actual attacks only those protocols where crashes would be tolerated Paxos is the name of such a protocol and then in from about 2000 till 2010 there was a lot of research in the computer science systems departments where people build such system tested them out but never exposed him to the real life never exposed and in the wild because whenever we wherever event and I was part of this too people wouldn't have an application for those systems yeah and so we stopped
developing this until a few years ago when the blockchain came along and we now found out that people were actually interested in this security assumption and along the way here is a link to a picture of a textbook that I have contributed to as well where we describe such protocols if case you want to know more now these protocols as you probably know also they are very well understood from the theoretical viewpoint also they can reach thousands of transactions per second even in light area networks and that's an important feature that they have certainly for enterprise applications is that the decisions that you to protocol reaches their final
you'll never have to revert this if the miners lose interest in your blockchain and it can also not be that somebody mounts as easily as in other some anonymous entity mounts a 51% attack on your blockchain like this on the other hand the No drawbacks of these protocols are that they will not run among thousands of knows who have an influence but then contrast this with the Bitcoin network where a few big mining pools are ruling today this is actually not so much of a different perspective now I will not talk more about hyper ledger and hyperbolic fabric hyper ledger is a consortium or actually is a it's project organized by the Linux Foundation the
Linux Foundation is of course responsible for Linux the biggest open source project in the world I pledge was founded about three years ago more than three years ago by the Linux Foundation knowing two and a half years ago to focus on enterprise business enterprise applications of blockchain and hyper ledger fabric is a particular platform within developed within the Hyperloop project there are more than one such platforms being built and developed by hyper later in fact there are five frameworks and five tools at this time that are all developed by hyper ledger including fabric sawtooth I Rojo indeed
that you heard before in the identity track in the identity session which concentrates on decentralized identity and here all the members of the hyper larger project but which is to say that these are companies who sponsor the governance but the development is really open source and it's like all the other open-source projects there are some people who are maintained errs and they are actually making the real decisions so hyper let your fabric to come to this now that's one of the enterprise blockchain platforms it's a distributed ledger framework for block chains initially it was developed it was started to be developed at IBM and also we indirectly made key decisions for
this we have been sort of in the driving in the driver's seat for this for several years now because we have expertise in the zurich research lab on cryptographic protocols consensus protocols and security architectures you can find technical data in a paper that sided here or on the website in the documentation suffice it to say that fabric is a platform for running smart contracts for enterprise applications and it does not have a coin the design feature of fabric is that it departs in a radical way from how existing blockchain platforms and many other such systems are built traditionally if you go to the to the
class and if you also read the textbook on how to build consensus among mistrusting node in a distributed system you will hear that oh we need a protocol to all the requests to sort the transactions and then once this protocol has decided on this order each individual node or tier in the system will execute the transactions individually this requires of course that transactions are deterministic and if you heard about that from etherium it is indeed the case that this shows this must be and then each peer updates the state individually on its own this is a design principle that had been used from the 1990s onwards and also our first version of fabric used this design and
here's a picture of how this looks like mainly every single payer runs every smart contract and participates in the protocol at the same time that of course has certain limitations in the sense that if somebody runs a transaction on this blockchain and it takes you ten milliseconds to execute such a transaction then all the peers will have to execute this and your blockchain will not deliver more than 100 transactions per second because after all you have to run each transaction for 10 milliseconds and there are not more milliseconds available and so this is the design that most that all other systems use so far and in fabric now we've recognized that
not only the replication to all nodes was a limiting factor the scalability was a limiting factor also the fact that the detailed operations had to be deterministic that's the problem that we saw in many cases because we had a protocol we had a pbft implementation compared to consensus protocol implementation and then our users told us you have a bugging consensus yeah we have a fork we have a state that diverged and every single time we went back and asked it turned out that they had programmed their smart contract using some non-deterministic programming language constructs such as iterating over some programming language construct
so it's hard to get programs right deterministically and another item here is that the trust model is sort of not flexible enough because you have all nodes more or less in the same weight all the nodes have the same weight on endorsing and validating the correctness of transactions as they have in the consensus protocol and that doesn't have to be because you can have a smart contract that is more important for some nodes and another one that's more important for other nodes and so we change this to the different architecture that you see in fabric ly-one and it's described also in the in the research reports that I pointed to where we first execute the transactions in of a particular smart code only on
those nodes that are relevant for this mod contract so you can define that a certain smart contract has to be endorsed so we call it has to be endorsed only by a certain subset of the nodes and the other nodes they will get all the state updates but they are not responsible for endorsing transactions and once we have executed the transactions the the non-deterministic ones will have filtered out themselves automatically in a certain way because they couldn't be properly endorsed if the endorses couldn't agree on what the state was we are ordering through the consensus protocol only a static representation of the output of this execution in a way we are just sending the effects - distort data as a database
jargon the in the database job this is called a red setter in the right sett and indeed this uses certain these ideas from replicated databases and then after this has been these transactions have been ordered there is a simple validation step that I think that's much faster than running this mod contracts transactions that every node every peer in the system executes so that's how the picture looks like now for the database for this sorry for the for the fabric blockchain with selective endorsement by peers that are defined for the blue smart contract only the nodes the peers that run the blue smart contract are responsible for endorsing it and the ordering itself is taken care of by a separate ordering service that's
completely stateless and agnostic the blockchain but again gives you the flexibility of defining a different trust model now yeah I don't really talk my talk about all these details but it's clear that if you invoke a transaction you first go to these endorsers the doors is compute the outcome of the transaction which is speculative at the moment then that's going to be ordered by the consensus protocol and if somebody wanted to spend two coins in different ways as a double spending then the mechanics of the conflict checking in the infrastructure will prevent this consensus as I said is modular so we have a couple of different implementations of consensus protocols
the easiest one is called solo order which we use for development but actually the ones that's in production now is a crash tolerant streaming platform we have a research prototype with a PFT platform and they are currently developing a pbft based variation to replace the research prototype for for ordering so now we get to tolerate malicious insiders in the blockchain there here is a picture for own performance that we reached in an experiment across several data centers varying the number of peers up to about a hundred and the lines that you can see that that performance sort of decreases the throughput decreases from about
3,000 transactions per second to 2,000 this or this is an experiment that ran over a couple of different data centers the other where the performance remains performance remain linear that's was done in the same data center with a Bitcoin like workload of a simple cryptocurrency now fabric has Diplo has been deployed in many systems already has been available has been made available as a blockchain as a service not only on IBM's cloud but on Amazon's Cloud Microsoft clouds for Oracle's in any other cloud I I mentioned here which gives us a good feeling in few competitors run another platform on
their clouds it has also been at the core of many new business ventures that were started such as the consortium on trade digit global trade digitalization and blockchain by IBM and Maersk the Danish shipping company where the idea would be that exporters terminals ports shippers would connect their data and interact through a blockchain of course it's also available on the IBM cloud and here's some details on what's running in terms of hybrid fabric on the IBM cloud the IBM blockchain platform is an integrated data and integrate the blockchain service platform it combines combines a development tool called hyper
logic composer which is also nicely works with high polish fabric smart contracts and the cloud platform itself provides Enterprise secure enterprise security features that you've want actually to use to secure your your money such as hardware secure module hardware security modules to God private keys this is technology that available among others on IBM Linux one servers that are very well known already to power traditional banking infrastructures now of course you can object to the blockchain as a service model and say well if blockchain runs on a cloud service provider isn't this cloud service provider a centralized
trusted party and to some extent you're right but to another extent you can wonder whether this cloud service provider not owned supplies electricity to your computers but now just supplies compute cycles to your computations in the sense that the cloud service provider just supplies the cycles yeah and that has no interest whatsoever to disrupt the whole system yeah and that's new forms that stand between the extreme of totally decentralized and centralized systems that we have seen in the past current research directions very briefly what are we working on in the lab now we are extending building and developing
mechanisms for more privacy to add parts where state can be stored but doesn't have to be shared as uniformly as it was as I explained before we're also building libraries incorporating zero knowledge proof for asset transfer such that you can trade with assets on a high plateau fabric blockchain and have as much privacy guarantees as the Z cache cryptocurrency would have and the mechanisms there are similar but not as expensive and also as you heard earlier we are building a lot of tools for anonymous credentials authentication
that we are building in there and last but not least we're also experimenting with secure hardware technology Intel form in the kind of Intel SGX where we are running smart contracts hypolita fabric with an int within an Intel is GX and clave to God privacy secrets yeah so I'd like to conclude mentioning again that blockchain is about distributing trust on the Internet hybrid fabric includes a lot of sound engineering principles that I hope to convince have to convince you that this is a better way to build a system than something you don't really understand hi
Petra fabric is currently the most advanced enterprise blockchain form out there and it's driven by innovations from IBM research here are some links we are also supported in a European Union research by with other academic colleagues here are some links that you can look up more and that's it thank you [Applause]