 So let's try and summarise, maybe go back to our picture, because we may have to skip a few things, but we're getting to what many of you have heard of. You hear about mining, Bitcoin mining, so that's what we're getting to and what it involves. But so far we know that we have transactions. Everything is a transaction. And someone checks, so we have a log of transactions, and once those transactions are entered into the public log, the true log of transactions, then new transactions can be created, which refer to them, which spend the Bitcoin. So we saw that a transaction created 30 Bitcoin for Tanarak, transaction three spent that 30 Bitcoin, sending five to Steve, and sending the change of 25 back to Tanarak. So each transaction spends Bitcoins. And we build up millions of transactions over time. Now, one of the problems is what's called double spending. I have just received, I think if we go through these transactions, you'll see I received two plus five. I have seven Bitcoin to my name. I have seven Bitcoin. If I was to cheat, what I would like to do is be able to say, let's create one transaction that sends seven Bitcoin to one person to pay them for something they've just sent me, and let's create another transaction that sends seven Bitcoin to someone else. Double spend. I've only got seven, but I spent it twice. That shouldn't be allowed, but that's something that a cheat may try to do. We need to stop that. I create two transactions spending all my Bitcoin, and the way that the system works is that when a transaction enters the network, not everyone has to verify it. So I create a transaction. I send it to some other computers in the network. They try and verify it with respect to the log. Not everyone must verify that one transaction. In fact, only one person needs to verify it eventually. So what I do to try and cheat the system is send one transaction to this area of the network, send the other transaction over here with the hope that both of those transactions will be accepted. Because this part of the network doesn't know about the other transaction, and this part doesn't know about the vice versa, the second transaction. So I hope that both transactions will be accepted, and effectively I've spent my money twice. That's bad. So we need to stop that. Now, why would two different groups of people verify different transactions without knowing about the others? Remember, it's the Internet. It's a distributed system. No one is connected to everyone else. You're only connected to a set of users, a small subset, such that you're not aware of what everyone else is doing. If it was a centralized system, the bank would verify all transactions in order. But in a distributed system, entities may be verifying separately and independently. So we need to somehow maintain ordering such that if I create two transactions to double spend my money, one of them will be verified first, and therefore the others will know that the second transaction must be rejected. That's what we want. And one way to do that is that we introduce some sort of delay into the system, so it takes some time to verify, and that's what we're trying to get to. But in fact, we now not talk about verifying individual transactions, we talk about creating a block of transactions. So there are many transactions every second. There are many new transactions occurring. And what we do is we group them into a block, and then a block will refer to... the next block will refer to other previously created blocks, where blocks contain verified transactions. So let's say all the transactions that are currently being verified are included in the block chain, a chain of blocks. Now there's some new transactions. What we do is we group them into a block and try and create that block to add to the chain. Once it's added to that chain, those transactions included will be considered verified or confirmed. Maybe a picture will capture this before we go into the technical details. Let's see if we can talk about it in a picture. This concept of a block and a block chain. So now the first block contains the very first transactions when Bitcoin was created. And there's some special cases. How did you create the first transaction and verify it? Let's assume the first block was created. A block is a data structure that refers to the previous block. It's like a link list or a list. There's a pointer to the previous block, except for the first one. It's called the Genesis block. Block 1 refers to block 0. And the block in the data structure also refers to the transactions inside that. So a set of transaction IDs. How many? It varies. Today it's usually in the order of 100s, or 300. We'll see some numbers later. So what happens, new transactions are created. They are sent out to people to try and verify. And what people do, people, other users in the network, so let's say we already have four blocks. Block 0 up to block 3. They're being created. They refer to verified transactions. Then there's some new transactions. Transaction 22, 23, and so on. And there are two different users. User 1 and user 2. We'll call them miners. We'll explain why later. But two different users. What they are trying to do is they take some of those unverified transactions. Those that aren't yet in the list. And they include them into a block and try and create a new block to add to the chain. So miner 1 creates a data structure containing a header which points to block 3. Includes some transactions. They don't have to be the same transactions, just some transactions. Miner 2 does the same on his computer on the other side of the world. Creates a block with a header and some in transactions. And then they perform some operations to mine this block, to create the block. And the operations are set up so that it will take some time. It requires your computer to do some work. It takes some time. We'll talk about the time later, but minutes, hours if you have a slow computer. So both of these computers are trying to create the next block in the chain. It's only a linear chain. There should just be one next block. So let's say miner 1, I think, has... So first, each of these computers check the transactions, make sure the signatures are correct, the money's correct, the amounts are correct, everything's correct, and they do some operations to create the next block. And let's say miner 1 has the fastest computer in this case. Miner 1 wins. That is, they create the block, they solve some problem, we'll come back to what that problem is later, but they solve some computational problem, and they create the block and they tell everyone in the network, I've created block number 4. Okay? And everyone checks, it's very easy to check that it's a valid block, and this block 4 and the transactions within become verified. They added to our transaction log. That becomes the next block in the block chain. This assumed miner 1 created that block first. They won some competition. Miner 2, when they realised that miner 1 created the block, they finished first, miner 2 gives up. They stopped creating their block because there's no longer a motivation to do it. Well, what's the motivation? It turns out whoever creates the next block in the chain gets 25 bitcoins. Today, 25 bitcoins is about $16,000. $16,000, US dollars. So the person or people who create the next block in the chain gets this special transaction of no input, output is you. That is, you get a reward of 25 bitcoins if you create the next block. So there's the motivation to create blocks because they get some financial reward. So both of these were trying to create the next block. Whoever does gets 25 bitcoins. Miner 1 got their first, they get the 25 bitcoins. Each block must refer to the previous block. So miner 1 creates the block, sends a message to everyone, I've created block 4. Miner 2 receives a message, someone beat me to it. Okay? And he gives up. Why does he give up? Because there's no longer a reward for block 4. The next block must point to block 4. The computation was such that miner 2 is doing some computation and that computation refers to block 3. But once block 4 is created you have to restart that computation because your computation must now refer to block 4. You can't continue with the old one because, well, you can, but you'll never get the reward. So miner 2 gives up and now he creates a group of transactions and goes to work trying to create block 5 as do other miners. And whoever creates the next block is added to the chain and everyone, I've created the next block. Everyone, it's very quick to check. It's broadcast through some network. Once you've learned someone else has created the next block, then you give up what you are doing and then move on to the next block to try and win that competition. So why create blocks? Because you get some reward. You get some financial reward. That motivates the people to do it. And it's important that each block is referred to the previous block in the chain. So that if you are working but then you learn someone else just complete a block 4, then there's no benefit in you continuing on this one because block 4 is already existing and your new block must point to block 4. So you must restart. The computation of creating a block is the previous block ID. So when the previous block ID changes you must restart your computation. Now, it's the internet. It may happen such that two blocks are mined at the same time. Miner 1 and minor 2 are going to work. They both find the next block. They're both separate at the same time. And they both tell everyone I've created a new block. It's a tie in the competition. They tell everyone, so minor 1 create a block 4, let's call it 4A, and minor 2 create a block 4B. Now this can be a problem because what that says is that from our system someone's saying that these transactions are being verified but someone else is saying that these other set of transactions are being verified. This is, we start what do we call it? We get a fork in the chain. Now what happens? This is possible. It turns out in practice very, very uncommon that two sets of users create the next block at the same time and then tell everyone and everyone believes them. Usually it's one of them comes first. But if it does happen then people then start creating the next block. Block 5 Some of them will refer to block 4B and others will refer to block 4A. Again, when you create a block you get a reward and when you create a block you must point to a previous block. Some people are trying to create this block which will point to 4A others are trying to create this one which will point to 4B. The one that wins will create the block let's say this group or this person wins and creates block 5 the system will then disregard this block. It will remove it from the chain. So if we get this special case where two users create a block at the same time it's possible. But usually it's fixed shortly later and it's fixed because now people are trying to create the next block and let's say one of them wins one of them gets there first this one does so now block 5 so the other users who want to create block 6 what they do is they normally take the longest chain so now we have removed this red cross but we have this chain and this chain and then the next block needs to be created well users choose the longest chain that's the rule to continue from the longest chain and what happens here this block moves from previously created and transactions verified to be orphaned and the transactions are no longer verified so they put back into the pool of transactions that need to be verified so yes, transactions in here which are not in the other blocks need to be verified again so that's the problem that's what happens with these ones and that's coming to this issue of a transaction occurs I make a payment to someone at what time do you believe that you've got that money well you want that transaction to be included in a block let's say my transaction was to pay Dana a thousand bitcoin and I'm going to pay him that and he's going to send me a car I'm buying a car from him so when does he send me the car once he's got the money but how does he know he's got the money well let's say it was transaction 22 then at this point transaction 22 has been included in a block okay good let's say it was transaction 22 so therefore he sends me the car because his transaction of receiving that 1000 bitcoin has been accepted by the system so he believes he's got the money and fine the next block and then this transaction remains in the log it's all about a log of transactions trusted transactions but what if his transaction was 27 transaction 27 it's verified here so he sends me the car thinking he just got 1000 bitcoin but then slightly later this transaction is converted back to unverified that doesn't count that transaction he hasn't got the bitcoin I've got the car so yeah so a block turns out takes about 10 minutes to verify every 10 minutes a new block is created so when does the receiver believe that they've got the money one rule has been once 6 blocks after it after that transaction have been created let's say in this case the block containing his transaction has been created if he believes he's got the money at this point in time he may be very unlucky and that this block is sorry, is rejected because of a fork in the chain so to be increase your confidence that the block is going to remain and the transaction remain wait until the chain is such that there are 6 blocks from when your transaction occurs because that means that it's very unlikely that that block containing the transaction is going to be rejected because of the way that they always choose the longest block the block chain the longest chain it's getting confusing so some practical things there about 10 minutes to create a block when do you believe the transaction has been confirmed well it's up to you but a general rule is 6 blocks once 6 blocks after your transaction have been confirmed then that's very very unlikely that you're going to have that transaction rejected in some cases it's you can make it longer in some cases it's 100 blocks and in practice these forks I'll show you some statistics say to very few happen so very few times does a block be rejected so it's possible in theory but in practice it turns out that usually there's only one chain so if it's 6 blocks and 10 minutes per block that's 1 hour transaction occurs about 1 hour later you can think I've got the safe to say you've got the money so there is some delay there yes so what happens is let's say how do we get to so we have a fork here we've got 2 parallel chain of blocks then the next one they happen at the same time and then the next one happens at the same time and it keeps going then we keep this parallel and we have this problem in this case that it's possible to have a transaction that double spends and that's bad so the longer that we have 2 parallel chains the more chance it is for someone to double spend but even then it's still possible to go back and revert so it creates a problem yeah yeah there was a problem with the version of the software I think such that there was a parallel chain created and eventually one of those forks had to be deleted which effectively invalidates all those transactions which causes a major inconvenience to people who thought they got money but actually didn't of course that impacts on the value of things as well what can happen if you do have a parallel chain is that let's say back here transaction 38 I received from some other transaction one bitcoin I have one bitcoin that's all I have I create two different transactions 427 and 435 both of them refer to 38 and both of them I'm spending one bitcoin this is double spending I have one bitcoin from here and I've got two different transactions trying to spend that one bitcoin one sending to Pekini one sending to Tanarak if this transaction is verified in this block and this fork of the chain and this other one here then Pekini thinks she's got one bitcoin from me Tanarak thinks he's got one bitcoin from me but I only had one to start with so both of them can't get one so that's the problem that we get if we have two parallel chains now if block 7 is created here then this chain is this fork is removed all these transactions are invalidated and then Tanarak doesn't get his one bitcoin so it works in that case but of course if Tanarak has tried to spend that one bitcoin somewhere else then that creates a problem so the problem with this fork is that double spending is possible but it's very unlikely in practice I'll show you statistics in a moment hopefully the last main thing why create blocks and creating blocks is called mining we create blocks to keep this transaction log consistent everyone agrees upon the same set of transactions if people are agreeing upon different sets of transactions we get the problem like double spending so the way the system is set up is that a new block takes some effort and to create the block you need to prove that you did work the concept of proof of work how's it done the users that create new blocks are called miners this is bitcoin mining what do they need to do so what they do is they collect a set of transactions that's easy then they create a data structure the block header there's some information about those transactions and that data structure must include a value of a special value and this is how it works the block data structure we must be able to take a hash of that block data structure and get a number that is less than some cutoff now moving back to hash functions using char256 with char256 there are 2 to the power of 256 possible values 256 bits long meaning 2 to the power of 256 possible values and char is effectively a random number generator if I take some input I'll get a random number as output a 256 bit random number if I change the input by just one bit I'll get a different random number as output the input in this case is the block header just some 80 or so bytes it's not big but it's some data structure that refers to the previous block now the block header must be such that when we take a hash of that we'll get a number which is less than some other number which is defined here we take the block header we calculate the hash of the block header and we get the block ID effectively a random number the block ID is the hash of the block header it must be less than this value which is 2 to the power of 256 divided by some difficulty factor times 2 to the power of 32 if the block ID is less than this then you've created the block if not you must change a value inside the block header there's a counterfield that you can change and retry calculate the hash you'll get a different random number a different block ID if it's less than this you've created the block and you've won if it's more than this value then you need to try again until you get a number less and see how that works coming back I think the block header contains the ID of the previous block so if we're trying to create block block 6 the header contains block 5 the ID the list of transactions some other information the difficulty factor but importantly a counter some value that we can set to anything so what we do to mine a block I create this data structure I set the counter let's say to 0 I calculate the hash of these values I get a number if that number is less than our cutoff then I've created the block and I've won the competition if it's more than that cutoff then I change my counter value to a different value take a hash again and if it's less than the cutoff I've got the block if not try again and again and again how long does it take or what effort does it require remember calculating the hash of some input generally or effectively produces a random number our random number the block ID must be less than this do I have an example here's an example currently the difficulty factor is about 2 to the power of 34 therefore our block ID or our random number must be less than 2 to the 256 divided by 2 to the 34 times 2 to the 32 do the calculation it's 2 to the power of 190 that is my block ID must be a value less than 2 to the power of 190 so what I do is I take a hash of the block header I get a random number I win it's less than 2 to the power of 190 if it's a large number greater than this I must try again and I'll get a different block ID and keep trying until it's less than this and the way that I produce a different header is I change the counter now let's look at the statistics here how many possible outputs are there of the hash 2 to the power of 256 256 SHA256 produces a random number of 256 bits in length therefore this is the number of possible values of all those possible values I need one of them which is less than 2 to the power of 190 so what's the probability of choosing a random number from some range this is the range and that number must be less than this well it's 2 to the power of minus 66 I'm sure you do this in your head quite simply if we choose from if you choose from 10 numbers what's the chance of it being less than or equal to 4 so choose between 1 to 10 the chance of being less than or equal to 4 well you either choose 1, 2, 3 or 4 you've got 40% chance so the same logic applies here you can work out the probability it's the total set it's the cutoff divided by the total set which is this and because it's random numbers how many attempts do we need to take to get that probability of 1 well 2 to the power of 66 on average I need 2 to the power of 66 different attempts to get a number less than 2 to the power of 190 back again 1 to 10 needs to be less than or equal to 4 you choose a random number you choose 7 it's not so you try again you choose 3 we've got it in 2 attempts if you keep doing that how many attempts does it take well this is what we're calculating here 2 to the power of 66 so to create a block what you do is you create the block header and you keep changing the counter and on average because it's choosing random numbers you cannot control the output on average it takes in this case 2 to the power of 66 operations so how long does it take your computer to do this 2 to the power of 66 is 7 by 10 to the 19 so think of a loop runs that many times each loop calculates a hash how long does it take to do this depends upon how fast your hardware is my I tried it this morning my laptop can do 1 million I've got the number I'll show you this is my laptop it's doing many hashes and this is the number on a small input size it did in it'll stop in a moment and we'll be able to read it I'll highlight my laptop focus on this line in 3 seconds 2.99 seconds my laptop did hashes let's round it up to 3 million hashes 3 million hashes in 3 seconds is 1 million hashes per second my laptop can do 1 million hashes per second your laptop may be different but say 1 million hashes per second we need to do 7 by 10 to the power of 19 hashes how many seconds well 7 by 10 to the 19 by 1 million anyone have the answer the number of hashes is 7 times 10 to the power of what do we say 17 19 and my speed is for me was 1 million per second 10 to the power of 6 this one will do that's how many seconds it would take how many minutes how many hours sorry how many days how many years how many centuries well 22,000 centuries it would take my laptop to find a block the reward I get for getting one block is 25 bitcoins it's about 16,000 dollars so if I wait for 22 centuries I will get 16,000 dollars okay we have a problem so mining is creating a block the rules are you need to create a hash of the block header which is less than some value the value is fixed except it depends upon some changing difficulty factor and that changes effectively as the speed of hardware and the number of people mining change this difficulty factor goes up and down it increases making it such that today if I use my laptop take 22,000 centuries but what people do is they combine many different hardware devices into a group and all mine together and the current rate is that groups of people are doing about 10 to the power of 17 hashes per second my laptop did 10 to the power of 6 but in the internet with people grouping together they are doing about 10 to the power of 17 per second which takes about 700 seconds or about 11 minutes and that as the hardware speed increases the difficulty factor increases which makes it such that it's designed such that the time it takes is roughly about 10 minutes to create one block to solve this problem takes about 10 minutes no matter how good the hardware is 5 years ago it took 10 minutes today it takes 10 minutes because the network automatically adjusts the difficulty factor such that if there's a great increase in the hash rate from 10 to the power of 17 up to 10 to the power of 18 overnight the difficulty factor changes so that it still takes about 10 minutes to create a block but this is in total this is not on one computer this is 10 minutes with maybe thousands of people using dedicated hardware all trying to create one block a pool of minus questions with time running short I think today a lot of the details we will not understand mainly because I don't understand some of them as well like I said I spent the last two or three days learning this I haven't used Bitcoin before so that's why it may be hard to convey the details to you but some of the things that you've heard of in the press in general maybe will start to make sense now not all of it but maybe we need another three or six hours to go through and explain in depth this difficulty factor is designed such that it takes about 10 minutes to mine each block and this value is adjusted every two weeks the system does a calculation how long did it take to mine the previous blocks and then adjust the difficulty factor such that in the next two weeks it's going to take about 10 minutes per block so it automatically adjusts so this is block mining the block mining is creating that block and it requires a lot of computational effort if you do it on your own computer well using your CPU impossible well it's possible but what happens I start mining on my computer but everyone else is mining using their computers and their groups of computers so I'm never going to win I'm never going to be faster than someone else someone else is always going to get the block before me I do not get a reward but I spent that 10 minutes processing using power electricity so mining on your own computer is not worthwhile in the past when the difficulty factor was quite low it was possible to mine on your own computer it was possible to win but now the capabilities are such that it's very hard to win so why mine blocks when you mine blocks you're using hardware you need to buy the computer you already have it that's fine but you need electricity you need to pay for power unless you plug into the university's electricity don't do that I saw news a few weeks ago someone had access to a supercomputer in the US and they would use that to mine coins they weren't bitcoins and they got caught so they're using the university resources to make some money on the side and they got caught I don't know what happened to them but it wasn't nice I suspect they got fired at least well yeah but you're still using electricity and compute resources of others so it costs to mine so why do it two reasons every block you're allowed to include one special coin based transaction and a coin based transaction is one where there's no input there's just a single output and you put that output to be you that is when you mine a block you set one special transaction to say give me 25 bitcoin so whenever you create the block you receive 25 bitcoin for free so this is the mining it's the benefit the reward changes over time so currently it's 25 bitcoin later it will half down to 12 and a half so about every four years it was some time period so the reward changes over time another reward is that some transactions include fees I create a transaction I want it to be processed very quickly so I include a fee in there it reminds a block that includes my transaction they can have this fee so that encourages people to create the blocks especially when the reward from here goes down to very low in the future how do you get people to create the blocks well increase your transaction fee if you don't include a transaction fee then maybe your transaction may take one hour, two hours if you include a high fee people will include that quickly and it will be processed faster that's the motivation there let's go straight to some statistics to finish I think and there are other slides you don't have them in front of you but I've just stole a bunch of things from different websites some of the websites here you can find one bitcoin yesterday was 646 US dollars or about 21,000 baht so that's the value of one bitcoin so mining a block gives you 25 bitcoin which is about 16,000 dollars if you mine the block you can have fractions you don't have to deal in bitcoins you have decimal places so you can have milli bitcoins, micro bitcoins the lowest is a Satoshi that's named after the guy who created it and there are 10 to the power of 8 of them in one bitcoins that's the lowest denomination that we have this is some graphs of prices so bitcoin to US dollars over time I did this yesterday over the past 24 hours so you see the scale this is 640 dollars 650 so over a day it's ranging between 640 dollars to 650 dollars it varies quite a lot it's quite volatile at the moment this is over the last one week so 650 up here 575 one week ago one bitcoin was 575 dollars so you send someone one bitcoin to do some work one week ago thinking it was 575 dollars they redeem the bitcoin today and they get 650 dollars so like with any currency the the changes can create problems and over different times one month one year one year ago in the order of tens of dollars one bitcoin so if you bought or if you mined one bitcoin then or someone gave you one bitcoin one year ago because they were nice to you now it's worth 650 dollars it peaked at about 1200 dollars so it's changed quite a lot and it's been running for about 5 years so that's the value over time some other statistics from a different website transactions per block we say we group transactions into one block currently there's about 400 transactions per block it's up to the person who creates the block to do it the fees may impact on which ones they include and whether the transactions have been received there's no limit there orphaned blocks so those blocks in a chain remember we get a chain and one of them has to be discarded once the other chain is accepted that discarded block and all those discarded transactions is called an orphaned block over time over the last one or two years how many have there been there haven't been many forks in the chain so here there was a fork where there were four orphaned blocks so the chain was four long and eventually they had to be discarded okay so it doesn't happen very often but it's starting to maybe happen a bit more this is the hash rate so for every block how many hashes per second that you need to do remember we do a SHA-256 hash if you took my computer well my computer could do 1 million per second this is the rate of the network not of a single computer but of when people mine in groups usually how many hashes per second are they doing giga hashes per second not mega 1 billion hashes per second what's the number 120 million giga hashes per second okay that's the what 10 to the power 17 or whatever hashes per second my computer can do 10 to the power of 6 per second but people when they combine together in groups are doing 10 to the power of 17 hashes per second so they're using many many computers and they're not using general purpose computers they're using dedicated hardware and the difficulty factor rises as the hash rate rises to keep things always about 10 minutes even though we can hash faster it still takes 10 minutes to get the block the miners how do they make money they get this 25 bitcoin reward plus transaction fees transaction fees are a very small part maybe a few percent or 1 percent of the total reward so it's mainly the 25 bitcoin this is how much in terms of US dollars miners get per day so what's this around 2 million, 3 million 2.5 million US dollars reward distributed now mining is not done by a single person anymore it takes me 22 centuries if I do it myself what I do is I join a group a pool and we all join together to mine one block when we get that block that 25 bitcoin is distributed to everyone who contributed so I don't get 25 bitcoin I just get a fraction of that I think it depends upon how much you contribute to the mining so let's say all of us join a group if I have the fastest computer that contributes the most hashes then I will get the largest fraction of the bitcoin but we'll just share it where do we get to some statistics how many blocks in the blockchain so it's just one long chain of blocks and how many bitcoins about 13 million bitcoins have been mined from people creating new blocks the current reward per block is 25 but it goes down every few years the difficulty factor in the past 24 hours this was yesterday there were 143 blocks added to the chain per day times by 25 is 3,500 bitcoins mined about on average 10 minutes between blocks it varies sometimes it's 15 minutes sometimes it's less but on average it keeps to around 10 minutes transactions 66,000 transaction fees very small of all those transactions the fees were 12 bitcoin but there were 3,500 bitcoins in reward so the transaction fees don't account for much people estimate how many what's the value of all those transactions some people say about 100 million bitcoins and the hash rate similar to what we saw before there's 120 million giga hashes per second to finish I think one maybe two slides mining hardware you want to create your own bitcoin so you mine that is you create blocks what are the hardware options well use your general purpose CPU use my laptop or desktop computer the rates at which CPUs work and this is rough so plus or minus an order of magnitude but mega hashes per second you need to pay for electricity so mega hashes per second per watt that that hardware uses and you need to pay for the device so mega hashes per second per dollar so we want these to be large a CPU you're talking about the order of 10 mega hashes per second mine's a laptop maybe you get a faster CPU mine was one GPUs at one stage were very well suited to calculating hashes or they still are the graphics card and they could do about 100 mega hashes per second they use more power but the ratio was quite good compared to your CPU so many people use the graphics cards video cards to do the hash calculations but then people okay let's get some dedicated hardware GPUs and CPUs are just general purpose hardware for other purposes FPGAs, field programmable gate arrays you basically buy some general purpose integrated circuits and you program them to do some special operations the operations are calculating hashes much faster than GPUs about the same in terms of the ratios of power usage and value then okay instead of buying general purpose integrated circuits get someone to make an integrated circuit for you that specifically calculates hashes A6 application specific integrated circuits you go to a company and say I'm going to buy 100,000 integrated circuits if you program it make it this way an FPGA you could go to a company and say I want to buy one maybe it's expensive I don't know $10,000 you buy one of these and you program it or someone programs it to calculate hashes A6 maybe costs $1,000,000 to create but once you design and create it they're very very cheap so to buy in bulk is very cheap compared to FPGAs and because it's dedicated hardware just for one specific problem we're talking about nowadays around 1,000,000 mega hashes per second and much more efficient in terms of power consumption and hardware so nowadays to mine using a CPU you'll never get the reward someone will always beat you to it because someone has faster hardware even using a GPU you will not get the reward someone will beat you to it because someone else has an ACP which goes much much faster and more so even doing it yourself people don't just do it themselves they join a group tens hundreds of these devices which may cost $100,000 a total of $100,000 just to mine one Bitcoin which returns $16,000 so people join groups and it's called pool mining there's a greater chance of winning but of course you must share that reward amongst everyone else in the pool much more there are alternatives crypto currencies Bitcoin is the popular one there are others Bitcoin uses SHA256 there are others, name coin and others so there are many I just selected some popular ones here they have different characteristics so some are newer or most are newer therefore there's maybe more reward less people working on it but maybe there's less chance in the future of being valuable so there's maybe more risk associated with it so there are many different ones some use different hash algorithms well you go and spend your thousands of dollars on some buying some integrated circuits that work for Bitcoin it only works for Bitcoin or it only works for SHA256 it will not work for coins which use different hash algorithms because it's designed specifically for that hash algorithm so it's not valuable for other things some are designed to be slow on integrated circuits so that people cannot get advantage by just getting better and better hardware slow such that they still you can mine you with a CPU so they have different characteristics many similarities to Bitcoin how to make money I have no idea well these change so the value of these change over time Bitcoin is still the largest but other the new ones are growing to some extent there are many issues with the financial side which we just don't have time all the knowledge to discuss we're going to aim to finish at 12 o'clock we're 5 minutes behind ah, this is something that we are asked about briefly mentioned so you receive a transaction when do you trust that you've got the money the general rule is after 6 blocks have been confirmed so your software will be programmed to say I'm running some Bitcoin software a wallet someone has transferred me Bitcoins my wallet will wait for the network to confirm 6 more blocks before it shows up saying ah, you've got 10 more Bitcoins ok so it some extra confirmation such that they're unlikely for your transaction to be rejected later if you mine Bitcoins it's set to 100 blocks you mine you must wait 100 blocks before you spend it ok, so what's that 15 hours or so anonymous are you anonymous every transaction is recorded who sends to who is recorded so that's not anonymous but what is recorded well, the hash of the public key of users or generally the public key of users so even though I can see this public key sent to this public key at this time this amount of money do I know that it was Steve sending to Tanara well, if I can map the public key back to an identity, yes but if we start to use many different public keys it's much harder for someone to map back to an identity so that's where it can become anonymous by using multiple data to account Silk Road I think they proved that it's not as hard so Bitcoin is being used in different places and one website was Silk Road saying drugs and murdering people and so on but I think usually when the FBI takes down things like that, they use not just they don't break the cryptographic principles here, they usually just get information from other sources I think right, if you've got software on your computer and someone gets that software then they've got your public ID and they can match that public ID to your name but if they've just got your public ID or your public key they're mapping that to your name if you use multiple public keys it can be very very hard but if you collect other information yes, it's possible all transactions are logged so that's not anonymous it's whether or not someone can map your public key to your actual identity and that takes different techniques that's it okay