Breaking Digital Gridlock

Start Your Digital Transformation Today

Facebook Crypto: First Look at Libra


Hello everyone. My name is John Best, and I am the CEO of Best Innovation Group. Welcome to my channel, Breaking Digital Gridlock, a FinTech channel based on my book, Breaking Digital Gridlock, which you can find on Amazon. However, that’s not what we’re discussing today. In addition to my position at BIG, I am an advisor for Hedera Hashgraph (for more information, check out the link below). I’ve done a lot of work in this space, so I thought it’d be helpful to quickly go through and set up Libra, which is Facebook’s cryptocurrency that they announced today. We’ve heard a little bit about it here and there, but overall, it was very secretive, and I thought while I showed you how to set things up that I would also give you my thoughts.

First things first, you’ve got to find out a little bit about it. There are a lot of great articles and all you have to do is go to Google and type “Facebook Libra cryptocurrency” or even “Facebook” and “cryptocurrency”, and you can see there’s a lot of good information out there. Libra is independent, so Facebook doesn’t own them. But you can see they’re based in Geneva, which is interesting because we’ve already had some cease and desist orders from Congress today, so it’s moving fast. Facebook has a digital wallet from a company called Calibra, and then you buy the Libra from an authorized seller site. Presumably, there’s going to be some sort of KYC, but I’m not sure how this is going to play out as I didn’t see a lot of that. That said, you can find your way to the developer site, and this is where we’re going to go ahead and set it up. While we do that, I’ll talk a little bit about the more technical side of things, but also some business ideas based on what I’m seeing. Think of it as if you looked at the engine of a car and knew something about engines, you could figure out how it’s going to work or how it’s going to be on the racetrack. But remember, they’re not live yet. This is just a testnet and how you get connected.

First off, I have a plain Ubuntu Linux that I set up on my Docker and I’m just running it here. Easy enough. I connect to it via website just to make it easy for myself. First thing you should do anytime you start up a fresh version of it is go ahead and update it. This is probably going to take a little bit, so we’ll talk a little bit more about Libra while this gets going. They give you a real quick jumpstart here. You go in and you clone Libra, which turns out to be open source, so if we go to this website we should see the actual github for it. Let’s look. Sure enough, there it is. There’s a repository out there for the website and then the actual application. It talks about the Libra Core being a prototype and how this is going to change, but in theory, this is the open source piece of it where you can look at all of the code. If you’re interested in that sort of thing, that is where you go. In the meantime, we’ll see if this is finished. It is, so now we’re going to our first step, and it looks like they are asking you to do this “git”, and git is a way to clone the repository there. If you’re starting from scratch like me, one of the first things you need to do is install git, so I’m going to do that, tell it yes, let it through, and install git. A lot of people come in and try to just copy these commands and don’t understand why it doesn’t work, maybe if you’re new to Linux or something like that, but here you go. It’s putting in git, which allows you to basically grab these repositories, pull them in, and put them into your systems. Now that that’s done, we are ready to actually download this thing and get started. First thing, they gave you a nice way to copy; all you have to do is click here and because I’m running it at the website, I can’t just directly paste it, so I have to go in here and do a quick paste. Once they do that, then I can actually run the command – which I will do – and it’s cloning it into the Libra account. So right off the bat, that worked, and there I am in Libra. Here’s their application, that’s how long it took to bring it up or to download it. Wasn’t very long. You can see there’s a Libra node, there’s a swarm, there’s probably a little image here, and most importantly, the scripts area, which is what they’re going to have us do next. Now that we’ve done that, I’m going to hop over here and I’m going to grab the next thing. Now, I don’t think this is going to work. I ran into a problem and I’m going to show you how to get by it, but I’m going to go ahead and start here. Whoops! I just tried to re-clone it and that’s not going to work out. Gotta remember to put it in my little pastebin here, so let me do that. Pop it in here. Now I can just pop it in and send it off. First thing that’s going to happen is it’s going to pull all this down, and as you can see, it’s going through it and wants to know if I want to install these dependencies. I’m going to say, “Yes, I do”. By the way, if you put a capital “Y” in, which most installs want to prove that you’re looking at it, it’ll actually fail. Here we go… it’s downloading the installer and rustc. It’s basically pulling down all of the things it thinks it needs to start off this platform. It’s showing me how long it’s going to take, and I’m just scrolling up so you can see it a little better here. I’m pretty sure when it’s done here it’s going to have a problem with a piece of the software called “protoc”. We’ll see here in a minute, but as you can see, it’s installing a lot of stuff. There’s a lot of open source software that’s used in this particular platform out on github, so it’s got a lot of extra stuff in it, including this rustc piece. You just have to let it do its thing. Here is the error that I got before, and you can see that it’s that this protoc version is too old. “Update to 3.60”, and unfortunately, this isn’t necessarily trivial. However, I did find a really good place to do it, and again, I’ll put all of these links out there. My issue is that there’s a piece of software on here that it needs to run called a product buffer compiler that, for whatever reason, came in this 3.0 and it needs to be 3.60 or above. The good news is that there’s somebody out here who gave the way to do it, so here is a nice way to install it. The challenge is that we have to go in and set it up real fast. First step is to go out there and find the latest version, which I just did. We’re going to pull it down for the Linux platform for the 64-bit, which is what I’m running. I’m going to copy this link address, and then I’m going go back here to “sofyanhadia”. Thank you, sir, for giving a way to fix this. However, this one is too old, so we can’t use it.

Instead, we are going to do “curl”, which means we are going to go out and basically pull a URL in and load it. I’m just going to copy that link address, go back there, and paste it in. Now we have it pulling in the latest one of these as a zip file. Let’s just go over here, hit paste, and it’s going to download this whole thing into this Libra file, which is totally okay, don’t worry about that. Now we’ve got to unzip it, and the unzip is pretty straightforward, but just in case, we’ll take a look. Here it’s telling us “unzip”, but guess what we don’t have? We don’t have unzip, so we’re going to have to install that. It also isn’t this file, it’s a file we just put in, so let’s do that.

We’re going to go in, turn off that, and do a “sudo apt get install unzip”, let it do its thing. Now, we’re going to say “unzip”, and we know that it’s the proto, so we can just hit tab. That gets us to the rest and we are going to say, “create a directory”, and I’m just going to call it “protoc”. Actually, I’ll make it “protoc1”, just in case it collides with something. Boom, it put all of that information in there, and you can see it’s all there. It gave us the bin files, the Google, so everything is in place. Challenge is that I’m still on the wrong version, right? If I check the version of this particular product, it’s still says 3.0. That’s because I have to move some of these files into the actual system here, and this person told us what to do, wonderfully. All I have to do is move this into here, so I’m going to go ahead and do that and I’ll just copy this to make it quick. Paste it in, and in this case, for me, its going to be “protoc1” because of where I am. If I do that, do this, paste it in, hit enter. Whoops, didn’t find it because I called it “protoc1”, so let’s fix that. Done. We’re going to do the same thing for the includes so that you can have all the different things that it likes to talk about, so we’ll go ahead and do that. I’m just going to go over here, hit paste, and change that to a 1 because, like we said, that’s what it is in mine, and hit enter. Just for good measure, let’s go ahead and just change the ownership of this particular file, which is protoc, and we’re just going to make it its own by root. You wouldn’t necessarily always do this from a security perspective.

All right, now I’m going to do the same thing, but I’m going to do it for the whole directory. It’s “-R root”, and I’m going to do it for the include directory, and just in case you’re wondering where that comes from, that’s right there. I’m going to go out to the Google directories because Google actually made this protocol buffer piece here, so “user/local/include/Google”. Go ahead and do that. We’re going to have “user/local/include/Google”, and that’s done. Unfortunately, if you watch, it’s going to say, “Hey John, when I check my version, it’s not going to be the new version”. That is because I need to restart, so I’m going to do that.

After we get this reinstalled and get the proto done, we’re going to have to start this CLI Testnet, CLI standing for “Command Line Interface”. Testnet is a very common term for distributed ledgers or blockchains in which there is a testnet where people go and connect to it and you can test. So, you can make money without actually having money on the platform. There’s a lot to it that you could do. We’ll go over it, but it is going to take a little bit for us to get to that point. In the meantime, let’s see if we’re back up. That didn’t take long at all. Let’s get back into our terminal and check our version. We are where we need to be, so let’s get back into Libra, and now we’re going to run this again because it had problem. So let’s just go ahead and rerun the install. By the way, I tried it where I got proto out there first, and for whatever reason, it wasn’t a big fan of it, so you kind of have to go through this twice. However, it’s good because it recognizes when things are already installed and it doesn’t try to go back through them, so you’re not going to spend too much time. It says it’s ready to go. Now we’re ready to actually run the testnet, which is the exciting part. Let’s go in here and we’re just going to bring it up, hit paste, and watch her go. Initially, it’s going to start creating all kinds of indexes. Again, I’m going to fast forward the video during this part.

All right, we’ve completed the install, and as you can see, you’ve got a terminal up and running. This is known as the CLI, the command line interface, for this particular platform. If you’re going here, they would say, “Hey, let’s do our first transaction”, so they go through the install again. Once you get up and running, now they say, “Let’s create some accounts”. It’s pretty simple to create an account in here; you just type “account create”. It created an account and it says that it retrieved account 0 and it gave us this big long number, which is the representation of the account. This is the index, and it is going to allow us to create two accounts, so let’s create two because I want to be able to move back and forth. Now, if we wanted to know what we have in terms of accounts, we can do an account list. They also have these little monikers where you can just type A or Q, so it shortens the commands.

You can see we have user account index 0, which starts with 60 B, user account index 1 starts with 1F4. All right. Now they’re going to say, “Let’s mint some coins”, and notice it says “mint”, not “transfer”, so you’re minting coins. I thought that was an interesting term to use because it also means that they can probably be burned, exposed, deleted or removed as well. Anyways, we’ll mint the coins like they asked. It’s saying, “For account 0, let’s mint 110 coins”, and they’re calling that Alice. So, “account mint 0 110” coins. Now it’s minting coins, and notice it says “mint requests submitted”. That means this is an asynchronous call, which means that the account itself could theoretically take some time to do this if we weren’t in a test. They’re going to have us do the same thing for what they’re calling “Bob’s” account, which is account 1, and I believe they have us do 50, though it really doesn’t matter. I’ll do 50, and now it’s going to mint those, and we have created the first two accounts here.

Now it says, “Let’s do a balance”, so you’re going to use this query command and we’re going to do a balance on one of the accounts. So, let’s do a balance on 0. We should have 110, and we do. Let’s do a balance on 1. We should have 50, and we do. Next, we are going to create a transaction, but before we do, they want to see the sequence number. They want to understand how this changes the sequence number of each account, so we’re going to query the sequence number for each one and see where we are. Theoretically, we should get two zeros, so let’s take a look. “q sequence 0”, and we’ve got that. Let’s do one. “q sequence 1”. Yep, we’re sitting at 0 for both accounts, which is to be expected.

Now its saying, “Hey, let’s do a transfer”. To do that, we say “transfer” and we transfer from zero to one, so that’s Alice to Bob, and it wants us to transfer 10 Libra, so we’ll go ahead and do that. “transfer 0 to 1”,and we’ll do 10 coins. You can see the query transactions status, and in this case, it’s probably complete, but here, they’re telling us, “Hey, if you want to see how things are going, you can check the sequence number of each one of these”, but I’m pretty sure if we do a quick look we’re gonna find out that these both already happened. Let’s look at the balance of 0. “balance query 0”. We’re at 100. Now let’s look at account 1, and account 1 now has 60. Pretty simple stuff, nothing magical about that.

Now it’s telling us how to do this blocking. That means there is a transferb and a mintb. That basically means that its synchronous. It’s just going to sit and wait until it’s bin comes back. It says there that it, “(…) will submit the transaction and return the client prompt only after the transaction has been committed to the block chain”. This means that you’re going to be blocking until it comes back. So in this case, they’re going to have us check the sequence number after a transfer. I’m not going to do the transferb, so let’s do “query sequence number 0”. So 0 is 1 now, and theoretically, this should still be 0 because we did a transfer from one to the other. Let’s check it. Yep. “… sequence number of 1 indicates that one transaction has been sent from Alice’s account (index 0) so far. 1 for Bob’s indicates that no transaction has been sent. For every transaction sent, you get an increment by 1”. That’s the whole gig here. You can see how they put it together, what they did, and they give you a little bit more about the transfer command.

One thing you can do is you can do is query transactions, which I thought was interesting. We could really see what happened on the blockchain; we can see the committed transaction and the sequence numbers. Let’s do a q. “qxn_sequence”. So, there is the actual contract data and the information about that. You can see the event, there’s our 60B account, our 1F4 account is there, and we can see the events and what happened as a historical event in the platform. You can also query actual events, so if you wanted to see what events were out there, you could do a query event cent 0 through 10. You’re getting all the events with proofs. “query event”, and there it goes. There’s all the transactions and it pulled back the first 10. You can see the account slate with proof. If you look in there, you’ll find the 06DB account – there it is – and if we look a little further, we’ll find the merkle tree, how it laid out, and there’s the proof. All of the things you would expect of a normal blockchain, and that’s about it.

Just a couple of things that I noticed as I was looking on this, as I promised. One, the fact that there’s a transaction B makes me feel that there is definitely some blocking that will go on, similar to Bitcoin. I don’t know how fast; it feels like it’s more of a lightning node. If you look in the glossary, there were a couple of things that were interesting to me. When they talk about gas, you really get a feel for what the monetization process is. If I scroll here— “… to pay for the computation and storage on the blockchain network, all transactions cost a certain amount of gas”. So, my wonder is, what does this look like in terms of if I were to transfer 100 dollars? What does that really mean? “Each transaction specifies the gas price it is willing to pay”, so you would say, “This is what I want to pay”.

“HotStuff” there is the name of their Byzantine consensus protocol. It appears this is a Leader-based network; Leader-based protocols must agree on the leader to make progress. That also works with the current round number. Theoretically, Leader-based protocols are a little scary because, if you know which one is the leader, you could attack the leader to bring the system down. Granted, it is hard to guess the leader because it changes every round, and it looks like they’ve done something to try to deal with that. Finally, they talk about the type of platform this is – permissioned versus permissionless – and I think this is important here: “Libra starts as a permissioned system”. If you go up from there, it says, “[If] only the nodes chosen by a single entity [or organization] are allowed to join the committee, it’s a permissioned system”. We know the Libra community is made up of a lot of different people. If we go look in here, they talk about all the different people that are part of it. You’ve got MasterCard, PayPal, Visa… you have a lot of different people who are part of this, and they are all permissioned. That means that us as normal people couldn’t really run a minor. There’s no way we can get involved. However, we go back to it, and it says it, “… will transition to permissionless”. I’m not sure what that means. That’s very interesting to me.

It appears to me, based on what it says a little further down, that there is a way to see the state of the entire platform. We haven’t gotten into smart contracts and I’ll try to figure out that later. This is just first impressions, but when I look at it a little further down, you can find how much backing there is in the entire platform. In other words, how much money there is out there. It basically lets you know that there is a maximum that’s available. There is the Libra Reserve, and that is, “(…) the total monetary holdings that back Libra”. “(…) it is a requirement to invest in the reserve”, so if you’re going to be a validator, then you have to put money in. What that means, I don’t know, but it definitely relates to the permission, so it’s something to consider.

I hope you liked this video. I’ll probably do some more like this down the road, and I hope this helps somebody get up and running with it and get past that problem I ran into.

Thanks again, and subscribe to my channel using the link below for notifications whenever we post a new video!

Youtube: BreakingDigitalGridlock
Premiered on Jun 19, 2019

Hedera: Hashgraph

Github Links:
Protocol Buffers –…
Protobuf 3 –…
Libra –

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.