ETHParis Getting Started with Quorum
ETHGlobal·Wed, Oct 9, 2019, 12:00 AM
ETHParis hackathon workshop: "Getting Started with Quorum" March 9, 2019 at 42, the coding school in Paris, France.
Transcript
fantastic okay so my name is Peter and I work at JPMorgan on the core and platform hopefully some of you would have heard of it before for those of you who haven't I'll give a quick overview of what quorum is and what it offers and I'll give you a demonstration on how you can get set up with quorum quickly and easily today if you wanted to okay so quorum we've been around for three or four years now since the start of 2016 we were Fork if they go a theorem client what we were aimed to do is add enterprise based features on top of blockchain which is a people most public book trains have data requirements load throughput we aim to solve these issues today so you know we look at 2016 we look back and we thought okay what options are available and your theory in platform we really stood out and so you know we started on there and we haven't looked back ever since to be honest just to give an overview of huge using it today so there's some a big one could take organizations Santander big bank providers and startups or even looking at quorum you know what what does coin offer and can we use in yes people are using it in production today so what is cool so coin is made up of four big features on top of aetherium so we aim to introduce privacy so permissioning fair is consensus mechanisms as well as high performance so for privacy we aim to only allow the participants who should be have access to a contract or transactions to actually see what's going on there so not everyone should be able to see what's happening and you know we can't even store encrypted data on the chain which is what a lot of solutions these days are doing permissioning so again we work for an EPS or enterprise environments so for permissioning you know you want to know who you're interacting with even if you don't trust them you want to know who's there who can see what information is publicly available and you don't want anyone to come into your network configurable consensus so I'll go in more detail later but you know barry's consensus mechanisms provide pros and cons such as high throughput or low latency or scalability and so you know we give users the choice of what they want to do and lastly is performance so I mean there's a lot of work in a theorem at the moment for improving performance we have solutions that we have today usually related around consensus but you know we're always looking to improve that as well and that's it I've still got a theorem on here so you know a theorem was the starting point for us and you know we still yeah benefits of what we have today and we are we want to give back so the community you guys really the biggest part of what quorum quorum is today right so you know we do have some bounties which I'll go through later but you know we do need to give back to the community where you do appreciate that so technically what is cool so quorum started out as a modification of Go etherium we've added some modifications on top to enable you know high performance privacy and to enable the privacy we have a what we called a private transaction manager which is separate to the gift client and what this transaction manager does is it is it holds the encrypted payloads of chain and distributes them point-to-point between the participants who are party to those transactions and passes back a hash so hash is what is stored on the chain for for witnesses by other other members we do want to keep up to date so we are currently on 18 one eight twelve we won't be on one eight eighteen and we know there are a few updates to get after that so what you have available for public is a room today it's usually more or less available for quorum as well one of the fantastic things about chrome is because it is just it's not a whole new application it's a fork an existing application you know a lot of the tools work out of the box without modification so remix meta mask truffle block explores you might be using usually work out of the box without any any need for any modifications which is you know a fantastic thing okay so consensus so corn provides three different consensus mechanisms we have a proof authority raft and IBF t so POA for those familiar with guess is just click which is you know yeah it's a good it's good for public blockchains but for enterprise solutions you want finality guarantee so finality is a thing that's often crops up and for especially like financial institutions you know you can't be reversing transactions so finality is a big thing which is what raft and ibf t provide raft is there are high throughput and low latency solution so it's a crash fault tolerant solution based on the etcd implementation for those familiar with that company and offers transaction finality high high speed and low latency and it's meant for really small permission networks so one of the things that raft is that you need all the participants to know who else is in the chain so a scaler has scalability issues but allows you for fast transactions IBF T on the other hand is almost the opposite so it's simple Byzantine fault tolerance has a has a set of validators in there and then participants for the rest of the chain so there are a few block breakers and then everybody else can submit transactions so because there's only a few block makers and it has the same sort of scalability as proof of work and the you know networks can scale to sort of thousands or tens of thousands of nodes just fine but it also offers transaction finality which is one of the big things I mentioned earlier and today that I'm sure a few companies using it earlier but there are over 2,000 networks running idft today cool so I mean as I say we've been here for years and we've done a lot in that time and we've seen a lot happen by you guys but there's still a lot more to go so I'll pick up a few key ones here so privacy so we have a POC with a Z cache to do zero knowledge proof and we really want to get that you know in production and cement in take it out the pssh this year private contract extensibility allowing users to come in after contracts have been created and interact with them as well as private state consensus so you have the public state of the chain you'll have to provide its same but there's no consensus over that private state which for some scenarios is really key performances as well you know performance isn't still quite what we want it to be it's a lot better than what you might find with other solutions but there's still a lot more to go so as far as performance goes you know transaction paralyzation there are public VIPs for this as well and that need to know go through a bit more process but you know we're looking into that as well and we'd love to contribute you have optimizations so you can always make what you have faster as well as you azzam so you azzam is a big thing coming up and as I gets introduced we'll be looking to take that on board as well a last thing is touring so one of the big things about enterprise blockchain is it could be difficult to set up and anything that lowers that barrier into entry means that more people are going to start using blockchain so yeah the better tooling we have especially sort of one-click deployments are fine you know existing databases so you know people want to store the data in the way that they want we want to allow that monitoring and logging you know network health particular node health things like that an identity management towards identity is a big thing you want to know who you're interacting with a lot of like know your customer requirements require that ok I'm gonna go through how to set up quorum and I've got some links here so cool so if you go to the JPMorgan get up we have a repos here some of them blockchain related some of them not but coin is what you're looking for in Tesla if you want to install it yourself and but I won't be going through this coin examples project yes I got oh yeah yeah sure no worries cool and so this once these have been installed we have this cool examples repo which allows you to set up a network analyzer quickly with seven seven notes so you can send transactions between them and we have some instructions how to set up I mean I'll be going through these now as well so cool so once it's all cloned I'll start from the very beginning okay yeah so this is the starting point so we have a very good file if you are that way inclined there's a docker compose file if you want to start a docking network or if you want it straight from the machine which is what I'm going to do and then I saw that files here others they be provide three different consensus mechanisms so we have raft Istanbul and so here click so setting up the network if you don't want to do too much work simple it's choosing which consensus mechanism you want I'm going through an initialization stage which will seed each of the seven nodes with the Genesis block and configuration and then starting it now I'm going to use we have to transaction managers I'm going to be using the one called Tessa it does take a minute to stop well that's going on what I'm going to be showing is a transaction of just a very simple directory that's a way okay so Tesla is the private transaction manager that meant before that holds the encrypted payloads and distributes and point-to-point I'm just do it right here so just an extremely simple smart contract that takes a function value for it some constructor and you can overwrite it or fetch the value back out okay so one thing I'll mention now as well as your etherion public keys you have a private transaction manager public key and this is your identity within the Tesla Network okay so what we've done is we have the API the bytecode and we'll send the smart contract using web three is you would usually but we've also got this extra field here which is his private form and this takes the private transaction manager public key and says this is the intended recipient okay so only there is only the person who owns this key will be able to actually see that payload yeah you can have as many as you want in there yeah including none if you just want to send it to yourself so I'll come back to that question cool fantastic so I sent the private contract and before I go into the details of that contract you'll note that the transaction was immediately mind I'm using raft which offers the low block times so I've currently set it up to create blocks every 50 milliseconds only if there are transactions present so because there were no transactions pending before as soon as one comes in it will create a block and the network comes in sensors on that if I take the contracted dress contractor dress vest that's not fun that's not fun at all two favorite here it's not been making I lied apparently now I did fiddle with this right for before the presentation so that could be why never do a live demo without testing okay take two I'll use the IP f t consensus mechanism instead which I have not fiddled with yes yep so no I don't raft is usually I'd be ft a lot more popular and because you know you can scale it a lot easier a lot of block chains require a lot of participants and they may not know all those who the participants are so I BFG is usually the option of choice raft is good if you need high throughput but there are you know quite limiting constraints on that so but now I don't know how many are using okay right take two on this success okay so the transactions gone through we have our contract address and using a script I made earlier we can see the value of 42 which we put in earlier nice color scheme doesn't fat come up okay now if I go to one of the other node so this was but as I say this is a seven node Network between nodes 1 & 7 is who I sent this transaction so from 1 to 7 if I were to do the same thing on node 3 for example they will only be see a value of 0 which is the default value for an integer so there we can see that only nodes 1 & 7 have access to the data if I were to do something like bone and see what the code is on a non-party node no there's nothing there right so node 3 literally doesn't know what this contract is about it knows the address exists but it doesn't know if it's a contract it doesn't know what code is there doesn't know what date is there only nodes 1 & 7 know that and like we mentioned earlier this could be between all 7 nodes it could be a subset of in this case it's 2 this is really one of the big features that corn provides if I had to aft working on my machine and you'll get it working on your machine I'm sure you know the high high transaction throughput you know you can create I've managed to get 3 400 transactions per second in about half as many blocks maybe so where is Istanbul I've set to have a ones that can block creation time this is configurable so yeah it's now that the 7 notes are running all your existing tools that you may be using for public aetherium workers quorum and so you know you now have a network up and running that you can develop the apps on so and as I mentioned earlier we do have some bounties if you fancy using corn for one of your projects this hackathon we have a $1,000 prize for the best use of the privacy features that quorum has another one for the use of the fast transaction throughput so and finally the best use of you know existing public tools how to integrate them with quorum so if you're interested in building on quorum then you know you could be up for you could get one of these prizes so thank you very much there any questions please feel free so Tesla is really just a datastore and encrypter so what happens is the data comes from quorum sends the data to Tesla Tesla encrypts it and sends it point-to-point okay and returns the hash to the original transaction so if I go back to yeah I try and find my transaction before all that's put on the public chain is is hash okay no it's got its own Noah play so it does sort of a naive synchronization between notes so that everyone has access to everybody else because communication has to be point-to-point so it cannot be relayed like it does in a theorem so me since so we have a rep yeah so we have references to every other node in the network because we need to know directly who to contact if we if we want to send a transaction to a particular public key we need to know directly this is this is who I call and so I need to keep a reference to that for as long as my test for a node lives so inside tesserae yeah it's just basic storage so all that's stored is this hash and this is what's put on the public chain and this references an encrypted payload which was the original data that was sent in to begin with yeah you know it's know did something but you don't know what it did okay so okay there are levels of you know previously that you have and this is this is what we provide so yeah if you didn't want to have this transaction at all then side-chains would be an answer to that but we go with a single chain solution yeah absolutely so you know a maternal state channels a big solution to that and plasma is another big one as well but they don't provide direct privacy right you can always put all those transactions back onto there you maintain your sub chains wherever so you know you need they allow scalability or they don't allow privacy and they don't allow permissioning as well as far as I'm aware you can probably improve in commissioning on top of so chains I've not come across any solutions but so you know if you only want certain participants to access your chain and that's going to be a bit more difficult and involved so if so if I spun off an eighth-note here and he wanted to connect and he knew about one of these existing notes even if he tried to connect to it that he wouldn't be able to if it connection will be refused and he wouldn't be allowed access to that data not even this this hash of data so you can't see anything that's going on but no we're we're always keeping up with layer 2 solutions and other solutions in general because yeah they do benefit quite as much as anyone else yeah sure so I don't know if you guys have seen we have a our own stable coin that's being trialed internally at the moment called JPM coin and Microsoft are using this for their Xbox loyalty platform so they'll be able to distribute loyalties over the core network there's a health remember on my head there's a health care network in the US that's currently training core as well as the US the Brazil national bank are saying well they can do with coin as well so there are some product there are production environments are now but there's also a lot of hello say this is still quite new so there's still a lot of trials going on about how watching can be used in enterprise solutions so as I say existing tools work with coin and so something like remix you could do to to submit transactions and we're making some modifications at the moment to allow you to do the private transactions so you'll be able to do public ones at the moment but other thing existing tools work so if you've got your favorite ID or something it would be able to submit transactions and you can continue using now with core yeah truffle works out the books yeah so when submitting your transaction if you do the same sort of thing of adding the private four field oh okay it's gonna say autocomplete you work on it yeah so in truffle if you actually just add this field when deploying your or migrating of contracts then they'll be done is private private contracts and that works out of the box so yeah so they work but they may not always have all of the features so like I said with remix you can't send private private transactions we mix them in same way the meta mask you can't sign a transaction and submit that due to the way Korn works I know you can do public transactions yeah but you can't do private transactions okay and so those sorts of things yeah how can we agree adapt existing tools that are mostly there and finish them off yeah exactly yeah so I'll go no madam ask it well it's supported for public transactions they're not private once so it needs particular logic but to be changed to enable private transactions we made a mask it would be a coin specific change so we would do that oh we would we would do that and then support it so you know when you say validator you mean okay yeah so so every every node in the network has to say trees the public sector and the private sector II so so the private state is particular to a certain note every node may have a different private state so it only has the data that it's privy to okay so to access it it's done in the same way through all the tools so if you're from a user perspective there's there's only a single state which they access they don't know whether it was a private se or public state okay but internally this is these are kept separate and so if I receive a transaction which was meant for me existed in my private transaction manager and I execute that transaction it would execute on the private state if I see that it's a public transaction and it would execute on the public state yeah so the axis controlled is whether you have the transaction in your transaction manager so it that's that's the only access control avaran there are other access controls we want so as someone mentioned earlier I was going to come back to it one of the features that doesn't happen to him is node 3 could send if it somehow got hold of the code or the API it could still send transactions to that contractor which clearly is not what you want we do have a solution to that which we're trying and we want to make sure it's right before we put it out that we are aware and we are fixing that so another question something thank you guys [Applause]
Automatic transcript — names and jargon may be misspelled.