The past 2 months (since I handed in my thesis on the 2nd of September), I’ve been busy thinking: what next? As any early 20-something probably experiences, you are suddenly faced with immense opportunity, and you frankly are overwhelmed. I don’t want to say this with any form of ‘bragging’ or ‘ego’ attached, but being a coder/developer/programmer, the opportunities are even more pronounced. In the past 2 months, I’ve already been approached to join amazing people, doing fucking cool shit. I’m grateful. Immensely.
I’ve been enjoying the #funemployed life, which has basically been the same stuff I’ve been doing anyway, except with 3-4hours each day working on a thesis. Those 3 - 4 hours has mostly been replaced with reading, which I’ve neglected. I’m still busy making music, trawling the web, hacking on something and trying to meet people and hear the stories they have to tell.
As I’m coming closer to to the end of the year, some roads are becoming more clearer, and some have disappeared (*romantic interests*). I need and want to make a decision coming closer to December and thus I feel when I wrote a blog post about (articulating my thoughts), I come closer to those decisions, and hopefully gather insight and advice from the great people I’ve met through the web.
So here’s what I’m thinking. Each day, I’m just absolutely enamored with Bitcoin (and cryptocurrencies in general). It is just so exciting. On every level (economics, philosophy, politics, computer science, systems). I feel empowered when I think about Bitcoin. The potential is immense, and it hasn’t even started yet. My daily routine when waking up, contains checking Twitter, Email, Facebook and then r/Bitcoin, Bitcointalk, prices (BTC and LTC) and Bitcoin Foundation forums.
One of these ideas pertain to Bitcoin’s potential to allow programs to function autonomously as agents (https://en.bitcoin.it/wiki/Agents). It allows programs to function on an equal level to humans (and other programs). Separated from the need of a human actor to exist, programs can fulfill new and exciting roles in our lives. Here’s some example that’s been discussed:
1) Electric self-driving cars not owned by anyone. They own themselves. They earn money by driving people around (and potentially goods). They spend these Bitcoins to charge themselves at stations. All done automatically without the need of humans.
2) A website that earns money by providing a service to humans. This website then automatically pays its hosting service in Bitcoin to ‘exist’. All automatically.
3) A coffee machine. You pay Bitcoin per coffee. Once empty, it automatically orders more coffee from the vendor. No need for a human (or credit card).
I’m sure this idea is also very new, and there could be some very interesting new use cases that come about from the question: What would be able if programs/machines didn’t need humans to function? What would they be capable of providing?
I’ve had the pleasure of discussing some of these possibilities with Mike Hearn, one of the Bitcoin core developers and creator of the Bitcoinj library.
There’s more, but this is just some of examples. Watch this video where Mike discusses some of this:
One of these possibilities towards creating this autonomous economy of programs, is the “low hanging fruit” of providing autonomous, low-trust storage.
What would a service look like that can provide storage to programs without the need of a human (with a credit card)? Can a program easily access cloud storage with just a Bitcoin wallet at their disposal? Theoretically, yes, because with Bitcoin, they don’t need a human actor.
So, for the past 2 weeks, I’ve been looking at all the ways in which this is possible (discussing some of it with Mike). Bitcoin’s very clever scripting language (in outputs), allows very, very interesting use cases.
One of these methods are micropayment channels, that has been developed by Mike and recently put into the Bitcoinj library. What a micropayment channel allows, is a connection between a client and a server to transact on a pre-determined manner continuously without flooding the Bitcoin blockchain with small and large amounts of transactions. It does this by first locking up Bitcoin in multi-signature contract, and the creating a refund transaction back to client. The client then changes this refund transaction (more to server, and less to client) as time goes on, and the server verifies it. Once done, the server or client broadcasts this transaction to the Bitcoin network. It is a bit more technical, but that is the basic gist. Here is an example of what it allows:
You connect to a wifi router, and pay exactly for how long you are online. It is low-trust, because the transaction process immediately starts once you connect (and confirm), and you pay for each second, minute or hour you are using the wifi. No need to fund an account with a credit card, or sign up to a monthly service. All you need is a Bitcoin wallet, and you have immediate access to a wifi hotspot providing this service.
So, using micropayment channels, a form of low-trust connection can be created between a client (the program) and the server to store files.
Here’s how it would work (thanks to Mike for the help fleshing this out):
1) Open up micropayment channel between client and server.
2) Client pre-calculates a host of hash challenges of a file which it wants to upload. Hash challenges are used to make sure the server keeps the file, and does not immediately delete the file once it is uploaded.
3) Upload the file.
4) If server says, it is done, do a hash challenge to see if the file is there.
5) Client starts incrementing on the micropayment channel for the pre-determined amount of time it wants to keep the file on the server.
6) Server checks each increment to see if the client is behaving (paying for the correct amount of time the file is being hosted).
7) Clients does occasional hash challenges to see if the server is behaving (keeping the file).
8) If either misbehaves, they stop the connection, and broadcast the refund transaction as is at that point. If client misbehaved, the server revokes access to the file. If the server misbehaved, the client simply moves away (possibly to another file host that complies).
This allows programs to store files on a low-trust manner.
There are a lot of pieces towards creating an autonomous economy for programs, and I feel this is one such service that will have to exist: the AWS S3 for programs.
I’ve started working with the Bitcoinj library. Not very far, as I haven’t worked with Java in 4 years. I want to build such a service. But. This type of service is admittedly ‘far’ into the future. Autonomous programs have only recently started to become a possibility and all the puzzle pieces have to be built. The problem however, that I’m struggling with, is that such a service has to be both easier than requiring a human with a credit card, and relatively easy to implement for a programmer that wants to automate their program.
I’m very wary of creating something technical, that is cool to tech people, but does not really solve a problem. Creating a low-trust micropayment channel to host files autonomously is very cool, but if programmers rather just want to stick to hosting files on S3, then what is the point? Until programs can exist completely autonomously (a lot of puzzle pieces), using S3 will always be an easy option.
So. What I’m envisioning, on a code level is that just using something like (pseudocode), “file.upload(‘epic.txt’);”, it automatically connects to the Bitcoin wallet on that client, uploads to my service, initiates a channel and hosts the file for a day. THAT is much easier than having to require an S3 account, and requiring keys. So in that sense, it is hopefully easier for a human, and enables programs more mobility.
In this way, you solve the immediate need of making an easier alternative to S3, but also providing the scope for a future where programs will be fully autonomous.
So. Here I am. Trying to figure out this puzzle. I haven’t done something this technical since freshman year when I coded up a compiler. It is exciting, challenging and very, very interesting.
For November, I’m mainly planning on exploring this further, trying to reconcile the needs of such a service with programs and human users, and delving deeper into Bitcoinj, trying to create the technical side of it as well.
Once I’m further along with this, protruding this concept into existence, I can gather some more conviction on it. If it seems feasible, I want to continue with this, because it is just so fun and cool. Hopefully find some seed funding.
The other path is to anyway continue with this sort of experimentation… while I work for an awesome company doing epic shit with Bitcoin.
There’s always the distant other path of just making music, and disappearing into sunsets. ;)