An introduction to Blockchain with Mark Russinovich - BRK2049
How's. The party, yeah. Good. Good. Yeah. If. Impressed. Its how many people are here after the party actually. And. How many people are here on the last day so thank you for coming thank you for staying for ignite. How. Many people, here are here, because you, want to learn how to get rich fast. Okay. Not that many good well. So my name is more kosanovich I'm going to this, morning give you an introduction, to blockchain. And to. Set the context, for blockchain. I'm going to start with the roots of where blockchain came from which, is a cryptocurrency that, I'm sure everybody in the room has heard of called Bitcoin so, I'll start by talking a little bit about Bitcoin, then I'll go into the foundations, of Bitcoin which, set the stage for understanding. Blockchain. That. Requires, a little bit of cryptography, quick cryptography. So, I'm going to cover some cryptographic basics. Some, of you might be familiar with these cryptographic basics, some, of you might not, might, be familiar with the terms but not exactly how they work so I'll be going through those briefly. And then, I'm gonna get to the meat of blockchain. What are transactions, what our transaction, chains what are blocks then. I'll get into smart contracts, and. Consortium. Block chains which is where business comes into play and then I'll talk a little bit at the end about what Microsoft, is doing with blockchain so. Let's go ahead and get started I'm sure everybody, in the room like, I said is familiar with Bitcoin. And Bitcoin, mania, really kicked in at the end of last year the Bitcoin prices, were going crazy and I'm. Sure all your friends and family started, to talk about Bitcoin, I had friends, who, have sons, and children, that basically, were like I'm quitting college I've learned how to make money I'm using cryptocurrency, dad and I'm. Getting. Rich and I'll never have to work again, well. They're back in school now. How. Many people have lost. Money on Bitcoin because, you bought into the mania okay. I can tell you're not willing, to admit it at this point. But. This. Caused. This fear, of missing out all these stories about people getting rich and this. Mania even transferred into the business world where you had companies, like Long, Island iced. Tea changing, its name pivoting, away from iced tea it's. Doing. A decent job at iced tea but they said we, can do better with blockchain, and so they changed their name to long blockchain, and their stock price went up 200 percent the next day. So. This is the kind of craziness that we were seeing and here you can see back, in December that big spike this. Is the bitcoins current. Price you can see it's come down so, it's above. Where it was about. A year ago but, still far from the heights that, it achieved and now there's. A whole bunch of people that are saying that. Bitcoins. Hype is gone we're, here to stay in the lowlands, there's, people even that are saying that, bitcoin, is a bunch of nonsense like. Warren Buffett this is a expression. I didn't ever expect to hear out of Warren Buffett which. Is Bitcoin is probably rat poison, squared. And. The, ironic thing about is about this is there's a crypto currency called rat coin it's price doubled the next day because of this. My. Own tale of woe about. A year, ago two, years ago actually I decided. To experiment with cryptocurrency I didn't, know anything about it but I wanted to learn about blockchain, and cryptocurrency and so I placed. Modest, investments. In Bitcoin. And another cryptocurrency, called a theory and we'll talk about later 50, dollars in each this. Was in July it. Actually had reached over five thousand dollars my $50, had translated into five thousand, last, December, here's where it was in July atheria. Didn't crash quite as hard as Bitcoin then but I checked, this, morning and, here. It is so. I can't, even buy an iPhone 10s now with this. So. Where did Bitcoin come from you. Might have heard of a person named Satoshi Nakamoto. It's a very. Elusive figure nobody knows exactly who this is or if even if it's a real single, person or an organization there's. All sorts of conspiracy theories but. Because, this paper was published under this name but nobody's ever been identified as this person as much as the whole world has been trying furiously, to figure it out and there's various people that come forward and say I am Satoshi, Nakamoto, well. The thing is come. To it there's a one easy way to prove that you're Satoshi Nakamoto, nobody has done that and I'll come to that in a minute but, this paper laid. Out the fundamentals, of blockchain, in. The purpose of serving this crypto, currency called Bitcoin it is I recommend, a very. Good read to, get the fundamentals I'm. Gonna be quickly going through what's in that paper but.
If You just want like a four-page, read on a five page read on what, is the foundation of all this mania, that, papers are great very simple, easy weight easy, read on understanding, those basics. And. The reason that it's. Very easy to prove who Satoshi Nakamoto, is is that when Bitcoin blocked, the Bitcoin cryptocurrency launched, the. Initial transaction, deposited. A bunch of Bitcoin into, Satoshi's, account about. And, various, some, of it's been spent but there's about a million Bitcoin. Left. In that account and anybody. That, wants to prove their Satoshi all they have to do is submit a transaction, from that account to the Bitcoin blockchain and that proves that they have access. To that account which, only Satoshi Nakamoto should have access to this. Million. Bitcoin obviously is a huge amount of money so whoever this is or whatever organization it is at, one, point in time you can see that it, would this, person would have been the 44th richest person in the world tens. Of billions of dollars of net worth based, off of that Bitcoin has come down of course now. Cryptocurrency. I've been talking about in the context of Bitcoin and why is, cryptocurrency. So. Interesting, to people, to. Understand, that you need to understand, what fiat currency, is and, compare. That to what cryptocurrency, is. Because. They're very different with, fiat currency, it's issued by governments, it's like the US dollar. The government, prints, the money and, stands, behind that money, and. What, this causes, is there's. Delays in settlement, when one. Entity, party, wants to pay another and party, some money especially when you're going across international. Borders, because, then you're going from one fiat currency to another fiat currency typically or one. Banking, institution, to another one and, that. Means that there's, settlement. Times that have to be put in place to make sure that neither party is, screwed, out of their money as this thing is in transit which is why when you do a wire transfer it's. Usually two or three days before that wire transfer, clears. There's. Also in many, of these situations even a need for an intermediary, to protect, both parties where, they can sit and hold, the money kind of in it in the city immediate state where. If one party defaults that the other parties protected, and so even, that international banking systems have organizations. That sit, there as intermediaries, for those cross-border, payments which, make them take, even longer and add a lot of cost overhead. To. The transactions, that go across border. There's. Also high transaction fees all, usually. Associated with all of this friction that's caused by, this these. Intermediaries, in the middle and the. Risks, of these, payments going from one party to another so. Cryptocurrency, aims at addressing. All of these one, of the key, aspects. Of cryptocurrencies that, it's decentralized meaning, that there's no single, organization. Responsible. For managing it it is, an autonomous. System that's, operated, by a whole network a network. Of parties that don't. Have to trust each other to participate. In that network, there's. No clearing, involved. When one, party sends Bitcoin to another party on the network it's. Effectively, instantaneous. I'll talk, about it's not quite instantaneous, but. When, that transaction. Is executed. And accepted by the network then. Everybody. Sees that as the ground truth. There's. New intermediaries, like I said you can just submit a transaction, to the network directly and, send. Money from to another party or any other parties without, having to go through these intermediaries, that are gonna sit there and protect each other because there's no need for that protection. And one. Of the spin-off. Aspects of this and one actually one of the requirements to make this trusted, decentralized, system is that there's, an immutable history, of the transactions, when I pay. Somebody, in Bitcoin, what. Goes into the. Bitcoin network is a, log of that transaction, and nobody can tamper with that log without it being visible, that somebody tampered with it there's a way for somebody to go verify beyond. Ten, tissa t of that transaction.
Chain Log and I'll show you how that's done in a minute. So. That, cryptocurrency. Is. Built on top of blockchain, which gives it all these properties, Brock. Chains are also called distributed, ledger technology. And. Block. Chains get, their fundamental, properties, that. Give cryptocurrency, those properties, from. Cryptography. So. I'm gonna talk a little bit about the cryptographic basics. In a second but, I want to start out by asking, this. Question, why, blockchain, because really when. There's, a business looking. At blockchain, and I'm going to talk more about business scenario scenarios a little bit there's. One question that you've, got to ask up front which. Is why do you want to use blockchain, for this there's. Been so many companies that have come to, us and Microsoft and said. Hey. Blockchain. What. Can I use it for I want or here's. A problem I want to use blockchain, on it because, blocked by because, blockchain, so. It's like a hammer looking for nails and. So. You got to step back and say why do you want to use blockchain, and the answer, the fundamental reason. To use blockchain, is that there's no, that. There's several parties that want to interact, with each other typically transact, send, assets from one to another and. None. Of the parties. Trust. Each other to operate, the database and they don't even trust anybody else to operate did a bit database on their behalf or, they'd, rather not because, that would introduce friction, and cost and, so. That effectively. Means, that you've got a network of, partially. Or fully untrusting. Participants. That, want to transact with one another directly and none. Of them trust any of them to top-right a database. So. The benefits that blockchain, give you besides I've talked about is that you can't censor on a blockchain the network accepts, transactions, and as long as some parties willing to accept a transaction, they can put it in at the blockchain so. It's very hard to keep, transactions. Out in, a centralized database case, it would be very easy for one part for the party operating, it to say I'm not gonna accept those transactions, it's. Capable. Of accommodating, anonymity. Or pseudo anonymity meaning, the parties aren't, recognized, I don't have to be tied back to any real-world identities, they're, represented.
With Cryptographic, keys, which, are fairly. Anonymous. There's. Ways you can actually looking. At transactions. And if. You've got some connection, to a real world you can do naanum eyes a key, but effectively, they're anonymous. They're. Resilient to failure because the whole networks maintaining, the database not a single, organisation. Not a single server or network of servers it's really everybody's, got copies of it and. The. Immutability means that there's a variable verifiable, audit log that. You, can validate. A transaction. Based off of seeing simply, its transaction, ID or its hash that I'll talk about now, the alternatives. In many cases where somebody comes and says hey I want to use blockchain for this are. A centralized. Database a trusted, operator you, want to outsource the database to as that, members. Of your party will, transact. With one another another, option is trust at execution, environments, or te es which I'll talk about at, the very end of the, presentation. Which. Are enclaves, where if you trust the code in the Enclave you can trust that on clay and you trust the Enclave itself like. The hardware that implements, that Enclave then you can trust that running, anywhere even outside of your own Network even on somebody else's machine and that. Might be a way to, solve, this problem without blockchain, and then. Multi-party, cryptography, that's another potential, solution, to this like. Using, homomorphic. Encryption so, if you're interested in the anonymity. Aspects, of blockchain you can get that through other means. So. I just wanted to set that up and I would come back to the Atlantean I want you to keep that in mind as I go through this presentation is, that blockchain, is not the answer to everything it's answered this very specific, scenario. So. Let's talk about the cryptographic basic. Starting with the hash, which is also, known as the digest, this is a succinct. Representation. Of, something very long could be very long, like. The. CliffsNotes for war and peace very. Succinct, representation, of, the book war and peace and the. Key, aspect, of this is that CliffsNotes. You'll never find two CliffsNotes four different books that are the same every. Book. Resolves. Into a different. Cliff's Notes summary, and it's. Impossible, to go from the Cliff's Notes summary, back, to the book if I give you the Cliff's Notes summary for war and peace it's impossible, for you to go back and produce. The. Whole book war in peace that. Is a, property. Called one-way. Hashing. Which means that I can go I can create, the succinct representation but I can't go from the succinct representation back to the original in fact I can derive, basically, no information, about that original from. The, summary. Now, when. It comes to digital hashing. Or summarization. Vic. You've, got a cryptographic hash function, sha-256. Is the one commonly, used and that's. Where you take some input and you, transform. It through this hash function into, a fixed length set, of a binary. In, the case of shot-to-shot 256, to 200 it's 32 bytes or 32. Bytes. Of, binary. This, is a more. Succinct form but, if. The property, here is that if you change anything, you change one character, you're gonna come up with completely different hashes, so. Hashes. Are a great way and and, these functions are also what's, called collision resistant, it's. Extremely. Hard or impossible, to, find virtually. Impossible to find two. Different, texts. That, will result in the same hash so. It's got this very kind of cool property, which seems counterintuitive and, that means that you can represent just, about anything uniquely. And, verifiably. Just, with its hash and, we'll. Be talking about hashes in the context, of block point blockchain. Transaction, IDs a little bit later now. Second concept is encryption, I'm going to talk about the encryption that we're all familiar with which is symmetric encryption. This. Is when. You take an unencrypted, message you take it through a symmetric. Encryption algorithm. Which, has a key associated, with it a symmetric, encryption key, and then. You produce some garbage and, this. Garbage like here it looks like what you see when you accidentally open. A Word document a notepad right oh come. On I know you've done it I've done it. And. Then you can take that same key and go. And decrypt, it so as long as you got the key you can either encrypt or decrypt and get back to the original contents. Publish. Blockchains. Rely on a variant, of this. Called. Public key cryptography or asymmetric. Cryptography where, there's a lock. And two. Keys and. The. Property, here is that the lock, can. Be turned one way by one key and can, only be turn the other way by the other key that's the simple kind of way to think about this, so. If, I've got the green key or the public key I can, move.
From. The locked, unlocked. Position into this lock position on the left side but, I can't use the green key to go to the locked. Position on, the right side so. The green key can only turn this. Direction counterclockwise, the. Red key or the private key can turn in any other direction now the. Way we label these is a bit, arbitrary I just define one and say this is the private, key the other one's going to be the public key and the idea. Here is that I. Can, take, a piece, of text and then. I can encrypt, it with my public key which, means taking. It from the unlocked the, locked, position to, the unlocked position with. That public key and. Then. The. Private key can be used to, go and decrypt it, so. This way I can, with, my. Public. Key. Actually. This is I can, encrypt something so that only the. Intended recipient, can get it at it if, somebody. Creates, a key pair and they give their public key out to anybody now. Anybody can take their public key encrypt. Messages that, only the person with the private key can see because the public key cannot go, the other way and decrypt. That message so. That's. One of the cool properties, of this asymmetric, encryption, so. If you have an encrypt unencrypted, message you, encrypt it with your public key you take. That encrypted message you send it to the receiver they. Can take their private. Key that corresponds, to that public key and decrypt it and, that. Is a way, to securely, send messages. Such, that only the receiving, party intended party can get them there's, another use for a public key cryptography which isn't for, sending. Messages that are encrypted but for verifying, that, somebody, has looked. At a message and basically, stamped, their seal of approval on, a message or said, or given, you evidence that they've. Have. Seen. That message and that. Is a process. Called signing, with. Signing, you take the message and, you. Encrypt it with your private key, and. At. That point somebody. With the public key can decrypt it, so. And this is the opposite, this, is where I take my private key I encrypt, something everybody. Has my public key so I can hand it out to everybody and you can all decrypt. It with my public key the only key that can decrypt it is my, public key so, now you know that I'm the one that encrypted, it nobody, else could have encrypted it and if I encrypted it that might mean something like I approve of this. So. Those just why, playing this out looks like this I take a message, I. Send. The message actually to, the, other to you I, then. Hash, the message. You. Hash the message so we both have hashes I sign my hash, so I basically are encrypt, the, hash with. My public. With. My private key then, I sent, you that encrypted, message you. Take my public key you decrypt it you, get out the decrypted, hash and if that decrypted, hash matches, the hash that. You've produced of the plaintext, then. You know that actually I approved, of that message. I signed. That message, so that's, signing. With, asymmetric. Cryptography. So. Now we've got basically. The. Basics. Of cryptography. Let's, talk about the blockchain basics, now. First talking with Trent about transactions. I mentioned I want to send somebody some Bitcoin so. Alice, Bob. Wants to pay Alice 10 Bitcoin what. Bob does is creates, a transaction, which. That. Transaction, has to refer to a previous, transaction, that, had given Bob, 10 Bitcoin, so, this is like saying I'm taking that 10 Bitcoin and, I'm gonna give it to Alice. Now. The way that Bob, proves. Or, but, the way that Bob shows who he's giving it to is to, embed with, that transaction, Alice's. Public key. So. This. Is basically telling the world Alice. Is getting this if, anybody, knows Alice's. Public key they can say see that it's Alice everybody else just sees that there's a key there that.
Whoever Owns that key is entitled. To this Bitcoin and then. What I do to show that I'm actually willing to give my 10 Bitcoin, to, Alice as Bob is that, I sign that transaction. So. I hash it I encrypt. It with my private. Key and now, anybody that gets my public key and my public keys in there as well so anybody can look at my public key and see. That I'm the one that actually authorized. This, transfer, of the ten Bitcoin that I prove that I own to Alice. And so that's the basic, of a Bitcoin transaction, or any kind of cryptocurrency. Transaction. And. Then what, this cause is if you. Recall. What, I said is that that Bitcoin. That I'm paying to Alice I have. To point back at previous transaction, to show that I have about that Bitcoin that that's the Bitcoin that I'm spending and so. What this creates is a chain. Of transactions. Over time. Where. This, Bitcoin. Transfers. Ownership as its, transferred, and so well, let's see right here. Owner. Zero, signed. This transaction, giving, Bitcoin to owner one and placing, owner ones public key there now to. Fur, at. This point it's under owner ones control, owner, one can take this Bitcoin and give it to somebody else by bringing, out their private key, creating. A transaction, that authorizes. Payment to somebody else and the, chain continue, and then, anybody can go and verify like. I said that. Owner one really did authorize this, transfer. - owner - owner, - did really authorized this - owner three and then the chain continues, and so. This is, a chain of transactions, now that's not the reason that blockchain. Gets its name I'll talk about that in a minute but, what I want to show you very quickly here is. An example of. A. Transit real transaction, and bit the Bitcoin blockchain. So. This is a one. Of the very, popular. Bitcoin, explorer. Tools it's at, blockchain, comm and if you go to data you can see, blocks. Which I'll talk about in a minute but, I'm going to click on a block here and, you. Can see that this consists, of transactions, and when, I click on one of these transactions, let. Me pick a better one, when. I click on one of these transactions. There's. The hash of the transaction, you, can see that, prints us some summary about the transaction, header and then. It. Shows us who, this Bitcoin went to so there's Bitcoin right here this. Is referencing, some previous transaction, and then, it's going out to these accounts and these. Accounts, then each get some of that transaction so one of the things you can do is if. I've got ten Bitcoin, in this, previous transaction, I have. To spend the whole thing, when. I reference that transaction, that gave me ten Bitcoin and you. Might think well that's just a waste if I've got to spend it all how, do I keep it the, answer to keeping it is that, if I want to give it Alice five of that I simply, make an output. That gives Alice five and another output that gives me back five to my account and so. That way I preserve, my five Bitcoin and then I can refer to that five Bitcoin in a subsequent transaction, so. That's a quick look at a transaction. Now. One. Of the big challenges here. The fundamental challenges is how you get everybody to agree about the order of transactions, which, is the. Fundamental. Property. Of a database is this, happened, before that and the, reason. That you need that especially. In cryptocurrency is that. You. Don't want a situation where, Bob has, a million, Bitcoin. And he wants to buy a van, Gogh and Bob. Takes, that, million. Bitcoin and sends, it to Alice who owns the van Gogh and then. Turns around and creates another transaction. Giving. Joe a million. Bitcoin to buy a Monet. And, one. Of them is going to get screwed. Out of their painting if. The, network depending, on which transaction, the network decides happen, before the other one so. Ordering, is key, and the, question is how does the network come to an agreement about the order of these transactions, that's, a process called consensus, and the, challenge. Here is that in, the bit cryptocurrency, networks, nobody trusts anybody else. At. My house we call that Thanksgiving so you might call that the same thing. The. Accept the solution. To this is to accept proposals, for. Transaction, order and, reward. Winning, proposals, so there's nodes. On the network that, are called miners, that collect, up transactions.
They. Make a block of them they, send, them out to the network and then the network then a group, kind of decides which, blocks are the next block on top of the previous block that the network is agreed on and, the. Way that it in. Cents miners, to go collect these transactions, into blocks is. Through a process called, mining. Where the miner gets a reward a reward. For, producing, a block that the network accepts. To. Prevent. Miners. From, spamming, the network with crap with bogus blocks. To. Make it so that it costs, something for them to submit a block which, helps. Ensure that they're trustworthy there, and they've, got some investment. In the network and. Also. To slow. Down the. Rate of block, submission. So that consensus. Can be achieved, without, lots, of different Forks as you'll see there's. A process called proof of work used, in Bitcoin. Aetherium. And several, other cryptocurrencies. But. What, miners do is they collect their train their blocks their transactions, into blocks these transactions, themselves are part of transaction, chains they put them in the block and that, the way that they. They're blocked to the existing. Blocks is that they saw. They have the hash of the, previous block in that. Block. That they add and so. Now this creates an immutable. Chain. Of, blocks. If I. Go mess with block four five six one that. Main, invalidates. That hash that's in block four five six to somebody looking at block four five six -, we'll. Look at block four five six one, hash. It and if, the hash comes out different than what the hash that's recorded in four five six - they know somebody messed with four five six one so, that's the immutability, of blockchain through, this hashing. That happens. That. This hash chain that. Gets, built as the miners add blocks so what's this proof of work like, the. Idea is that in that, block. Header. I've. Got to make. That block header hash to a particular value and. If. You think about hashing. Hashing. Is just a random function basically and, when. I can take messages and I can hash them and each, message comes out with something completely different the. Goal here with proof of work is I've got to solve a puzzle I've got to basically come out with a hash that has a certain number of leading zeros in it and the. More leading zeros I've got to my, hash has to produce the harder it is to find that number because if you take the number space like. If it's just 256. Numbers, if I say, the. Leadings. It's got to have the, numbers got to be less than 128, I've just cut out half. Of my hashes are gonna be invalid. So basically I got a 50% chance of solving the puzzle and, you could think if I say, that I've the, number has to be less than 8 well then my random number generator has to try so hard to get a number less than 8 that's proof of work and you can see example. Of this which, is I've, got to find a hash that starts with 4 zeros of hello. World the, block, header plus, I have a number that I can mess with in the block header called a nonce, that's. What miners manipulate, is this non so they just basically, set. It at 0 hash did I solve the puzzle no set it at 1 hash no did I solve the puzzle you, know and it goes on and on until they come up with one that solves the puzzle and then they go here's. A block they submit it to the network, the network can very easily verify that they actually solve the puzzle and if. They have then. They add it to the blockchain, now.
The Problem is that my little multiple, miners might find blocks, at approximately, the same time and, that's what happened here, is that, we got a blockchain and then. Two miners solve the puzzle at approximately, the same time so the network nodes. On the network start, to, get two blocks both, valid sets the transactions, on top of the previous block, question. Is which. One do. They mine on and. The answer is if I get to it approximately, the same time I'm, going to mine on the first one that I got and. So. The, network starts to mine, and try. To create other blocks on top of some, fork and. If. I get a, block, now that has. Other. Blocks that are deeper than the one I've been mining on meaning, somebody's. Got the network's gone ahead and mines two blocks when I'm still mining, this one down here you know the next one down, here then, the rule is I've got two except the longest one and I've got to discard what I've been doing so, in this case the, miner somebody. If somebody's, mining on that left fork, because. They got that block, first and then the network they get from the network twenty, three four four five one five from, the other fork they, got a crap, I just wasted work, on this fork. That the network is going to reject and then. They toss. Their that, block away and then, they start working. On the longest chain and that's how the network converges, over time. So. How long should you wait before you, consider the, Forks unlikely. Because the fork can happen in that case of Monet and, Van. Gogh is, if. You're looking at the wrong fork and that. Fork. Dies you, might just be out of your painting so, the rule of thumb with Bitcoin is wait for anything significant, about 60. Minutes the. Mining. Time, the, difficulty. Of the puzzles automatically. Set by the Bitcoin, algorithm, to target a block being generated about every ten minutes and, so. After. Six that's, a huge amount of mining. Power that.
Is Required to go undo. Six blocks like. That's an hour of massive. Computation, so if somebody wants to go try, to screw with the network and undo that vengo. Transaction. That's six blocks deep they've, got a overwhelm. The network with. Mining. Power something. Very unlikely. Like. I mentioned the reward, for miners is something called coin base, so. Automatically, the Bitcoin network gives. Miners, reward. For, getting, a valid transaction and this is the first, transaction, in a block is this, coin base that gives them some amount, of Bitcoin for, it and reward for them to spending this energy it, started, out at 50 and it hashed it halves every two hundred ten thousand blocks we're down to 12.5, Bitcoin, that. A miner gets so. It's roughly over three to four years this go down you can see the Bitcoin it the coin base is going to go to zero sometime. Out past 20 30 and, so. Miners also are incented, to mine. Blocks because, they get transaction. Fees now, what our transaction fees there's no hard-coded. Transaction, fees in Bitcoin they're. Simply. Transactions. That don't spend all of the. Bitcoin. That, is in their input so, if I'm spending, if I'm giving Alice ten, Bitcoin, I. Might. Reference. Transact. Bitcoin. Transaction. Earlier one that gives me 12, if. I give Alice 10, and I don't say who's getting the remaining two it, automatically, goes to the miner and the reason I might want to do that is that miners they. Like money and so, they will take my transaction, along, with the other ones that go oh look. This one if I'd mine this one I get to Bitcoin, these. Others I get less than that so let me go and put this in the next block I'm in a mine and there's, a fixed number of. Blocks. Have a fixed maximum size, they. Can support one thousand two thousand transactions, so if, I. Want to get my transaction. And sooner than, later I might, increase. The fee that I have in that transaction so. Look. Let, me take a quick look at blocks. And. You kind of saw a preview of this here. These are the latest blocks in Bitcoin, and, if I click on this you can see the block you, can see the number of transactions, in this one. 6:35. You. Can see the output totals, of the transactions, the estimated transaction, volume the transaction, fee so the, miner got point five Bitcoin, on top of the twelve point five so they get roughly 13 Bitcoin from mining this block and. Then. You can see this. Is a mining, pool we'll come back to that in a minute you can see the difficulty that is the number of leading zeros basically, that they've got to solve in their cryptographic puzzle, and here's, the nonce here's what they they. Took the hash, of all the transactions, in that block they. Messed with this value they came up with this to solve that puzzle to satisfy, that difficulty, and there's. The block reward and here's all the transactions, in, it and this first one is this coinbase transaction.
Plus. The mining. Fees so roughly 14 so. That's a quick look at blocks all. Right so. Mining. Just, a quick stop of mining so, I normally don't show photos of my basement but I thought you'd appreciate this one. All. Right no I'm just kidding obviously there's no way that, rat's nest of cables without ties and proper labeling in my basement. This. Is my basement. I'm. Just kidding this is these are mining operations, mining. Operations, that. Happen to be in China and, you. Can see the kind of massive. Electricity. That's being thrown at this problem of trying to bind blocks in, fact people are saying that, this is a huge problem for the environment, well just how big of a problem for the environment, here's the site that. You can go to that, tracks how, much energy estimated. Is being consumed by miners, trying, to mind blocks and that. Vertical. Axis, is terawatts per, year and you. Can see we're about seventy three terabyte watts per year right now give. You I put, that in perspective anybody. Here from Austria. So. This, seventy three terawatts is about, the same amount of energy that Austria consumes, every year. And, so in this number keeps keeps growing and. There's a lot of controversy I'm not going to get into the the, defenses. That people have of this amount, of energy spend on Bitcoin and other cryptocurrencies but. But. That's how, much energy it's using, now. There's this problem called 51%, attack I talked it before about you know having to wait a certain amount of time before you trust a block. And. That. Is if somebody, has so, much mining, power more. Than 50% of, the, network's mining power they, can theoretically. Mine. Off their own chain and they, will create longer, chains. Eventually. Sooner, or later just through statistics, than, the rest of the network and that. Gives them the power to go undo things and do double spins and they're, actually been cryptocurrencies, that are smaller than Bitcoin that have been hit by double, spending attacks is, it smaller the network the. Easier it is for somebody to come along spend. A bunch of money to accumulate, power, mining, power and overwhelm. The rest of the network and do a double spend attack on it so. This, is a real. Threat. And. When it comes to where mining is concentrated, here's you, can go to any Bitcoin, stat site and see this breakdown of miners. Mining. Pools, are. Formed, where. People give, money into the pool the pool buys hardware, and then. The pool the hardware goes and tries to sell find, a block if the block is found then. The rewards are spent out relative. To the amount of money that you put into the pool so, if you're a 1%, owner of a pool you get 1% basically of every of that, 13 Bitcoin, that was mined if your pool mind that Bitcoin and so.
This Is a way for people to aggregate, their money get, economies, of scale and mining. Power and so, you can see most, of the network now is dominated, by these. Massive mining, pools, where. These mining pools located. Yeah. And there's that other green one is in. Czech. Republic so. This is where, China. Obviously has more than 51% of the hash, hash. Power in, the world. Ironically. The, Chinese regulators, have said, cryptocurrencies. Illegal. In China and. All, you miners have. To get out. So. That you've, just checked recently and. Basically. They're all like okay yeah whatever. And. I think I don't know what they'll do you, know maybe take the legal front offshore. And. Leave. The mining happening. In China I don't know what kind of workarounds, they might find or just, you know got a giant tanker ship it ship their mining rig off, off. To. Someone someplace, else but this, is the kind of interesting thing that people are watching right now given all that concentrated, mining power, so. That's a look, at crypt bitcoins, crypto currency there there's. About 10,000, full Bitcoin notes meaning, nodes. That pull, down the whole database which is now hundreds. Of gigabytes in size and. Keep. Track of the transactions, that example, of that websites one of those full mining full nodes they've obviously have keeping. Track of all the transactions, that come so. That they can show you those cool stats, anyone. You, can start your own full, Bitcoin note just launched, the Bitcoin software it's open source there's. Different versions of it join. It to the network it'll, pull down over, a few days the, entire Bitcoin, blockchain, and then you can start messing. With it those statistics yourself you. Can even go create your own miner as, well and, that's. What a lot of people you know do with their home basements, I see people you know get water-cooled, rigs and see if they can line some Bitcoin what, they fail to recognize is that they're paying the electricity bill for that rig as well as the. Rig but. That's. The way it works in anybody you don't have to have a full node or anything to to get Bitcoin there's a bunch of coin exchanges, you can go take real US, money and buy Bitcoin like I did and then. At that point you can use the exchange, go there and do Bitcoin transactions, through them and get a wallet that you can carry out on your iPhone. And there's. A bunch of other cryptocurrencies, anybody, invested. In any of these raise your hand like coin a few. People ripple. X, R P so x RP is a controversial, one it's. Not really decentralized, it's managed, by this company, called Ripple that is really interested, in cross-border payment, systems. They just happen to have a cryptocurrency. That they use, to fuel that basically, parties. Have to pay the XRP, to initiate. These transact, cross reporter, payments but. They. Are in full control of the issuance of this currency just like a fiat, currency what. At government is and so, at some point back, when it was peaked it's also tanked, like everything else it. Put them among the world's richest people the amount of XRP, they did initiate issued, to themselves, was. About sixty billion dollars worth, at, one point so. That one has some controversy, associated with it and then there's a theorem how many people own ether. So. A few of you and. There's. Been a bunch of others there's been thousands, of what are called initial, coin offerings, where. Companies come and instead of. Doing. VC, fundraising. They. Issue a coin. They. Do an IC o---- and then, people can buy into the coin basically you're kind of buying into the company and that, coin may be or may be not related, at all to what the company does but. You, can see that there's just been an incredible run, on scams of icos, people pumping and dumping I see these ICS all are anybody been caught by one of these just out here okay, you're not gonna admit it oh one person thank, you for being honest sir. How. Many people watch Silicon Valley. So. If you have it look if you haven't watch it can we roll this oh. Maybe. I have to do it. I'm. Emily Chang and this is Bloomberg technology. Decentralized. Internet company Pied Piper is the most recent, Valley startup, to ICO and joining, us to discuss chief, systems architect. Bertram guilfoyle, welcome. Bertram a skillful. Okay. That guilfoyle tell, me a little bit about your past experience, with cryptocurrency. Well, I've been mining, coins since 2009. It. Was a different scene than underground.
Only. True believers, so, I imagine when it came to launching Pied Piper coin that you were. The team's head cheerleader. Let. Me rephrase that what. Attracted, you personally. To, an ICO what. Attracted, me was, the. Passage, and ICO offers, across the river Styx of venture capital, what, attracted. Me was, an. Informed. Disdain, for traditional, fiat currency, its paper. Stained. With the greasy, fingerprints, of your banks, and your mints what, attracted, me was crypto, currencies, fundamental. Anonymity, that, shields. Private, transactions. From, the peering, green eyes of the all-knowing governmental. Overlords. Does. That answer your question, you. Have a rather bleak. View of financial, institutions, that have worked for centuries worked. How. So. Thank. You for coming, it's guilty. Still, to come the, aftermath, of hooli's manufacturing, did. So. That kind of summarizes the philosophy, of some, people that are into cryptocurrencies now, I'm gonna switch, to talking about something that's based. Off of blockchain, but not cryptocurrency. It's smart, contracts and it's really the, foundation for the enterprise scenarios, that I'll talk about in a little bit basically. A smart contract it's at some point people started to realize that using the simple, language the Bitcoin script, has, in it that they could start to put business rules in it like pay, this only to this person if this other person has also signed the transaction, and. People. Started to actually create complicated. Apps on top of it but it was very awkward because the script was not really designed for that so there. Were several. Other. Block chains that came out that had this fundamental, concept of, an app that could be run on the blockchain and what does it mean to have an app run on the blockchain well. The code in the state of the app our story, as, transactions. In the blockchain. They. Can, hold themselves. They've, got their own accounts so they can hold money, and, they. Can use that money to execute. Transactions, with, other accounts. Or other block chains or send money to people they're. Immutable just. Like transactions. For the, money, transcript, of currency transactions, I've talked about because they're sitting. As transactions. The blockchain, function. Calls to, the smart contract are also encoded as transactions. With the input parameters in the function name, in the. Transaction. They're. Publicly readable so, anybody can go look at one of these things they're byte code because they've well, all of these run with basically, virtual machines that implement byte code but, you can reverse and byte code into source code and reverse. What the smart, contracts, are doing they're. Deterministic, because, all the miners execute, the smart contracts, function. Calls to, make sure that they're legal before they say yeah this transaction, can.
Go Into blockchain, because. Some of those function, calls can refer to state that was generated by previous. Transactions. And. Like. I said every call is executed, and to. Prevent people from bossing, the network, what. You've got to do is estimate about how much. Gas, and gas. Is like the units of computation, that a smart contract will, consume it's how its measure how the miners measure how, much computation, a smart contract execution, takes you've, got to estimate about how much that is, translate. The current the. Gas price to ether in the case of aetherium and then, when, you send a transaction a function call transaction, and you give. A bunch of certain, amount of ether to. That and then, the smart contracts, execute and the miners. Rebate. You the, amount of ether, that wasn't, consumed by the execution or your smart contract function call but. That's what we're gas comes in and that's why ether is a key part of it now the most famous smart, contract, in, the world is, something called crypto kiddies anybody, familiar with this one, so. A few people anybody own a crypto kitty, so. This you. Can go to crypto Kitty's calm this. Is built on top of the etherion blockchain, it's a smart contract that takes, kitten. Genes you know, kittens. That are defined, by a set of attributes like, genes and. The. Smart contract mates, them together to. Two kitten genes, sets. Of genes and then produces another kitten and. So. This is kind of the random, generation. Of kittens. And and, then, based, off of the genes you. Can look at a picture of the kitten and, people. Really want pretty. Kittens. With good genes. Enough. That there's. About to over, 200,000, people have bought these things. Somebody's. Even spent, $100,000. On what's considered one of the designer kittens. That has really, great genes so. This is something. That really got, out of control. It's under, more control now but this still exists and you can still go buy Krypto kitties they're, more trying. To pivot and focus on charity, giving where they will sell these cryptic kitties at auctions now. To raise money but. That, is one of the most famous. Ones and you can actually go to the etherium blockchain, and see the crypto Kitty contract, and you can see all the, transactions. Against the crypto Kitty contractors, like I said it's all out in the open now. Smart, contracts, business. Logic that you put in the blockchain of function, where, are the places that we're seeing interest in this basically. Everywhere. And this is just some of the examples that have we've, seen trade finance, of course using. Blockchain, with smart contracts, to do initiate to do cross-border, payments and, settlement, across. Without. Having to worry about intermediaries, with a logic, of defaults, and everything, else is encoded right inside their code, digital. Music rights so. Tracking who gets paid what. Diamond. Tracing so tracked something called track and trace where you say this is a diamond that initiated in a non. You. Know a, mine, that's friendly to labor. And. Then that's how I know that I bought something that is not a Blood Diamond. Real. Estate so. You, can imagine a smart contract that says I've. Got a state the smart contract has some state which, is house, is ready to be, sold and, to. Get to that state you've got to have the inspector, fire. A transaction. Call a function fire transaction, or the smart contract that says inspector, signs off another. One that says escrow, has been paid and so, on and then, once those sets, of conditions have been met the smart contract says okay my states now house, is ready to be sold and so. Now you've just gotten rid of all the intermediaries, and paperwork required, to keep track of these things it's visible for everybody to see and so, that's an example their supply.
Chain Management keeping, track of who, has what, across. A distributed, network of parties, that are moving, something, along I'll talk more about that one a little bit and the list goes on and on and there's. Not just the theorem as a smart contract based ledger there's, other ones like r3 corta hyper ledger fabric, aetherium, of dimension, and quorum and ripple. Itself, these are all smart. Contract. Block. Chains they're, really they're fundamental purposes in cryptocurrency it, is business. Processes, on, some on top of block chains let's. Get take a quick look at a theorem smart contracts. And. For. This I'm going to switch to visual studio code here. And. Show. You a smart contract this is in the etherium, language solidity. So. These files have sol and there's actually a visual studio code plugin. That, understand, solidity, syntax. And that's what I'm looking at this refrigeration. Transportation. Smart contract which, is going to track an item and make, sure that it doesn't, fall, out of health, safety guidelines. Humidity. And temperature, you. Can see this initialization sets. You, can call this constructor and say this, particular item refrigerated. Transport. Item, it's maximum, temperatures this it's minimum to interest at so on and, then. Smart. Transactions. Can be fired into it that report the, current humidity and temperature along, with the time stamp and then. That's recorded, in the smart contract so you can also query the state and say okay. When's the last telemetry. That this thing got what was the temperature and then. Finally you can also transfer responsibility, this, would be is one, shippers giving, it to another one they can assign now this, item to the other shipper that's. Recorded. As a transaction so anybody L can look in the blockchain and see it and now. That shipper, the one that's been given to can go and call that in just function only the owner of, it, can, call that in just function and, to. What. I'm going to do is deploy this, to the, etherium, test network and, to, do that I'm going to. Unlock. Some. Aetherium. There's an in theorem test network that. Is basically, free to use so this is where you can experiment. It's. Public, just like the main aetherium network or main net and, it's.
Got Its own concept. Of ether oops. Personal. Oh. Unlock. I'm. Used to typing 8:04, Linux by the way. And. So. What. I can do is now, compile. And, so what this doing is compiling that smart contract, creating. A transaction, but, that includes that smart contract bytecode in it and submitting. It to the etherium Rob's den Network this test network and what, we're gonna get back is the address, of that smart contractor Network which is the hash of the transaction, that's. It's an initial creation and, now when I want to fire transactions. Or call functions, but into that treant that it's. More contract I simply reference that. Smart contract, address with. A function, call which is represented, again with some byte code that says this is the function these are the inputs so, what I'm going to do after this is done is run a little script here called. Tx-. Which. Is going to here. Set, the thing, out. Of compliance. By sending. And calling this ingest telemetry, function, that we saw with a value, that exceeds the, initial value that I had, set. For this. So. This is deploying we're gonna get the smart contract address, here in a second and then what we can do is actually go see that in the Robson Network. Just. Taking a little bit longer than normal. Okay. Give. It another second and then what I'll do is I'll come back to it and. Move. On. Okay. Let, me come back to that in a second. That. Will surely finish in another there, it goes and. So. Here's the smart contract address, right here, and. So. If I go to, the. Whoops. Rob's. Ten network Explorer, which. Lets. Us view. That. Should've. Okay. I'm not sure what oh there it is it just shut up. Here. It is so this is the transaction. That's to put our smoke smart, contract you can see smart contract. Creation right here and you, can see the transaction, hash if I click on that this, is the smart contract byte code that we just submitted to the Robson Network and now that we've got that there we. Can then, execute, functions. Against, it like. I'm gonna do like, I mentioned, this. Changing. The state of that contract. I'm. Going to use a different Rob's, gonna count to do that. Okay. Accounts, and by. The way up key doesn't work well in this thing you, can see that it doesn't really, work. At. All. Alright. And. Now what I can do is, go back to visual studio code and. I can say truffle. Which, is the dev environment. Tx-. Dot. Jas Network. Rob's. Den, and. Then, what's going to come back here after a second is that's firing that calling. That ingest Network thing and then this is also going to call a function call, that checks the compliance, status, and, you're, going to see that disc is going to come back as this. Thing is out of compliance. Now. That it's succeed that I'd fired in transaction, in there that says this refrigerated, item has, exceeded. The, humidity because I said I sent in a sixty its max is set to 50 cent. So now you can see compliance status is false so that's an example of a real-world kind. Of contract, being. Executed on a, real. Etherion blockchain, so. Speaking of theory, and blockchains I've been showing you public aetherium they're in public Bitcoin, but what's. Coming. Now for in enterprises or a private, blockchains. Ones, where they're, not public only certain parties can participate in them and this is typical a consortium architecture. That we see you, can see the block, chains at the very bottom or the ledger you have, identity and key management. You've, got these. Users, that don't want to manage those raw keys to sign things they, actually want to put them in key management Keith Hart Google key server management, servers like.
As. Your key vault and they want to use real. Identities, to unlock those keys like ones provision, through Azure Active Directory, they've. Got a consortium, governance, on top which is who can be part of this network. What, rules do they have to abide by what is the software that they need to run to be part of this and then, you have apps that run on top of this that allow them to do the smart contracting, things. Now. One of the benefits you get out of being in these consortiums is you don't need to do proof of work if you take a look at consensus, algorithms, they're really on along a spectrum, so. Even, the etherion public network its transaction, latency is 10 seconds, rather than 10 minutes but it's still long because. Nobody trusts anybody in public networks but, in a confidential. Or a private network you. Can use other argument. Team fault tolerance which operate at much smaller scale they. Can give you better performance even. When people don't trust each other proof. Of stake which. Now, it's being turned there's attempts to be introduced, that into public networks but that can work in private, networks the one that's most commonly, used in consortium. Networks is proof of Authority which, says these are the participants, that are can. Vote and say that these are valid transactions. And ballot blocks we. Trust them all the network trust these particular, entities, and, then. You can also do fault tolerant consensus, this one requires everybody to really trust each other which is everybody's, gonna behave appropriately which. Is normally, not the case even a consortium blockchains so this one you rarely see. Now. We've had lots of different, scenarios where we partnered with customers, on consortium, block chains and you can see just. A list of them here some. Of the key, ones that we've talked about publicly and I'm, going to just talk about three of them just to give you an example of what we're seeing customers doing with. These consortium, block chains starting. With musk. So. Mercy is a shipping. Company obviously everybody's probably everybody in here seen a mercy poor, mr. erskine tanners they. Operate hundreds of ships around the world one. Of the largest container. Shippers. And they've. Partnered with us and, with, Ernst & Young with, Willis, Towers Watson and several other, insurance companies and guard time is. V insurance, sites fee to, create a network, called insurer wave the. Idea here and the reason that Maersk, was motivated, to do this is that they have ships pass, through different kinds of waters and they, buy, insurance for, those ships from a variety of insurance companies depending. On which part of the world they're in they might get better, rates from one insurance company than, another and depending. On which, kind of items they've got on the ship as, well. Well. The challenge is that they've run into are as. They're, moving between waters, moving between insurance, companies or moving into waters that require different.
Policies, Like they're moving into a war zone their. Ship requires more insurance is. Disputes. As to, okay. Which policy, was effective when how much money does Moresco and the insurance companies, what, are the liabilities that the insurance company has to oh mercy, and some. Of these disputes, which don't come up that often they come up they cost a lot of money and a lot of time for, everybody involved, so, what Maersk is doing is putting. This on a blockchain so. When the ship moves into water its war zone water fires a transaction. Into the smart contract that's tracking that ship that. Causes, the. Insurance policy to kick in at that point by, connecting that to an external business system that says new, insurance, rates. Gone. Up start tracking this and then, when it comes out of the water it. Goes back down and fires another transaction saying okay, remove that policy or lower the liability. On that policy and. That's. Being, done by humans. Right now on the ships or, people tracking the ships what, they're gonna be doing is wiring. The, ships to GPS and the, blockchain so, that these things fire automatically, no, humans involved it's automated as the ship moves around, insurance. Is being tracked automatically, so, that's an example there. Another. One is one that we did, ourselves with. Some, partners including. Electronic Arts on, making. Sure that. Artists. That produce. Artifacts. For games and the publishers of those games get. Their royalties, paid, in a timely manner. Right now with, existing kind of royalty payment systems I don't know if anybody in here has ever published something where you're owed a royalty, but, so. Having been a book author it's still done by paper, I get it like three months or four months later there's. No way for me to know if they're, telling me what's really I'm, owed with. This, kind, of system put on a blockchain. Well. Actually with the in the game publishing business, it's, roughly, 45. To 60 days before the publisher, gets paid for a sale of. An item like. It one of the game titles it's, another 75. Days before as the artist gets paid by the publisher, so. It is shortened all that and to give people real-time visibility into what they're owed and how their title is doing. Putting. This on blockchain these, sales on blockchain so all the participating, publishers, and artists, that want to be part, of this and there's already a bunch signed up now. Have real-time visibility into, when, they're how many items are sold on which days knowing. Exactly how much they're owed because of that and they, can get, their payments more quickly and there's, fewer, disputes, because it's, all out there in the open for them to. All see it. And. The third one is that, I want to highlight is Webjet. This. One is this. Company, is a hotel, company. That, does travel, bookings and they also own some hotel chains based out of Australia and, the. Travel, business is. One. Of those very, decentralized, businesses. Where hotel inventory, changes, hands, sometimes as much as five times going from the hotel saying I've got a room to, somebody buying that room through, travel agents, and brokers and. Other intermediary. Intermediaries, and each. One has their own database and so. What happens, is that. Somebody. Thinks the rooms available it's really not available anymore because it's already been sold or. That. Room gets. Lost. Nobody in. Transacting. It between one party another it, gets dropped and so, and, this. Leads to a ton, of waste a ton, of fraud there's about 10 billion dollars per year in fraud. And waste in the, travel. Business through. This kind these kinds of problems and so what. Web jets created is this, blockchain. Network, called res Sain and res. Chain is where they track these. Transactions. Among all. Of the travel, agents and the hotel. Suppliers, and the, other parties as, part of this they've. Already, reduced. The number of disputed transactions, by 90 percent since, putting this into production just a few months ago so that's an, example of blockchain nobody really wants to trust anybody else running this centralized, thing in blockchain.
Could Come and give that distance realization and visibility. One, of the things I want to mention is that there's like. I said I showed, you earlier there's tons of other examples of these. Block chains in production, or, going to production like 3m, food safety 3m. Has got one for pharmaceutical, authenticity, where, they've got theirs tamper proof containers. Pharmaceuticals. Get bottled in those they, can be checked for authenticity and that, they haven't been tampered with and then, that goes through a supply chain all the way out to for example a pharmacy, and using. Buy tracking that in a block chain with, IOT that, is going and saying a link step of the way as, this you know checking. To make sure this thing hasn't been tampered with that, you can verify that the drug, that you get at the pharmacy is actually, the legitimate, drug produced. By factoring. So. We've got a bunch of blockchain initiatives, at Microsoft, that I mentioned, I was going to wrap up with one. Of them is block. Chains in the marketplace, so. We have. Templates. As your resource manager templates that you can go into the marketplace there's. Roughly twelve or thirteen of them for. Roughly. Four or five five or six different ledger types where. You can go and within, a few minutes deploy. A single, node for your own dev test of, blockchain. Multi-node. For. A larger, proof-of-concept or a multi. Member one, that you might want to even put into production where you're collaborating with other parties, so. The. Templates support all of these kinds of scenarios including aetherium network for example that you can stand up nodes at different Asha region regions for high availability. So. It's a quick way to get started just with the core of a, blockchain but, one. Of the things that we've seen as, we've been working with customers is that this, kind of stuff managing, this level stuff is very complicated. Setting. Up the blockchain network and then, if. That's taken care of for you by the template, the next level up is like how do I wire, this up without your key vault how do I get Azure Active Directory to manage, those keys how do I look. At this in a sequel, database that the, history, of these transactions, how, do I kick off a workflow to my CRM, database for example if it's blockchain. Needs to kick off something there how do I do all that that's and how do I create api's and front-ends and authentic authentication for, people to be able to interact at the blockchain all of, that is left, as an exercise to the reader until. We. Develop this, which, aims at taking. All that stuff and making it go, away, it's. Called Azure blockchain, workbench, and we. Auto generate, a blockchain. Platon. Platform for you when you go create one you going to create one of these in a few minutes, underneath. The hood you're getting an azure database, you're. Getting a web. Front-end, an azure app service, you're, getting business. Logic on, a drive service you're getting. Xamarin. Apps that. Are automatically, generated with the with, interfaces, to interact with the blockchain you're getting Azure Active Directory stood. Up and connected, with identities, and keys stored, in key vault and you're, getting a web interface where, administrator, or somebody interacting with the application, can. Go and see what's going on and execute, transactions, but not, knowing. That they're executing transactions, basically just. Setting, properties, on a smart. Contract and what. Happens underneath the hood is key. Is fetched out of Azure. Active Directory. As. Your key vault transactions. Created transactions, fired in the blockchain and that's. Just. All