Go Beyond

Written by Teran McKinney
/ About /

Skynet 0.0.1

I haven't named anything Skynet, but I guess the concept is about right.

My startup, SporeStack, sells servers for Bitcoin by the day. Payment is handled in the API call and there is no registration. Servers have fixed lifetimes naturally, although you can top them up under most circumstances.

In an effort to dogfood I've ported all of my services to SporeStack. I rarely use topup, so a server or a pair of servers usually just replaces the old ones. This is better than trying to patch or upgrade existing servers. I have audit scripts to make sure the server is working properly before I switch over to it.

All in all, it's worked pretty well. Although it is painful when your servers last a week and you have to relaunch them by hand.

For development purposes I have a "paycode" option which let's me avoid the Bitcoin payment step and just launches servers. But I intended that to just be for development and eventually move away from it. The nice thing with --paycode is that I don't have to manually invoke a wallet. Whether scanning a QR code with my phone or paying with some app.

I wanted to get to the point where near expiry, the servers would just launch another pair... on their own. I could have cheated and done that with paycode (not a feature for customers), but wanted to do it properly.

My first problem was that of a Bitcoin wallet. I looked into SPV options and didn't get anything working all that easily. I decided to write something up in Python with existing libraries. The intention to hold funds in a simple, single address known by a deterministic key.

And WalkingLiberty was born. It's pretty straight forward, just sends coins out using blockchain.info's pushtx feature. It's not going to be the most reliable but that can be revisited. I still think a good SPV client would be ideal and cooler. To be clear, walkingliberty is not remotely novel. There's lots like it out there. I just wanted something that behaved in a stateless way and didn't need to be "primed" by creating wallets before hand or what not.

The next step was to integrate it in with SporeStack's client. I thought of a few approaches, possibly integrating the wallet in the client, but figured a more UNIXy approach of having it external was better. Thus, 0.6.3 has --wallet_command.

In practice, this looks like: sporestack spawn --wallet_command="walkingliberty send payphrase". It adds the address and then the number of Satoshis after that.

You pick your "payphrase" and then pay coins to the address that corresponds to it. Send will then send coins from that address. Payphrase needs to be kept private, else someone can steal your coins.

I've set this all up to launch and relaunch go-beyond.org (this site): https://github.com/teran-mckinney/staticator

As long as 1DwNTGYXdRgjpKoPBVaah9KHmpzutpmm9J is funded, it will keep renewing itself.

I'm thinking about writing a boilerplate application that runs a Bitcoin service where users pay the address that it renews itself with. Autonomous servers, literally.

Not much of a Skynet but the first step is to let machines buy themselves. And that's what's now happening with SporeStack.




Share on Voat.