Looking for more podcasts? Tune in to the Salesforce Developer podcast to hear short and insightful stories for developers, from developers.
73. The Blockchain, Beyond Cryptocurrency
Hosted by Owen Ou, with guests Adam Hanna and Melanie Plaza.
Cryptocurrencies like Bitcoin have gained popularity as people seek to reclaim more privacy in their online activities. But the underlying concept is built on a technology called blockchain, and while it's often associated with cryptocurrencies, its potential can be applied in many more places. Host Owen Ou interviews Adam Hanna and Melanie Plaza at AE Studio to talk about what the blockchain is (and isn't), building on top of blockchain platforms like Ethereum, and the future implications for blockchain networks.
Owen Ou is an engineer at Heroku, and he is joined by two employees from AE Studio: Melanie Plaza, the Head of Technology, and Adam Hanna, an engineer. The conversation begins with a discussion of the tools used when developing with the blockchain in mind, including testing environments that mimic production systems like Ethereum. Developers in the blockchain community are constantly trying to lower the barriers to entry, and both Adam and Melanie agree that it's very easy to get started with the available tooling.
The three take a step back from this and start talking about the origins of the blockchain and Bitcoin in particular, how it came about from a need for a decentralized system of privacy. The ultimate goal of the blockchain is to provide a repeatable and verifiable chain of anonymized information that cannot be tampered with. Each block in the blockchain is a cryptographic hash of all the data that came before it. Adam talks about how "mining" works--the incentives for people to provide computational resources to help verify the blockchain. Since all of this information is decentralized, no one can control or manipulate the history of the hashes.
While cryptocurrencies have been used for nefarious activities in the past, Melanie is optimistic for its current and potential uses. Filecoin, for example, is a distributed file storage network on the blockchain. Residents of countries with draconian censorship laws rely on Ethereum to communicate safely with each other. Adam believes that a potential "second Internet" could arise for social conversations that's separate from the transactional, ad-driven one we currently use.
Links from this episode
- AE Studio builds technology products that increase human agency
- Truffle allows you to spin up a development environment to compile and test your smart contracts on as if they were on the Ethereum network
- MetaMask is a browser extension which allows you to interact with your smart contracts and the Ethereum blockchain
- Merkle trees are the basis for the blockchain
- Overcoming Byzantine fault tolerance is one advantage of the blockchain
- Filecoin is an application of the blockchain for file storage
Owen: Hello. Welcome to the Code[ish] podcast. I'm your host Owen Ou. I'm an engineer from Heroku. Today we have two guests, Adam Hanna and Melanie Plaza from AE Studio. Would you want to introduce yourself?
Adam: Sure. So my name is Adam Hanna. I'm an engineer at AE Studio. My background is actually in electrical engineering. I started my life my work life as a engineer in the renewable energy space. I worked for a little while as a research assistant at the National Renewable Energy Lab before going into the private sector as a consultant. I'm spending most of my career early career in the wind energy industry. Did that for about five years. And for about the past 10 years or so, I've been a software developer and only recently, maybe late 2017, maybe January 2018 I got into blockchain. And I kind of got in right before that run-up. The now infamous run up of Bitcoin up to like $20,000 and Ethereum to like $1,200 or $1,400. That's right kind of when I got in and started developing and have been a software developer in blockchain ever since.
Melanie: And hey, I'm Melanie. I'm the Head of Technology and a full stack developer at AE Studio. I also got into blockchain around the same time as Adam, so been there for the highs and the lows. I work at AE working with different clients. AE is a design, data science and development agency based in LA on Abbott Kinney. So I worked with like different companies from like early stage startups to enterprise companies building cool tech products. So we love working with blockchain companies, doing different machine learning applications and also just building really awesome products and apps.
Adam: Very empowering. Very agency increasing.
Owen: What are the toolings around developing with or on blockchain?
Adam: There are a lot of tools available. Truffle is probably one of the most well known tools but basically Truffle allows you to spin up a kind of development environment as an Ethereum developer to allow you to compile your smart contracts, test your smart contracts, and to basically see how your smart contracts are going to behave on the Ethereum network. There's other things like ganache which allows you to spin up a whole bunch of fake test accounts and to have a test network up and running before you decided to push your smart contract out into the real world.
Adam: And then there are these things called test nets, like a ring could be in Rothstein and all these different networks on the Ethereum network which basically are being run by miners for free and they have these things called faucets. And you can request test network funds to be deposited into your test wallet. And then you can upload your smart contract and you can interact with it just like you would on the Ethereum main net. And it's also a way for the core developers to test certain pieces of technology that they're thinking about introducing into the Ethereum main net . So each test net will typically have some minor differences that are being proposed and possibly used for integration into the main net.
Adam: And when you're ready, you can as a developer go live and push your smart contract onto the Ethereum main net. But the barriers to entry are pretty small. If you go on Learn X in Y Minutes and you read through the solidity example, you'll kind of get a sense of it pretty quickly. There's not much there. It's not a complex language. It's not like C++ that has volumes that you have to learn to be a very well versed developer. I really suggest developers try to write their first smart contract and find some blog posts and some tutorials and you'll see how easy it is. It really is not that difficult.
Adam: The rabbit hole does not go very deep, I promise. As far as learning how to use these kinds of things. And there's new things coming out all the time. Developers in the blockchain world are very innovative and they're constantly introducing new things.
Melanie: I'm getting started reusing Web 3 is also just pretty easy. It makes it very accessible. And smart contracts I'll say, are not as difficult. I mean they're hard to write complicated ones as well, but they're definitely not hard to write some things simple to get started.
Adam: Yeah. I totally forgot that. That's a great point. I totally forgot about the Web 3 libraries and MetaMask. MetaMask is a browser extension, which basically allows you to interact with your smart contracts and the Ethereum blockchain directly through your browser. And there are just so many awesome tools out there that you can use.
Owen: Nice. We will make sure all the links will be in the show notes.
Owen: Blockchain is probably most famous for being the technology behind digital currency like Bitcoin and Ethereum. To better explain blockchain, perhaps lets start with explaining Bitcoin or Ethereum. What is Bitcoin?
Adam: Satoshi really lays out his vision for Bitcoin. So by the way, for people that don't know or aren't familiar, Satoshi Nakamoto is the moniker for the person who released this white paper. Basically just think it's a 12 page paper, not fairly technical to read at all, explaining his vision for Bitcoin. And in the very first sentence of the paper, he says, "Bitcoin is a peer to peer electronic cash system."
Adam: Basically he outlines his vision for this payment method that no one controls that doesn't require any third party. There's no need for a trusted authority in the system. Rather it's made of... It's made up of just its users and they can use this decentralized network to send Bitcoin to each other. And because he envisioned Bitcoin having some sort of a value, it could be seen as basically a cash system or some way to transfer value among participants. And from a high level, that's essentially what Bitcoin is.
Melanie: Yeah. Bitcoin is kind of like the OG cryptocurrency. I think it's really interesting how it was basically created. The system for people to be able to participate without being able to trust all the actors. Because there are certain rules in place to incentivize people to behave in a way that is expected and desired. And then a lot of the stuff that's characteristics of Bitcoin is kind of like the foundation for the blockchain ecosystem. Now it's decentralized, no one controls it, anyone can join and participate in it. It's like a public blockchain. It's semi-anonymous. You can send transactions and they're not tied to a particular person, just an address.
Melanie: At the same time there's authentication and non-repudiation. So you can tell that something happened and someone did it. That a certain address did it at least. You can't reverse the transactions. It's highly secure. So you can tell they have integrity. And I think one thing that's interesting about Bitcoin in particular too is that from the actual coin there's a limited supply. So it's different from a lot of other fiat currencies where they're being printed. You can know that they're not going to be infinitely created. Which is kind of interesting for the cryptocurrency system, if you are buying Bitcoin also.
Owen: So I have heard a lot about Bitcoin mining. What exactly is that?
Adam: So basically the way that a Bitcoin miner works is they take transactions that have been submitted to them from people that are trying to use Bitcoin. So they're trying to send transactions to people. And the miner is basically, the whole job is to try to get those transactions onto the blockchain. And they do this thing called proof of work, which we'll get into in a little more detail later on. But they take all of these transactions, they do this proof of work calculation, and then they try to get their block accepted onto the blockchain so they can get the reward and get the fees and move on to the next block. And from a really high level, that's all they're trying to do. They're just trying to take transactions, build blocks, and put them on the blockchain.
Owen: I guess now we can better explain what a blockchain is. So what is a blockchain?
Adam: A blockchain is really an ingenious invention. Before the blockchain, really any transaction that two people wanted to engage in required a trusted third party. So basically in this day and age, there's two options. We can, we can use paper currency or we can use some sort of digital currency, like a credit card or something like that. In both of those cases, we're both relying on a trusted third-party to help facilitate the transaction. So the example of the credit card is probably the easiest to explain.
Adam: Basically what's happening is I've gone through some sort of credit check with my credit card company. They know that I'm capable of spending X dollars per year, per month, or they're willing to lend me X dollars per month. And so then when you want money from me, you can ask my credit card company. You can say, "Hey, can you give me money on this guy's behalf?" And they say yes or no. Either they decline my card or they let it go through. And then you know because it's a very large, well-respected credit card company that that transaction is good. And so as long as you follow a couple of rules, you're not going to get your money reversed and you allow me to leave the store.
Adam: Now with the example of cash is a little harder to kind of fit into this model. But essentially the trusted third party is the mint. They go through certain things to make sure that the money isn't counterfeit. They have people investigating counterfeiters and taking counterfeit currency off the street. So if you receive a dollar bill and it looks reasonably non-counterfeit, you can basically be sure that it's a non-counterfeit currency. But in that case, you still require a trusted third party. You require the FBI or the secret service, whoever do investigate counterfeiters and you require the mint to be ensuring that there's no counterfeit currency out there so that you can know that you have actually received something of value.
Adam: So that's basically how transactions happened for a long time. And if there was a dispute, there was some legal framework that you could go through to dispute some sort of transaction, Bitcoin turns all of that on it's head. It says, "What if we don't want to elect someone or nominate someone to be a trusted party? How can we still have these transactions?" And basically, Satoshi invented this concept of CPU power as a vote. So if everyone joins a network and they contribute computational power to that network, we can use that computational power to come to a consensus on what the state of the system should be.
Adam: And so together we can all be basically that trusted third party and we can send money to each other and write these bit scripts and we don't need anyone else to verify a transaction. But we're really just kind of understanding what this paradigm shift is going to do for us and how it's going to affect us.
Melanie: I think also blockchain and kind of the technology behind it is a little bit of a black box or intimidating. But it is pretty simple in its fundamental concept. It literally is just a chain of the box. So it's just like part of this family of distributed larger technologies that have existed but is just creating this chain of blocks, linking them together using cryptography. So basically you have the first genesis block and then there's certain transactions and data that go into this. And then we're using concepts that have been around for a while. So just using Merkle trees. There's these data blocks get associated with these leaf nodes, which are kind of like leaves on a tree and they just have a cryptographic hash of the data. And then you work your way up the tree continuing hashing all of these different nodes until you get to a root hash.
Melanie: And then, I mean the nice thing about the cryptographic hashes too is that if you change any of the data in them, it changes the hash drastically. So it's not predictable. So if I hash "melanie" with just all lower case M and I get a hash, then I hash "Melanie" with a capital, it's going to be a totally different thing even though it seems like a really small change. And so by having these hashes, if you change one transaction, or you're trying to modify any of the data in the blockchain, it's going to change the root hash of that block and then that route hash is used for the next block.
Melanie: So then the roots on the hash of block is going to change and every block down the chain. Basically that's how you can know that the data wasn't changed. And then using these consensus algorithms, we can tell which transactions are valid and which should be included in the next block and have all these distributed nodes agree. It's pretty simple as a concept.
Adam: Let's maybe give an example of how someone might use the Bitcoin network. So let's say that I want to use the Bitcoin network and I'm not going to get into create a wallet and the first time that you've received money just yet. Just for this example, I'll kind of explain that maybe at the end, but just imagine that you do have a wallet and you have some Bitcoin in your wallet and you want to send someone some money. So the first thing you have to do is you have to get their wallet address and then you create a transaction. There's a lot of software that will do this for you. You don't need to understand exactly what's going into it.
Adam: But from a deeper level, when you received money in the past from someone, you basically receive what are called the UTXOs. They're unspent transactions and they're these little pieces of Bitcoin essentially. And when you then want to send someone else Bitcoin, you have to enter... Your software does this for you, you don't have to do this. But you have to gather a previously unspent transactions. You need to sign them, you basically need to prepare them and you prepare them with information from the person that you're sending it to. And you do it in a way using your private key, which is basically just a cryptographic private key. And you do it in a way that's verifiable by miners to make sure that you actually are the owner of these unspent transactions and you do actually desire to send them to the recipient.
Adam: And what's also very important is that all of the UTXO needs to be sent. So let's say that I have a UTXO that's worth one Bitcoin, but I only want to send Melanie half a Bitcoin. Well I can't break that UTXO. I have to spend the entire UTXO. So what I have to do is I have to send... If I send Melanie half of the UTXO, because she wants half a Bitcoin, I then need to do something else with the other half. And either I create a new wallet, a new address, and I send it to that address or I send it back to myself. If I don't spend it, the miner will use it as a fee. So basically anytime you send a transaction and you want to include a fee to incentivize a miner to pick up that transaction, you just don't send the UTXOs anyone. And the minor will take that as a fee.
Adam: If you're building a Bitcoin library from scratch and you don't know that, you're basically just going to be rewarding miners with a lot of mining fees. But so after you've gathered those UTXOs you prepared them in a way that has the recipient's public key information and you've signed that using your private key. What you then do is you have to connect to a miner, you have to connect to a known minor and you send that package to them. And then that minor broadcasts that request, that transaction to all of the other miners that they're connected to. And then those miners do the same to all of the miners that they're connected to. And it goes into what's called the mempool.
Adam: So these miners, they have this thing called the mempool, which is basically a collection of all of the transactions that are trying to get into the Bitcoin network. So all the people all over the world who are trying to send Bitcoin to each other should be represented in this mempool. And ideally, in an ideal case, every miner should have an exact replica of this mempool. Basically everyone should know what all the transactions are. And it's not really the case. In the real world it takes a little while for messages to propagate and things like that. But for the most part, most miners have access to transactions that are trying to get into the next block. Now from a miner's perspective, what they then do, once they have all of these transactions in their mempool, they then try to get those transactions into a block.
Adam: And so what they do is they take the hash of the previous block, they then gather the transactions that they want to include and there's a block size limit. And so what they do is they have to choose the ones that are going to be most profitable for them. So currently they are rewarded for mining a block. So just simply by finding the next block, they get a block reward. That's a ever decreasing block reward. And eventually it will run out eventually in the future, I forget the exact date or the estimated date. But there will be no more block rewards. And they'll only have to rely on these fees, these UTXOs that weren't sent anywhere.
Adam: So they're incentivized basically to include transactions with the highest fees first. So if you really want your transaction to get through on the Bitcoin network, you have to include a higher fee. If you don't really care about it... If you don't care if it takes a couple hours or maybe for longer, you can send a really low fee and eventually maybe it'll get picked up by a minor somewhere. But if you want it to get done fast, you have to include a higher fee.
Adam: Then what the Bitcoin miners do is they create this thing called a Merkle Tree Hash. You can think of a Merkle Tree kind of like a pyramid. So you take all of the transactions and you put them at the base of your pyramid. And then you take two transactions and then you take a hash of those transactions. I believe it's two, I'm not 100% sure, to be totally honest, we take a group of transactions, I believe it's two. You take a hash of those and then you have your next level of your pyramid. And you can kind of see as you do this, as you go up, you take the two below you, you can take a hash of that. You're kind of getting fewer and fewer and fewer hashes until you get to what's called the Merkle root.
Adam: So eventually you get to one hash that is a hash of the hashes of all of the transactions that are below you. It's kind of this pyramid with the transactions at the base. And then there's this thing called a nonce. So a nonce is basically a random number. And the Bitcoin miner just randomly guesses at what this nonce is. They just randomly increment or guests this nonce until the hash of the nonce, the Merkle root and the previous hash match this pattern. And when they do, you send it out onto the network and other miners will basically verify that it's correct. They'll verify that the UTXOs that are in there are valid UTXOs. That they were signed properly. They do a hash themselves of the blocks to get the Merkle root. To make sure that matches, they check the nonce and the block hash in the previous block hash to make sure that all of it works. And if so, then they accept it.
Adam: They put it basically in their stored memory of what the blockchain is. And then they go trying to work on the next block. They go back to the mem pool, they take transactions that are still available and they start hashing again. And now if you were the miner who got that block accepted, you now get the block reward and you get all of the fees that were included in that block. You get those fees into your address and you're just, you're happy. You just got paid and you continue on. You now try to get the next block.
Adam: And Melanie brought up a really good point here, which is, what happens if multiple blocks get accepted at the same time? Because it takes about... The way that the Bitcoin works currently is they've set the difficulty such that roughly every 10 minutes a new block is going to be discovered. It's on average and it gets adjusted. This difficulty gets adjusted such that it takes roughly about 10 minutes. So it happens all the time that multiple miners all over the world might find a block roughly at about the same time. And what happens is you just keep going and eventually one of those chains is going to be more accepted by other miners in the network.
Adam: One of those chains is going to get longer than the other one and longer. And the protocol says that you just accept the longest chain and these chains that basically die off or orphaned or uncled and they're no longer considered valid. So what that means for you as a user is when you're sending a transaction, you may see that your transaction got included in a block, but you're not necessarily sure that that is going to be the final chain. There may be competing paths that the Bitcoin network has taken currently. And so you have to wait for a certain number of confirmations.
Adam: So basically a confirmation is just a block that's ahead of yours. It's more recent than yours. So what this allows you to do is it allows you to make the assumption that there's a lower probability that the fork will happen at or before your block because there are so many numbers of blocks ahead of yours that the likelihood of the chain forking very far back is next to nothing. I mean, after you wait... I think in Ethereum it's like 12 blocks. I forget exactly off the top of my head what it is in Bitcoin, but in Ethereum, if you wait roughly 12 or so blocks, you can be relatively certain that your transaction was included in the network. And you can move on. And that's kind of from a detailed level basically what's happening.
Adam: But there's not much there. There's a Merkle tree, there's a nonce, and there's this thing called the proof of work. Which is what I was explaining where the nonce gets randomly guessed at until the results and hash matches some sort of agreed upon criteria.
Owen: I have a question about the time a chain session live in the mempool.
Adam: Mm-hmm (affirmative).
Owen: So let's say I buy something with Bitcoin, my transaction will live in the mempool before a Bitcoin miner will put that into the blockchains. So the time that it takes for a transaction to be written into a blockchain, will be roughly 10 minutes, right?
Adam: If it gets picked up in that block. And now it may be that you've included such a low fee that a miner doesn't pick it up. Because there is a size limit to the block that a Bitcoin miner can put forward as being a valid block. And so they have to choose the transactions that they include wisely because they can't go over the size limit. And so it's basically a supply and demand marketplace. There's other people out there with transactions in this mempool that are also trying to get on the blockchain and they've included a fee with their transaction as well. And so the miners are going to be profit maximizing and so they're going to choose the transactions that give them the most profit. And so if yours doesn't make the cut, it may be that it takes longer than 10 minutes to get on the blockchain. It may be that you have to wait hours or maybe even days.
Melanie: Yeah, I think on Owen you brought up a good point about the ideas of expected block time and block size though, which I think are pretty interesting. So it is true though, that 10 minutes is that the expected time to mine your block, whether or not your transaction is included is kind of depending on the fee you offer and whether it makes sense for miners to pick up. But as we were talking before about the proof of work thing, it is interesting. So Bitcoin gets back to block time is 10 minutes, Ethereum, it's 10 to 19 seconds on average. So basically in order to keep that though, you have to make the proof of work algorithm be a sufficient difficulty in order to keep that same expected block time. So if the blocks are being mined too quickly, the difficulty should go off. It should be harder to solve the puzzle. And if the blocks are taking way too long to mine, then the difficulty should go down to keep this kind of expected block time.
Melanie: And I think it's also interesting that there's a block size limit. I mean blockchain was audited. I think after there was this one megabyte block limit and now it's had this concept of block wait. So now it's somewhere between theoretically four megabytes, practically it's about two megabytes per block. But yeah, I think it's interesting that it's almost controversial though, the block size for Bitcoin particularly. So if a block size is too small, the problem is that it's harder to get your transaction to the block. There's this bidding war for... Potentially it would be discouraging for people to top to spend a lot of money to get their blocks mined. They might not be willing to pay more and they'd have to wait a long time to get their block mined and they might just give up on using the network.
Melanie: On the flip side, if the blocks are too large, it makes it more costly to operate this full node. So you have to store more blockchain. It would... It's more computationally expensive to verify and deal with all of these transactions in the bigger blocks. But it takes a lot of bandwidth to actually run the node also to download and upload all of these transactions from the box. It takes longer to bootstrap a new node and so it might discourage more people from mining, which is essential to the ecosystem. Having more miners makes the network more robust. If the blocks are also... There's no block limit, users might not even really add fees to their transaction. So it might decrease the incentive.
Melanie: It might give some miners of have big miner pools, more of a headstart because it takes longer for the blocks to propagate. So it might discourage smaller miners from participating in the network. So there's always trade offs. And one thing that's interesting about Ethereum is that they actually let miners... They use a block gas limit and they let minors vote on what the gas limit should be. So basically the network chooses for itself how it wants to scale. So what the lock gas limit should be. And then miners also choose what gas costs they're willing to accept for a transaction. So it's very interesting that that part of it is also determined by the network as often by the miners participating in it.
Owen: I still want to clarify the mempool part of that. Who owns the mempool? Is it distributed?
Adam: Each minor keeps a record of the transactions that they've received from either end users or from other miners that they're connected to. And they just keep it themselves. They constantly communicate with each other and they constantly communicate... They're in communication with users who are trying to get transactions sent. And it's basically just kind of kept through communication. That's just on their hardware.
Owen: So why does Bitcoin or Ethereum use blockchain when they could have used a database or even distributed log like Kafka?
Melanie: There's some... You hear people talk sometimes about like distributed databases as being kind of like blockchain killer, but I think there's a lot of oftentimes distributive databases are still managed by a service provider. So that's still a central point of failure. Unlike blockchain, there's still some amount of centralization there. And like we were talking about before we're up to basically everyone owns that. Everyone has copies of it. There's no centralization. But even aside from that, I think there's still some things that distributed databases, it's hard for them to do right that I think blockchain offers a better solution for us. So there's always network delays, connection time outs. It's hard to really ensure perfect communication between distributed databases. So because the communication can be unreliable, they have to be able to deal with data conflicts and knowing what the real source of truth is.
Melanie: And I think that's something that's built into blockchain at a fundamental level that doesn't exist there. So with consensus algorithms for blockchain, you can know what the true transaction was, you can't go back and change it, it's fully auditable. Whereas with distributed databases there's all of these potential. I mean even with you people talk about having ACID databases for financial things. Most people databases don't offer full isolation. So you can't really guarantee with the same level that you can with blockchain. That's something that's going to be consistent. And then I think also with Kafka, what's interesting about that is like it is crash fault tolerant and it works really well for something like Hyperledger, I think you can use Kafka with like Hyperledger fabric or something and it's pretty nice as a private network. But I think where it's lacking that blockchain solves is that it's not Byzantine fault tolerant.
Melanie: So a public blockchain, like Bitcoin is meant to have a lot of untrusted actors. And so Byzantine fault tolerance is pretty important there so the Byzantine general problem like you have two armies in there invading from different sides. And you need to make sure that you attack them at exactly the same time. So you have this messenger and you need to have perfect communication between the two sides of the army and you need to make sure that the messenger isn't going to be replaced, killed on the way there or replaced by this other malicious messenger. And so the Byzantine fault tolerance being that you can prevent the system from allowing for malicious or faulty nodes. So I think that's something that for a private network it's less of a concern. But for a public network where you're encouraging people to interact with people, there's no verifications who this person is or something. I think that's one of the reasons why blockchain was slightly better solution there.
Adam: There are definitely some ways that blockchain can fail. Everyone knows in Bitcoin there this thing called the 51% attack. And so it is susceptible to that. Ethereum it's hard to write a smart contract correctly in a way that's it can't be... Hacked is not a great word because no one's hacking into the system or the smart contract, but exploited maybe is a better word.
Adam: And so there are faults but for the most part, it's the only system that allows a truly decentralized system that can handle possible bad actors. And that doesn't require any sort of registration or identity. All of the other potential solutions out there don't allow for that. And that's really what makes blockchain unique.
Melanie: I think a lot of the pushback that blockchain was getting is because people were just adding blockchain as a buzzword to their companies and really they could have been using decentralized databases.
Adam: Yeah. And for a long time, and even still kind of currently it was a solution looking for a problem. And people were just applying it everywhere and everywhere. And you're right. And it got kind of this bad reputation by a lot of people and rightly so, that, "Hey, you know you didn't need to use blockchain here in this use case, you could have used this other solution." And they were exactly right. And in that sense, it got very over-hyped that it was just going to change, it was going to be applicable everywhere. And it was going to completely upend everything and everyone was going to be using blockchain. And it's not true. It is a tool that can be used.
Adam: The pros and cons of that tool should be compared to the alternatives. And when it's not the right tool for the job, don't use it. It's very good at what it does. But it's not going to replace everything. It is going to make a larger impact in our lives in the future. And it's going to be adopted more and we're going to find very interesting and very applicable use cases for it. But it got kind of overblown where everyone thought that, "Oh, I can just slap some blockchain on here and it's going to be great." And it's wrong, it's the wrong mentality. But I really do kind of feel like we're, I don't know, we're seeing the internet being invented back in 1988 and at first people were using it just basically as a glorified FTP server to send and receive files to each other.
Adam: And we're still just kind of trying to figure out what it's going to be used for and how it's going to change. And there are things that we can't even imagine yet that it's going to be used for. I mean in 1988, could you really imagine Facebook or Gmail or Skype, all these other really awesome things. It just takes a little while for a technology like this to mature, but with companies out there like Filecoin launching later this year where you're going to have a fully distributed competitor to things like Dropbox and Box.net. I mean, that's awesome, that's so cool. And people are going to continue to push the boundaries and invent really awesome things that we can't even imagine today. And so I think we're very early in the blockchain life cycle.
Owen: What are some of the interesting use case of blockchain other than cryptocurrency?
Melanie: Yes. I guess we talked a little bit about Filecoin and that's one thing that's really interesting, so having this distributed file storage network. Where you can have... That's kind of one of the limitations of using a system like Bitcoin. It's not really meant to store a ton of raw data and sometimes we want to have things that are on the blockchain that are associated with data. But without reverting back to a centralized database to having distributed file storage is really exciting having--you really see that things were a certain way at a certain point in time with total certainty I think causes, aside from just the monetary transactions, I think the immutability of blockchain and the transparency there is something that's really pretty special.
Melanie: So people being able to know one year ago this data was like this and then it changed to be like this or this person changed this document to be like this, right? And so I think it's really, it can be really important and feels where having data integrity and having a lot of people needing to trust that something wasn't tampered with is pretty interesting. I think that's a really exciting use case. And also then introducing incentives for people to actually continue to store this data and make it available going into the future. I think that's going to be a huge game changer for a lot of industries.
Melanie: I think also using it for government audit systems is awesome and interesting. It's kind of cool to see that being embraced. So like Estonia, using it to enforce integrity of their data and systems in here making it harder to manipulate things. And knowing that their systems are compromised I think is like interesting because I've seen the technology embraced by something that's otherwise a pretty centralized system. It's pretty cool. And then also I think Ethereum is something that Adam and I are also really excited about Ethereum particular ecosystem.
Adam: Yeah. I think there are a lot of really cool things that are coming. But it's still very limited. There's very little that you can do right now on the Ethereum blockchain. And we've seen some progress being made on the compute level.
Adam: Web assembly is kind of the hot new thing and Ethereum is working to adopt web assembly as well with ewasm. I mean US was probably one of the more famous WebAssembly blockchains that's been launched recently that's out there. But there are other people working on fully deterministic virtual machines. And there are other projects too, like Golem. Golem has been around for a long time. That basically is a distributed trustless compute layer. And what this allows is really some very interesting... I guess kind of a paradigm shift where you don't need to trust the software that you're interacting with because the owner of that software can't sensor you.
Adam: For example, on Facebook, if I post something that's very disparaging to Mark Zuckerberg, Facebook could censor me. They could decide to take that post down because they control the compute. They control what happens to the inputs and the outputs and they control the data storage layer and all of that.
Adam: But in, in blockchain when you have a system in place that has distributed storage, like what Firecoin is building and it has distributed compute, which is like what Ethereum and Golem and WebAssembly and all these other people are trying to push forward, you can now start to build a truly decentralized software system where the contract between the software developers and the owners and the users is completely different. I can use that piece of equipment and know how it's going to act because it's on the blockchain and the people who wrote the code don't own it. It can be run by any miner on the network and that's going to change a lot of things.
Adam: It's going to change I think a lot of things. In content distribution we're already seeing people use Ethereum as kind of a blog. There's this really famous transaction that happened I think a year or two ago. It was during the kind of the height of the metoo movement when the student in China was investigating allegations against her professor and she was basically being shut down by the university and her investigation and her posts were being deleted on WeChat. And so she wrote this message both in English and Chinese on the Ethereum blockchain and basically used it like a blog post. And people started sending her messages to her Ethereum address, creating this community discussion, kind of like Twitter in a way.
Adam: I mean they were using Ethereum kind of like this Twitter, but in a way that couldn't be censored or taken down and that would live on the blockchain forever. I think that's kind of a very interesting paradigm shift. It basically changes the contract between users of software and builders of software where the builders of the software don't necessarily have control over how it gets used. Once they put it out there, it's out there. They can't censor it, they can't change it. And there's lots of other things that we need done. There's lots of people working on how do we basically recreate this like DNS lookup server using blockchain that no one can control. And domain names. How do we create these domain names where we can have people that own certain endpoints but it's not controlled by any sort of authority so that it can't be taken away from you if you own the rights to it.
Adam: And we're slowly kind of building all of these tools that we need as computer scientists using blockchain. And I really do believe that there's going to be two Internets. So there's going to be this centralized internet, which is good at a lot of things. It's good at sending lots of bits to lots of concurrently connected users very fast. And it's very good at that. And if you need speed and you're okay with having a central authority to get that speed, then you're going to use the centralized internet.
Adam: So watching Netflix for instance might be done on the centralized internet, but I really do believe there's going to be a second kind of place that we all go to share information and send information. This is going to be kind of a blockchain powered internet. And I think social networks and content delivery and payments and all of that kind of stuff is going to happen on this decentralized internet because it benefits from having no authority and no third party who's in control. You don't want someone taking down your blog posts, you don't want Facebook controlling how you interact with your friends and possibly using your data for ways that you don't want to use. And you get all of those benefits on this new blockchain internet. And I really do think that we're going to have a future. I don't know how long, 15, 20 years probably before we have this.
Owen: What are the challenges that you see when using blockchain?
Melanie: Yeah, I think one of the biggest challenges for blockchain is kind of the... Although the systems are totally open, there's a little bit of a barrier to entry in terms of people feeling comfortable and the gateways to being able to join the Bitcoin network to assign Bitcoin transactions or to interact with their smart contracts are still a little bit difficult. So I mean, just on a basic level, I think it's been interesting that there are all of these now custodial cryptocurrency companies that have started running. And I think that a lot of it is because a lot of people don't feel comfortable keeping their own private keys. So in order for the encryption to work like so, it uses asymmetric key cryptography.
Melanie: So I sign it with my private key. With his public key, he decrypts it with my public key, his private key about if I lose my private key, if he loses his private key, I sent him that, and he's screwed. He can't get into his wallet, right? He also can't access his funds and stuff. That's one problem is just like a paradigm shift in terms of how people have to interact with things and one is keeping things like your private keys. So in one hand it's very empowering to people. They totally own things and they're totally responsible for all their interactions. On the flip side, there's a lot more responsibility to that. And you do now have to keep track of this, you have to.
Melanie: If you're interacting with a smart contract, you should probably know exactly what it does. It's transparent, but then on the flip side you're kind of taking on the responsibility yourself of understanding how things work. On the other hand, I think it's also interesting... It's a little bit different from how the other ways that you interact with the internet are I think. So we're used to having things that are very fast and blockchain by its nature, we have to wait for many confirmations to know that something happened. It's not just like I click a button and then it immediately changes to say that I have sent a payment before it even may be reaches the server depending on how things are configured. It's a very different thing and it can be frustrating for people having to deal with this new paradigm, interacting with things.
Melanie: I also think that because things are immutable, they also can't be changed and that can have trade offs. So if I wanted to push an update to a service, like if I'm trying to update a website, I just change code and then I push an update and then everyone sees my new website and interacts with the new things I can migrate my users over if I totally transformed my system behind the scenes and then they just interact with something that's new and has updated improvements with blockchain. I had to place a smart contract, I can actually change that smart contract later. I have to deploy a new smart contract and then have people move over to interacting with this other smart contract for future transactions. And I can't change the protocols of the blockchain I've established even if I think that there might be something more efficient.
Melanie: That's why we have all these competing forks, right? So we'll have like Bitcoin X, Y. And I think that it can be a limitation especially when people are both new developers and users are used to things changing really fast. I also think it's kind of interesting because you're talking about the early days of the internet. If we were to get even the first iPhone now you'd be like, "What is this piece of shit?" Right? Because we're used to getting things that are new and improved. Like now I got the new iPhone and I'm like, "Oh wow! This is so awesome."
Melanie: And blockchain I think people a lot of times because it is a new technology and people are used to these kind of incremental improvements over systems that they're already familiar with. They're like, "Oh, blockchain is going to be so awesome. It's going to be way better than anything else I've been using." And it does offer a lot of improvements but it's not the same thing. So in some ways it's more like the early internet rather than like a new version of your iPhone.
Melanie: Which is like clearly better than the thing that you have been using before because it's basically the same with some improvements and I think it's improving now, but I think it's something that a lot of people were like, "Oh, blockchain is so cool and I got all this hype." And then people were like, "Oh, blockchain actually needs to evolve in these certain ways and there are these limitations to blockchain." And in some ways it is worse than other systems I've been using. And I think people aren't used to experiencing those curiosity in technology as often.
Adam: But besides from hacking almost every tool that gets used for good can also be used for evil. A great tool for people that are trying to launder money. Which is why there's all these KYC AML rules for exchanges, reputable exchanges anyway. There's the Silk Road that people were using it to buy illegal things and do illegal things with it. And honestly, that's one of the reasons I didn't get into blockchain a long time ago, back in 2012, 2013 when Silk Road was happening. And Bitcoin was kind of making its first splash, one of its first splashes. And I thought to myself, "Why would I want to touch this thing that drug dealers and money launderers use."
Adam: I don't want... This is like the dark side of the internet, I don't want to use this. And I didn't really understand the potential. I was kind of turned off to it because of that. And I think a lot of other people were too. And there's just the fact that it's so new, we're not sure how it's supposed to be used and so we're using it for a lot of things that we're not supposed to. And that also gives it a bad name. People say, "Oh, it's not everything that was promised and we should've just used these other things." And although a lot of times they were right and it's bad to use it when it's not supposed to because it's going to fail and it's not going to work well. So there are a lot of downsides. It's not totally rosy picture that I'm trying to paint here at Bitcoin or blockchain even though I love it so much there are some bad things that come with it.
Melanie: Yeah. I think also you just reminded me how to move on. One of the reasons I was initially a little skeptical of Bitcoin was the proof of work trade off being... Yes, it's like great at ensuring that people are actually... That you can't fake compute power and stuff like that. But on the flip side it's using tremendous amount of energy and pretty wasteful. But I think it's also interesting that now at least we do see things that are trying to respond to these problems, like we have proof of stake and the Bitcoin chain theorem and stuff like that. So I think it's at the time, very hopeful about the blockchain in general. I think it's going to be a huge thing because there are these problems, but we're also... I think we're really making a lot of progress and addressing them as best as we can and growing ecosystem.
Adam: Totally. And I think you've hit on a really good point that I really do love about blockchain. And that it is very much community driven. Bitcoin is evolving. There are software developers working on Bitcoin today and there are people who disagree with the path that's taking. And so they've forked off and have done their own thing. Ethereum has a great developer team and they're constantly making improvements and they're doing it in an open way where no one has control over it. We're moving forward as a community of software developers and we get to kind of decide what we want. And if we don't like it, we're totally free to fork it and to go in a different direction.
Adam: And there's going to be all of these kinds of competing technologies that are out there that are offering slight benefits in one direction for slight drawbacks and another direction. And based on these pros and cons, certain chains will be more adopted than others. And then there are projects like Dr. Gavin Wood's new project Polkadot Web 3 that are trying to bring all of these under one umbrella. So I also don't believe that there's going to be one chain that rules them all. I think every chain offers some pros and cons and they're just different tools that you can choose between. And so we need kind of a way for all of these chains to coexist and to communicate with each other.
Owen: Any parting words of advice for people who want to get into blockchain?
Adam: Oh man. It's just starting. It's so exciting to see where this is going to go. All the good and the bad that's going to come with it. They're going to be hacks. They're going to be... People that have money stolen. They're going to be people that use it for nefarious reasons, but it's just the beginning and it's very exciting,
Melanie: It's like the wild West of tech right now, kind of with blockchain. And it's really pretty exciting time. So if you're a developer, it's really not that hard to start getting into some blockchain stuff. And I think you'll probably find it really interesting. And if you're not, I think participating in this space is also I think really fun depending on what you want to do with it. If you want to use it to have something that's an immutable data store, you want to stop yourself from getting censored or you just want to buy some cryptocurrency. I think I've mentioned everyone should try participate in an ecosystem just a little bit, get a taste of it. And I think it'll be like Adam said, like increasingly important. So it's kind of an exciting time right now.
Owen: How do people get in touch with you?
Adam: Sure. So you can reach us at AE studio and before I get the website wrong, I believe it's AE.Studio it is. AE.Studio. And we're also on Abbot Kinney. So if you ever want to come by if you're in the LA area and you want to come by, we're right here on Abbot Kinney.
Melanie: You can also if you want to email us that it's just firstname.lastname@example.org or go to our website. So we'd love to talk about anything blockchain or tech related we are a lot of big nerds over here and stuff.
Owen: Thank you for chatting with us about blockchain, Melanie and Adam.
Adam: Thank you for having us.
Melanie: Yeah, thanks Owen.
A podcast brought to you by the developer advocate team at Heroku, exploring code, technology, tools, tips, and the life of the developer.
Principal Engineer, Heroku
Owen is a software engineer at Heroku and an internet plumber. In off time, you'll find him working on open source projects, or dunking basketballs.
Software Developer, AE Studio
Adam is a software developer with ten years of experience building products. He has been building in the blockchain space for more than two years.
Head of Technology, AE Studio
Melanie writes code, obsesses over AI, builds with blockchain and enjoys working with startups and enterprise to build awesome tech.
More episodes from Code[ish]
Karan Gupta and Marcus Blankenship
How can applying the right technology choices at the right time impact your coding and business choices? Karan Gupta explains how practicing “pragmatic engineering” can have an oversized impact on business and business efficiency. →
The episode focuses on managing a certificate authority (CA) within an enterprise. The internal CA is compared on many points to PKI on the public internet. →
James Dong and Chris Castle
How much can a day of coding help others? James Dong created a platform to help small businesses impacted by the COVID-19 pandemic sell gift cards online. Learn how this platform, built on Heroku, provided a way for residents to support... →