[00:05.670 --> 00:06.230] Thanks. [00:06.810 --> 00:10.190] Yeah, I'm really excited to be here at HOPE to give a talk. [00:10.710 --> 00:12.450] It's a huge honor for me. [00:12.890 --> 00:16.070] So my name is Paul Kernfeld, and I'm a software engineer. [00:16.290 --> 00:20.250] I'm interested in peer-to-peer systems, especially Bitcoin. [00:21.170 --> 00:26.850] So this talk is going to be about a public digital library that I designed and built. [00:27.050 --> 00:29.670] It's designed to be resistant to censorship. [00:29.670 --> 00:32.770] And I actually have a working prototype. [00:33.970 --> 00:38.010] This is my first public presentation of the working code. [00:38.210 --> 00:40.010] So I hope you like it. [00:40.430 --> 00:46.010] So for you, you're probably going to get the most out of this if you're interested in software. [00:46.970 --> 00:49.530] But you shouldn't need too much background. [00:51.230 --> 00:54.190] And I'm intentionally going to move really fast here. [00:54.410 --> 00:57.630] And, you know, I'd rather get you excited about this. [00:58.510 --> 01:02.090] And, you know, maybe you won't understand 100%. [01:02.090 --> 01:08.350] But I'd like you to leave the talk with some, you know, some questions about what's going on. [01:08.890 --> 01:09.070] So... [01:12.970 --> 01:15.490] Hey, that's from the Internet, but yeah. [01:17.310 --> 01:17.850] Sure. [01:18.710 --> 01:22.710] So, what do I mean when I say digital library? [01:23.390 --> 01:30.030] For my personal definition, really, it's a searchable repository of files. [01:30.730 --> 01:33.290] And there's two things that you should be able to do. [01:34.010 --> 01:38.330] One thing is it allows a user to find files. [01:38.690 --> 01:42.210] And the second thing is it allows a user to retrieve files. [01:42.210 --> 01:43.410] Pretty simple. [01:43.990 --> 01:48.790] So, some example of digital libraries that you've probably heard of. [01:49.770 --> 01:53.770] Pretty much, you know, there's trillions of digital libraries out there. [01:54.370 --> 02:00.850] One that's quite interesting to me is the combination of the Pirate Bay and BitTorrent. [02:00.850 --> 02:03.210] That's quite relevant to this talk. [02:05.030 --> 02:15.890] And so, you know, whether it's Wikipedia, YouTube, or BitTorrent, you need some way to determine what content goes into the library and what content doesn't. [02:17.050 --> 02:23.790] The typical way this is done, maybe you have users who can, you know, add, modify, or delete files. [02:24.470 --> 02:27.610] Moderators can ban or block users. [02:28.570 --> 02:30.830] Administrators can hire and fire moderators. [02:31.030 --> 02:37.190] And finally, the government makes sure that administrators are following laws. [02:37.450 --> 02:40.810] So, this is what I'm calling a chain of command system. [02:41.390 --> 02:47.350] And, you know, for most purposes, you're probably on the Internet because you want to look at some videos of cats. [02:47.610 --> 02:50.170] So, generally, this works pretty good for everybody. [02:52.450 --> 02:55.450] In some cases, though, it doesn't work so great. [02:55.870 --> 03:00.070] There's some things that governments like to restrict the sharing of. [03:00.690 --> 03:15.210] And, you know, whether it's criticism of the government or intellectual property, you know, you probably have your own personal opinion on which of these things should and should not be legal to share. [03:17.010 --> 03:23.510] But, I think probably everybody in this room is going to agree that you should be able to, for example, criticize a government. [03:25.250 --> 03:30.490] So, really, your personal definition of the word censorship is going to vary. [03:31.250 --> 03:41.150] But, what all of these different things have in common is they require humans to make policy decisions on which kinds of these things you can and cannot share. [03:42.650 --> 03:50.150] And, one problem is anytime these decisions are made by a government, you get the potential for censorship. [03:51.050 --> 03:57.030] So, you know, and I'm lucky to live in a society where I can even talk about this. [03:57.030 --> 04:04.350] But, in past societies and, you know, other places on earth and perhaps in the future, you know, people might not be so lucky. [04:04.970 --> 04:16.090] So, what I'm interested in talking about today is where the... a system where these policies are made by the participants of the network rather than by the government. [04:18.090 --> 04:23.430] So, the question here is how can we create a censorship resistant digital library? [04:24.730 --> 04:28.170] I'm going to explain a couple different ways I've been thinking about the problem. [04:29.110 --> 04:32.610] You know, at some point you might think, why are you telling me this? [04:32.910 --> 04:36.870] Trust me, it's going to come together when you see the design. [04:37.770 --> 04:45.070] So, the first issue that I've been thinking about is, you know, there's kind of two ways to fight censorship as far as I'm concerned. [04:45.230 --> 04:46.190] You can hide. [04:47.050 --> 04:48.990] That's what the Tor network is all about. [04:48.990 --> 04:52.970] It disguises the physical location of your computer. [04:54.470 --> 04:56.990] And also, you can replicate information. [04:57.890 --> 05:07.990] And the idea is, if you make it easy to replicate information from place to place, you can replicate that information faster than the government can take it down. [05:08.410 --> 05:13.250] And these two models are... they're each good for different kinds of situations. [05:14.270 --> 05:19.130] What I'm going to talk about today is focused on replication, not on hiding. [05:23.310 --> 05:27.610] So, one really interesting type of network is darknet. [05:27.890 --> 05:29.390] Basically, it's friend to friend. [05:30.050 --> 05:34.150] You only connect to people you know, and you need an invite to join. [05:34.750 --> 05:37.890] And for a lot of applications, this is a really good solution. [05:39.210 --> 05:41.590] Because it tends to keep governments out. [05:42.110 --> 05:45.930] But on the other hand, it also tends to keep everyone out. [05:46.550 --> 05:48.510] So, that makes it very secure. [05:49.130 --> 05:54.550] But it's also a little bit less accessible than a system that you can get to publicly. [05:55.050 --> 05:58.550] So, today I'm going to be talking about a non-darknet solution. [05:58.990 --> 06:01.750] I want a library that everybody can read from. [06:03.970 --> 06:10.670] When you're designing any new system, including a P2P system, you have to think about how the system is going to be organized. [06:11.770 --> 06:16.470] So, a chain of command is a really easy way to organize your system. [06:16.870 --> 06:19.810] And it's easy to program and enforce the rules. [06:20.450 --> 06:24.410] So, you might have one master server controlling the other computers. [06:25.130 --> 06:28.390] And you might have one human at the top of your organization. [06:29.710 --> 06:33.930] Of course, this creates a problem for certain kinds of networks. [06:34.090 --> 06:37.570] Because you have a single point of failure. [06:37.790 --> 06:43.010] If you can take out the node at the top of the hierarchy, then you can take down the whole network. [06:44.070 --> 06:55.270] So, when we're talking about a physical system, probably the easiest example of this is police find the server room where the system is hosted and they go shut it down. [06:55.270 --> 07:00.090] And this, of course, happens pretty frequently. [07:01.410 --> 07:20.930] To solve this problem with the physical system, people have created really interesting peer-to-peer networks whereby instead of having a single server in the middle of the network, the different participants in the network connect directly to one another. [07:20.930 --> 07:27.630] And this is good because if you take out one participant, the fabric of the network stays intact. [07:29.130 --> 07:31.790] Nutella, BitTorrent and Bitcoin all do this. [07:32.510 --> 07:39.370] And I'm not going to go into too much detail on this because it's sort of a solved problem as far as I'm concerned. [07:40.230 --> 07:47.070] But if you're interested at all in distributed systems, there's a lot of really cool stuff to read about. [07:48.470 --> 07:56.070] So human organizations are a little bit like computer systems in that chain of command structure is really common. [07:56.670 --> 08:01.550] A lot of businesses and militaries and governments are all structured like this. [08:01.830 --> 08:07.250] Of course, for an organization that wants to dissent, this can be pretty tough. [08:07.730 --> 08:11.750] For example, Julian Assange of WikiLeaks is currently hiding in refuge. [08:11.750 --> 08:17.110] And the guys from the Pirate Bay got jail time and really huge fines. [08:18.050 --> 08:24.830] So what I'm talking about is applying this principle from physical systems to ownership. [08:25.490 --> 08:33.310] So the idea here is instead of having a single owner who has the keys to turn off the system, have a lot of owners of the system. [08:35.010 --> 08:38.990] So this is, I would say, a partially solved problem. [08:40.710 --> 08:44.890] Darknets can do this pretty well, but they require invites. [08:45.470 --> 08:50.110] And BitTorrent can do this well, but it's not searchable. [08:51.090 --> 08:56.330] So those of you who have used it might say, well, I've definitely searched for torrents before, right? [08:57.330 --> 09:00.010] And that's kind of where the Pirate Bay comes in. [09:00.010 --> 09:05.830] So the way BitTorrent works, it's a system for sharing individual files. [09:06.510 --> 09:10.090] But it doesn't include a way to discover new files. [09:10.530 --> 09:17.010] So you can think of it as each file exists independently in BitTorrent. [09:17.350 --> 09:24.810] So what the Pirate Bay and a lot of other sites have done is add search functionality on top of this. [09:25.070 --> 09:31.250] So BitTorrent takes care of the retrieving the file, and the Pirate Bay takes care of searching for the file. [09:35.970 --> 09:40.010] So the Pirate Bay actually is succeeding in a lot of ways. [09:40.650 --> 09:47.530] But going to jail shouldn't really be part of, you know, your site administrator's job description. [09:51.050 --> 09:56.690] So the Pirate Bay is, to be clear, a site that's run by, you know, a small number of people. [09:57.950 --> 10:05.650] So the question here then is, how is it that BitTorrent can be ownerless, whereas the Pirate Bay needs an owner? [10:06.190 --> 10:13.330] So as far as I'm concerned, this difference is all about the difference between static content and dynamic content. [10:14.430 --> 10:19.210] So for static content, a good example of that is just a book. [10:19.390 --> 10:21.130] You know, Moby Dick is Moby Dick. [10:22.510 --> 10:25.690] The content of the book is not going to change over time. [10:27.070 --> 10:36.390] I don't know if... I think a lot of you know what a card catalog is, but, you know, it's the thing at a library that keeps track of which books are there and where they all are, right? [10:36.390 --> 10:41.790] So the card catalog of a library is what I would call dynamic content. [10:42.130 --> 10:46.810] The library is always going to be adding new books, removing books, or even moving books around. [10:47.110 --> 10:53.250] So in that case, you need to be able to change the content. [10:53.510 --> 10:59.190] So BitTorrent is a little bit like a book in this case, and the Pirate Bay is like a card catalog. [11:01.130 --> 11:09.450] So for static content, there's some really cool ways to share the data without requiring an owner. [11:09.930 --> 11:14.270] So a common way to do this is called content hashing. [11:14.470 --> 11:24.790] So you take your content, run it through a cryptographic hash function, and that will produce a short binary string called a hash. [11:25.470 --> 11:30.170] So you can think of this hash in a lot of cases as a link to the content. [11:30.510 --> 11:36.210] The hash is a constant size, and really importantly, it's difficult to reverse. [11:36.470 --> 11:44.130] So that means it's hard to come up with another file that has the same hash D39B258E. [11:44.410 --> 11:55.550] And that's really important because if you start with the hash, which is the link, you can download a copy of the content even from somebody you don't trust. [11:56.450 --> 12:06.130] And once you've finished downloading the content, all you have to do is run the hash function on the content and check that it matches the hash that you started with. [12:06.230 --> 12:09.850] And that way you can tell whether your content is authentic or not. [12:10.270 --> 12:16.970] This is used by BitTorrent and actually a lot of other systems, including non-peer-to-peer systems. [12:19.550 --> 12:31.170] So dynamic content, one thing is content... taking a hash of the content doesn't really help because, you know, the content can change, which means the hash will change. [12:31.350 --> 12:35.630] So the real question here is then, who is allowed to change the content? [12:36.590 --> 12:40.990] And for a decentralized library, how can you enforce that rule? [12:42.890 --> 12:48.670] One tool that's going to be really helpful for this is called public key cryptography. [12:49.550 --> 12:57.090] Generally how this works, let's say Bob generates a cryptographic key pair with a private key and public key. [12:57.450 --> 13:01.950] He gives the public key out freely, but he doesn't show anyone the private key. [13:01.950 --> 13:09.850] And when he wants to write something, he can sign it using his private key and distribute it. [13:10.250 --> 13:17.330] And anybody who has the public key can verify that what he signed was authentic. [13:18.850 --> 13:22.650] And this typically is used by only a single user. [13:22.650 --> 13:29.330] It doesn't scale up to groups of arbitrary size very well. [13:31.690 --> 13:38.390] So for the system that I'm going to build, here's an overview of the properties that I'd like it to have. [13:38.870 --> 13:42.110] You should obviously be able to search for files and view them. [13:42.610 --> 13:44.370] It shouldn't require an invite. [13:44.690 --> 13:50.790] It should be physically decentralized, but it should also be decentralized in terms of ownership. [13:51.550 --> 13:53.970] Nobody should have a key to turn the system off. [13:54.670 --> 13:56.450] And obviously that includes me. [13:57.370 --> 14:00.190] And finally, it should be resistant to spam. [14:01.990 --> 14:06.430] And when I'm thinking about the user interface, it should really look something like this. [14:06.630 --> 14:09.610] Basically, you type text into a text box. [14:09.950 --> 14:11.490] You can perform a search. [14:11.710 --> 14:13.490] That gives you a list of files. [14:13.950 --> 14:16.910] And then you can select a file in order to view it. [14:17.490 --> 14:21.010] So a pretty simple user interface concept. [14:23.890 --> 14:27.790] So now I'm going to explain how I went about designing this system. [14:28.590 --> 14:32.410] And this is called Exandria, the system that I've built. [14:33.450 --> 14:37.930] So in order to meet the requirements, there's kind of three things that I'm thinking about. [14:38.190 --> 14:40.670] We need to store the data for the system. [14:40.670 --> 14:42.370] We need to be able to exchange it. [14:42.370 --> 14:45.850] And we need some way to determine ownership of the data. [14:45.990 --> 14:50.890] That is, how do you decide what data does and does not go into the library. [14:51.370 --> 14:54.550] So I'm going to explain each of these three things in order. [14:58.230 --> 15:04.890] So the general structure that I've got here is there's a central index for the library. [15:05.770 --> 15:08.330] Inside the index are a bunch of... [15:08.330 --> 15:12.270] Each entry in the index is a pair of two things. [15:12.430 --> 15:15.910] So one is a human readable name for the file. [15:16.150 --> 15:19.530] And the other thing is a content hash of the file. [15:19.530 --> 15:25.330] And that is basically a link that you can use to retrieve the full file. [15:27.730 --> 15:33.030] So owners of the system will be able to make contributions to the index. [15:33.290 --> 15:39.090] And the index is more or less the new and interesting thing that I'm doing. [15:40.310 --> 15:45.990] So you can think of the Pirate Bay is a centralized index of files. [15:45.990 --> 15:48.490] And I want to make a decentralized index. [15:51.070 --> 15:59.090] So one thing to note is every participant in the network is going to keep a copy of the entire index. [15:59.850 --> 16:02.230] But you don't need to download every file. [16:02.550 --> 16:05.310] You only download the files that you're interested in. [16:07.010 --> 16:09.410] So the way the data is going to flow here. [16:09.650 --> 16:11.670] You type in a search string. [16:11.850 --> 16:12.530] Say kittens. [16:13.790 --> 16:15.350] And you search your index. [16:16.390 --> 16:18.630] You do that locally on your computer. [16:19.230 --> 16:22.670] And that will give you a list of name and hash pairs. [16:23.190 --> 16:25.330] And then given one of those hash pairs. [16:26.990 --> 16:30.610] That identifies a file that you can then download from the network. [16:33.450 --> 16:38.050] So now I'm going to talk about a data structure called an append-only feed. [16:38.650 --> 16:45.830] And even for people who don't like hearing the phrase data structure, I hope you'll be able to understand this. [16:46.210 --> 16:51.710] So part of what makes it so great is its simplicity and elegance. [16:52.090 --> 16:58.890] The way an append-only feed works, you take your data and you have it broken up into blocks. [16:58.890 --> 17:09.810] And the only way that you can modify the data in an append-only feed is you can add a new block onto the end. [17:09.830 --> 17:14.210] So you're never allowed to modify an existing block. [17:14.330 --> 17:17.410] And you're never allowed to delete an existing block. [17:19.690 --> 17:29.190] And the way I've chosen to represent the data in my system is as a set of different append-only feeds. [17:29.470 --> 17:35.310] So the first thing at the top in orange, that's the identity feed. [17:35.310 --> 17:47.130] So the idea here is anybody can sign up for a new identity by adding an entry onto the identity feed. [17:48.870 --> 17:54.330] And then each identity has their own metadata feed. [17:54.330 --> 18:00.850] And the metadata feed consists of a bunch of name hash pairs. [18:01.230 --> 18:04.970] And the metadata feeds are what make up the index. [18:06.990 --> 18:12.350] And then obviously the metadata feeds have links to the actual files in the network. [18:12.630 --> 18:18.710] So we have a bunch of append-only feeds, but we need a way to implement each feed. [18:18.710 --> 18:25.890] So, now I'm going to talk about Bitcoin for a reason that will become apparent very soon. [18:27.590 --> 18:32.490] So, one really common question about Bitcoin is, what is it? [18:33.370 --> 18:36.610] Is it a payment system or a commodity or a currency? [18:36.990 --> 18:38.170] Is it a network? [18:38.470 --> 18:39.950] It is all of those things. [18:40.170 --> 18:43.750] But today I'm going to talk about Bitcoin as a database. [18:45.210 --> 18:47.470] There's this thing called the Bitcoin blockchain. [18:47.470 --> 18:49.730] You've probably at least heard that term. [18:50.350 --> 18:54.890] And that's an append-only feed of financial transactions. [18:55.450 --> 19:03.270] So, each block in the Bitcoin blockchain has a bunch of financial transactions inside of it. [19:03.530 --> 19:08.210] And the way it kind of works is anybody can submit a transaction to the network. [19:08.210 --> 19:12.430] And Bitcoin miners can append new blocks to the blockchain. [19:13.190 --> 19:15.990] And there's a new block about every 10 minutes. [19:18.370 --> 19:27.470] So, one question about the Bitcoin blockchain is, is it possible to store non-financial data inside the blockchain? [19:29.890 --> 19:36.410] So, I've shown up here an example of how to do that in a human-readable way. [19:36.410 --> 19:38.690] This is a valid Bitcoin address. [19:39.050 --> 19:44.910] It says, one, meet me at the drop-off at 9pm, XXXSYMHEM8. [19:45.030 --> 19:51.910] So, obviously, I've hidden some sort of non-financial message inside of this Bitcoin address. [19:52.310 --> 20:02.270] So, by sending Bitcoins to an address like this one, you can encode information inside of the Bitcoin blockchain. [20:02.270 --> 20:09.490] As you might guess, this is not a particularly efficient way to encode that information. [20:10.210 --> 20:20.610] So, there are features of the Bitcoin protocol that let you store information in Bitcoin transactions pretty efficiently. [20:20.610 --> 20:30.830] And what I'm most interested in is something called op-return, which basically says everything after this is just raw data. [20:33.650 --> 20:39.130] So, another important question is, is it ethical to store data in the Bitcoin blockchain? [20:39.410 --> 20:40.830] Some people would say no. [20:41.910 --> 20:45.850] Bitcoin was designed specifically as a payment system. [20:45.850 --> 20:54.350] And, you know, if you're storing other non-financial data in the Bitcoin blockchain, you're cluttering it up for everybody else. [20:54.730 --> 20:56.690] Some other people might say yes. [20:57.270 --> 20:59.390] You know, Bitcoin's code is its contract. [20:59.390 --> 21:03.990] And it does include these features designed for storing arbitrary data. [21:04.510 --> 21:10.130] And another thing is, you know, I'll happily pay to store my data in the Bitcoin blockchain. [21:10.130 --> 21:15.710] And as far as I'm concerned, it's none of your business what data I want to store there. [21:17.470 --> 21:22.010] So, obviously, I am one of the people who thinks that the answer is yes. [21:22.890 --> 21:33.210] Although, with an important caveat, which is, I think it's important to be nice and try to use the least resources possible. [21:35.630 --> 21:43.130] So, the thing that we needed was a world-writable place to store our identities. [21:43.290 --> 21:46.010] And a great solution is the Bitcoin blockchain. [21:46.670 --> 21:48.170] Anybody can write to it. [21:48.350 --> 21:53.450] It's a very robust network with a good track record. [21:54.090 --> 21:58.770] And it also has good spam resistance capabilities that I'll talk about in a second. [22:00.770 --> 22:10.850] For many reasons, though, if you want to have a library of files, you just can't practically fit that inside of the Bitcoin blockchain. [22:12.090 --> 22:16.510] Because space is limited and the efficiency would be abysmal. [22:17.230 --> 22:24.730] So, the vast, vast majority of the data for this network is going to be stored off of the Bitcoin blockchain. [22:24.730 --> 22:30.050] So, back again to append-only feeds, which I obviously love. [22:32.630 --> 22:44.530] Since each peer has their own... each identity has its own append-only feed, in order to exchange data between two append-only feeds, the algorithm is really simple. [22:45.010 --> 22:50.290] You know, all you have to do is basically copy in the missing blocks and you're done. [22:51.850 --> 23:01.970] So, for each peer identity feed, the metadata feed, you can replicate that feed between all users' computers in the network. [23:02.430 --> 23:08.630] And you can also use a really similar protocol to exchange static files as well. [23:09.190 --> 23:16.650] What I'm using to actually implement this are two libraries called HyperCore and HyperDrive. [23:16.650 --> 23:24.150] And if you're interested in distributed systems or algorithms, I would definitely recommend checking those out. [23:25.090 --> 23:37.630] So, a swarm is a group of computers that are all connected to each other, that are all interested in the same piece of data. [23:37.630 --> 23:41.610] So, the different swarms that are going on. [23:42.830 --> 23:46.670] Every node is going to become part of the index swarm. [23:46.950 --> 23:52.590] And these nodes will exchange the central index of the library. [23:54.890 --> 23:59.390] And each node can also join one or more file swarms. [23:59.550 --> 24:03.250] You just join the swarm for the files that you're interested in. [24:03.250 --> 24:09.030] And finally, every node is going to be part of the Bitcoin swarm. [24:09.350 --> 24:14.670] Because you need to access the identity data stored in the Bitcoin blockchain. [24:15.970 --> 24:20.270] So, to recap this, we got our identity feed on top. [24:20.490 --> 24:24.530] That's implemented by storing identities inside of Bitcoin transactions. [24:25.590 --> 24:31.590] And for each of the individual feeds, that's implemented with HyperCore. [24:33.310 --> 24:38.110] So, now the kind of tricky problem is determining ownership of the library. [24:38.250 --> 24:41.110] Who gets to decide what goes into it and what doesn't? [24:41.650 --> 24:44.410] So, I'm going to talk about a couple different strategies. [24:45.930 --> 24:48.790] One strategy that you could try is anarchy. [24:49.530 --> 24:51.710] Anybody can add or delete data. [24:51.710 --> 24:55.490] Of course, anybody also includes the government. [24:55.830 --> 25:00.290] So, you know, a government can just delete the things that it wants. [25:00.610 --> 25:03.330] And that's not very censorship resistant. [25:04.470 --> 25:08.350] It is possible to make an ad-only library. [25:09.290 --> 25:22.110] However, the problem here is the government can just create a million fake copies of a particular thing that it dislikes, making it impossible for users to find the real copy. [25:22.650 --> 25:28.090] So, I think that there's a really interesting relationship here between spam and censorship. [25:29.730 --> 25:35.050] Could you use an algorithm to differentiate the spam files from the real files? [25:35.650 --> 25:38.890] One thing right now, algorithms aren't very smart. [25:39.530 --> 25:44.850] For example, you could rewrite the book 1984 to be pro-Big Brother. [25:45.170 --> 25:53.470] And I don't think there's any algorithm that could really detect that subtle semantic level change. [25:54.270 --> 25:59.710] Even if it could though, you have to decide who's the person who's writing the algorithms. [26:00.170 --> 26:03.030] So, and then you get back to the ownership question. [26:03.210 --> 26:05.870] So, it's really just kicking the can down the road there. [26:06.630 --> 26:11.770] As far as I know, nothing really uses this particular model. [26:12.510 --> 26:14.130] But what about Wikipedia? [26:15.070 --> 26:19.090] Wikipedia is actually a great example of chain of command style ownership. [26:19.390 --> 26:26.810] They have a bunch of moderators, administrators, Jimmy Wales, and I think they have a board of directors. [26:28.470 --> 26:32.630] So, this is used by pretty much every system ever. [26:33.010 --> 26:36.830] Because it's simple, it's efficient, it's easy to implement. [26:38.370 --> 26:46.370] The only... well, the main disadvantage is that it's got a single point of failure, which also makes it definitely vulnerable to censorship. [26:47.450 --> 26:51.990] So, now I'm going to talk about a third and very weird ownership model. [26:51.990 --> 26:54.290] And I'm calling this resource burn. [26:54.650 --> 26:58.650] When I'm talking about resources, really, more or less, I mean money. [26:58.910 --> 27:02.910] And this system is simple but counterintuitive. [27:03.410 --> 27:08.330] So, the idea is that anybody can become an owner of the system. [27:09.030 --> 27:16.050] But if you want to become an owner, you have to destroy some resources in order to earn an ownership stake. [27:17.170 --> 27:28.830] And that prevents spammers from joining the system or from having too much influence, because it becomes too expensive to spam. [27:29.970 --> 27:39.070] And you could think of this as paying to be an owner, except it's not a traditional payment, because no one is receiving the money. [27:39.630 --> 27:41.290] The money is being destroyed. [27:43.490 --> 27:45.450] So, that sounds pretty crazy. [27:45.450 --> 27:46.750] Could it possibly work? [27:47.110 --> 27:47.650] Yes. [27:47.870 --> 27:50.390] This is actually exactly what Bitcoin is doing. [27:50.790 --> 27:57.190] So, when you hear about Bitcoin mining, a lot of people say, oh, well, they're validating Bitcoin transactions. [27:57.370 --> 28:00.890] Or maybe people will say they're discovering new Bitcoins. [28:01.250 --> 28:03.250] These things aren't exactly true. [28:03.470 --> 28:10.190] Bitcoin mining is actually intentionally forcing people to waste huge amounts of electricity. [28:10.190 --> 28:14.810] And that was the crucial innovation behind Bitcoin. [28:15.470 --> 28:19.890] And actually, it is succeeding on a massive scale. [28:20.570 --> 28:24.870] Bitcoin uses about as much electricity as the nation of Jamaica. [28:29.060 --> 28:36.400] So, there's another way to think about destroying resources now that Bitcoin exists. [28:36.400 --> 28:44.040] So, one important aspect of the Bitcoin network is anybody can send money to anybody else. [28:44.580 --> 28:59.120] So, if we could create a way to provably destroy Bitcoins, then that gives us a way to basically burn resources for ownership in our network. [28:59.120 --> 29:02.580] So, there's something called unspendable addresses. [29:02.980 --> 29:07.640] I've got one of the most famous unspendable addresses at the bottom. [29:07.900 --> 29:12.580] It's one Bitcoin eater address, don't send F59KUE. [29:13.180 --> 29:17.020] And this actually has a couple of thousand bucks in it right now. [29:18.260 --> 29:23.320] And the interesting thing here is money can go in, but it can never leave. [29:23.320 --> 29:28.940] So, those whatever three Bitcoins that are in there are now destroyed forever. [29:29.340 --> 29:32.080] And it's easy to make your own unspendable address. [29:32.660 --> 29:43.080] So, the great thing about Bitcoin is that it's easy to verify that somebody has sent a particular amount of money into an unspendable address. [29:43.080 --> 29:58.280] So, what we can say is if you want to sign up for an identity in the system, like a user, like a user name or an account basically, if you want an identity, you have to pay a fixed price for that. [29:58.620 --> 30:03.240] And we can say that each identity has an equal say in the system. [30:05.080 --> 30:14.720] One important thing to note about this is if you have more money, that does mean you can sign up for more identities, which is that's an important thing to understand. [30:15.640 --> 30:23.480] So, as far as Exandria, I'm using Bitcoin for two distinct purposes. [30:23.920 --> 30:29.340] One is I'm asking people to burn Bitcoins to sign up for ownership. [30:30.120 --> 30:35.320] And the second thing, I'm also using it as a database to store identities. [30:37.220 --> 30:40.900] So, it's very convenient that you can do both kind of at the same time. [30:40.900 --> 30:42.260] So, alright. [30:42.580 --> 30:49.680] Now, how does that design meet the requirements that I described at the start? [30:49.980 --> 30:56.160] You can search for files, and you do that by searching your local copy of the metadata. [30:56.820 --> 30:58.300] You can view files. [30:58.660 --> 31:01.120] You download those from the file swarm. [31:02.500 --> 31:13.440] By the way, files are stored on people's computers, and when you want to download a file, you connect to the other people who have that file. [31:14.900 --> 31:20.760] Another thing, there's no invite required because there's no invite required. [31:22.600 --> 31:33.980] The network's already physically decentralized because Bitcoin's physically decentralized, and the only real way I'm connecting computers together is in a swarm. [31:34.840 --> 31:37.080] And also, the ownership is decentralized. [31:37.760 --> 31:45.660] Anybody can sign up for an identity, and there's no way for me to prevent people from signing up for identities. [31:45.660 --> 31:53.060] And even if you can take out one identity, the network keeps on working pretty well. [31:54.340 --> 32:01.920] And finally, Exandria is spam resistant because you need to pay money to sign up for an identity. [32:02.540 --> 32:05.620] So, spamming the network is too expensive. [32:07.580 --> 32:10.460] So, I'll be honest about some disadvantages. [32:11.520 --> 32:18.780] One thing people mention to me is, what if you put, you know, the most horrible and disgusting content on the network? [32:19.440 --> 32:24.520] As far as that, it is pretty easy to add a downvote feature. [32:25.220 --> 32:35.780] And I believe that the community can decide for itself what content should and shouldn't be allowed to be part of the index. [32:37.560 --> 32:42.420] Another thing is, this is a single index that's shared by everybody. [32:42.420 --> 32:44.360] But of course, people have their own preferences. [32:44.440 --> 32:47.180] And you want your search to be customized. [32:47.560 --> 32:51.680] So, one thing I'm thinking about for that is the ability to add on filters. [32:51.680 --> 32:57.980] That is, you can say, I want to see more content from her, less content from him. [32:58.120 --> 33:00.220] And that customizes your search results. [33:01.200 --> 33:10.140] And the third thing is, you know, since money is the thing that you use to sign up identities, will this be taken over by corporations? [33:11.120 --> 33:15.180] And maybe they'll use it for, you know, disseminating advertisements? [33:16.480 --> 33:25.620] I say, if people act in a selfish and, quote unquote, economically rational manner, then, yeah, we're cooked. [33:25.900 --> 33:29.940] But I don't believe that humans are selfish. [33:30.100 --> 33:31.880] I think that people are fundamentally good. [33:32.000 --> 33:36.340] And I think that there's a lot of people out there who want to do the right thing. [33:40.250 --> 33:42.530] So, I didn't just design this system. [33:42.670 --> 33:43.530] I also built it. [33:43.730 --> 33:46.430] And here's some things that I thought about when building it. [33:46.590 --> 33:52.090] I used Node.js because the peer-to-peer community is amazing. [33:52.310 --> 33:54.350] There's so many great libraries out there. [33:55.190 --> 34:02.790] Another thing is, when startups, say, fail fast, they mean you want to tackle the hardest problems first. [34:02.790 --> 34:07.250] So, I think the hardest problem was building the kind of plumbing of the network. [34:07.550 --> 34:08.670] Now, I've done that. [34:09.130 --> 34:14.110] And the second hardest problem is, is anybody interested in using it? [34:14.190 --> 34:17.930] So, that's what I'm going to start working on now. [34:19.190 --> 34:21.970] I've also tried to keep it as simple as possible. [34:22.350 --> 34:29.930] I believe that simple software is not just easier to build, but it's also easier to maintain and more secure. [34:31.870 --> 34:35.470] Also, so, I think that execution is important. [34:35.730 --> 34:44.410] Even if somebody else has a better idea, if it's not easy to build, you know, that obviously counts for a lot. [34:46.170 --> 34:50.010] I've also tried to resist the temptation to reinvent the wheel. [34:50.270 --> 34:56.430] There's a lot of really interesting and cool sub-problems that you need to solve to build a system like that. [34:56.430 --> 35:00.310] And I have tried to not solve any of them. [35:00.650 --> 35:05.110] So, I'm using other people's solutions for many different things. [35:05.590 --> 35:11.250] Another thing I've tried to do, I've broken out smaller components of my work. [35:11.410 --> 35:19.570] So, for example, I have a library called Bernie that you can use to determine if somebody has burned bitcoins. [35:20.570 --> 35:25.010] And it gives you a live feed as new people burn bitcoins. [35:27.230 --> 35:30.010] So, some of the challenges I ran into... [35:30.010 --> 35:36.930] I'm not originally a JavaScript guy, so learning Node was at times frustrating, but that's been overall fun. [35:38.630 --> 35:43.810] I'm using a lot of pretty new dependencies, which means... [35:44.370 --> 35:49.330] Of course, that means new dependencies have more bugs, but also they change faster. [35:49.810 --> 35:55.490] And, you know, I have to be ready for libraries that are changing out from underneath me. [35:57.110 --> 36:06.050] And also, one thing that I also noticed was connecting two computers together is surprisingly hard in a peer-to-peer network. [36:06.630 --> 36:11.170] I'm used to client-server development, where, you know, your connection just works. [36:11.410 --> 36:13.630] But with peer-to-peer connections, you have to... [36:13.630 --> 36:23.410] It's kind of like a trip back to the early 2000s or whatever, trying to worry about firewalls and routers and network settings. [36:23.850 --> 36:26.070] So, I was a little surprised by that. [36:27.890 --> 36:30.470] Now, I'm going to show a live demo of the system. [36:30.590 --> 36:39.010] And that's going to be awesome, because either it'll work, and that'll be exciting, or it won't work, and that'll be fun. [36:45.620 --> 36:46.350] One second. [36:46.830 --> 36:48.570] So, this is the terminal. [36:49.230 --> 37:00.270] Probably a lot of you have seen it, but basically, it's a way to view files and run commands on my computer. [37:03.660 --> 37:08.800] So, first off, I'm going to show a list of commands commands that are available. [37:12.800 --> 37:23.440] So, these are the sort of different mini programs in the network that I've provided for people to interact with the network. [37:24.660 --> 37:30.320] As you can see, this is not yet at the user interface stage that I had hoped for. [37:30.320 --> 37:36.280] So, what I'm going to do first, is I'm going to print out my feed. [37:41.760 --> 37:42.360] All right. [37:42.560 --> 37:44.260] So, I've got three items here. [37:45.120 --> 37:47.240] So, at the top, you see the name of the feed. [37:47.580 --> 37:49.140] And then you also see... [37:50.520 --> 37:52.160] I've got Read Me in here. [37:52.420 --> 37:54.000] I've got the book Beowulf. [37:54.500 --> 37:56.300] And I have the book Ulysses. [37:57.040 --> 38:00.620] So, what I want to do now is I'm going to add a new book to my feed. [38:19.470 --> 38:21.470] I'll add the book Dracula. [38:30.000 --> 38:38.050] So, basically, this tells me what feed I'm appending to, the name of the book, and it gives me a content hash of the book. [38:39.900 --> 38:41.400] So, yes, I do want to write it. [38:41.480 --> 38:43.920] So, now I'm going to just print out my feed again. [38:44.300 --> 38:44.980] Okay, cool. [38:44.980 --> 38:47.180] So, you can see at the bottom... [38:48.000 --> 38:52.240] You might not be able to see, depending on what row you're in, but at the bottom, now we have Dracula. [38:53.640 --> 38:58.640] So, now I'm going to run a script that serves the files. [38:58.840 --> 39:06.400] So, that means it makes them available to other peers who want to get a hold of them. [39:07.900 --> 39:13.240] So, now I'm going to go into this other tab, and I'm going to run a different peer. [39:13.240 --> 39:16.760] Of course, normally you would run the peers on different computers. [39:17.540 --> 39:18.080] It's much... [39:19.020 --> 39:21.760] Well, you know, that actually does work. [39:21.900 --> 39:22.700] I have one... [39:23.050 --> 39:27.340] I have a server running on AWS with a peer on it. [39:29.020 --> 39:31.100] But it's easier to demo this way. [39:37.050 --> 39:38.090] The first... [39:38.650 --> 39:48.150] Okay, so what I did there was is I tried to run the same peer twice, which you can't do. [39:51.390 --> 39:53.610] So, what this does... [39:55.030 --> 39:58.710] That's my firewall, by the way, because it needs to accept incoming connections. [39:58.970 --> 40:03.330] So, what it does here is it looks through the transactions in the Bitcoin blockchain. [40:03.330 --> 40:08.310] When it finds an identity, it joins the swarm for that identity. [40:08.970 --> 40:15.010] And then, when it's in the identity swarm, it gets the metadata. [40:15.510 --> 40:20.610] So, okay, you can see now, it sees the file Dracula. [40:21.670 --> 40:29.610] So, now I'm going to run another command to retrieve the file Dracula. [40:36.960 --> 40:37.480] Oh. [41:01.340 --> 41:02.300] It didn't work. [41:02.740 --> 41:05.620] So, I think I probably have my timeout set too low. [41:06.160 --> 41:07.460] Maybe I can fix that. [41:07.940 --> 41:11.460] I also might be able to get another item from that feed. [41:12.440 --> 41:13.480] Perhaps Beowulf? [41:14.800 --> 41:16.460] Is that how you spell Beowulf? [41:26.670 --> 41:27.190] Oof. [41:27.190 --> 41:29.990] Oh, that's because the name of Beowulf is ridiculous. [41:32.550 --> 41:33.410] The Ulysses? [41:34.330 --> 41:34.790] Oof. [41:35.030 --> 41:36.550] Yeah, that's the... [41:36.550 --> 41:37.170] It's a spell. [41:38.750 --> 41:39.650] Yeah, seriously. [41:40.850 --> 41:42.090] But it's right on the first line. [41:43.090 --> 41:44.670] Spellcheck.js is coming up. [41:45.790 --> 41:45.850] Oof. [41:52.970 --> 41:53.750] Very nervous. [41:54.290 --> 41:55.350] Let's hope this works, right? [42:03.160 --> 42:03.720] All right. [42:03.840 --> 42:04.460] Well, all right. [42:04.580 --> 42:07.120] I'll try the simplest one, which is the read me. [42:17.970 --> 42:18.450] Okay. [42:18.910 --> 42:19.190] Finally. [42:19.450 --> 42:19.770] It works. [42:20.010 --> 42:20.390] Great. [42:20.630 --> 42:21.390] So, yeah. [42:22.010 --> 42:24.790] I definitely need to work on those flakiness issues. [42:25.170 --> 42:30.490] So, what I'm going to do now, I'm going to show you guys the read me that it downloaded. [42:31.510 --> 42:34.530] So, that goes to this folder called archives. [42:35.050 --> 42:36.950] I can just open that in the finder. [42:37.110 --> 42:38.890] Yeah, you can definitely read that, right? [42:40.030 --> 42:44.910] So, you've got this folder, readme.md, and then the read me files inside of it. [42:45.550 --> 42:53.830] So, open that up, and there's the Exandria readme file that I shared from my computer back to my computer. [42:54.010 --> 42:56.650] But different peers on my computer. [42:57.910 --> 42:58.850] So, yeah. [42:58.990 --> 42:59.850] That's enough of that, right? [43:21.660 --> 43:23.340] My Chrome slides ran away. [43:23.520 --> 43:31.600] So, for the interest of time, some really cool libraries I'm using are HyperCore, HyperDrive, WebCoin. [43:32.340 --> 43:37.420] I also was really inspired by StoreJ and Secure Scuttlebutt. [43:39.460 --> 43:43.880] And right now, I think we're in a golden age of peer-to-peer systems. [43:44.680 --> 43:48.160] And there's so many other great systems in this space. [43:49.400 --> 43:54.580] And if you want to get involved, you know, tell a friend who might be interested. [43:54.880 --> 43:55.760] Try using it. [43:55.820 --> 43:59.140] You can just get it from GitHub, and you should be able to get those files. [43:59.880 --> 44:04.040] And, of course, I'm sure you'll find a bug, so feel free to report that. [44:06.340 --> 44:09.720] And also, of course, share some files, right? [44:12.580 --> 44:13.880] Are you good at marketing? [44:14.140 --> 44:15.320] I'm not good at marketing. [44:15.700 --> 44:19.620] But if you are, maybe you can help me get people excited about the system. [44:20.280 --> 44:22.860] And, of course, there's plenty of code to write. [44:22.860 --> 44:29.020] So, if you like programming, there's a bunch of really cool problems that need to be solved. [44:29.020 --> 44:36.320] And if you're a person who's worked on peer-to-peer systems before, I'd love to hear what kind of advice you have. [44:38.440 --> 44:47.720] So, finally, thanks to Maffintosh and Mapum, who were both really helpful when I was working on this project. [44:48.580 --> 44:50.560] And, you know, I hope you like this talk. [44:50.720 --> 44:58.680] Even if you think my design is terrible, maybe this encourages you to think that you can develop your own better peer-to-peer system. [44:58.800 --> 45:00.760] And, you know, that would be a great outcome, too. [45:01.680 --> 45:04.840] So, finally, thanks to everybody who, like, reviewed my presentation. [45:04.840 --> 45:06.640] And thanks to you for listening. [45:06.900 --> 45:07.460] The end. [45:17.140 --> 45:18.160] Any questions? [45:20.460 --> 45:34.760] Are you concerned with, as the size grows of the data that you're going to store, and your gigabytes and terabytes, that the processing-intensive side of Bitcoin is going to, like, swamp the project? [45:34.760 --> 45:38.620] I mean, look at how much money they spend now, and that's to make money. [45:39.340 --> 45:39.380] Yeah. [45:39.700 --> 45:42.640] You're going to ask people to spend money to save data. [45:43.260 --> 45:43.360] Yeah. [45:44.360 --> 45:51.180] So, the question is about technical scalability or whether people are going to be willing to spend money? [45:51.540 --> 45:53.980] Kind of financial scalability. [45:54.160 --> 46:01.340] I mean, right now, essentially, you can't mine Bitcoins now unless you have specialized hardware and a lot of it. [46:01.840 --> 46:04.640] Unless you, maybe, you'll get a Bitcoin this decade. [46:05.320 --> 46:07.020] So, I mean... [46:07.020 --> 46:07.420] Yeah. [46:07.580 --> 46:10.740] So, the question is, will people be willing to sign up for identities? [46:11.140 --> 46:19.540] One interesting thing you can do is, say, there's no minimum price on an identity, or set the minimum price to, you know, one cent. [46:19.720 --> 46:25.500] And then, also, allow people to buy identities that have a bigger say in the system. [46:25.500 --> 46:30.720] So, you can buy an identity that has, basically, more weight. [46:31.720 --> 46:43.900] And then, there's also, like, code scalability issues, which are, you know, compression, shorter naming, are both interesting things that you could use to solve the... [46:44.920 --> 46:47.240] as the index grows very large. [46:49.120 --> 46:49.920] Over there. [46:50.600 --> 46:55.380] I see two issues with this that would both make the storage more expensive over time. [46:55.940 --> 47:06.260] One of them is that Bitcoin will eventually stop making new blocks, which means each Bitcoin will become more and more valuable, which will raise the price of an identity. [47:06.940 --> 47:18.640] And also, as time goes on, more and more people will buy multiple identities to have more say in it, which is going to also drive down the value of each identity. [47:19.420 --> 47:19.940] Yeah. [47:20.180 --> 47:23.760] So, the comment was, two things will make storage more expensive. [47:24.640 --> 47:26.060] Bitcoin's getting more expensive. [47:26.060 --> 47:35.840] And also, as more people join the network, people will... it will take more money to store files. [47:37.620 --> 47:43.480] I'm not, I guess, necessarily convinced that either of those things will happen. [47:43.480 --> 47:48.160] It's possible that Bitcoin is correctly priced now. [47:50.540 --> 48:05.480] I don't necessarily think that in the future people will... I'm not sure if there will be a snowball effect or not. [48:05.640 --> 48:06.540] It's definitely possible. [48:06.860 --> 48:08.500] But I think that's... you'd have to see. [48:08.700 --> 48:09.820] That's supply and demand. [48:10.540 --> 48:12.040] It's a supply and demand issue. [48:16.680 --> 48:21.360] I don't quite understand that, but I would like to... maybe we could talk afterwards. [48:21.360 --> 48:24.200] I'd like to understand more about the economics of that. [48:24.880 --> 48:24.960] Yeah. [48:26.020 --> 48:26.820] Oh, sorry. [48:26.920 --> 48:28.340] You intercepted that guy behind you. [48:29.000 --> 48:33.120] So, you were talking about resource burden to limit people acquiring multiple identities. [48:34.000 --> 48:38.080] What's the difference between having multiple identities and having one identity in the system? [48:38.080 --> 48:42.040] It seems like you just... you either store them all over the one identity or store them... [48:42.680 --> 48:44.460] for your files that are multiple identities. [48:44.660 --> 48:47.720] But it doesn't seem like, from what you've explained, there's more say in the system. [48:48.360 --> 48:49.220] That's a good point. [48:49.360 --> 48:52.380] So, the question is, why is it better to have multiple identities? [48:52.560 --> 48:53.400] Why would you want that? [48:53.960 --> 49:06.440] The way I would just answer that is, basically, each... a simple way to think about it is, each identity would have some fixed number of entries that they could publish into the index. [49:06.440 --> 49:08.180] I didn't explain that clearly. [49:09.000 --> 49:14.600] But... so, maybe each identity gets to publish 10,000 entries into the metadata index. [49:14.840 --> 49:21.480] So, the more identities you have, the more influence you have over the content in the network. [49:22.400 --> 49:23.320] And up here? [49:23.440 --> 49:23.860] Okay. [49:23.860 --> 49:29.260] So, it seems like the main problem is that a rich adversary can perform a cyber attack pretty easily and spam the network. [49:29.540 --> 49:34.600] Have you thought of adding any sort of, like, web of trust model to kind of get around that? [49:37.780 --> 49:38.380] All right. [49:38.640 --> 49:39.020] Yeah. [49:39.160 --> 49:42.460] So, the question is, rich people can mess up the network. [49:42.620 --> 49:43.600] That's completely true. [49:44.080 --> 49:46.920] And have I thought about adding a web of trust model? [49:47.060 --> 49:47.320] Yes. [49:47.740 --> 49:50.340] So, that's one of the things I'd love to add down the line. [49:50.340 --> 49:53.780] There's something... there's an algorithm called eigen-trust. [49:53.840 --> 49:57.980] That's a lot like kind of page rank for trust relationships. [49:59.160 --> 50:04.340] And I'm hoping at some point to be able to implement that. [50:04.540 --> 50:09.300] And that would dissuade one bad actor from messing up the network. [50:09.580 --> 50:14.480] Because you can sort of have the entire community vote against one person. [50:16.940 --> 50:17.560] All right. [50:18.060 --> 50:21.000] I'd love to hear more about what you guys have to say. [50:21.040 --> 50:23.060] So, I guess I'll be out there. [50:23.660 --> 50:24.020] Yeah. [50:24.200 --> 50:24.840] Thanks for the questions. [50:24.840 --> 50:24.940] We're our students. [50:25.560 --> 50:25.920] Yeah, hello.