Hi everyone, I just wanted to show off our new Zcash sidechain. So, this software is primarily for Linux, but if you're running Windows, you can use a free piece of software, VirtualBox. I think Mac users have better experience with a different piece of software, but its name escapes me right now. But once you have this thing, you can make little computers within computers, and you can put Linux on there. This is Ubuntu, that's a version of Linux. All this is free software, so it's kind of a neat trick. Once you get all that set up, you want to open up your Linux operating system, and I have that here. And then you want to go to the internet and download, this is the drivechain.info releases page, this little trophy. Here's where we host all the software files. You need to get the mainchain, and you need to get zside if you want to use it. We will put the latest version up here when it's ready, and I've downloaded them all. When you get them all, they'll be in these tar.gz files, that you'll have to open and then extract. They're compressed to save space, but you're going to uncompress them into these folders. Now we're just going to run them all and take a look at them. To do that, you go into this bin folder for binary files, and you open a terminal window. The Qt is the graphical user interface, so this is the one that you want with a Q. This is what it looks like when the blockchain is blank. We want to run it in something called write-test mode, so that we're all on our own and we can just generate blocks as much as we want. We'll be God over there. This is the first piece of software. It looks just like Bitcoin Core, except it has the sidechains tab. There's no sidechains here yet. We're going to add them now. Now we go into this second folder for the testchain. We're going to give this a run. Then we're going to do the same thing with the last piece of software, which is zside, which is what we really want to look at today. This is all three softwares with no blocks and a brand new version of the blockchain. I'm going to move all this stuff so that we can take a better look at it soon. Now we have three pieces of software. This is the mainchain. This would be Bitcoin Core 16.99 with BIP300/301 activated on it. We're in write-test mode for all three. This is the testchain. It's basically just a blank sidechain that does nothing, but it can send and receive coins. This is zside. It has cool Zcash technology in it and a cool little user interface that we built for that, which I think you're going to enjoy seeing. The first thing we have to do is, since sidechains are layer 2s, we have to link them all up to our full node, which is this guy. This is the full node. There's actually a little trick for this. We have this little thing here. You have to restart, though. That's the only hitch. You have to close these pieces of software down and restart them, which is a little annoying. Other than that, it's just clicking a button, which is pretty convenient. We use a command line to get them all back. We're on the same command as we did before. Now they're all going to be connected. If you go to the parent chain tab, you see that it's now connected to the mainchain. Now, since we're in write-test mode, we're going to be conjuring some blocks out of thin air. On the debug window on the console, you can just make some blocks if you like. You can make as many as you like. Now we have coins. In particular, we're going to need to activate these sidechains, so we need some information in order to do that. The sidechain parameters. Sidechain 0 is the test chain. We're going to add it. Create sidechain proposal. We will now click this button. We'll just do them one at a time, just so you can see them come to life. Generate another 20 blocks. Now it exists. Generate another 20 blocks. Now it exists. Now we will do zside. This is sidechain number 1. The sidechain has to know what number it is. Right now, you can only add them in order. It's much easier to add a sidechain in this test than it would normally be. We just shortened it for ease of testing and demonstration to 64 blocks, which is obviously a very short amount of time. Anyway, now they exist. We will go to zside, parent chain, transfer. Here's all these ways of interacting with the sidechain. What we want to do now is transfer coins over. We're going to deposit to the sidechain. It gives us an address here. We can just copy it over and put it over here. Thanks to all these blocks I've been finding, I have all these coins. Let's just send 1,000 over. This thing will complain about the fee if it's set wrong because it's poorly designed by whoever made it. It wasn't me. You have to type in some fee there. It can't be too high or too low. The other thing you need to do is, in order to find blocks, you have to enable Blind Merged Mining. You have to go to BMM, Blind Merged Mining, and click Start. You can also do it manually, but I don't recommend that because it's pretty confusing. We're going to mine blocks on the test chain as well. Why not? Oh, that's what I said not to do. Okay. Now we have... The blocks are being... It's going to try to find blocks in concert with the mainchain. Now we're going to generate... It's going to generate one block at a time. As you can see, we find a block here. We have a little thing here that you may be able to see. 237 blocks. Now we have one block on Z side. And we also have one block on the test chain. So... The deposit can't go through until there's some confirmations on... At least one confirmation on both pieces of software. So, that was two blocks. And now it's over here as immature. We're going to keep finding blocks, block by block, until the coins become available on... Z side, which they now are. So now we have our coins on Z side. And the coins are in a T address. Over here. That we can see. And we can see that it has two confirmations in this address. And if you want to shield these... You can use this Zcash tab to click shield. And shield a certain amount. So let's say you want to shield 40 coins. You click this button. And then it does some calculations. You know. In the background. But it's going to need more blocks to show up. On the right. Which is where it belongs. Now that it's a Z address. So you can see it went down to 659. The 40 coins are gone. But three blocks and then... Let's see, still three blocks. Let's see if we can get some... Five blocks. Here we go. And now you see 40. Minus the fee. As you may have noticed. This amount will be... There's a fixed shielding fee. In the world of Zcash. So let's do another example maybe. We'll do like 100. And we'll add the fee in. Put the fee in here. So that it comes out to a nice beautiful number. So we'll do that. And then we'll get more blocks on everything. When I do generate on the main chain. It's finding blocks on all the networks at once. You see even the test chain is going up to five. It's finding these blocks over here. Of course nothing has been deposited here. So there's no coins in the test chain. The parent chain on there knows. That there's a thousand coins. Here. So let's... Remember those calculations took a while. Oh this is funny. We've mined over here. We've mined the fee that it took to shield this. So we shielded this. And we also mined that. It showed up here as a... I forgot that that happened. So we should get another one. If we just keep mining. Keeps track of the confirmations. This is a change now. So it has less. So now we had our round number of 100 show up. And we should get another shielding fee. Should we not? So... Now we have some transparent coins and some shielded coins. And... We can... You know, send them around. Or... To another Z address and they'll be totally private. Or we can deshield them. So let's take... 100 and we're going to say... Well we want... 14 and then back. And we'll add the fee back in. Actually, I don't know what... I don't really remember where the fee will come out. So we'll see what happens with that. But it will come out to a new T address for us. When it does these operations, you can click this button and look at the history of what happened. Because it's kind of actually confusing without this button, so we added it. To figure out what's going on. Now we need some more blocks. And we deshield. So we're just going to find more blocks. You can see how the number of confirmations keeps going up. Keeps driving up the confirmations. Coins have. Great. Almost. There. Oh, we saw that vanish from that. Now we have... Success, success, success. Our 100 output is gone. Will it give us a new... There it is. 85.9999. And 14. Oh wait, that's the shielding. Oh, there it is. 14, 859, and then three of these. Okay, now. This is important. Because most of the people who use Zcash actually screw up and leak all the privacy that normally would have been added. So we've reduced... To stop the user from screwing it up we've reduced it to two steps called Melt and Cast. Now all you have to do is click Melt and it will shield all of your coins. And then you just click this button and then just wait. It won't... That's a good point. It won't shield these because it's so small that it can't pay the shielding fee. But it will melt all of your other coins. And then they'll show up over here this Available to Cast area. So let's mine some blocks again. And we'll just wait for them to show up. And remember it should be like 1,000, right? It was 1,000 coins. So okay, there they go. They've showed up. 999994. Now what this is going to do is when you click Cast it's going to show the largest bills that are all powers of two. And it's going to remove them all on a given day. So these are fixed amounts. 1, 2, 4, 8, 16, 32, 64, 128. And as you can see there's Saturday through Sunday and it's repeated again Saturday through Sunday. So what's going to happen is on this given day there's just going to be a lot of people de-shielding the coins that all have the exact same amount. A lot of people on Tuesday de-shielding 0.33554432 in Bitcoin or whatever. It will then be impossible to determine whose shielding operations are associated with whose de-shielding operations. So I just click this button and it will then extract all these coins. So you start with 999 and it's going to get D987. So if we get most of them sometimes it's luckier than other times. That's just a function of how close your balance amount is to some sum of four powers of two. So now that it's scheduled these four casts you can always cancel them of course. Now what happens when you end up de-shielding the coins? This has it queued up but it won't do it for a while so let's just manually de-shield some coins so that we have more so that we can withdraw a good amount. Let's take this and just de-shield 500. This is again not how you should de-shield but if you are determined to do so then you can do it anyway. Now I'm going to find two more blocks blah blah blah Oh yeah it takes a while to do those calculations to de-shield the coin. Here it is. Shields and now we have 500 coins basically over here in the transparent world. So we want to take those coins back from Z-side back to the main chain and go back to transfer without a withdraw. And we have 504 in the transparent balance so let's withdraw Oh whoops 400 of that. I'll put that here where it belongs. And then main chain fee it's important to pay a good main chain fee. Let's make it 90 and then the sidechain transaction fee can be pretty small. I'll just make that some random number. Then we have the total costs. Now we need a main chain Bitcoin address which we will get by going over here receive, click new a bunch of times. We'll copy it. We'll copy it over. Then we click withdraw. And then it says that this amount it doesn't like is prejudicial against this fee amount. Okay there we go. This fee estimation stuff sometimes. Okay so it's done that and you see the balance went down to 99. We now need to explore Go to the withdrawal explorer to see these withdrawals show up. So we're going to mine some more blocks. Okay here it is. It's programmed to wait to make the first one for there to be 10. So I'm just going to click this I'm going to make this really small and I'm going to click it 10 times. Since we have 99 coins. And we'll use a new address why not. Another burner. Just click this. 1 2 And in practice there would be months between these so they would be accumulating. It's just this first one that's a little quirky. 10 but we'll now check. So now we'll mine some blocks and this should all show up. 28 blocks 29 blocks And now we have more than 10 Do we? I think so. So it should construct this WT Prime thing here. It says none yet. Waiting for withdrawals. Very accurate. Okay now it's made this thing. This thing is these rare Drivechain withdrawals. Now for testing we've made it short but it normally would take So here we have this we're back on our main chain screen you go Z side and then the deposit screen you can click this other tab it says see withdrawals and it will show you any withdrawals that are trying to get through and this one hasn't shown up yet because it was just made. But these pieces of software will be talking to each other. And you see here it is. And we've programmed it to expire after 300 blocks and only need 140 blocks for testing and normally again it would be 6 months it would be 26,000 blocks and change and this would be 13,150 it would be a huge number. But you can see that this thing here has to match this thing this is the Drivechain security model does this and this match can we do anything about it in 3 months we have to click this gear since we're mining blocks over here we get to drive this around normally most users would not so we're going to set this to upvote and then we're going to mine a bunch of blocks we're going to mine 1 you'll see it goes up from 1 out of 140 to 2 and it goes up to 3 and now we're going to type in a huge number like 100 and it will go up by 100 and now how many do we need and now we'll have let it go through so it's gone through and now we can see those coins somewhere if we look at the let's see if we can get this open here enable coin control features okay so now you can see the these 50's are all the coins that I mined let's see the confirmations I don't know why they say 25 at all oh I know what that is that's because of Blind Merged Mining is spending them and making all these change outputs so sorry about that it's confusing but at the end you can see that here are all these three confirmations exactly here's the 400 of what I sent before n2 by whatever that's this thing over here and all these n1g ka1 those are all these other ones so you can see that I got the coins back over so that was the demo I hope you liked it