New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Develop, Deploy & Interact with Quorum Private Contracts – Brad McDermott

Ethereum DenverFri, Oct 9, 2020, 12:00 AM

This talk is from ETHDenver, the world’s largest Web3 BUIDLathon and Community Gathering. ETHDenver’s content is crypto and blockchain focused. Subscribe to our channel to learn more + connect on Twitter: https://twitter.com/EthereumDenver. Speaker: Brad McDermott of J.P. Morgan Quorum Abstract: Getting started with Quorum’s Remix plug-in. This talk was recorded Friday, February 14, 2020. ETHDenver 2020’s content themes included DeFi; DAOs and Token Engineering (TE); Gaming and Usability; Protocols and Interoperability; and Public Good and Social Impact. Industry experts also weighed in on topics like decentralization, privacy, identity, non-fungible tokens, scaling, governance, diversity, and arts and culture in blockchain technology. The 2020 event was February 14-16 in Denver, Colorado and hosted 2000+ blockchain enthusiasts, developers and community members from 50 countries and 50 U.S. states. 🔴 SUBSCRIBE ETHDenver’s YouTube https://www.youtube.com/channel/UCgz9NU06t_FkT0Py1Vadczw 💡 LEARN ETHDenver’s Official Website https://www.ethdenver.com/ 👋 CONNECT ETHDenver Twitter https://twitter.com/EthereumDenver 📖 READ ETHDenver News on Medium https://medium.com/ethdenver 🛍️ SHOP ETHDenver Official Merchandise bufficorn.com 💬 CHAT Telegram https://t.me/Ethdenver Discord https://discord.gg/jteMn5c 📱 FOLLOW LinkedIn https://www.linkedin.com/company/ethdenver Instagram https://www.instagram.com/ethdenver/ Facebook https://www.facebook.com/ETHDenver/

Transcript

all right hi everyone I'm my name is Brad McDermott I'm a software engineer at quorum quorum for those of you don't know is a way to run a private permissioned etherium network with some additional privacy features that we've added on top so the topic of today's talk is actually the plugin that we developed to support some of these features for remix but I know many of you might not know exactly what quorum is so let's start with the basic understanding of that and the problems we're trying to solve so quorum is our Fork of the Go aetherium codebase which many of you may know as guess we took the go through in codebase added some features that are beneficial to a lot of enterprise these cases one of those is permissioning so in this case the permission network means that you can control which nodes are allowed to connect and participate in the network so send transactions many blocks all that stuff so for a lot of companies they're not ready to do everything in the open on maintenance areum so this gives them an opportunity to use the etherium technology but on their own private network the second thing we did proof-of-work doesn't really make sense in the permission context mining and stuff like that so we have a couple other consensus options raft and I BFT which happened to give you faster throughput because you don't need the whole mining process finally we had private transactions within the network so the network is private itself but within that you can say certain nodes can see this contract and interact with it and see the state and other nodes can't so to illustrate that let me walk you through a public and a private transaction so this is just a simple representation of a contract creation transaction you send it with web 3j s or whatever to your quorum node just like you would normally and just like regular aetherium it broadcasts it to the other nodes put in the next block and now it's on the chain so a lot of companies this is enough for them they just need a private permission network but there's other use cases where maybe a B and C are all different companies they want to be able to interact with each other but they also want to interact with maybe note a and B want to interact with each other without C knowing about it so we added that ability so when you create your contract or send a transaction or whatever you can add this private four field to the transaction object and the value is a list of the public keys of the participants of the transaction so you just add that and send it to the node just like you normally would but now the node knows that it's a private transaction so it's instead of broadcasting it right away it's gonna send it to its private transaction manager which we call tesara so Tessera handles all the private stuff so each node is running their own instance of tessera alongside their guest node so the corm node sends the transaction to the Tessera instance it encrypts it using the public keys that you provided in the private for lists and sends it to all the participants in the transaction they receive it decrypt it and then acknowledge back to the first node that they have processed in so once the original node receives the acknowledgments from all the participants it will take the original transaction and replace the data with a hash of this encrypted payload and then send the new transaction to back to the quorum node so basically none of the original data is there and visible on the chain there's just a hash for the private participants to know what happened then this transactions broadcast just like any other transaction and when it's added to the next block and these nodes process it if they were a party they will see that that hash is in their private State and they can run in the BBM and update their private EDM state if they weren't a party they'll just they'll know they weren't a party because they didn't find anything and they'll just ignore that transaction so yeah there's a lot more detail like you're going to about that but that's enough to get an idea for what quorum does so just to recap it's a fork of the go theorem code base and by fork we mean code Fork not like a main net fork these core networks don't share any transactions with maintenance or any public aetherium network but you could and you should add a link to main that if it makes sense for your use case it's just like any other side chain fast permission network these private transactions that I was talking about among specific nodes in the network and the best part is that it all works with the standard etherium tools it's just a theory Munder the hood with a few modifications so truffle meta mask open Zeppelin remix web 3j web 3j s all that stuff should work out of the box in addition to these etherium tools we maintain a number of tools so we have this list and then we have a few more corn cloud lets you deploy to the various cloud providers pretty easily we've got a kubernetes project kubernetes with the cube because it's a quorum on kubernetes and a bunch more but the focus of this talk is the quorum plugin for remix so let's get into that most of you know remix I'm sure it's an in-browser development environment develop smart contracts developed by the etherium foundation and just like the other tools it works with quorum but there's some limitations when you want to run these private transactions so let's go look at remix and get an idea of how this works alright so this is just regular remix we're gonna look at it with no plug-in right now I'm just the standard plugins so I'm just gonna deploy this simple contract just to remind you of the flow all this does is set and get a integer that you store so you compile it as usual and then when you're ready to deploy you go to their deploy tab you can choose their virtual environment or you could connect to a guest or a theory node this way alright guess or a quorum note this way but we'll just stick with the VM for now you deploy and you can interact with the contract great so this is great and this works with quorum as well but as you can see here there's only a certain number of fields that you can edit in the transaction metadata so like a count gas limit the ether you want to send so for a while this has been the most requested or one of the most requested features is being able to set that private four value right from the remix browser development environment so luckily last year the remix team added third-party plugins so you can see this plug-in list here all of these provides add some sort of functionality to remix so there's a lot of them you can take a look later but we developed our quorum Network plugin we got a bunch of advice from the remix team and we were able to deploy last December as you can see we've got it activated already and that means it shows up over here so this is the plugin the idea was to keep it pretty much keep the development experiments experiences similar to regular remix as possible so you still edit in the text editor compile and the compiler do your unit testing but when it's time to connect to a node and deploy that's when you come to our plugin so I've got a local three node Network running on my machine and I'm already connected to the first node so as you can see here with all the other metadata we have this private four drop-down so we have the public keys on the network this is node one will do node one and two and then we'll leave node three off of this just to show that privacy is possible then we're gonna just deploy this contract just like we did before except now when you expand it you can see it's private and it shows the participants so we're gonna just set one one one for node one great so now let's take a look at it from the second notes perspective we're gonna copy this address so we can connect to it again no two is running on this port alright so we can attach to the RT deploy contract using the address and it connects successfully we can get it and see that the first value is there and we'll just set a new value great and now finally just for sanity check let's go to node 3 and make sure they can't see anything so we will attach and you can see contract does not exist at that address this is exactly what we want we don't want it to even know that this contract exists it can't see the state it can't do anything like that and yeah that's pretty much it this is the first version so we try to keep things simple keep the developer experience the same or as close as we could as possible some improvements we want to make maybe remember previous networks that you've connected to instead of having to remember all the URLs this would be a drop down I could connect to it authentication so a lot of the quorum nodes would be protected by some sort of authentication so we support basic auth if you put the username and password in the URL but that could be better we could support maybe OAuth some other SSO type authentication the latest version of test ara actually lets you pre populate this list you didn't see it but before the talk I pasted in these public keys manually so that will pull those automatically with the latest version and also maybe we can add an ability to like label these public keys so you don't have to remember that this long base64 string is node 1 this one's node 2 all that other than that just improving the UI maybe better error handling that kind of stuff oh yeah that's pretty much it oh so as we're developing these new features we want to be able to deploy them confidently and not break anything so actually the remix team has a great integration test setup where it'll run through the in an actual browser it'll run through the UI and so we borrowed some of that and use some of their helpers and let me just show you that really quick so just run the test and it connects adds all the modules adds our plugin and basically runs through the whole demo that I just did except about five times faster yeah so that's pretty much it any questions yeah so yeah so yes if he needs to use meta mask or can use not a mask or need to so meta mask basically has the same limitations as remix where it won't let us add the private four thing so that's still limitation although with that snaps plug-in system hopefully we can develop kind of the same thing for meta mask but yeah right now you can use meta mask for sending public transactions but private you'll need to send it through here yeah great so that's it for the hackathon we've got some bounties so come by our booth on the second floor talk to us about that and you can reach out to us here our slack is at the bottom we answer all kinds of questions in there thank you [Applause] [Music] you

Automatic transcript — names and jargon may be misspelled.