on master help sign in
Merge branch 'master' into patch-2
commite33608416cd60976ca1de377df4cbef3c9a62c7f authorDavid Kerschner <david@tlon.io> dateMon 4 Jan 2021, 16:58 (6 years ago) parent6e4acadcf00586
24 files changed+1424−218
content/blog/20201020-interplanetary-commerce.md−38 content/blog/20201119-models-of-society.md+77 content/blog/aesthetic-culture-1.md+106 content/blog/an-email.md+88 content/blog/events-series.md+7 content/blog/io-in-hoon.md+322 content/blog/metaphase.md+74 content/blog/providers.md+6−6 content/blog/security-and-continuity.md+62 content/blog/security-audit.md+157 content/blog/value-of-address-space-pt3.md+2−2 content/breach.md+105 content/docs+1−1 content/using/develop.md+35−14 content/using/install.md+34−63 content/using/integrating-api.md+224 content/using/operations/hosting.md+12−10 content/using/operations/stars-and-galaxies.md+9−6 content/using/operations/using-bridge.md+46−1 content/using/operations/using-your-ship.md+42−67 content/voting-instructions.md+8−8 static/_redirects+2 templates/index.html+4−1 templates/understanding-urbit/list.html+1−1
content/blog/20201020-interplanetary-commerce.mddeleted−38
@@ -1,38 +0,0 @@
1−+++
2−title = "Interplanetary Commerce"
3−slug = "interplanetary-commerce"
4−date = 2020-10-20
5−description = "The way we see it, hosting is the most important thing, next to Landscape, that Tlon can do to help Urbit continue toward widespread adoption."
6−[extra]
7−author = "Christian Langalis"
8−ship = "~pindut-timmut"
9−image ="https://storage.googleapis.com/media.urbit.org/site/posts/essays/200930-hosting-by-tlon.jpg"
10−+++
11−
12−<br>
13−
14−![Ocean](https://storage.googleapis.com/media.urbit.org/site/posts/essays/200930-hosting-by-tlon.jpg)
15−
16−<br>
17−
18−One year ago, we started [integrating](https://urbit.org/blog/urbit-and-bitcoin/) Bitcoin into Urbit to be an OS-level primitive for money. Our initial goal: building a wallet equally sovereign and ergonomic. The first public version, releasing in Q1 2021, will have a broad set of capabilities including ship-to-ship payments, hardware wallet support, and full node integration.
19−
20−However, a wallet is only half the equation for a holistic P2P commercial experience. Offering goods and services is that other half. While we don’t part with our Bitcoin [easily](https://nakamotoinstitute.org/mempool/everyones-a-scammer/), two potential markets appear logical and attractive: content and Urbit-native services.
21−
22−First, a digital cottage industry (streaming, podcasting, newsletters, and other culture media) is currently blossoming. We think it can be even more vibrant if unshackled from centralized distribution platforms. Specifically, we’re building a peer-to-peer content graph which permits monetization. With a click, you should be able to syndicate your ‘thing’ to Urbit and get paid.
23−
24−Second, we enthusiastically note the proliferation of Urbit [providers](https://urbit.org/blog/providers/). Providers are businesses that offer a variety of Urbit-native services such as hosting, onboarding, Urbit IDs, and software distribution. A milestone in Urbit’s maturity will be when users can manage their provider relationships through Urbit itself. To get there, we envision a suite of basic commercial tools to assist providers in serving and scaling our network.
25−
26−Beyond these first use-cases, there is a blue ocean of opportunity. Extensibility means that every popular web 2.0 service can find its P2P analog on Urbit. We invite entrepreneurs of all stripes to join in the feeding frenzy.
27−
28−Throughout this project, Urbit Grants is your steadfast sponsor and resource. If you’re aching to work on any aspect of this, [send us a proposal](https://grants.urbit.org/create) and we’ll work with you to make it happen. We have recently posted [several](https://grants.urbit.org/bounties/2056919898-bitcoin-full-node-provider-and-wallet) [bounties](https://grants.urbit.org/bounties/794126751-bitcoin-key-derivation) to this effect; look out for more in the coming weeks.
29−
30−These ideas are constantly nucleating in Urbitcoiners:
31−
32−`~pindet-timmut/urbitcoiners`
33−
34−and the Urbit Community:
35−
36−`~darrux-landes/business-building-on-urbit`
37−
38−We welcome your participation.
content/blog/20201119-models-of-society.mdnew file+77
@@ -0,0 +1,77 @@
1++++
2+title = "Models of Society"
3+description = "Conversations compose society. What composes conversation — how do we digitize it in a way that enhances society without imposing upon it? How do we form this new medium, both to facilitate natural human behavior and to inspire the best of it?"
4+date = 2020-11-19
5+[extra]
6+author = "Tyler Shuster"
7+ship = "~radbur-sivmus"
8+image = "https://media.urbit.org/site/posts/essays/cochno-stone.png"
9++++
10+
11+*I had used Facebook and Google for my entire adult life. I knew they were toxic but I didn't know why. For a few weeks I tried to create a website that would scrape data from Facebook’s API and push data back, puppetting it from my own server. But as I stared headlong into the ever-shifting darkness of the modern web, I despaired and abandoned my attempt. Less than a year later I heard about Urbit. Technically, it went way over my head&mdash;but socially I knew exactly what it was, what it always had to be, why it was a discovery and not an invention, a place and not a product. I've watched the settlers there for four years, only just now using the opportunity of the pandemic to swim to this new landscape and gaze upon this young nation, this digital city, this urbis ec bit. I do not work for Tlon. I just live here.*
12+
13+<hr>
14+
15+All people like to talk. Society is built by talking. In this&mdash;the year of our Lord two thousand and twenty&mdash;for many (maybe most) talking means typing on computers: handheld, laptop, or desktop. Computers can do all sorts of interesting things, like aid in designing buildings or simulate protein folding&mdash;fundamentally, a computer is a machine for doing math really fast. But computers can be networked, which turns them into tools for communication. Because society runs on talking and because computers enable us to do that, the most common thing that computers end up doing is to transmit human thoughts in text. Normal people call this writing, which is a kind of talking. Let’s call it messaging. When we think about building a good computer&mdash;and computer network&mdash;one that serves society in the best ways needs to do messaging well. Only a small percentage of people will regularly do anything else. (Urbit does serve those needs but I will leave that explanation to more capable minds.)
16+
17+## Modes of Messaging
18+
19+<br>
20+
21+![Ludovic Maclellan Mann examining the Cochno Stone](https://media.urbit.org/site/posts/essays/cochno-stone.png)
22+
23+<br>
24+
25+In general, technology serves humanity as a kind of appendage&mdash;instead of thinking new thoughts or acting on its own, it does what we command. Technology never creates new social structures&mdash;it merely makes existing ones easier, or it facilitates the creation of new ones. We use our tools to expand our capacities, and once we are capable of doing more, we can imagine new things to do. Inventing the wheel did not invent motorized transportation&mdash;but it did facilitate it and it was a necessary step, even an inspirational one. Similarly, the invention of writing made new forms of human interaction and new tools for organization possible.
26+
27+Consider the following conversational conventions, or modes of messaging: a letter; a dialogue; a book; a meeting; minutes of that meeting. These are each pieces of technology: finely constrained solutions to human problems. Now, we have digital forms of each of these which diverge variously from the original. A letter becomes an email. A dialogue becomes a chat room, or a series of blog posts, or a twitter spat. A book becomes a website or an ebook. Meetings in 2020 have virtually been replaced by their virtual counterparts. Minutes become recordings or transcripts.
28+
29+Although we do not have a clear picture of how humanity developed the technology of writing out of the basic capacity for speech, we can imagine that the computerization of writing has many parallels. It does not make the old tools obsolete, nor does it immediately introduce new social structures. It does create the potential, however. On the timeline of human existence, we have only had digitized text for a relatively short time. Because we want to understand how to best use these new forms, we should look at their underlying structure.
30+
31+In order to digitize messages well, computers need to reconcile two facts about all modes of messaging. They have:
32+
33+1. One basic shape, and
34+2. An infinite variety of forms.
35+
36+1 &mdash; The basic shape: all these modes have one common substance: human language. Any conversation is made of words. At first we only had spoken language. Then we discovered writing. Writing allows us to encode our words as glyphs to transmit them over time or distance. The internet extends this capacity. We called this "hypertext"&mdash;like good old fashioned text, but one level up. A staggering amount of messaging now takes place over this hypertext transfer protocol (http). In the process of digitizing language, we have learned the basic shape of a message. We can see this in how every social network shares messages in basically the same shape: an author, some content, references, an audience. We can confirm this basic shape by comparing it against our experience of the real world, and the previous comparison between speech and writing. Speech and writing both use the same substance, and take the same basic shape. They all have an author, content, references, and an audience.
37+
38+2 &mdash; Our experience of this one basic shape takes an infinite number of forms. The examples above (letter, meeting, &c) are just a few. These forms depend on the content of the message, the people involved, and the place they occur. All three aspects contribute significantly to its form, but the one that computerized messaging has not adequately compensated for is the place. Content depends only on the author and their intent. Getting certain people to view that content might be more difficult but most know how to use a computer. The place however, has not yet been adequately compensated for, and I think that has contributed seriously to our lack of civil and serious discourse over the internet. A president would not give an address in a bar, and a prospective lover would not utter his advances on stage. In writing, we can use the different physical forms to distinguish place. You shouldn’t read a book by the pool. You might not read a letter in public. You wouldn’t put a billboard in your bedroom.
39+
40+Furthermore, it seems possible that in our eagerness to "connect the world," we focused injudiciously on creating communities around "interests." Evidence suggests that unless the interest has a highly refined focus, these communities devolve into pandering, self-reference, and exploitation. In this way, the internet is something like a convention of conventions, where you wander in a sea of foreigners loosely affiliated by interest and surrounded by advertising booths. In physical space, people do gather by interest but they also gather by physical proximity&mdash;they are grounded and bound in place.
41+
42+Having an indistinct sense of place makes the form of conversation ambiguous and the participants of the conversation disconnected. Consequently, people are unsure how to interact. One need only know the term "comments section" to understand that.
43+
44+## People in Places
45+
46+<br>
47+
48+![Halle Saale Marktplatz](https://media.urbit.org/site/posts/essays/halle-saale-marktplatz.jpg)
49+
50+<br>
51+
52+As the internet grew to accommodate new conversation forms using the basic substrate of hypertext, web developers began to conceive of "digital spaces" through analogy&mdash;chat "rooms" and "forums,” or the "silo" and the "walled garden." Today, most of our conversation takes place in these walled gardens&mdash;privately-owned places which may be beautiful on the inside, but inaccessible from elsewhere. While some of these walled gardens are very large, our conversation is essentially confined to them. There is no roaming from one space to another while keeping one’s identity. We create new identities for new spaces both because we must and because we are afraid of repercussions on one platform for what we say on another. This is because we do not own our identity; we merely have a key&mdash;our password. The owners of the walled garden still own the artifacts of our tenure there, and can revoke our access to them at any time.
53+
54+The concept of identity and the concept of place are fundamentally linked. We imagine the prince who travels overseas where no one knows his name, or we imagine the old prospect of traveling to a new world to make a fortune. While those both exemplify a dramatic change in identity and place, we usually want to keep our identity consistent. We want to be recognized by friends whichever place we go, and we all strive toward having a good reputation, which is a consistent identity across places. This consistent identity also allows control of that reputation per place. A man is not judged in public by the words he says among friends. And there is no way to search what someone has said except by asking him. With our current system of identity providers (an absurd term, but a real one), we surrender our rights to selectively expose our thoughts, regardless of the place they have been uttered. A data breach or a weak password might lay bare our most private thoughts. We run the real risk of being confronted by an old conversation presented out of context or after we have learned better.
55+
56+People need distinct spaces to form conversations in distinct modes, and they need to have a consistent identity that controls how public their words are.
57+
58+In theory, we would have a digital city with unique regions, public fora, and sovereign parcels, into which one person might travel at will. In practice, we see this pattern: an app emerges to facilitate a mode of conversation. It gains popularity. Facebook (or Google, or Microsoft) buys and absorbs it. As monolithic empires, they can use the same format for all their messages. This gives them a great amount of power. They use this power to create things like "Sign in with Facebook" (or Google, or Microsoft) that benefit the user by consolidating their identity, but fail to solve the underlying problem. Their problem is that in order to allow people to communicate using the current technology stack, they need to be in control of everything.
59+
60+## Urbis ec Bit
61+
62+
63+<br>
64+
65+![View of Florence from San Miniato](https://media.urbit.org/site/posts/essays/view-of-florence.jpg)
66+
67+<br>
68+
69+Urbit does solve this underlying problem. At this point the explanation goes so far down the stack that you could spend years tracing it all, but the relevant part is this: Urbit is not an empire; it’s a territory. An empire is an entangling of land and rule: within the bounds of said empire, you agree to be bound by its laws and the penalties for transgression. The laws exist at the whim of a despot or cabal. Your standing as a Roman citizen buys you no favors in Persia. In contrast, a territory imposes only physical laws. For example, in the desert, you will die faster. The only way to change that is to alter the desert. Urbit imposes nothing but the digital equivalent of physical laws. You have an identity which can be said to be truly yours, and you have a piece of software that runs on whatever computer you choose and can do anything you want with the messages sent to your identity. There are no social protocols enforced, because no one can control what software you run on your computer. As long as you agree to communicate using the same basic substrate, you can communicate with anyone using Urbit. This is the digital equivalent of speaking the same language. Whether or not others will accept you into their coalitions is not the technology's concern.
70+
71+In the same way that the land provides clay and timber, Urbit also provides the tools and material for building places both public and private. These include the aforementioned consistent message substrate (content), as well as tools for organizing people/audiences, structure for referencing other content, and an identity system that is owned only by you while being verified by all. The places are being built&mdash;private rooms with just a few people, meeting halls, club houses, huge public spaces, and countless personal encounters, the contents of which are known to none but the participants.
72+
73+The default tools work with messages in a few of the ways with which we've grown familiar: chat, direct messaging, publishing, link-sharing. They map onto existing forms of messaging because as I said earlier, the technology does not create new social structures; it just facilitates them. We have only seen the beginning of what the internet is capable of doing. Within a few decades it replaced the majority of letters, phone calls, and text dissemination&mdash;that was just the first phase of getting up to parity with what written text and speech could already do. In order to get to the next phase of creating new social processes, we need our technology to be organic and democratic, in the sense that everyone can participate and shape it. It needs to have a consensual foundation&mdash;a common substrate&mdash;and infinite possibility for expression. Urbit provides both of those.
74+
75+Similar to working undeveloped land, it takes a lot of hard work, which is why Urbit is not ready for mainstream adoption yet, and why I alluded to the idea of settlers in my opening paragraph. Traveling to the new world is not for everyone, but everyone is welcome.
76+
77+*How could one do other than submit to Tlön, to the minute and vast evidence of an orderly plant? It is useless to answer that reality is also orderly. Perhaps it is, but in accordance with divine laws&mdash;I translate: inhuman laws&mdash;which we never quite grasp. Tlön is surely a labyrinth, but it is a labyrinth devised by men, a labyrinth destined to be deciphered by men.*
content/blog/aesthetic-culture-1.mdnew file+106
@@ -0,0 +1,106 @@
1++++
2+title = "Aesthetic Culture #1"
3+description = "One of the most exciting things about Urbit is the aesthetic and design around it, developed partly by Tlon (through the design of Urbit itself) and partly by the community (by producing great Urbit art)."
4+date = 2020-11-12
5+[extra]
6+description = "One of the most exciting things about Urbit is the aesthetic and design around it, developed partly by Tlon (through the design of Urbit itself) and partly by the community (by producing great Urbit art)."
7+author = "Nikolai Mallett"
8+ship = "~nartes-fasrum"
9+image = "https://media.urbit.org/site/posts/essays/help-the-environment.jpg"
10++++
11+
12+<br>
13+
14+![A set of four sigils arranged & coloured to appear as various natural forms, above the ~sorwet sigil & the text "help the environment and help yourself"](https://media.urbit.org/site/posts/essays/help-the-environment.jpg)
15+
16+<br>
17+
18+*This post is the first in a series of digests centered on art produced within and about Urbit by a member of the community, ~nartes-fasrum. Monthly digests will be available within the Urbit Community group in Landscape, and will occasionally be compiled here on the blog to give you a sneak peek at some of what’s happening on the network. Enjoy! ~wolref-podlex*
19+
20+One of the most exciting things about Urbit is the aesthetic and design around it, developed partly by Tlon (through the design of Urbit itself) and partly by the community (by producing great Urbit art). As the community grows, it creates more art, and we have the opportunity to showcase some of the pieces we love. These works can draw curious new users in, and they give existing users ways to communicate their excitement to friends.
21+
22+To that end, I wrote [the Art by Urbit proposal](https://grants.urbit.org/proposals/636838408-art-by-urbit), a regular digest for the dissemination of Urbit art and propaganda. We'll bring you the works of both familiar faces and new users, in a variety of media types from image manipulation to 3D models and physical pieces. This first digest will cover some of the art produced in the past year, but will have a focus on the last two months. Future digests will be incremental updates summarizing the artworks of the prior month.
23+
24+## ~datnut-pollen
25+
26+~datnut- made a physical representation of their sigil from maple wood & epoxy resin, and mentioned the potential to use an Arduino to cause different lighting effects for different statuses of an urbit.
27+
28+![The sigil of ~datnut-pollen glowing yellow on a black background](https://i.imgur.com/GxmO6sT.jpg)
29+
30+## ~lagrev-nocfep
31+
32+~lagrev- [made a thread of Dinosaur Comics](https://twitter.com/sigilante/status/1299101593997127680), using the Urbit Whitepaper as the seed text.
33+
34+![A Dinosaur Comics comic, with text pulled from the Urbit Whitepaper](https://pbs.twimg.com/media/EgdUaoKWoAAl6A3.jpg)
35+
36+A sweet poem about the potential for Martian felines is theirs as well:
37+
38+![A brief poem regarding cats on Mars](https://pbs.twimg.com/media/Ef_KTbqWAAAHN-k.jpg)
39+
40+## ~litmus-ritten
41+
42+~litmus- produces art full of glowing gases and colourful curves:
43+
44+![A hand holding a glowing orb, underneath the text: "Urbit - Lunar Operations"](https://i.imgur.com/fRbFIpj.png)
45+
46+~litmus- also drew Urbitan for the release of OS1:
47+
48+![An cartoon-type female character holding an orb, standing in front of a fan of Urbit sigils](https://i.imgur.com/vGqVmNM.png)
49+
50+More of their work is available in the notebooks of the Internet Weirdness Research Unit.
51+
52+## ~minder-folden
53+
54+~minder- stylistically ranges from retrofuturistic memes to flat-out classic 50s retro:
55+
56+![An image of a meteor shaped like ~minder-folden's sigil in front of Mr. Clean, with the text "Soon it will all be clean"](https://pbs.twimg.com/media/Eggk0CGU8AAJC-W.jpg)
57+
58+![A Popular Science cover advertising "Video-Disc Players", with ~minder-folden's sigil present on a television](https://minderimages.nyc3.digitaloceanspaces.com/1ib61l8ugy451.jpg)
59+
60+More of ~minder-’s work is available in his The New Era notebook.
61+
62+## ~naltyc-wornes
63+
64+~naltyc-, & by extension ~dasfeb industries, produces content related to the exploration of Urbit on small & unique computers:
65+
66+![An image of five astronauts wearing Urbit badges strapped into a spaceship cockpit, with the ~dasfeb logo & a Raspberry Pi on the wall behind them](https://pbs.twimg.com/media/EkiyfGbVgAAp8wm.jpg)
67+
68+![An image of a large, early computer control panel with the ~dasfeb sigil on the upper wall and a number of planet sigils on display readouts](https://pbs.twimg.com/media/Ejap_knXgAARo38.png)
69+
70+More of their work is available in the smol computers group.
71+
72+## ~nartes-fasrum
73+
74+I use GIMP to edit images I pull off various social media platforms, and usually post the results on Twitter at [@nartesfasrum](https://twitter.com/nartesfasrum).
75+
76+![A set of four sigils arranged & coloured to appear as various natural forms, above the ~sorwet sigil & the text "help the environment and help yourself"](https://pbs.twimg.com/media/EjuuJjTXsAIcfU9.jpg)
77+
78+## ~norsyr-torryn
79+
80+No discussion of Urbit art would be complete without mentioning [~norsyr-'s Canvas app](https://github.com/yosoyubik/canvas), which won first place in the [Hackathon 2020](https://urbit.org/blog/hackathon-results/) event.
81+
82+![A demo image of the Canvas app, with various drawn characters](https://i.imgur.com/zpm3dYX.png)
83+
84+## ~radbur-sivmus
85+
86+~radbur- writes poetry on a range of subjects, one of which could be Urbit. Interpretation of ["A Weaver's Regard"](https://t.fust.us/writing/poetry/weavers-regard) and ["Internet Absurdities"](https://t.fust.us/writing/poetry/internet-absurdities) is left as an exercise to the reader.
87+
88+## ~sitful-hatred
89+
90+~sitful- has a Martian Meme Depository chat in the Networked Subject group, which catalogs a number of the Urbit memes that have been created so far.
91+
92+![An image of a Connect-Four type game box, edited to read “Connect ~zod: The Classic Network Connectivity Game](https://i.postimg.cc/d1yH7PHL/connect.png)
93+
94+## ~tocrex-holpen
95+
96+~tocrex- has been drawing the galaxies of Urbit, and uploading results to Twitter at [@tocrexholpen](https://twitter.com/tocrexholpen). Each galaxy has a unique design and outfit, with the galactic sigil proudly displayed as its face.
97+
98+![An image of the ~feb galaxy wearing elaborately embossed armor.](https://pbs.twimg.com/media/ENeLOb4WkAApDu2.jpg)
99+
100+## Landscape
101+
102+Something that's become quickly evident with the addition of background images to Landscape is that people love to customize their ship's appearance and make it feel more like home. To close things out, we're providing a pair of backgrounds — one darker, one lighter — for use on your ship (or your desktop, should you so desire).
103+
104+![A moody Martian city](https://i.imgur.com/7Ot9Hcu.jpg)
105+
106+![A bright outing in a young ship](https://i.imgur.com/wFKt2EW.jpg)
content/blog/an-email.mdnew file+88
@@ -0,0 +1,88 @@
1++++
2+title = "An Email from the Archive"
3+description = "I found this email in my archives recently and thought it might be fun to share publicly."
4+date = 2020-11-30
5+[extra]
6+author = "Galen Wolfe-Pauly"
7+ship = "~ravmel-ropdyl"
8+image = "https://media.urbit.org/site/posts/essays/moon.jpg"
9++++
10+
11+![An email from the archive](https://media.urbit.org/site/posts/essays/moon.jpg)
12+
13+I found this email in my archives recently and thought it might be fun to share publicly.
14+
15+```
16+From: Galen Wolfe-Pauly <galen@tlon.io>
17+Date: Thu, Jul 2, 2020 at 9:50 AM
18+Subject: Continuing
19+To: XXXXXXXXXXXXX
20+```
21+
22+Here are a few things I was thinking about after we chatted. It may be that I'm just reiterating things I already said — but perhaps it's useful:
23+
24+1 -
25+
26+Our collective desire to depend on digital communication tools vastly exceeds what I would have ever guessed. Even if you somehow factor out what’s addictive about the platforms we use today: they serve a real need. The crux of the problem with our current platforms is that they don’t actually serve the need that we want them to serve. They’re not tools in the way we expect tools to be. For the most part, the platforms we depend on serve the needs of their shareholders or some graph or another that needs to go ‘up’, which makes them compromised in a very deep way.
27+
28+In the pre-digital world we enjoyed a few things about the way we communicated, collaborated and did business that are dwindling: simplicity, durability and ownership. I’ll try to give some straightforward examples of what I mean:
29+
30+A - When I talk to someone directly, I’m not worried that someone else is listening in. If they go tell someone else what I said to them, that’s something for us to work out between us — they’re not *always* reporting our conversations back to a third party. The constraints of the interaction and the privacy implications are *simple* — I don’t think about them at all. Good privacy guarantees flow from a strict focus on simplicity. When two people want to talk to each other: give them a secure channel to talk. Putting a centrally-controlled service between them is just an interim solution because no one could figure out a better way to do it.
31+
32+B - When I write something down on paper, or type into a typewriter, I have an intuitive sense of the durability of what I’ve made. I have notes on my shelf I took ten years ago. I don’t worry about them disappearing. This means I can have a very direct, high-resolution relationship with the medium. I can pour myself into my physically-written notes in a way I would never pour myself into a Google Doc. Our digital tools are deeply untrustworthy because we know they can disappear, that they won’t actually last forever.
33+
34+C - Around 2008 I started limiting myself to a few specific drawing and writing tools. I use them all the time and can actually refine my relationship to them since I know they’re not going to change out from under me. Perhaps at some point these pens wont be made anymore, but the ones I have are actually *mine*. Similarly, the things I make with them actually belong to me in a way that doesn’t require some ridiculous terms of service. A sense of ownership, when it comes to the medium of communication, determines our level of trust and commitment.
35+
36+Our digital tools have to achieve the same level of simplicity, durability and ownership that our pre-digital tools did. Until they do, we’re always going to be in conflict with them, full stop.
37+
38+The main thing is that exactly none of our present platform-centric world can survive when you see things this way. The digital world we live in is composed of an insanely complicated, ephemeral set of tools that distinctly *do not* belong to the people that use them.
39+
40+We’re going to be in a constant struggle with technology until it conforms to these three very basic expectations. These are the expectations we try to get Urbit to fall in-line with, of course. Something else could also succeed by satisfying them. But I also don’t really see anything else, aside from Bitcoin and maybe Ethereum, falling in line with these core principles.
41+
42+So: while I wish that Urbit was more mature and ready to capture those that are being purged from mainstream social media, are bored with it or are frustrated with the constraints of ‘productivity software’ — I think this conflict is going to drag on until people realize that what we’re in conflict with is the structure of the software we use. Using software that’s managed by other people is always going to cause serious problems all the way up at the user level. For more speculation on how this might play out, watch Black Mirror.
43+
44+
45+2 -
46+
47+(1) is, in a way, a long-winded way of saying that the state of the world hasn’t changed our direction all that much. In order for Urbit to be approachable to use, it has to be very nicely made and that takes time and iteration. As the system stabilizes, Urbit can evolve in a more traditional way: we, along with others in the ecosystem, release stuff, observe how people use it, and try to make it better. We’re at the point where we’re nearly ready to get into that feedback loop, and we very much need to get there. We’re close.
48+
49+Urbit is a distinctly different *kind* of software than anything we have now. Your Urbit is something you actually own and can do whatever you want with: not unlike your furniture or your kitchen tools. An Urbit is a tool for individual, human-scale computing and our whole approach to designing and making things is completely different. Most computing is about industrial-scale computing: where the software system stores everyone’s data and is managed by the people who build it.
50+
51+Urbit is the opposite of industrial-scale. Urbit is much more like something that’s carefully crafted and delivered to you directly. This craftsman-like approach to building software really isn’t a part of most modern software engineering.
52+
53+When I think about this from the standpoint of the person using what we make, it’s especially important. Urbit should feel like something that’s purposefully made by hand — not something you picked off the shelf at Wal-Mart. Some of this ethos was present in the early PC movement, but it’s mostly lost today. The care and attention that goes into building the system is also exactly what we make money on. People pay us to own a piece of it, to use it. We’re incentivized to make nice things, in the Urbit model, and we take that responsibility seriously.
54+
55+
56+3 -
57+
58+Networks are a really important social form that’s only just beginning to come into existence. A network is neither a state nor a company, but something in-between. Bitcoin is a network, Ethereum is network (but it’s still far too centralized). Urbit is a young network.
59+
60+(In my view, a real network is always decentralized. Centralized networks are basically just companies.)
61+
62+Urbit is controlled by the collective of people who use it — in varying degrees, of course. The main thing is that this collective is bound together only by private keys and a blockchain, not a set of legal documents. The agreements between everyone on the network are in some cases more formalized (in terms of ownership) and looser (in terms of content moderation) than what we’re used to in either a state controlled or company controlled model. This is a very unusual kind of institution.
63+
64+On a successful Urbit network, Facebook, Airtable, and Signal are just successful applications. You could probably build companies around them that ship software to Urbit — but they’re more like 5 - 10 people instead of thousands.
65+
66+Urbit doesn’t aim to eat away at the government per se. Instead, it’s an important communication tool for institutions of any scale to actually take control of their means of collaboration. The efficiency of inter-government communication and government to populace communication can clearly be improved by *a whole lot*.
67+
68+
69+4 -
70+
71+The most important thing is that people can generate a vision of the future. This can only emerge from a small collective of motivated people. Our public life is overwhelmed by people shooting from the hip, aiming for likes.
72+
73+There are difficult, infrastructural problems *all over the place* that desperately need the considerate attention of small groups of people. Urbit, as communication tooling, is aimed at improving the quality of the fabric that binds these groups together. Or, to put it another way, before you can solve any specific problem you have to improve the problem solving process overall. Everything is gated on solving the process.
74+
75+
76+5 -
77+
78+Christopher Alexander is, indeed, probably the biggest influence on my thinking when it comes to paying close attention to making things that both generate a deep sense of connection and are shaped by the people who inhabit them.
79+
80+[http://en.bp.ntu.edu.tw/wp-content/uploads/2011/12/06-Alexander-A-city-is-not-a-tree.pdf](http://en.bp.ntu.edu.tw/wp-content/uploads/2011/12/06-Alexander-A-city-is-not-a-tree.pdf) is one of his early, well known essays that’s easy to find online. I think ‘The Nature of Order’ is the thing that had the biggest impact on me, but it’s harder to find. There’s probably a PDF floating around on the internet somewhere. It's also a beautiful (four volume) book. The first volume kind of nails it. This talk is also great: [https://twitter.com/urbit/status/1148030042846326784](https://twitter.com/urbit/status/1148030042846326784)
81+
82+The thing that comes to mind lately is Hejduk. He had passed away by the time I was at Cooper, but I feel like I was educated in the ghost of his work. This documentary gives a good impression of his thinking: [https://www.amazon.com/John-Hejduk-Builder-Worlds/dp/B07NKQ72C8](https://www.amazon.com/John-Hejduk-Builder-Worlds/dp/B07NKQ72C8)
83+
84+Hejduk was able to see that architecture isn’t about building buildings per se, but something else. That was always quite obvious to me.
85+
86+
87+Talk soon!
88+G
content/blog/events-series.md+7
@@ -6,8 +6,15 @@ date = 2020-10-30
66description = "These events are an opportunity for Urbit contributors to share real-time updates that don’t make it into this blog, and for the community to get to know the contributors (and one another)."
77author = "Lane Rettig"
88ship = "~naplet-hildec"
9+image = "https://media.urbit.org/site/posts/essays/bau.jpg"
910+++
1011
12+<br>
13+
14+![people gathered](https://media.urbit.org/site/posts/essays/bau.jpg)
15+
16+<br>
17+
1118*TL;DR: Urbit is launching a series of community events, the first of which is a developer call taking place on Thursday, November 5 at 9am PT. [Sign up here](https://www.meetup.com/urbit-sf/events/274279522/), and read on for all of the details.*
1219
1320--
content/blog/io-in-hoon.mdnew file+322
@@ -0,0 +1,322 @@
1++++
2+title = "Input and Output in Hoon"
3+description = "Let's talk about IO in Urbit."
4+date = 2020-12-16
5+[extra]
6+author = "Philip Monk"
7+ship = "~wicdev-wisryt"
8+image = "https://media.urbit.org/site/posts/essays/zion-canyon-1.jpg"
9++++
10+
11+<br>
12+
13+![canyon](https://media.urbit.org/site/posts/essays/zion-canyon-1.jpg)
14+
15+<br>
16+
17+
18+Let's talk about IO in Urbit. I won't say much about how events and effects are processed by the runtime; it suffices to note that the runtime is a normal Unix program which (1) listens for various events, (2) passes them to Arvo (Urbit OS), and (3) processes the effects produced by Arvo. Instead, I’ll focus on how IO works from the perspective of Hoon programs, like Arvo or apps running on Arvo. But first, let's review IO paradigms in other languages.
19+
20+All examples are in a made-up language, since it's useful to understand this information even before you're comfortable in Hoon. If you're learning Hoon and want a challenge, try translating them!
21+
22+## The three styles of IO
23+
24+I will call these styles imperative IO, monadic IO, and state machines (note that this classification refers only to the experience of using them and the program structure they dictate). An imperative programming language can use any of these and a functional programming language can use any of them.
25+
26+### Imperative IO
27+
28+Imperative languages (such as C and Python) perform IO by calling a function in the middle of whatever they were doing. Anywhere, in any statement, you could have IO.
29+
30+In this example and others to follow, the task will be to read a filename from the command line, read a URL out of that file, and fetch the contents at that URL.
31+
32+ output = fetchUrl(stripWhitespace(readFile(cliInput())))
33+
34+For readability, intermediate variables would be a good idea, but nothing stops you from nesting IO this way.
35+
36+### Monadic IO
37+
38+Languages that use explicit monads for IO (such as Haskell) perform IO by running IO behind a bind operation, which I'll notate with `<-`. Thus, while you can't put IO *anywhere*, the general structure is a sequence of IO operations.
39+
40+ fileName <- cliInput()
41+ url <- readFile(fileName)
42+ output <- fetchUrl(stripWhitespace(url))
43+
44+[Tackling the Awkward Squad](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/mark.pdf) is the canonical description of monadic IO, and does a great job of explaining how the Haskell community decided to use this as their primary IO style.
45+
46+### State machines
47+
48+Languages that use explicit state machines for IO (such as Elm) perform IO by accepting events and producing a list of effects.
49+
50+ event :: Initialize
51+ | CLIInput text
52+ | FileInput text
53+ | HTTPResponse body
54+ effect :: CLIInput
55+ | ReadFile fileName
56+ | FetchUrl url
57+ | Print text
58+ main(event) {
59+ switch event {
60+ Initialize -> [CLIInput ~]
61+ CLIinput fileName -> [ReadFile fileName]
62+ FileInput url -> [FetchUrl stripWhitespace(url)]
63+ HTTPResponse body -> [Print body]
64+ }
65+ }
66+
67+The effects produced are not functions but data.
68+
69+It's important to note that this example is chosen to highlight a particular kind of IO — sequences of events. Further, this example has no persistent state — each IO operation is a pure function of the output of the previous one.
70+
71+## A stateful, loopy example
72+
73+Let's look at another type of program: a simple HTTP server that you can give text at the CLI, which will respond to all HTTP requests with that text.
74+
75+Imperative:
76+
77+ text = "no text entered yet"
78+ while (true)
79+ cli = readCli()
80+ if (cli != Null)
81+ text = cli
82+ request = readHttp()
83+ if (request != Null)
84+ respond(request,text)
85+
86+Monadic:
87+
88+ loop("no text entered yet")
89+
90+ where:
91+
92+ loop :: text -> IO Null
93+ loop =
94+ input <- readInput()
95+ switch input
96+ CLIInput newText -> loop(newText)
97+ HTTPRequest request ->
98+ _ <- respond(request,text)
99+ loop(text)
100+
101+State machine:
102+
103+ text = "no text entered yet"
104+ main(text,event) {
105+ switch event {
106+ CLIInput newText -> [newText, Null]
107+ HTTPRequest request -> [text, HTTPResponse text]
108+ }
109+ }
110+
111+Again, note the response in the state machine is data, not a function.
112+
113+I'm not trying to make a point about which type is better in general. There's a pretty strong argument that in the first example, imperative was the best option, followed by monadic, followed by state machine. There's an equally strong argument that the second example is most naturally represented by the state machine.
114+
115+Look at how state is handled in the monadic example. Formally, bind composes functions, so that every time you see a `<-` there's actually a new function (closure/delimited continuation) being created and stored for when we receive a response. All variables in scope are stored in that closure, so we can conveniently access them later without explicitly storing them. However, the state we preserve over time varies a lot. In this example, it varies between storing `loop`, `[loop input]`, `[loop input newText]`, and `[loop input request]`.
116+
117+By comparison, the state machine does not store intermediate values, it only stores its explicit state. While this is somewhat less flexible, it puts the permanent state front-and-center.
118+
119+I'll reiterate that all of these are possible to implement in purely functional languages, and further they can all be implemented in terms of each other. State machines are trivially implementable -- it's just a function [state event] -> [new-state (list effect)]. Monadic IO can be implemented directly (as in Haskell) or on top of state machines by storing continuations in your state. Imperative IO is somewhat more difficult but should be possible through algebraic effects.
120+
121+When inventing a new system, you should consider which of these you intend to support based on the sort of code you expect to see. For example, a scripting language will almost always benefit from imperative (or at least monadic) style.
122+
123+## In Urbit
124+
125+So much for exploring the space of IO solutions. In terms of deployed code on Earth, the split is about 90% imperative, 5% monadic, and 5% state machine. In Urbit, the split is about 90% state machine and 10% monadic. This is what I intend to explain and defend.
126+
127+Urbit's OS is called Arvo; it has several "kernel modules" called vanes, and it has userspace applications. Colloquially these are called "apps," but when speaking about them abstractly, it's helpful to use their more specific name: ["agents"](https://urbit.org/docs/tutorials/arvo/gall/#agents). Arvo, the vanes, and agents are all structured as explicit state machines.
128+
129+In addition, there are ["threads"](https://urbit.org/docs/tutorials/arvo/gall/#threads), which are structured as monadic IO. Note there's only a superficial resemblance to Unix threads: they are not executed in parallel and they don't share memory, or at least not any more than agents do. They're simply a computation that takes an argument and produces a result, possibly after doing some IO, structured monadically.
130+
131+As you can see, all the lowest levels of Arvo are explicit state machines, and only the highest layer supports monadic IO. To see why this is the case, let's list advantages and disadvantages to each type. Note that, while I'm speaking specifically of agents and threads in the context of Urbit, these are fundamental properties of monadic and state machine IO.
132+
133+Agents are:
134+
135+- Upgradable. Since the state is explicit, you can upgrade an agent in-place by supplying a new state machine and a function from the old state type to the new state type. This is very similar to a database migration.
136+
137+- Robust. A state machine must accept any input at any time. If it receives unexpected input, it must have had explicit error handling for that input, since it's one of the types in the switch statement. Thus, it's relatively easy to stay in a consistent state.
138+
139+- Permanent. Since it's upgradable and robust, there's no reason to stop its running.
140+
141+- Hard to write long sequences of IO. Long sequences of IO create many possible states, and you must handle any input in any state. This can result in complex, hard-to-follow code with code paths that are rarely if ever taken.
142+
143+Threads are:
144+
145+- Not upgradable in-place. Since the state is implicit, you can only cleanly upgrade by (1) killing the thread and restarting it or (2) letting it resolve to a defined "upgradable state" periodically, usually at the top of a "main loop". If you do (2), then you are in fact structuring it as a state machine, so the other advantages of threads are compromised.
146+
147+- Fragile. If we don't receive expected input, the default behavior is to be stuck waiting for input. You must remember to add any error-handling features you want, and it's easy to end up in an inconsistent state.
148+
149+- Impermanent. Since a thread can't be upgraded and may get stuck in case of unexpected input, a thread can't be expected to last forever. It must be "rebooted" from time to time.
150+
151+- Easy to write long sequences of IO. Just...write the IO one line at a time.
152+
153+Arvo proper and the vanes are permanent pieces of software and, for this reason, state machines are more natural.
154+
155+I'll note that other kernels, like the Unix kernel, use imperative IO. The difference is that Unix isn't permanent in itself — it only lasts until you reboot. Since your permanent state is stored externally, you don't need to be upgradable or permanent. With sufficient discipline you can write robust C code, so it makes sense to use imperative style. Even so, a lot of C code is written in a state machine style; even if it doesn't need to be upgradable, it's worth it for the robustness and concurrency advantages.
156+
157+However, Arvo is a single-level store — all of its state is permanent. This is very convenient and eliminates many long-tail bugs, but it also means we need to code for permanence, and that's much easier when you structure your code with explicit state.
158+
159+Further, Arvo and the vanes rarely perform long sequences of IO. Generally, they do one thing and emit some effects, similar to the HTTP server example above. Sometimes they "pass through" a request. For example, the Eyre vane passes HTTP requests to userspace agents or threads. In this case, there is a sequence of IO, which in monadic code would be:
160+
161+ loop()
162+
163+ where:
164+
165+ loop =
166+ request <- receiveRequest()
167+ agent = lookupAgent(request)
168+ response <- callAgent(agent, request)
169+ _ <- sendResponse(request, response)
170+ loop()
171+
172+This is clear code to read, but it leaves open the question of how to respond during the callAgent() function. If another request comes in, can we handle it in parallel? If we need to upgrade ourselves before the agent responds, can we make sure to properly handle the response?
173+
174+The naive solution in monadic code is to say that you can only handle one request at a time, and if an upgrade happens you just drop outstanding requests. You can resolve both of these by introducing a sort of main loop, which is just a way of saying "turn it into a state machine".
175+
176+In a state machine, the naive solution is:
177+
178+ state :: (map request agent)
179+ main(state, event) {
180+ switch event {
181+ HTTPRequest request ->
182+ agent = lookupAgent(request)
183+ [put(state, request, agent), CallAgent agent request]
184+ AgentResponse request response ->
185+ [del(state, request), HTTPRespond request response]
186+ }
187+ }
188+
189+Upgrading this is trivial, since the state (map of requests to outstanding calls to agents) is explicit. It also trivially handles concurrent requests.
190+
191+I won't claim this is easier or harder to write than the monadic version, but it has the properties we need at this level of the system.
192+
193+Userspace agents similarly are permanent entities that need to not lose data or get stuck. For this reason they’re structured as state machines.
194+
195+A helpful comparison is that explicit state machines are basically Mealy machines, the kind you might have learned about in an introductory digital design class. This shouldn't be surprising; a digital circuit must always be consistent because it can't be manually "rebooted", and their input and output is highly formalized. By contrast, a Rube Goldberg machine doesn't have the same constraints; which is why they're a lot more fun!
196+
197+It's notable also that explicit state machines are considerably more declarative than imperative or monadic IO. Not everyone thinks that's a good thing, but anyone who defends functional programming should see some advantages to that.
198+
199+However, userspace sometimes needs to perform long sequences of IO. Let's look at an example where we want to fetch the front page of a site and the first couple comments on each story. HTTP is unreliable, so on failure we retry five times.
200+
201+Monadic:
202+
203+ topStories <- fetch(topStoriesUrl)
204+ loop(topStories)
205+
206+ where:
207+
208+ loop :: topStories -> IO Null
209+ if topStories is Null
210+ return Null
211+ comments <- retryLoop(5,head(topStories))
212+ otherComments <- loop(tail(topStories))
213+ append(comments,otherComments)
214+
215+ retryLoop :: [n story] -> IO Comments
216+ comments <- fetchComments(story)
217+ if comments is HTTPError:
218+ if n == 0:
219+ bail
220+ else:
221+ retryLoop(n-1, story)
222+
223+State machine:
224+
225+ state :: Initial
226+ | FetchingTop
227+ | FetchingStory comments stories retries
228+ | Done comments
229+
230+ main(state, event) {
231+ switch event {
232+ Initialize ->
233+ assert state == Initial
234+ [FetchingTop, Fetch topStoriesUrl]
235+ HttpResponse response ->
236+ switch state {
237+ FetchingTop ->
238+ [FetchingStory Null stories 5, FetchComments head(stories)]
239+ FetchingStory comments stories retries ->
240+ if response is HTTPError:
241+ if retries == 0:
242+ [Initial, Null]
243+ else:
244+ [FetchingStory comments stories retries-1,
245+ FetchComments head(stories)]
246+ else:
247+ comments = append(response,comments)
248+ if tail(stories) is Null:
249+ [Done comments, Null]
250+ else:
251+ [FetchingStory append(comments,response) tail(stories) 5,
252+ FetchComments head(tail(stories))]
253+ }
254+ }
255+ }
256+
257+With practice, the state machine version of this can be written correctly. However, (1) it's verbose, (2) the control flow jumps all over the place, and (3) in practice it's challenging to get exactly right. This is still a small example, and it gets much worse as the length and complexity of the IO sequence grows.
258+
259+The monadic version, on the other hand, flows cleanly down the page. We can factor out generic functionality like "retry this request n times" to make the essence of the computation clear.
260+
261+Suppose you have to upgrade this. In the state machine, you can see exactly which stage of the computation you're in and write specific code to upgrade cleanly.
262+
263+Threads, as we've discussed, can't be upgraded in-place. Let's be real though: we're downloading comment sections, not regulating a nuclear reactor. If we get a better version of this script, just kill the old one and start the new one from scratch. What's a couple extra HTTP requests?
264+
265+This suggests a general division of workloads: code which needs to be permanent, upgradable, and concurrent should generally be a state machine. Code with long or complex sequences of IO and definite termination should generally be a thread.
266+
267+These aren't completely mutually exclusive, but it's surprising how often they are.
268+
269+### Jael: a case study
270+
271+When you need to do something permanent and upgradable, but you also need to do long sequences of IO, the main trick is to factor your problem into both an agent and a thread (or several).
272+
273+As a case study, consider Jael, one of our vanes. This maintains our PKI state, which it downloads over HTTP from an Ethereum node. Downloading from an Ethereum node is a complex sequence that starts with fetching its most recent block number, then fetching all the blocks we haven't seen and scanning for transactions we care about. We also maintain a map of block hashes to block number, and if we see that a block's parent doesn't have the hash we expect, that means a reorganization has occurred, so we must "rewind" one block at a time until we find where the fork happened, then restart going forward.
274+
275+You don't have to understand this sequence of IO; it's sufficient to see that it's complex and must be exactly right. We used to do this in a state machine directly in Jael. This data is, of course, permanent and needs to be accessible to the rest of the system, so Jael must be a state machine.
276+
277+However, we had many small mistakes in this sequence of IO, some of which only appeared during unusual events, such as when an HTTP request failed at the same time as a reorganization happened.
278+
279+We're in a bit of a bind, though: Jael has to be a state machine. The solution is to factor out the act of getting updates into a thread while the main PKI state is stored in the state machine in Jael.
280+
281+This thread has a definite purpose: given the most recent block number we already know about, fetch all the PKI transactions since then. The function signature is:
282+
283+ syncEthereum oldBlockNumber -> IO [newBlockNumber, newTxs]
284+
285+Jael runs this thread every five minutes and, if it succeeds, then we update our block number and PKI state. If the thread fails, gets stuck, or we need to upgrade it, we just kill the old thread and start a new one. Again, a few extra HTTP requests don’t matter.
286+
287+From Jael's perspective, it looks something like:
288+
289+ state :: State block txs outstandingThread
290+ main(state,event) {
291+ switch event {
292+ Initialize -> [State 0 Null Null, StartTimer (now + five minutes)]
293+ TimerFired ->
294+ effects = If outstandingThread is Null
295+ then Null
296+ else [Kill outstandingThread]
297+ newId = newThreadId()
298+ [State txs newId,
299+ append(effects,
300+ StartThread newId syncEthereum(block),
301+ StartTimer (now + five minutes))]
302+ ThreadFinished Failure -> [State block txs Null, Null]
303+ ThreadFinished Success newBlockNumber newTxs ->
304+ [State newBlockNumber append(txs,newTxs) Null, Null]
305+ }
306+ }
307+
308+In other words, from Jael's perspective, it's just a single IO event that encapsulates arbitrarily complex IO in the thread. A single IO event is easy enough, and we can maintain all our permanency and robustness guarantees, because we know the thread will have one of three results: success, failure, or it hangs. If we set a timeout, hang becomes failure, so there's only two possible results: success or failure. If we handle both of those correctly, we've handled all the possible IO errors that could have occurred.
309+
310+What about upgrading? We've already said we can handle the thread dying for arbitrary reasons, so if an upgrade comes in, we just kill it. We can upgrade Jael's state machine easily since its state is very simple.
311+
312+## Recap
313+
314+Let's recap what we've covered:
315+
316+- There are three styles of IO: imperative, monadic, and explicit state machines.
317+- Urbit supports explicit state machines (agents) and monadic IO (threads).
318+- Explicit state machines are preferred for permanent, robust, concurrent code.
319+- Monadic IO is preferred for short-lived code with complex IO.
320+- If a state machine needs to perform complex IO, it should encapsulate it in a thread so that, from the perspective of the state machine, it's simple IO.
321+
322+Hopefully it's fairly clear why Urbit uses explicit state machines in most situations. More than anything else, our goal is to build software that can last forever. Explicit state machines are a crucial tool for that.
content/blog/metaphase.mdnew file+74
@@ -0,0 +1,74 @@
1++++
2+title = "Metaphase"
3+date = 2020-12-09
4+description = "On the upcoming and foregoing Landscape lifecycles, and other forms of mitosis across the Urbit project."
5+[extra]
6+author = "Matilde Park"
7+ship = "~haddef-sigwen"
8+image = "https://media.urbit.org/site/posts/essays/metaphase.jpg"
9++++
10+
11+<br>
12+
13+![mitosis](https://media.urbit.org/site/posts/essays/metaphase.jpg)
14+
15+<br>
16+
17+A few weeks ago, the Landscape team — those of us building Tlon’s suite of userspace applications on top of Urbit— deployed our first over-the-air update for notifications. This is a big leap forward for us. Of course, getting notifications inside Landscape itself is a big deal, but getting a push notification on your phone, or an email digest based on activity inside Urbit is now just one step away, a weekend project for a hobby developer, not an indeterminate number of steps away.
18+
19+After release, we received some feedback from users on the behaviour and design of this feature; beyond the obvious kinks that come from an initial release, it seemed to some like a minimum viable affordance pitched as a fully designed feature. This “bottom-up” development approach was, to us, fairly straightforward; to some of our users, it seemed that we had closed the door on the feature without even beginning to expose all its possibilities.
20+
21+As I’ll describe, we haven’t just been iterating Landscape, but the way we develop Landscape, and the way we consider Landscape in relation to Arvo. Finally, we’ll discuss our upcoming two-stream release process: a “stable” release stream with updates every six weeks and a development stream, with ongoing changes continuously deployed on an opt-in basis.
22+
23+To someone coming to Landscape for the first time, it is starting to look mature; and it is indeed maturing quickly. After all, these mismatches in expectations are pangs calling out for growth. Landscape truly has *users*, not just explorers, who are developing the same expectations they have with the other tools they use: predictability, reliability, and iterative improvements, not just leaps forward. So to meet those expectations, we’ve been working on the prerequisite work for a mature release schedule, with two different release streams for users and explorers: a lifecycle, with the cells, interlinked, dividing into a coherent higher being.
24+
25+## Landscapers and lifecycles
26+
27+For most of 2020, the core Landscape team has comprised of Liam (`~hastuc-dibtux`), Logan (`~tacryt-socryp`), and myself (`~haddef-sigwen`). Others at Tlon have rotated on and off, and some community members (`~radbur-sivmus` comes to mind) have also contributed a lot, but the three of us handle the core decisions and the entire stack for Landscape, working with designers, infrastructure, and third-party developers.
28+
29+After OS1’s release in April 2020, Landscape’s back-end has changed quite a bit; the first rearchitecture we performed was in group-store, adding roles and simplifying quite a lot of the back-end logic at the same time.
30+
31+Around May of this year, Logan flagged that our code surface was too large and had too much boilerplate by writing a set of bespoke full-stack applications when just one flexible userspace database would do. Our designers also had a vision of our interfaces being “modes and genres of the same data” that fit this vision as well; and so since then, we’ve put our resources into migrating all of Landscape to use graph-store (more information available in [this developer call](https://www.youtube.com/watch?v=E4DFuAZQ32Y)).
32+
33+Obviously, developing userspace for distributed computing has some additional challenges that you don’t have to consider when writing software for a single server. Each ship interacting has to mutually coordinate the agents running and the events to be processed. If those fall out of synchronisation, the edge cases multiply.
34+
35+We traditionally tended toward solving those problems by writing the simplest possible incarnation of an application or a solution first, triaging out additional complications until they can be most prudently addressed — usually when they are just one step away.
36+
37+For most of its history, Landscape’s userspace suite had to be up-to-date on all ships to function at all, so multiple staging streams added quite a few complications. Since incompatible versions of applications on different ships would produce mutual fail states if they attempted to interact –and since each application had no sense of how to negotiate compatibility with older applications, each user had to keep up-to-date. Landscape was moving too fast, constantly reconfiguring (to give you a sense of this: we still refer to a month ago as “old”).
38+
39+Historically, Arvo and Landscape were also considered just one object; changes in Landscape would often require refining the layers underneath it as well. We often aimed to use our interface’s requirements to refine Arvo in turn. But as Landscape’s cells continued to split, as it became a proper client *for* Arvo rather than a subsection *of* Arvo, it required its own planning and execution cycle that only came to fruition around April of this year.
40+
41+The first thing we did was start recurring, six-week product backlogs with designers and engineers to occasionally reassess short-term priorities with a larger roadmap. Once we did that, we began working on opening our process to the public, migrating all tasks, priorities, and current decisions to a [product board](https://github.com/urbit/landscape). By doing this, community members could both suggest features *and* contribute features, with a centralised, transparent process for getting designer input and Tlon engineer priorities. This has also been a successful effort.
42+
43+By adjusting ourselves to a six week rhythm for execution, it’s clearly time to slow down our release schedule and dedicate design and QA time to each release.
44+
45+Since Arvo is still quite young, we can’t quite get to all the thornier aspects of instituting a lifecycle. For example, we can’t tackle agent version negotiation in full yet; and mark versioning is still not present. This means modifying the validators for our graph modules (that is, validating the graph structure of a notebook vs. a collection) presents a deployment challenge in a two-stream lifecycle.
46+
47+That said, our userspace infrastructure is maturing, so we could at least organise the APIs to those agents; and we could at least slow the development cycle on those agents in favour of the more flexible components of the stack. The front-end specific features, for example, can be deployed on different ships without side effects for other users.
48+
49+So now, before we could launch a stable stream, we had some things to do first:
50+
51+- **We wanted to provide assurance that the userspace suite is relatively stable.** All our remaining stores (invite-store, metadata-store, and contact-store) needed to be modernised to use the same libraries and utilities inside Arvo as newer userspace applications.
52+- **We wanted all our applications to be using graph-store.** If we were going to migrate the entire network to a new userspace model, we shouldn’t undermine the new release cycle process and make it more difficult to test and deploy to meet higher user expectations. We needed to migrate everything first.
53+- **We wanted to release the notification-store**. After the October 2020 groups release, Landscape simply wouldn’t be complete without it.
54+- Finally, **we wanted all of Landscape to use the [Indigo component library](https://github.com/urbit/indigo-react).** Landscape shipped with each application using its own build with handwritten, bespoke DOM components. Once we moved to a single-page application architecture in June 2020, we wanted the same guaranteed consistency for both back-end and front-end code.
55+
56+Most of these are now accomplished; the remaining tasks are awaiting some final tests and UX work. We’re aiming for a stable stream of Landscape to deploy by **December 18, 2020**.
57+
58+What does this mean? For everyday users, you can expect Landscape releases every six weeks; the slate of features and any breaking changes will be flagged well in advance for third-party developers; and you can expect a more thoroughly considered user experience with notes and copy for each new release.
59+
60+And for intrepid users, you can opt-in to a development stream and help us find and eliminate bugs before release to the wider public. This development stream is much like how we've been deploying Landscape up until now — but now it's optional.
61+
62+## Mitosis
63+
64+Describing our progress so candidly can feel strange — after all, it sounds so *early*. But to me, it’s exciting. It’s mitosis.
65+
66+Take another example. For all of Urbit’s history — all until now — Tlon was playing the role of both parents to the project when it was really just an embryonic corporate vehicle itself, fated to become twins. But in the past few months the burgeoning Urbit Foundation’s interim Director, Josh Lehman (`~wolref-podlex`), has begun to ramp up responsibility, taking increasing stewardship over urbit.org and giving it a physical voice, an Otherness, apart from Tlon’s own goals.
67+
68+Now, each day, we stray a little closer to these entities splitting apart, a step closer to the Urbit Foundation and the Tlon Corporation being completely different entities with completely different concerns.
69+
70+The same has occurred with Landscape. Previously Landscape was “*the* interface to Urbit,” the proof that there was more to the project than a Unix executable. And slowly to those of us at Tlon, it became obvious what it was destined to become: a flagship client for an entire network, a tree branch rooting a world beneath clearnet, the first cell by which other clients might be born. Mitosis can be clumsy to watch; it can be nauseating to experience; it can be difficult to make out what will arrive where.
71+
72+But this is, after all, how a body forms.
73+
74+*A previous version of this essay specified the stream deploy date as December 11, 2020. We appreciate your patience as we wrap up the final pieces of the logistics...*
content/blog/providers.md+6−6
@@ -20,7 +20,7 @@ Sounds good—but how does this actually come to pass? Urbit has to be technical
2020
2121Urbit has been getting nicer to use and more stable every day. We use it constantly, both as a company (Tlon) and for the broader Urbit community. From what we can tell, people are using Urbit to start communities of their own here and there. The problem is: to use our platform, you’ve got to run it yourself. This limits our audience *a lot*. Setting up a VPS and running an Urbit OS node is pretty easy if you’re comfortable in the command line, which makes it completely impossible for most people.
2222
23−We hear from people regularly who want to be able to sign up for Urbit like it was any cloud service. What they want is what we’ve been calling a *provider*: a service to provide easy onboarding and hosting. Given a good provider, we’d be pretty close to our long-term vision: Urbit would feel like an ubiquitous, easily accessible service.
23+We hear from people regularly who want to be able to sign up for Urbit like it was any cloud service. What they want is what we’ve been calling a *provider*: a service to provide easy onboarding and hosting. Given a good provider, we’d be pretty close to our long-term vision: Urbit would feel like a ubiquitous, easily accessible service.
2424
2525We’ve always assumed that providers would have to come into existence sooner or later. By the look of it, that time is now. Tlon and a few others have provider-like services in the works. We’ll talk about the specifics of what Tlon is planning to do in a future post. In this one, we’ll talk about what a provider is, why anyone would start one, and give a few examples of what they might look like.
2626
@@ -44,13 +44,13 @@ Let’s move on and talk a bit about why starting a provider makes sense to begi
4444
4545## Why would anyone start a provider?
4646
47−Our aim is to make Urbit OS so obviously nice to use that it’s well worth paying for. Today, a planet goes for about $10 - $20 and, once you buy one, you’ve got to figure out how to really put it to use. Which takes some work.
47+Our aim is to make Urbit OS so obviously nice to use that it’s well worth paying for. Today, a planet goes for about $10–$20 and, once you buy one, you’ve got to figure out how to really put it to use. Which takes some work.
4848
4949Any large holder of address space should immediately see the opportunity here: the more useful Urbit is, the more value can be captured by starting a provider. Providers make it possible to actually capture the value in address space, both by selling it and by operating nodes.
5050
5151Let’s say the base cost of running an Urbit OS node, in a hosted environment, is $10 / node / month. If you can sell hosting for $200 / year, you’re making back the ‘cost’ of the planet when someone signs up. Given that it’s more desirable to buy a planet when you know the star is online and you can put it to good use, this seems like a pretty good proposition: both for the provider and the customer.
5252
53−Starting a provider doesn’t *have* to be done by address space holders. You could start a provider with no address space of your own by custodying the address space of others. Then, you could take a cut of the address space sales and all of the hosting revenue. With a market of people looking to use Urbit, the crux of success with this approach is simply whether you can compete on user experience.
53+Starting a provider doesn’t *have* to be done by address-space holders. You could start a provider with no address space of your own by custodying the address space of others. Then, you could take a cut of the address space sales and all of the hosting revenue. With a market of people looking to use Urbit, the crux of success with this approach is simply whether you can compete on user experience.
5454
5555Providers are, in a way, like the miners of Urbit. They’re incentivized to run fleets of very specific VMs for profit. The profit motive, in Urbit’s case, is just a bit more conventional than a bitcoin miner. An Urbit provider is just offering a service in exchange for money.
5656
@@ -59,7 +59,7 @@ Providers are, in a way, like the miners of Urbit. They’re incentivized to run
5959
6060If you think of a provider simply as a business, its most basic incentive is to attract as many customers as possible. You can do that by competing on price or performance, or by competing on aesthetics and community—there are lots of ways that providers can compete.
6161
62−As a roughly similar ecosystem, the world of webhosting is a great comparison. There are lots of small webhosts that all have very specific services: Dreamhost, MediaTemple, prgmr.com, Linode all come to mind. Then there are the more generic, large-scale, performance-oriented options: AWS, GCP, Azure. It’s not quite time for an AWS-scale Urbit provider, but perhaps the AWS of Urbit will start as something much smaller.
62+As a roughly similar ecosystem, the world of webhosting is a great comparison. There are lots of small webhosts that all have very specific services: Dreamhost, MediaTemple, prgmr.com, and Linode all come to mind. Then there are the more generic, large-scale, performance-oriented options: AWS, GCP, Azure. It’s not quite time for an AWS-scale Urbit provider, but perhaps the AWS of Urbit will start as something much smaller.
6363
6464Let’s walk through a few examples to get a feel for what’s possible:
6565
@@ -80,10 +80,10 @@ Let’s say our base cost of $10 / month / planet from above is correct (it’s
8080
8181## What about Tlon?
8282
83−Before there can be an ecosystem of providers, there has to be *one* provider. While we’ve heard of a few other people working on things—we expect Tlon to be the first to try to really get into the provider business in earnest.
83+Before there can be an ecosystem of providers, there has to be *one* provider. While we’ve heard of a few other people working on things, we expect Tlon to be the first to try to really get into the provider business in earnest.
8484
8585I’ll save the details of what we’re going to do for a future post. Launching Tlon as a separate business will be the beginning of the separation of Tlon and Urbit. I’m really quite excited about it. Tlon is only able to consider becoming a business of its own because Urbit is mature enough that we can actually do it.
8686
8787For now, I’ll just say that Tlon will pick the low-hanging fruit first. Our goal is to make onboarding a group into Urbit incredibly simple. We want people to be able to go from email invite to running Urbit in a few minutes without ever knowing anything about Ethereum, Unix, or what a private key is.
8888
89−Once we’ve laid the groundwork with something that *just works*, we plan to open source some of our components. Scaling up Urbit isn’t going to be easy. We hope that others will help us, and will help explore what’s possible in supporting Urbit users in the future.
89+Once we’ve laid the groundwork with something that *just works*, we plan to open-source some of our components. Scaling up Urbit isn’t going to be easy. We hope that others will help us, and will help explore what’s possible in supporting Urbit users in the future.
content/blog/security-and-continuity.mdnew file+62
@@ -0,0 +1,62 @@
1++++
2+title = "Security and Continuity"
3+description = "An update on our primary infrastructure milestones for 2020."
4+date = 2020-12-01
5+[extra]
6+author = "Galen Wolfe-Pauly"
7+ship = "~ravmel-ropdyl"
8+image = "https://media.urbit.org/site/posts/essays/land4.jpg"
9++++
10+
11+![Security and Continuity](https://media.urbit.org/site/posts/essays/land4.jpg)
12+
13+## Security and Continuity
14+
15+In 2018, when we launched the Urbit ID contracts (also called ‘Azimuth’), we committed to yearly infrastructure goals for 2019 and 2020. This wasn’t an informal commitment — it’s part of the contracts that were published to the blockchain, which you can read [here](https://raw.githubusercontent.com/urbit/azimuth/edf68b8da04806dd5b95994daf14cf1e7e226829/proposals/0xcb1f81e42b5e75f000f94fc71a3ea70cab4bfc6f236b91e717f1b9516e5596b5.txt). At the end of each year, we ratify our accomplishment of these goals with a galaxy vote.
16+
17+Since the year is coming close to an end, and this year’s vote is on the horizon, it’s time for an update on our progress.
18+
19+For this year, we committed to completing two things: passing a third-party security audit of our networking protocol (Ames) and getting Urbit OS (both Arvo and the interpreter) to the point where we can reasonably expect the Urbit network to continue without any hard forks (which we call ‘breaches’). A world with no network breaches is one where the network should be able to run indefinitely without any interruption. We also call this ‘continuity’.
20+
21+We’ve been steadily making progress on these two fronts, and I’m happy to report both are nearly complete. We’ll walk through some of the details here and then follow up in another post soon to report on how the final work turned out.
22+
23+
24+## Ames Audit
25+
26+Urbit OS is an ‘overlay OS’: it runs on top of (pretty much) any flavor of Unix. Each Urbit OS node communicates with other nodes over UDP using Ames, the Urbit-specific networking protocol.
27+
28+There are two things worth worrying about when it comes to Urbit OS security: someone breaking into Urbit from the machine it’s running on, and someone compromising the network protocol itself. As to the first, there are probably ways that we can harden the OS sandbox, but if the machine it’s running on is secure we can feel reasonably safe. Since there’s lots of prior art on how to secure a Unix machine, we can leave hardening the runtime for later and simply encourage everyone to secure the boxes they run their Urbit nodes on.
29+
30+Assuming each node on the network can run on a locked-down machine, it’s really important that the protocol for communicating between these nodes is secure. Also, since Ames uses other Urbit nodes for peer discovery, we want to make sure no ‘relay node’ can inspect data not meant for them.
31+
32+The question “Is Ames secure?” is too vague for an auditor, of course. The audit was scoped to determine that the following three criteria are met:
33+
34+- No one can impersonate another ship on the network
35+- No one (including relays) can intercept and decrypt messages not meant for them
36+- Ames messages don’t leak keys that could endanger the sender’s data
37+
38+Our goal with this scope is to focus exclusively on the design and implementation of Ames itself. Basically, the crypto should be correct and there should be no flaws in either the protocol design or its implementation. Our interpreter can still be hardened against other potential attacks, which is work we’ll undertake in the future. We asked our auditors to flag all of these potential issues, so we know what needs to be addressed in the future.
39+
40+The good thing about an audit scoped in this way is that we can trust the protocol to authenticate people and shuttle packets back and forth safely. We’ve always been reasonably confident about Ames, but having an external stamp of approval will be great.
41+
42+As of the end of November 2020, the audit is very nearly complete, and we’ve handled all the important issues that were brought up. We’ll post the results and talk about our mitigation strategies in a future writeup.
43+
44+
45+## Continuity
46+
47+Urbit is designed to last a long time. What’s the use of a personal computer if it’s gonna disappear along with all the data you put in it? Ideally, you can put your Urbit on a USB stick, forget about it for ten years and have it work again when you plug it in. It’ll need to update for a while, but once our work on continuity is complete, your urbit should be able to upgrade itself through ten years of updates, all over the air.
48+
49+While Urbit is designed to upgrade seamlessly over the network we have occasionally run into issues that have caused us to reboot the entire network. Most of the time this is when some incompatibility between the interpreter and the kernel means we have to force everyone to do a hard reset to ensure compatibility between the two. Our current work on continuity addresses this. Soon, your urbit will tell you when your interpreter needs to be upgraded. At first this won’t be that different from an application notifying you to download an update. Eventually, we think we can make this a lot smoother.
50+
51+A network reboot isn’t the only way that we can break continuity. Urbit is a general-purpose computer — which means you’re free to attempt to destroy it. If, for any reason, you do manage to screw the system up we want you to be able to get your data out and effectively reset continuity on a single node. We built the affordance for that a while ago, but before the end of the year we’ll also distribute tooling to migrate userspace data between hard resets.
52+
53+The combination of version negotiation and data migration should afford us the ability to run the network indefinitely into the future. Unfortunately, to get this change in, we’ll need to reset the network. We’re optimistic that this will be the last time we ever do it. And, given our data migration tooling, this breach won’t involve losing data.
54+
55+
56+## Status + conclusion
57+
58+We have been working with auditors since this summer and should have a report ready to publish in the next few weeks. Both version negotiation and data migration are in testing and are ready to be deployed.
59+
60+Our goal is to have all of this work complete by `~2020.12.10`. This means we should be able to start a galaxy vote right around that time. Galaxy votes (as specified in the contracts) run for a month, which should have this whole process ending on `~2021.1.10`.
61+
62+It's going to be an exciting couple of weeks!
content/blog/security-audit.mdnew file+157
@@ -0,0 +1,157 @@
1++++
2+title = "Ames Security Audit and the Future of the Protocol"
3+description = "Ames’ design has unparalleled potential to deter, mitigate, and recover from attacks, since every packet is authenticated and encrypted and backed by a stable, decentralized PKI."
4+date = 2020-12-18
5+[extra]
6+author = "Ted Blackman + Anthony Arroyo"
7+ship = "~rovnys-ricfer + ~poldec-tonteg"
8+image = "https://storage.googleapis.com/media.urbit.org/site/posts/essays/20201218-audit.png"
9++++
10+
11+<br>
12+
13+![audit](https://storage.googleapis.com/media.urbit.org/site/posts/essays/20201218-audit.png)
14+
15+<br>
16+
17+The security firm Leviathan has now finished their initial audit of the security of Urbit's Ames network protocol. In addition to their review of Ames, we also asked them to identify any other issues in order to help guide further development.
18+
19+I'm pleased to report they confirmed the cryptographic soundness of the protocol, namely that "a ship must have possession of their own valid Urbit key in order to authenticate as that ship and to send valid Ames messages. Additionally, no other ship except the two communicating may be able to decrypt or modify messages during transport."
20+
21+This means Ames uses cryptography in a mathematically sound manner that protects your privacy, keeps your secrets secret, and ensures nobody else will be able to impersonate you on the network. Since this was an architectural audit, it’s possible there are still vulnerabilities in the runtime implementation. Until the runtime has been hardened, Tlon continues to recommend against storing valuables in your ship.
22+
23+Aside from a couple of minor issues that have already been resolved, there are three general classes of problem highlighted in their report that future work will need to address:
24+
25++ Forward secrecy
26++ Protection against denial of service attacks
27++ Enforcement of social boundaries
28+
29+Ames’ design allows for versioning of the protocol, which means that the proposed changes below can be deployed as over-the-air updates as they become more pressing concerns. This feature gives us confidence that we can address future security issues as they arise.
30+
31+We will need to improve all of these over the next couple of years, as independent lines of work. As the network grows: better forward secrecy will decrease the damage from a key getting compromised; resistance against denial of service attacks will make the Urbit network resilient to increasingly determined saboteurs; and stricter enforcement of social boundaries will let Urbit’s social networks remain safe and friendly despite potentially increasingly large numbers of bad actors and increasingly complex app ecosystems.
32+
33+## Forward Secrecy
34+
35+A protocol is said to have forward secrecy if compromising a key used in a recent message doesn’t also compromise all previous messages. Similarly, a protocol is said to have backward secrecy -- also called future secrecy -- if compromising a key used in a previous message fails to compromise all future messages. Ames has some degree of both, but more would be better, to decrease the damage an attacker could inflict by compromising a key.
36+
37+As it stands, an Urbit user can change their Ames keys whenever they want, by conducting an Ethereum transaction to update the Ames public key listed in the Azimuth contract, which implements Urbit’s PKI on Ethereum. Compromise of one Ames private key does not compromise earlier or later keys, so this has both forward and backward secrecy. The main drawback is that Ethereum transactions can be expensive, so key rotation is likely to be infrequent, and an attacker might be able to gain access to a long stretch of time by compromising a single key.
38+
39+Various key rotation “ratchet” schemes could be added to Ames to establish varying degrees of forward and backward secrecy, and other kinds of cryptographic protections beyond basic soundness, such as break-in recovery.
40+
41+Right now, changing a key through Azimuth is a manual process. It could be automated, possibly as one of a suite of services that an Urbit Provider will offer. Unfortunately, each key rotation costs the user money, so automating rotation could get prohibitively expensive.
42+Existing protocols, such as the Signal app's encrypted messaging protocol, the Noise protocol framework, and the Wireguard VPN protocol, use ephemeral Diffie-Hellman key exchange and KDF chaining to achieve forward and backward secrecy and self-healing.
43+
44+Ames could be upgraded to use one of these existing ratchet algorithms, or we might create an Urbit-specific variant optimized for the Urbit network. This is work that should be done, but fortunately it will not require any novel research or drastic changes to Ames’s architecture.
45+
46+While Urbit’s cryptographic protections don’t yet match those of Signal or a few other privacy-focused apps, Ames is cryptographically sound, and since Urbit updates itself over-the-air and is backed by a stable, decentralized PKI, I’m confident that the level of sophistication of Urbit’s cryptography has the potential to be world-class with just a bit more work.
47+
48+## Denial of Service
49+
50+A denial of service (DoS) attack against an Urbit ship is an attempt to overwhelm it remotely by sending it network data in such a way as to interfere with the ship’s ability to communicate with other ships or process other events -- usually by hogging its resources (computational power, memory, or bandwidth) until normal operation slows down or ceases entirely. Since the promise of Urbit is that everyone can run their own server, that server needs to be able to defend itself against DoS attacks. This is in fact one of the main impediments to running your own server in the modern world.
51+
52+Right now, Urbit has no protection. Soon, it will need to at least be able to resist a simple attack carried out by an individual. Eventually, it should be able to resist a determined Distributed Denial of Service (“DDoS”) attack, which is more difficult.
53+
54+There are two categories of DoS attacks in Urbit: authenticated and unauthenticated. An authenticated attack requires access to a ship's private key to construct valid Ames packets intended to overwhelm a target. All authenticated attacks will be handled primarily through enforcement of social boundaries, as discussed in the next section.
55+
56+An unauthenticated DoS attack constructs packets that eventually fail to authenticate and decrypt but still overwhelm the target by causing it to waste resources (CPU, memory, disk, bandwidth) in such a way that it can't keep up with legitimate communications.
57+
58+An unauthenticated DoS attack relies on the lack of Sybil resistance of IP networks: it's possible to generate new IP addresses rapidly, and a determined attacker might also be able to spoof its sender IP address. This is best considered an IP-layer attack that must be handled mostly at the IP layer itself, by maintaining state about which IP addresses can be trusted and which can't, determined empirically and heuristically by the Urbit runtime. The best any higher-level protocol, such as Ames or TCP, can do is make it as cheap as possible for a DoS target to reject a bad packet.
59+
60+The overall strategy that Ames can take, as a protocol layering over the IP protocol, is to add an authentication procedure to each packet that can quickly identify bad packets, which an implementation will then use to mark that IP address as suspect and to refrain from adding the sender IP to a list of known-good IPs.
61+
62+Currently, Ames handles this by attempting to decrypt a message and rejecting the message on failure. This may be a more costly solution than other methods, such as attaching a signature or a MAC to each message. The way to mitigate unauthenticated attacks is to make bad packets fail faster by augmenting each packet with a signature or MAC to each packet, since those are faster to validate than encryption.
63+
64+So far, we have identified three approaches that could be taken here. Of these three, Leviathan recommended the end-to-end HMAC solution, since that would not impose additional CPU requirements on packet-relay nodes, such as stars.
65+
66++ Sign each packet, and any relay or final recipient could validate the signature
67++ Wrap each packet in an HMAC, validated by the final receiver
68++ Wrap each packet in a HMAC for each hop in a relay chain; each relay would validate and strip the previous HMAC and add a new one for the next hop
69+
70+Any of these solutions would be attempts to increase the rate at which the network could discard invalid packets, with different tradeoffs. I'll back up a bit to provide some context, and then I'll compare the approaches.
71+
72+In any DoS solution, a planet will want to block or throttle IPs that have been sending it packets that fail to authenticate and decrypt. Ideally, a star will help protect planets for whom it’s relaying, too. Many different arrangements among galaxy, star, and planet are imaginable here, from an open policy to a policy wherein each packet has to come from a known-good IP. This sort of paranoid, closed-off arrangement might still not be enough to withstand a determined DDoS, but it's difficult for me to imagine doing better than that without launching Urbit-specific ISPs. Ames packets are cryptographically authenticated, so an Urbit ISP would actually be feasible.
73+
74+This brings us back to the three possible ways of mitigating DoS from within the Ames protocol. They all involve adding a piece of authenticating information to each packet that can be verified more quickly than waiting for the cyphertext to fail to decrypt — Ames's symmetric encryption is authenticated, so it's not a cryptographic soundness issue, but the performance impact of trying to decrypt could be significant enough to make it hard to prevent a DoS.
75+
76+As-is, an Ames packet is basically `[protocol-version checksum sndr rcvr (nullable origin) cyphertext]` (visit [this PR](https://github.com/urbit/urbit/pull/4051#issue-530369627) for a full specification). Let’s walk through the construction of the packet and how it can be upgraded to offer different DOS mitigations.
77+
78+### DoS Mitigation Approach 1: Signature
79+
80+The first approach to DoS protection would be to add a signature to the packet. The signature would cover everything except the checksum and the origin, since those need to be swapped out by relays. The signature would probably obviate the need for the (20-bit) checksum, although we could also leave it in there if we can't figure out what else to do with those header bits.
81+
82+#### Advantages of a signature over other approaches
83+
84+- It can be validated by anyone on the network. Relays would not need to modify it. This might also give it symmetry with the upcoming remote scry protocol, which might also sign every packet. I'm not quite sure this is an important property, actually, but it might theoretically make launching an Urbit ISP or internet backbone easier one day.
85+- It would be signed directly by the key listed on Ethereum, not something that might get ratcheted at some point for better forward secrecy — this could eventually lower the rate at which intermediate validators need their key caches invalidated, although this is a bit of a theoretical concern.
86+
87+#### Disadvantages of a signature over other approaches
88+
89+- Generating and validating a signature is significantly slower than generating and validating an HMAC.
90+- An ECDSA signature is 64 bytes, which is ~6% of a packet payload. As far as I can tell, it can't be compressed.
91+- Since the signature could be validated by anyone, it doesn't attest to a specific communication channel, so it might not help as much with IP filtering.
92+
93+### DoS Mitigation Approach 2: End-to-End HMAC
94+
95+The second approach would be to use an HMAC instead of a signature, validated by the eventual receiver. This HMAC would also cover everything except the mug and origin. I'm calling this the "end-to-end HMAC" design. An HMAC requires a shared secret, for which we could use the same symmetric key that Ames uses.
96+
97+#### Advantages of end-to-end HMAC
98+
99+- It's simple in some sense; relays don't need to do anything cryptographic.
100+- HMACs are much faster to create and validate than signatures.
101+- HMACs, since they're hashes, can be truncated arbitrarily and still maintain some security — to find hash collisions, you'd still have to guess what packet||shared-secret would hash to; it would just be a smaller search space. Since Ames's encryption already guarantees authentication and we'd just be using this as a performance optimization, I suspect we could get away with using one that's significantly smaller than a signature — I'm not sure how small, but if 4 bytes would be enough in practice, that would take up less than 0.5% of the space in a packet.
102+
103+#### Disadvantages of end-to-end HMAC
104+
105+- Only the recipient can validate. This means the authentication couldn't be used by relays to discard invalid packets. The recipient could provide back-pressure out-of-band to a relay to ask the relay to discard packets from an IP with an invalid HMAC, but this is indirect and might need to filter backward through multiple relays to work properly.
106+
107+### DoS Mitigation Approach 3: Point-to-Point HMAC
108+
109+The third approach, which is what I would build unless convinced otherwise, is what I'm calling "point-to-point HMAC". This design would include a different HMAC for each hop in a relay chain, instead of (or maybe in addition to) including one end-to-end HMAC.
110+
111+We have a couple different options for how to construct the shared secret for each hop. I would intuitively construct it using a Diffie-Hellman of my private signing key and your public signing key — the "networking keys" on Ethereum include a currently unused signing key in addition to the encryption key that Ames uses. This way even if we add more forward secrecy to Ames, changing the symmetric key used for encryption, relays wouldn't have to have their caches invalidated as often; the state required to perform relaying wouldn't be as tied to the state required to receive a message.
112+
113+#### Advantages of point-to-point HMAC
114+
115+- A star could perform some validation on every packet it's asked to relay. This makes it more difficult for an attacker to route a ton of packets to a planet through a star, or even through many relays. Signatures also have this property, but they're slower to verify. This approach and the signature approach, but not the end-to-end HMACs, force an attacker to use an (at least partially) authenticated attack in order to use a relay as a way to get to a planet.
116+- A planet could quickly validate that a relayed packet actually came from its star, not an attacker who's managed to spoof the star's IP address.
117+
118+#### Disadvantages of point-to-point HMAC
119+
120+- Not everyone on the network can validate a packet, unlike a signature.
121+- Each relay needs to validate and strip off the previous HMAC and create a new one before sending it. This should be quite fast, since an HMAC is just a hash, but it's still some CPU, and potentially creates an imbalance where an attacker could induce the relay to spend more CPU in validation than the attacker spent in constructing the packets.
122+- By itself, it doesn't validate the cyphertext in an end-to-end way. I suspect we might want to include both a per-route HMAC and an end-to-end one, especially if we use truncated HMACs — although per-route might be enough on its own, since if the receiver fails to validate a bunch of packets whose HMACs were validated by the relay, the receiver can ask the relay to block that whole Urbit address regardless of IP, so it shouldn't be possible to sustain that kind of attack for long.
123+
124+#### An Aside About Cryptographic Performance
125+
126+I'm not sure exactly how much faster HMAC is. According to DJB (https://ed25519.cr.yp.to/ed25519-20110705.pdf), an ECDSA signature can be created in around 30 microseconds and verified in around 100 microseconds. This source (https://www.jacksondunstan.com/articles/3206) suggests about 21 microseconds for HMAC-SHA256, so about a 1.5x improvement in generation speed and 5x in validation speed. We should verify these numbers for ourselves before making a decision.
127+
128+### DoS Protection Strategy and Timeline
129+
130+Tlon is not currently pursuing adding any of the extra cryptographic authentication on Ames packets described above. Since this is ultimately a performance issue, there are other more pressing performance issues that we could improve upon before decryption will become the limiting factor in how many packets can be processed by a ship. We will revisit this authentication performance question once some of the low-hanging fruit has been done, perhaps roughly a year from now.
131+
132+Since the audit, we’ve already improved the Ames packet format to allow faster parsing, faster validation of basic fields, and faster relaying; in the future, increases in performance of Nock execution and inter-process communication between Urbit's I/O process and Nock worker would allow Urbit to absorb somewhat more punishment before service can be effectively denied.
133+
134+## Enforcement of Social Boundaries
135+
136+While Urbit needs to rely largely on its runtime to mitigate unauthenticated attacks, any attack conducted from an Urbit ship needs to be handled inside Arvo itself, not just by IP filtering in the runtime. Just like in any DoS, an attacker ship might try to induce you to use too much memory, CPU, or disk space in order to sabotage normal operation. An authenticated attack is harder to define than an unauthenticated attack, because it depends on what social relationship the attacker and target have, and it involves valid, authenticated Ames packets; once discovered, though, it’s easier to mitigate, because it can use Urbit’s permanent identity system to enforce social consequences, i.e. stop listening to that Urbit address and possibly encourage others to do so as well.
137+
138+There are a couple of different kinds of authenticated attack: attempts to exploit vulnerabilities in the Nock worker (the interpreter, allocator, and jets) by causing particular Nock code to run, and attempts to induce the target to exhaust various computational resources.
139+
140+Protecting against attempts to break out of the sandbox and hijack or otherwise interfere with the Unix process running Nock will require a process of hardening, fuzzing, and likely further security audits specifically evaluating the security of that boundary. This is largely out of scope of the Ames protocol itself, which was the subject of this audit.
141+
142+This leaves us with the latter case: resource exhaustion attacks. A peer could try to get my ship to use too much RAM, disk, CPU, or bandwidth by sending it valid Ames packets. This represents a social problem: a person on the network is trying to interfere with me. It's what's known in blockchain circles as an "attributable fault": once the attack is detected, it's trivial to determine the identity of the culprit.
143+
144+Once the attacker’s Urbit address is known, Urbit will fall back on the Sybil resistance of its identity system: there are a finite number of identities, each of which costs some money. Because Urbit identities are relatively permanent, they can be blocked permanently. As long as the expected value of an authenticated attack is less than the cost of the identity, the attacks won't happen very much — they'll cost money to sustain, instead of being self-perpetuating.
145+
146+Attacks like this are best thought of as attempts to violate social boundaries. I don't want you using up too many of my resources; that's a social boundary, and an attempt to force my ship to spend its resources on your behalf constitutes a violation of this boundary. The strategy for mitigating these attacks is to impose social and, indirectly, economic consequences on the perpetrators. The main social consequence is other ships refusing to communicate with you anymore.
147+
148+Some of this mitigation will take place in the Arvo kernel, and some will need to be application-specific. To protect the system from attackers, the kernel needs to be able to free space (Urbit is a single-level store, so there's no distinction between disk and RAM from Arvo's perspective) taken up by unfinished messages sent by peers. This can be done by allowing an application to ask Ames to delete partially received messages from a peer, generally replacing the received packets with an intent to nack (negative acknowledgment) to indicate that the transaction the peer wanted me to perform has been rejected.
149+
150+Applications should also be able to set resource usage policies that the Arvo kernel will enforce. For example, a chat application should configure Ames to reject any chat messages larger than, say, two hundred kilobytes. A file-sharing application would need a much larger per-message limit (ideally no per-message limit), but it might need to place a cap on its bandwidth usage to make sure lower-latency communications aren't swamped by a large file transfer. This kernel/application interface starts to resemble a permissioning or capabilities system, and it could be built as part of the crucial larger project of providing for configurable application permissions.
151+
152+To close the loop on enforcing social boundaries, reputation information should be shared across ships. This will likely be done by building one or more applications that share statistics and block operations. Some forms of reputation are likely to be globally shared, whereas others are likely to be multipolar, i.e. some people like you and some don’t. Generally, the lower the layer of the attack, the more global the reputation effect will be; the higher the layer, the more multipolar. An attempt to spam the network with millions of malicious packets will cause most people not to want to talk to you; sending me a movie I found mediocre is probably not even information worth sharing with anyone else.
153+
154+
155+## Conclusion
156+
157+Ames’ design has unparalleled potential to deter, mitigate, and recover from attacks, since every packet is authenticated and encrypted and backed by a stable, decentralized PKI. It feels good to have our design for encryption and authentication be confirmed by a third party as cryptographically sound, and we know more or less what we need to build to reach the full security potential of the platform, including the steps outlined here.
content/blog/value-of-address-space-pt3.md+2−2
@@ -36,7 +36,7 @@ One way to think about galaxies, stars, and planets is that they’re different-
3636
3737Booted and Unbooted Addresses –
3838
39−A booted address is one that has actually been used to boot Urbit OS. By convention, booted addresses are expected to have some existing reputation outside of their name alone, since they’ve been used on the network. Reputation, good and bad, comes in many forms. Did the address operate any useful infrastructure? Did it get placed on any blacklists for spam or abuse? Did it simply send and receive messages? The ability to programatically track reputation is still in its infancy, but we expect the tooling to develop as urbit grows.
39+A booted address is one that has actually been used to boot Urbit OS. By convention, booted addresses are expected to have some existing reputation outside of their name alone, since they’ve been used on the network. Reputation, good and bad, comes in many forms. Did the address operate any useful infrastructure? Did it get placed on any blacklists for spam or abuse? Did it simply send and receive messages? The ability to programatically track reputation is still in its infancy, but we expect the tooling to develop as Urbit grows.
4040
4141Unbooted addresses, on the other hand, have no reputation. Both booted and unbooted addresses can be transferred between owners, but booted addresses will likely vary widely in price depending on the reputation each of them has acquired, and how they’ve been used.
4242
@@ -103,7 +103,7 @@ We intend to further distribute Tlon’s address space over the coming years thr
103103
104104## Usage data and composition
105105
106−Usage data is an obvious missing piece of the puzzle in this discussion. We understand this, and yet we don’t actively capture usage data, for two important reasons: it’s premature, and Urbit is privacy focused by design.
106+Usage data is an obvious missing piece of the puzzle in this discussion. We understand this, and yet we don’t actively capture usage data, for two important reasons: it’s premature, and Urbit is privacy-focused by design.
107107
108108First, it’s too early. Urbit’s current users are a fanbase of pioneers who are willing to put up with the challenges of a young network. This fanbase grows on its own, but Tlon doesn’t actively encourage that growth yet. For the vast majority of potential users, the barriers to entry are still high enough that an invitation would risk losing them permanently. You can think of Urbit today as being a developer alpha.
109109
content/breach.mdnew file+105
@@ -0,0 +1,105 @@
1++++
2+title = "~2020.12 Network Breach"
3+template = "page_indiced.html"
4++++
5+
6+## TL;DR
7+
8+*Last updated ~2020.12.9*
9+
10+A network breach happened on ~2020.12.8 — you may need to take action.
11+
12+Unlike past breaches, this one comes with a tool to export and reimport all of your data so that you don't lose anything; we call it `flagday`. Details on its usage can be found below.
13+
14+*If you are self-hosting your ship, following these instructions is mandatory in order to communicate with the rest of the network.*
15+
16+## When was the last network breach?
17+
18+On Tuesday, ~2020.12.8.
19+
20+## How do I get updates about what's going on throughout the process?
21+
22+We'll be adding new information to this document as soon as there's anything to share. Updates will be broadcasted via Twitter [here](https://twitter.com/zodisok/) as well.
23+
24+## What is a “network breach”?
25+
26+A network breach occurs when we need to change the Ames networking protocol number in order to reset the network’s state. When we change the protocol number, it will essentially create a new network. This rupture in continuity is why we refer to it as a “breach”. In the past, this has required users to take some action in order to get on the new network, but we are striving to make this as painless and loss-free as possible.
27+
28+## Why does the network need to breach?
29+
30+A network breach occurs when:
31+- A change must be made to all ships on the network simultaneously
32+- A change must be made to the Ames networking protocol
33+- Substantial changes must be made to Arvo and Vere simultaneously
34+
35+In this breach, we are including changes that will allow us to make these changes in the future without breaching the network.
36+
37+## Do I need to perform a personal breach?
38+
39+No. A network breach subsumes all personal breaches, so please don’t also perform a personal breach.
40+
41+## What can I expect?
42+
43+If you are using a self-hosted ship, you need to affirmatively perform the breach using the instructions below. If you are using hosting, your ship will process the breach automatically.
44+
45+## Do I need to do anything with Bridge/Ethereum?
46+
47+There are no Ethereum transactions necessary for this breach.
48+
49+## I’m self-hosted—what do I need to do?
50+
51+You are still in the old era. First you need to ensure that you are on the
52+correct base hash - run `+trouble` in dojo and check that the following line
53+is displayed.
54+```
55+[%base-hash [0v1f.lbtqc.5o909.qqja6.17dgp.m8gde.bmiqc.fa97p.8jer8.msu43.5rf36]]
56+```
57+If `%base-hash` is different, you need to download the correct OTA from `~fet`,
58+a galaxy that Tlon has left running in the old era specifically for this
59+purpose. Enter `|ota ~fet %kids` into dojo and wait until the OTA update is
60+complete. Now you are ready to proceed.
61+
62+**Simply use the `flagday` tool that we have provided**. It will perform all the
63+relevant actions on your behalf, as well as exporting and reimporting your data.
64+
65+To use `flagday`, run the following:
66+
67+```shell
68+curl https://bootstrap.urbit.org/flagday.sh > flagday.sh; chmod 755 ./flagday.sh; ./flagday.sh PIER_DIRECTORY
69+```
70+
71+Alternatively, you can perform the migration manually (see below).
72+
73+## Can I perform the migration manually?
74+
75+Yes, by following these steps (note that these steps **will not** back up your data as is the case with `flagday`):
76+
77+1. Download your [keyfile from Bridge](https://urbit.org/using/install/#keyfile).
78+2. Shut down your ship.
79+3. [Archive and move your old pier](https://urbit.org/using/operations/using-your-ship/#moving-your-pier) (this is the directory that contains your urbit event log).
80+4. [Download the latest version](@/using/install.md#macos-and-linux) of the urbit binary.
81+5. [Boot your ship with the new keyfile](https://urbit.org/using/install/#boot-your-planet).
82+
83+## I’m hosted by Tlon, or someone else—what do I need to do?
84+
85+Users hosted by Tlon will not need to take any action. We’re handling everything on our end. If you’re hosted by another provider, you should contact that provider for instructions.
86+
87+## What happens to my data?
88+
89+We’ve written a tool called `flagday` that will allow you to easily export your ship’s Landscape data. This includes your subscriptions and any content such as Collections, Notebooks and Chats that are on your ship. This data can then be seamlessly imported into a new ship.
90+
91+## What is unique about this breach?
92+
93+This breach will include Arvo/Vere Version Negotiation. This will allow us to ship updates to Vere and Arvo separately without worrying about an incompatibility on ships. For example, if you are running Vere 1.0 and an OTA of Arvo goes out that requires Vere 2.0, your ship will simply drop the update and notify you that you need to update your binary in order to receive the next update. When you update your binary is up to you.
94+
95+## Will there be more network breaches?
96+
97+We are optimistic that this will be our last breach, as all future updates to the network can be distributed as OTA (over-the-air) updates, possibly accompanied by a notification to update a binary version.
98+
99+## What happens if I don’t breach?
100+
101+Your Urbit will fall out of communication with the rest of the Urbit network which has performed the breach. This means that updates (OTAs) will no longer process and you won’t be able to communicate with anyone else on the network.
102+
103+## How do I get help if I need it?
104+
105+If you're in a tight spot or confused, reach out to us at support@urbit.org.
content/docs+1−1

Submodule changed.

content/using/develop.md+35−14
@@ -6,7 +6,11 @@ template = "page_indiced.html"
66aliases = ["/docs/using/creating-a-development-ship/", "/docs/getting-started/contributing"]
77+++
88
9−There are roughly two kinds of development on Urbit: core development and application development. Urbit applications are still young, but can be fun to experiment with. The kernel is much more stable, but generally more challenging from an engineering standpoint.
9+You can develop on Urbit in three ways:
10+
11+- [Applications using Urbit](#api), which use Urbit as the back-end to store data and communicate with others
12+- [Urbit Applications](#application), which are written in [Hoon](/docs/glossary/hoon/), and run as part of Urbit
13+- [Urbit Core](#core), which involves contributing to Urbit's operating system ([Arvo](https://github.com/urbit/urbit/tree/master/pkg/arvo)) or runtime ([Vere](https://github.com/urbit/urbit/tree/master/pkg/urbit))
1014
1115This guide will start by getting you set up to run an Urbit ship, and then tell you everything you need to know to do either.
1216
@@ -18,21 +22,23 @@ Once you’re ready, you can get started on the network right away and take some
1822
1923When developing, however, we recommend [booting a development ship](#creating-a-development-ship) and working locally -- you may need to make changes that could, in the wrong hands, destroy the ship’s environment, and it’s best to do so in a safe, separate place.
2024
21−## Core development {#core}
22−
23−Working on the core means improving the Urbit project itself, working with the existing community of Urbit developers.
25+## Applications using Urbit {#api}
2426
25−Just arrived and unsure what to work on? An ideal way to get started is by experimenting with the system, talking to other developers, and reading (or [contributing to](https://github.com/urbit/docs)) the [documentation](/docs/).
27+Urbit ships with its own set of apps written in its own language, Hoon. However it is also meant to integrate with applications written in other languages via an API. The clearest example of an application using Urbit is Landscape, the default client. Although it does currently ship with Urbit, its front-end is a separate piece of software that uses Urbit's HTTP APIs to interact with an Urbit ship. You can create your own application that uses Urbit to store data and interact with other Urbit ships without writing any Hoon code thanks to Urbit's HTTP APIs. This could be a chat client, a writing app, a game, or anything else that can communicate over HTTP.
2628
27−Prefer learning with an instructor? We also offer an online course that covers the basics of Urbit development called [Hoon School](@/community/hoonschool.md). If course-based learning works well for you, we recommend you sign up.
29+To get started quickly with the language of your choice, see the following libraries that provide HTTP interfaces to Urbit:
2830
29−The Urbit developer community congregates around [the urbit-dev mailing list](https://groups.google.com/a/urbit.org/forum/#!forum/dev), the `~bitbet-bolbel/urbit-community` group on Landscape, and [Urbit’s GitHub repository](https://github.com/urbit/urbit). It’s a good idea to sign up, see what people are talking about, and introduce yourself.
31+ - [Python](https://github.com/baudtack/urlock-py) (Stable)
32+ - [Swift](https://github.com/dclelland/UrsusAirlock) (Under development)
33+ - [Haskell](https://github.com/bsima/urbit-airlock) (Under active development)
34+ - [JavaScript](https://www.npmjs.com/package/urbit) (Under active development)
35+ - Go (Pending release)
3036
31−Once you’re comfortable working with Urbit, check out the [project’s issues on GitHub](https://github.com/urbit/urbit/issues) or some of our [contribution bounties](https://grants.urbit.org/).
37+[View details about using the API or creating your own implementation here.](/using/integrating-api/)
3238
33−If you’re looking for some guidance, need help, or would prefer direct communication for your ideas, you can also always reach out to us directly at [support@urbit.org](mailto:support@urbit.org).
39+## Urbit Applications {#application}
3440
35−## Application development {#application}
41+Urbit applications are still young, but can be fun to experiment with.
3642
3743When creating user applications on Urbit, you aren’t tied to any particular user interface. They can work without providing a response to the user, or by printing to the Dojo, or with an interface in Landscape, which uses [Eyre](@/docs/tutorials/arvo/eyre.md) (the Arvo vane that serves HTTP to serve a React-based interface to the application through a web browser).
3844
@@ -40,6 +46,19 @@ When writing applications, you will often make use of [Gall](@/docs/tutorials/ho
4046
4147If you want to see examples of Urbit applications with common functionality requirements, you can see our [examples](https://github.com/urbit/examples) repository. If you want to get started building applications with a Landscape interface, check out our [create-landscape-app](https://github.com/urbit/create-landscape-app) repository.
4248
49+## Urbit Core {#core}
50+
51+Working on the core means improving the Urbit project itself, working with the existing community of Urbit developers. The kernel is much more stable, but generally more challenging from an engineering standpoint.
52+
53+Just arrived and unsure what to work on? An ideal way to get started is by experimenting with the system, talking to other developers, and reading (or [contributing to](https://github.com/urbit/docs)) the [documentation](/docs/).
54+
55+Prefer learning with an instructor? Our community runs an online course that covers the basics of Urbit development called [Hooniversity](https://hooniversity.org/). If course-based learning works well for you, we recommend you sign up.
56+
57+The Urbit developer community congregates around [the urbit-dev mailing list](https://groups.google.com/a/urbit.org/forum/#!forum/dev), the `~bitbet-bolbel/urbit-community` group on Landscape, and [Urbit’s GitHub repository](https://github.com/urbit/urbit). It’s a good idea to sign up, see what people are talking about, and introduce yourself.
58+
59+Once you’re comfortable working with Urbit, check out the [project’s issues on GitHub](https://github.com/urbit/urbit/issues) or some of our [contribution bounties](https://grants.urbit.org/).
60+
61+If you’re looking for some guidance, need help, or would prefer direct communication for your ideas, you can also always reach out to us directly at [support@urbit.org](mailto:support@urbit.org).
4362
4463## Creating a development ship {#creating-a-development-ship}
4564
@@ -57,13 +76,15 @@ Now you should see a block of boot messages, starting with the Urbit version num
5776
5877## Community tutorials {#community-tutorials}
5978
60−Here are some tutorials written by members of the Urbit community. Some are a little outdated, but they may still prove useful.
79+Here are some tutorials written by members of the Urbit community.
6180
62−- [Generators](https://github.com/joemfb/mardev/tree/master/docs/gen) by `~master-morzod`
63−- [Urbit by Doing](https://github.com/Fang-/Urbit-By-Doing) by `~palfun-foslup`
64−- [Learning Hoon](https://github.com/knubie/learning-hoon) by `@knubie`
6581- [A Nock Interpreter](https://jtobin.io/nock) by `~nidsut-tomdun`
6682- [Basic Hoonery](https://jtobin.io/basic-hoonery) by `~nidsut-tomdun`
83+- [The Complete Guide to
84+ Gall](https://github.com/timlucmiptev/gall-guide/blob/master/overview.md) by
85+ `~timluc-miptev`
86+- [Nock for Everyday Coders](https://blog.timlucmiptev.space/part1.html) by `~timluc-miptev`
87+- [Rote - An Annotated Flashcard App](https://github.com/lukechampine/rote)
6788
6889If you want to add something to the list, [shoot us an email](mailto:support@urbit.org) or make a pull request in the [docs repository](https://github.com/urbit/docs).
6990
content/using/install.md+34−63
@@ -32,16 +32,16 @@ Regardless of your Urbit ID, you'll want the Urbit binary installed first. The U
3232#macOS:
3333mkdir urbit
3434cd urbit
35−curl -O https://bootstrap.urbit.org/urbit-v0.10.8-darwin.tgz
36−tar xzf urbit-v0.10.8-darwin.tgz
37−./urbit-v0.10.8-darwin/urbit
35+curl -JLO https://urbit.org/install/mac/latest
36+tar zxvf ./darwin.tgz --strip=1
37+./urbit
3838
3939#Linux:
4040mkdir urbit
4141cd urbit
42−curl -O https://bootstrap.urbit.org/urbit-v0.10.8-linux64.tgz
43−tar xzf urbit-v0.10.8-linux64.tgz
44−./urbit-v0.10.8-linux64/urbit
42+wget --content-disposition https://urbit.org/install/linux64/latest
43+tar zxvf ./linux64.tgz --strip=1
44+./urbit
4545```
4646
4747Once you've followed the appropriate install instructions, you can check if everything went right by running the `./urbit` command. Installation was successful if you get a block of output that begins with the line below:
@@ -55,15 +55,13 @@ To access your Urbit via HTTP on port 80 on Ubuntu, you may need to run the foll
5555sudo apt-get install libcap2-bin
5656sudo setcap 'cap_net_bind_service=+ep' /path/to/urbit
5757```
58−(Where `urbit` is the urbit executable downloaded with `curl` prior)
58+(Where `urbit` is the urbit executable downloaded with `wget` prior)
5959
6060### Windows
6161
6262> Please note that this method of installing Urbit is experimental, and we may not be able to assist you if you encounter issues related to WSL 2.
6363
64−These instructions have been tested and verified for WSL 2 + Ubuntu 18.04 LTS.
65−
66−Urbit cannot run on Windows itself, but there is a convenient way to run a Linux distro using the [Windows Subsystem for Linux 2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-install) on Windows 10. Install the Windows Subsystem for Linux 2 and open a Linux terminal in Windows, then follow the Linux installation instructions above.
64+Urbit cannot run on Windows itself, but there is a convenient way to run a Linux distro using the [Windows Subsystem for Linux 2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-install) on Windows 10. Install the Windows Subsystem for Linux 2 and open a Linux terminal in Windows, then follow the Linux installation instructions above. These instructions have been tested and verified for WSL 2 + Ubuntu 18.04 LTS, as demonstrated in `~sitful-hatred`'s step-by-step setup guide [here](https://subject.network/posts/urbit-wsl2/).
6765
6866For performance reasons, do not install Urbit in the mounted Windows volume, but install it in the Linux file system. For example, in your home directory, which can be navigated to by entering `cd ~`.
6967
@@ -80,11 +78,7 @@ Comets are disposable, free identities that can be used to quickly join the netw
8078To boot a comet, go into the command line and run the following command from the `urbit` directory you created during [Urbit installation](#installing-urbit):
8179
8280```sh
83−#macOS:
84−./urbit-v0.10.8-darwin/urbit -c mycomet
85−
86−#Linux:
87−./urbit-v0.10.8-linux64/urbit -c mycomet
81+./urbit -c mycomet
8882```
8983
9084Since your identity on the network is not verified, it may take up to an hour to generate your comet. As it boots, will spin out a bunch of boot messages and create a directory called `mycomet`. Toward the end of the boot process, you'll see something like:
@@ -104,11 +98,7 @@ To exit Urbit, use `Ctrl-D` or enter `|exit` into Dojo.
10498To start your ship up again, run the following from your `urbit` directory (note the lack of `-c` argument):
10599
106100```sh
107−#macOS:
108−./urbit-v0.10.8-darwin/urbit mycomet
109−
110−#Linux:
111−./urbit-v0.10.8-linux64/urbit mycomet
101+./urbit mycomet
112102```
113103
114104### The Dojo
@@ -184,12 +174,21 @@ Urbit ID secrets operate as a system of separate but hierarchically related Ethe
184174
185175### Get your keyfile {#keyfile}
186176
187−As mentioned previously, there are a few ways to acquire a planet. All methods, however, should result in you receiving at least one secret, such as a **master ticket**. If you received an email invite to Urbit, the master ticket should a `.pdf` the passport folder that you downloaded.
177+As mentioned previously, there are a few ways to acquire a planet. All methods,
178+however, should result in you receiving at least one secret, such as a **master
179+ticket**. If you received an email invite to Urbit, the master ticket should be
180+a `.pdf` file in the passport folder inside the archive that you downloaded.
188181
1891821. Connect to [Bridge](https://bridge.urbit.org).
1901832. Enter the name of your planet and the associated master ticket in the appropriate fields. Click the "Metamask, Mnemonic, Hardware Wallet..." button for alternate login methods if you don't have a master ticket.
1911843. Once you're logged in, click the "OS" option.
192−4. In resulting page, click the "Download Arvo Keyfile" button. You should receive a `.key` file that contains the secret needed to boot your ship. Hold onto this file.
185+4. In resulting page, click the "Download Arvo Keyfile" button. You should
186+ receive a `.key` file that contains the secret needed to boot your ship. Hold
187+ onto this file. This may be grayed out if you are not using a master ticket.
188+ If so, click on "Reset Networking Keys", then click on "Reset Networking Keys" on
189+ the following page, validate the transaction using your wallet, and then
190+ click Send Trasaction. Once the transaction is complete, the "Download Arvo
191+ Keyfile" button should be available for you to press.
193192
194193### Choose to host or run your ship locally
195194
@@ -213,21 +212,13 @@ Once you're inside, run the command below, except with `sampel-palnet` replaced
213212Urbit identity, and `path/to/my-planet.key` replaced with the path to your keyfile:
214213
215214```sh
216−#macOS:
217−./urbit-v0.10.8-darwin/urbit -w sampel-palnet -k path/to/my-planet.key
218−
219−#Linux:
220−./urbit-v0.10.8-linux64/urbit -w sampel-palnet -k path/to/my-planet.key
215+./urbit -w sampel-palnet -k path/to/my-planet.key
221216```
222217
223−Or, if you'd prefer to copy your key in, you can run:
218+Or, if you'd prefer to copy-paste your key, you can run:
224219
225220```sh
226−#macOS:
227−./urbit-v0.10.8-darwin/urbit -w sampel-palnet -G rAnDoMkEy
228−
229−#Linux:
230−./urbit-v0.10.8-linux64/urbit -w sampel-palnet -G rAnDoMkEy
221+./urbit -w sampel-palnet -G rAnDoMkEy
231222```
232223
233224Either command will create a directory called `sampel-palnet/` and begin building your ship. It may take a few minutes.
@@ -237,11 +228,7 @@ When your ship is finished booting, you will see either the `~sampel-palnet:dojo
237228To shut down your ship, use `Ctrl-D`. To start your ship up again, run the following from your `urbit` directory:
238229
239230```sh
240−#macOS:
241−./urbit-v0.10.8-darwin/urbit sampel-palnet
242−
243−#Linux:
244−./urbit-v0.10.8-linux64/urbit sampel-palnet
231+./urbit sampel-palnet
245232```
246233
247234Note that `sampel-palnet/` is the path of a folder, which we just created in your `urbit` directory. This folder is called your ship's **pier**.
@@ -262,46 +249,30 @@ Most updates to Urbit are downloaded and applied automatically as OTA (Over the
262249
263250To update to the latest binary, download and extract it to replace your existing one. Then run it as before.
264251
265−For example, if in your current `urbit` directory you have an `urbit-v0.10.7-<OS>` directory along with a ship directory called `mycomet`, and a new `urbit-v0.10.8-<OS>` binary was just released, then you'd run the following commands from your `urbit` directory:
266−
267−First shut down your ship, by running the following in dojo (or `Ctrl-D`).
252+First shut down your ship, by running the following in dojo (or with `Ctrl-D`).
268253```
269254|exit
270255```
271256
272−**NOTE**: Your ship itself can be reused, only the binary needs to be changed. This is why we have the directory structure configured as an `urbit` directory that contains your ship and your binary. This structure makes it easy to swap in new binaries. If you have your ship *inside* the `urbit-vX.XX.X` directory, move it out before deleting that directory.
273−
274−Delete the old binary directory from your `urbit` directory:
275−
276−```sh
277−#macOS:
278−rm -rf urbit-v0.10.7-darwin
279−
280−#Linux:
281−rm -rf urbit-v0.10.7-linux64
282−```
283−
284257Next download and extract the most recent binary from inside your `urbit` directory:
285258```sh
286259#macOS:
287−curl -O https://bootstrap.urbit.org/urbit-v0.10.8-darwin.tgz
288−tar xzf urbit-v0.10.8-darwin.tgz
260+curl -JLO https://urbit.org/install/mac/latest
261+tar zxvf ./darwin.tgz --strip=1
289262
290263#Linux:
291−curl -O https://bootstrap.urbit.org/urbit-v0.10.8-linux64.tgz
292−tar xzf urbit-v0.10.8-linux64.tgz
264+wget --content-disposition https://urbit.org/install/linux64/latest
265+tar zxvf ./linux64.tgz --strip=1
293266```
294267
268+**NOTE**: Do not delete the directory named after your ship. Your ship itself can be reused, only the binary needs to be changed. This is why we have the directory structure configured as an `urbit` directory that contains your ship and your binary. This structure makes it easy to swap in new binaries.
269+
295270Start up your ship with the new binary from your `urbit` directory:
296271```sh
297−#macOS:
298−./urbit-v0.10.8-darwin/urbit mycomet
299−
300−#Linux:
301−./urbit-v0.10.8-linux64/urbit mycomet
272+./urbit sampel-palnet
302273```
303274
304−Then you're good to go, in the future you'll just modify the version numbers in the example above to the most recent version.
275+Then you're good to go!
305276
306277### Breaches {#breaches}
307278
content/using/integrating-api.mdnew file+224
@@ -0,0 +1,224 @@
1++++
2+title = "Integrating with Urbit for Developers"
3+description = "How to use Urbit's API."
4+weight = 4
5+template = "page_indiced.html"
6++++
7+
8+This guide is aimed at developers who have a working knowledge of HTTP grammar (`PUT`, `GET`), and should not require any special knowledge of Urbit's internals. To learn more about a specific application within Urbit, please search for that with the docs once you have finished this guide.
9+
10+## Authentication
11+
12+The first step in creating an application *on* Urbit (to be distinguished from an Urbit application) is to authenticate with the desired ship. This can be a planet, comet, or any other Urbit ship. For the purposes of this example, we will be running a "fakezod" on port 8080. Run this code, substituting the appropriate path to your Urbit binary:
13+
14+```bash
15+/path/to/urbit -p 8080 -F zod
16+```
17+
18+(for the unfamiliar, this will create a folder named "zod" in your working directory, from which the ship will run. Use `/path/to/urbit -p 8080 zod` in the future)
19+
20+You can run `+code` in the dojo to get the key, but a fakezod's key is always `lidlut-tabwed-pillex-ridrup`. This is our password, our API token that we will use.
21+
22+Run this code in your bash terminal (requires cURL):
23+
24+```bash
25+curl -i localhost:8080/~/login -X POST -d "password=lidlut-tabwed-pillex-ridrup"
26+```
27+Let's explain what this does:
28+
29+ - `-i` displays the headers, so that you can see the cookie that gets sent
30+ - `localhost:8080/~/login` is the URL to which you are POSTing. You will note this is also the URL you visit when you log into Landscape.
31+ - `-X POST` specifies that you are POSTing data, not GETting.
32+ - `-d "password=lidlut-tabwed-pillex-ridrup"` specifies the key for your Urbit that we retrieved above. It is sent as form data, as if it were sent from an HTML form input field (which it is in Landscape)
33+
34+You should see the following:
35+
36+```bash
37+HTTP/1.1 200 ok
38+Date: Sun, 01 Jan 2020 00:00:00 GMT
39+Connection: keep-alive
40+Server: urbit/vere-0.10.8
41+set-cookie: urbauth-~zod=0v3.fvaqc.nnjda.vude1.vb5l6.kmjmg; Path=/; Max-Age=604800
42+transfer-encoding: chunked
43+```
44+
45+The `Date` and `set-cookie` will be slightly different of course.
46+
47+Take a look at the `set-cookie` line. This is now your session authentication, and will need to be sent with any future requests. It consists of three parts:
48+
49+ - `urbauth` is a prefix that Eyre uses to check for presence of authentication
50+ - `~zod` is the name of the ship you are logging in as
51+ - `0v3.fvaqc.nnjda.vude1.vb5l6.kmjmg` is the actual authentication token.
52+
53+At present there is no way to separate these parts — you must pass a cookie *as* a cookie. This string must be in the `Cookie` header. The `set-cookie` header is only used for this request upon response. It is what browsers expect when receiving a cookie.
54+
55+## Interacting with Urbit
56+
57+Once authenticated, you will perform all your operations on a channel. You may open as many channels as needed using the same authentication token, but this will increase complexity and memory usage on your Urbit ship.
58+
59+Interacting with Urbit comprises two parts:
60+
61+1. Sending information via PUT requests, which receive HTTP status code `204` (no content) upon success. We will not receive updated information (as in a POST request).
62+2. Receiving data on channels, which must first be subscribed to via an initial request. These come in the form of SSEs ([Server-Sent Events](https://www.w3.org/TR/eventsource/))
63+
64+These can be used independently, i.e. you may choose to only send information or only receive information from your Urbit, based on your application. Both can take place on the same channel.
65+
66+### Creating a Channel
67+
68+For this example, we will use the following channel:
69+
70+```
71+http://localhost:8080/~/channel/1601844290-ae45b
72+```
73+
74+Let's examine the parts. A channel is simply a URL in this pattern: `{url}/~/channel/{uid}` where `{uid}` is a string of your choosing. Most libraries default to the current unix time plus six hexadecimal characters. Your program should determine a channel for its current session and store that in its state.
75+
76+The channel does not yet exist in Urbit, however. To subscribe to events on this URL, you must first make a request (PUT) to Urbit on this URL. The simplest way to do this is to `hi` ourselves, as if we had entered `|hi our` in the dojo. A `hi` is analogous to a ping, and does not manipulate state. Let's learn how to make requests using this as an example.
77+
78+### Making Requests
79+
80+All requests will take the form of sending a message. Messages can take different forms, such as `subscribe`s, `ack`s, and `poke`s. These are called actions and there are more than these, but these will cover most basic use cases. You can think of them as a somewhat more sophisticated HTTP grammar. A message always requires an `id` and an `action`. Other fields depend on the specific action.
81+
82+Let's look at the structure of a message by examining the most basic `hi` we will send.
83+
84+```js
85+{
86+ 'id': 1, // Required. A sequential ID. Keep track of which messages you have sent.
87+ 'action': 'poke', // Required. The action to take. poke is the most basic way of sending data, like HTTP POST
88+ 'ship': 'zod', // Required by poke. The ship on which to perform the poke. You can only poke foreign ships with JSON, but this is the authenticated ship.
89+ 'app': 'hood', // Required by poke. The Urbit app to which to send the data.
90+ 'mark': 'helm-hi', // Required by poke. The "mark," or type, of data being sent.
91+ 'json': 'Opening airlock' // Required by poke. The actual data being sent.
92+}
93+```
94+
95+Let's open our channel by sending the following request using cURL (**remember to change the cookie**):
96+
97+```bash
98+curl --header "Content-Type: application/json" \
99+ --cookie "urbauth-~zod=0v3.fvaqc.nnjda.vude1.vb5l6.kmjmg" \
100+ --request PUT \
101+ --data '[{"id":1,"action":"poke","ship":"zod","app":"hood","mark":"helm-hi","json":"Opening airlock"}]' \
102+ http://localhost:8080/~/channel/1601844290-ae45b
103+```
104+
105+If you switch to your fakezod's dojo, you should see `< ~zod: Opening airlock`.
106+
107+Note that in the JSON that we sent via `--data`, the payload is wrapped in `[]`. This is because we can send multiple messages in a single payload, and Eyre expects a list of items, even if we are only sending one.
108+
109+You will always receive a `204` status code if the `PUT` request successfully reached Urbit, authentication succeeded, and the payload was valid. This is merely an HTTP status code, however. If the request failed within Urbit itself, however, you will receive a "nack" event that you will have to process separately.
110+
111+Let's look at how to receive events from Urbit.
112+
113+### Subscribing to Events
114+
115+Now that Urbit has opened an Eyre channel at our URL, we can watch for events on that URL by sending a `subscribe` message. Let's look at the anatomy of a `susbcribe`:
116+
117+```js
118+{
119+ 'id': 2, // Required. This is the next message we are sending, so we give it the next ID.
120+ 'action': 'subscribe', // Required.
121+ 'ship': 'zod', // Required by subscribe.
122+ 'app': 'chat-view', // Required by subscribe. In this case, we want to watch events that occur in the chat-view app, which is responsible for handling incoming chats.
123+ 'path': '/primary' // Required by subscribe. All apps have different path structures. In the case of chat-view, this is where we see all incoming chats.
124+}
125+```
126+
127+This is all we need to send Urbit to say "On this URL through which I am sending information, send me SSEs whenever something occurs on this app at this path."
128+
129+You should be able to send this information if you were able to send the above cURL example. However, we now need to be able to listen to the SSEs. The `EventSource` object is available for JavaScript in the browser context, as this is why SSEs were invented, but there should be a library for it in your chosen language. Take a look at a Browser JavaScript example:
130+
131+```js
132+const eventSource = new EventSource('http://localhost:8080/~/channel/1601844290-ae45b', {
133+ withCredentials: true // Required, sends your cookie
134+});
135+
136+eventSource.addEventListener('message', function (event) {
137+ ack(Number(event.lastEventId)); // See section below
138+ const payload = JSON.parse(event.data); // Data is sent in JSON format
139+ payload.id === event.lastEventId; // The SSE spec includes event IDs. This information is duplicated in the payload.
140+ const data = payload.json; // Beyond this, the actual data will vary between apps
141+});
142+
143+eventSource.addEventListener('error', function (event) {
144+ handleError(event);
145+});
146+
147+```
148+
149+### Handling Received Events
150+
151+Once you have received an event, it is expected that you will "ack" or "acknowledge" that you have received them. To do so, simply send a message in the following format:
152+
153+```js
154+{
155+ 'id': 3, // Required. Picking up where we left off
156+ 'action': 'ack', // Required.
157+ 'event-id': 15, // Required by ack. Whichever SSE of which you are acknowledging receipt
158+}
159+```
160+
161+### Unsubscribing from Events
162+
163+You may want to stop receiving events from a particular app path, but you don't want to close the channel altogether yet. Let's look at how to do that. Take a look at the example for subscribing. We sent that message with `id: 2`. We will use that ID to cancel the relevant subscription:
164+
165+```javascript
166+{
167+ 'id': 4, // Required. We always increment the ID as we send messages.
168+ 'action': 'unsubscribe', // Required.
169+ 'subscription': 2 // Required by unsubscribe. This corresponds to the id of a subscribe message sent earlier.
170+}
171+```
172+
173+### Deleting a Channel
174+
175+You should clean up your channel when able. To do so, simply send a `delete` message and Eyre will handle the rest so your program can safely exit.
176+
177+```javascript
178+{
179+ 'id': 5, // Required.
180+ 'action': 'delete' // Required.
181+}
182+```
183+
184+## Other Operations
185+
186+There are other operations which require authentication but do not require the use of a channel. Some operations are app-specific and will not be enumerated here, but there are two operations that exist across Urbit: `scry` and `spider`.
187+
188+### Scrying
189+
190+Scrying lets you see what an app has exposed at a particular path. It does not manipulate state.
191+
192+It takes the form `{url}/~/scry/{app}{path}.{mark}`
193+
194+ Let's get the base hash of our fakezod in the same way that Landscape does it.
195+
196+```bash
197+curl --header "Content-Type: application/json" \
198+ --cookie "urbauth-~zod=0v3.fvaqc.nnjda.vude1.vb5l6.kmjmg" \
199+ --request GET \
200+ http://localhost:8080/~/scry/file-server/clay/base/hash.json
201+```
202+
203+Note the use of a `GET` request.
204+
205+In this example we're scrying the `file-server` app at the path `/clay/base/hash` and using the `json` mark, which is most common. We receive `"0"` which is correct because we are at the top level of the hierarchy using a fake ship.
206+
207+Scry will fail with a 500 or return a 404 if no data is found.
208+
209+### Running Threads with Spider
210+
211+Running threads is an exception to the rule that we outlined in the section on channels. It uses a `POST` request and both manipulates state and receives information back. It also exposes the ability to send a sequence of commands, i.e. a "thread," hence the name.
212+
213+It takes the form `{url}/spider/{inputMark}/{threadname}/{outputmark}.json`
214+
215+This should be considered an advanced technique, but the basic structure of a request can be seen here:
216+
217+```bash
218+curl --header "Content-Type: application/json" \
219+ --cookie "urbauth-~zod=0v3.fvaqc.nnjda.vude1.vb5l6.kmjmg" \
220+ --request POST \
221+ --data '[{"foo": "bar"}]' \
222+ http://localhost:8080/spider/graph-view-action/graph-create/json.json
223+
224+```
content/using/operations/hosting.md+12−10
@@ -96,7 +96,7 @@ Continuing to follow the DO docs we're going to configure the ufw firewall.
9696 ```
9797 $ sudo ufw enable
9898 ```
99− - To see the current the current firewall status use the following.
99+ - To see the current firewall status use the following.
100100 ```
101101 $ sudo ufw status
102102 ```
@@ -110,29 +110,31 @@ Finally we're ready to install Urbit on your very own server. This part is actua
110110 $ ssh your_user@your_domain
111111 $ mkdir urbit
112112 $ cd urbit
113− $ curl -O https://bootstrap.urbit.org/urbit-v0.10.8-linux64.tgz
114− $ tar xzf urbit-v0.10.8-linux64.tgz
115− $ cd urbit-v0.10.8-linux64
113+ $ wget --content-disposition https://urbit.org/install/linux64/latest
114+ $ tar zxf ./linux64.tgz --strip=1
116115 $ sudo setcap 'cap_net_bind_service=+ep' urbit
117116 ```
118117 - Now we're going to tar up your local ship and send it to your server, from your local machine's urbit directory:
119118 ```
120119 $ tar -zcvf <ship_dir_name>.tar.gz <ship_dir_name>
121− $ scp <ship_dir_name>.tar.gz your_user@your_domain:/home/your_user/urbit
120+ $ scp <ship_dir_name>.tar.gz your_user@your_domain:urbit
122121 ```
123122 - Back on your server let's untar your ship and start it up with the Ames port we allowed through the firewall:
124123 ```
125124 $ ssh your_user@your_domain
126125 $ cd urbit
127126 $ tar -zxvf <ship_dir_name>.tar.gz
128− $ ./urbit-v0.10.8-linux64/urbit -p 34543 <ship_dir_name>
127+ $ ./urbit -p 34543 <ship_dir_name>
129128 ```
130− - Now we run a few commands in Dojo to request a Let’s Encrypt cert for your domain (replace `tld` with whatever your top-level domain is e.g. `com` in `example.com`:
129+ - Now we run a few commands in Dojo to request a Let’s Encrypt cert for your
130+ domain. Replace `tld` with whatever your top-level domain is e.g. `com` in
131+ `example.com`. `your_subdomain` is optional and that part of the command
132+ should be omitted if you are not using it):
131133 ```
132134 ~sampel-palnet:dojo> |start %acme
133− ~sampel-palnet:dojo> :acme &path /tld/your_domain
135+ ~sampel-palnet:dojo> :acme &path /tld/your_domain/your_subdomain
134136 ```
135− - Your ship should now be sailing on the digital ocean. Check `https://your_domain`, if everything is working properly you should see a login page.
137+ - Your ship should now be sailing on the digital ocean. Check `https://your_subdomain.your_domain.tld`, if everything is working properly you should see a login page.
136138 - Log in with the code from `+code` in dojo like normal and you should see all of your applications.
137139
138140## Leaving your Urbit running in a Screen session
@@ -143,7 +145,7 @@ Finally, to leave your Urbit running after you disconnect we can leave it in a S
143145 ```
144146 - This will start a screen session, we can now start up the Urbit ship from the `urbit` directory in this session:
145147 ```
146− $ ./urbit-v0.10.8-linux64/urbit <ship_dir_name>
148+ $ ./urbit <ship_dir_name>
147149 ```
148150 - Then we can disconnect from the screen session and leave the ship running with `control-a d`
149151 - To get back into the screen session:
content/using/operations/stars-and-galaxies.md+9−6
@@ -10,11 +10,12 @@ To boot your galaxy or star, follow our [installation instructions](@/using/inst
1010
1111### Hosting your star
1212
13−If you plan to distribute planets in any capacity, you must keep your star running. If you fail to do so, those planets will become orphans that are unable to communicate with the network.
13+If you plan to distribute planets in any capacity, we ask that you keep your star
14+running. If you fail to do so, those planets will become orphans that are unable
15+to communicate with the network unless they transfer to a new star.
1416
15−To make this as simple as possible, we’re building Terraform-based tooling for star and planet hosting via Google Cloud Platform. Once it’s ready we’ll open source the tooling so you can host stars and planets for yourself and others.
16−
17−In the meantime, there are [existing instructions](@/using/install.md) for those familiar with booting a Linux instance on GCP, AWS, Digital Ocean, etc.
17+See our [cloud hosting instructions](@/using/operations/hosting.md) for
18+instructions on settings up a Digital Ocean droplet.
1819
1920### Distributing planets
2021
@@ -28,13 +29,15 @@ By default, your star accepts software updates from its galaxy and routes them t
2829
2930To ensure new planets can connect to your ship, users are expected to participate in network-wide breaches by [updating to the latest Urbit version](@/using/install.md), deleting (or archiving) your pier, and then booting your ship using the new binary. If you don’t participate, you won’t be able to communicate with anyone on the network who has updated to the new era.
3031
31−Network-wide breaches are distinct from personal breaches, wherein an individual ship cycles its personal network keys using bridge, and then follows the same steps outlined above.
32+Network-wide breaches are distinct from personal breaches, wherein an individual ship cycles its personal network keys using Bridge, and then follows the same steps outlined above.
3233
3334See our [Guide to Breaches](https://urbit.org/docs/tutorials/guide-to-breaches) for more information and for instructions on breaching.
3435
3536### Star-owner etiquette
3637
37−- If you distribute planets, boot and run your star on the Arvo network, or the planets won't be able to boot for the first time or connect.
38+- If you distribute planets, boot and run your star on the Arvo network, or the
39+ planets won't be able to boot for the first time or connect unless they
40+ transfer to a different star.
3841- A star is networking infrastructure. For that reason, the machine running your star or galaxy must have sufficient bandwidth and processing power for your dependent planets.
3942- When messaging others, communicate using your star only when speaking in an official/infrastructural capacity. Otherwise, use your personal planet.
4043
content/using/operations/using-bridge.md+46−1
@@ -42,7 +42,14 @@ If you were given points by Tlon you likely already fully own them. But if someo
4242
4343After you access your Ethereum address, if a point was sent to that address, you'll come to a page that has an `Incoming Transfers` header, under which is a graphic. Click the `Details ->` link under that graphic.
4444
45−Now you'll be on the management page of your point. The transfer isn't completed yet, so click `Accept incoming transfer`. Then check both boxes and and click their associated `Sign Transaction` and `Send Transaction` buttons.
45+Now you'll be on the management page of your point. The transfer isn't completed
46+yet, so click `Accept incoming transfer`. If you are transferring to yourself
47+and do not wish to [breach](@/docs/glossary/breach.md), check the box labeled
48+`Retain proxies and key configuration, in case of transferring to self`.
49+Otherwise leave the box unchecked, ensuring that your ship will be breached upon
50+transfer and thus no Azimuth data from the previous owner (namely proxies and
51+networking keys) will be retained. Then press the `Generate and Sign
52+Transaction` button, followed by the `Send Transaction` button.
4653
4754If you already own a point, click on the `Details ->` under your sigil in the `Your Points` section.
4855
@@ -66,3 +73,41 @@ From the detail page associated with your point, click the `Generate Arvo Keyfil
6673Click `Generate ->`, which will download a keyfile onto your machine.
6774
6875With that keyfile in hand, you can now exit Bridge and continue to the guide to [install the Urbit binary](@/using/install.md).
76+
77+### Escaping your sponsor
78+
79+As a planet or star, it behooves you to be sponsored by an active star or galaxy,
80+respectively. If your sponsor isn't suiting your needs, you can escape to a
81+different one.
82+
83+#### Prerequisites
84+
85+- A little bit of ETH in your management proxy address to pay for the
86+ transaction.
87+- The `@p` of the sponsor you want to escape to. You should negotiate the
88+ transfer with the sponsor ahead of time, as they will need to accept it on
89+ their end. If you cannot find one, contact Tlon at support@urbit.org and we
90+ will assist you in escaping to one of our stars/galaxies.
91+
92+#### Instructions
93+
94+1. Login to [Bridge](https://bridge.urbit.org) with the management proxy address
95+ for the ship that will be escaping their sponsor. The ownership address will
96+ also do, as will the master ticket if you have that.
97+2. Click on the "OS" button at the bottom of the screen.
98+3. Below Network, you will find the `@p` of your current sponsor. Click "Change"
99+ to the right of that.
100+4. Enter the `@p` of your new sponsor.
101+5. Click the "Request" button and then complete the transaction.
102+
103+This action will consume a small amount of ETH. Your sponsor will then need to
104+accept you via a similar process in Bridge, which will require ETH on their end.
105+After the transaction is completed on Ethereum, it will still take some time for
106+the information to propagate to the Urbit network. After 30 minutes or so, you
107+may check that your sponsor has successfully been altered by running
108+`(sein:title our now our)` in dojo and confirming that the `@p` matches that of
109+your new sponsor.
110+
111+Once you change your sponsor, you will likely want to change your source of
112+[OTAs](@/docs/glossary/ota-updates.md) to them as well. To accomplish this, enter `|ota
113+~sponsor %kids` in dojo, where `~sponsor` is the `@p` of your new sponsor.
content/using/operations/using-your-ship.md+42−67
@@ -108,7 +108,7 @@ By default, you will automatically receive updates ([OTAs](@/docs/glossary/ota-u
108108
109109If for some reason (for example, if your sponsor is out of date), you can switch OTA sources by running `|ota ~otasrc %kids` in the dojo, where `~otasrc` is the ship from which you want to receive updates. It is a good idea to contact the source ship and ask permission to sync from them.
110110
111−If OTAs are not succeeding, or if you are on an version of Urbit before the `|ota` command was introduced, you can run `|merge %kids (sein:title our now our) %kids, =gem %take-that`. **Note:** This will wipe out any custom changes to the base distribution.
111+If OTAs are not succeeding, or if you are on an version of Urbit before the `|ota` command was introduced, you can run `|merge %home (sein:title our now our) %kids, =gem %take-that`. **Note:** This will wipe out any custom changes to the base distribution.
112112
113113### Landscape
114114
@@ -185,28 +185,11 @@ To cycle the keys of a moon without breaching, run:
185185
186186### Escaping A Sponsor {#escape}
187187
188−To use the network as a planet or star, you must be sponsored by an active star or galaxy, respectively. If your sponsor isn't suiting your needs, you can escape to a different one. The [Bridge](https://bridge.urbit.org/) software doesn't yet support escaping. For the time being, however, you can follow this guide.
189−
190−#### Prerequisites
191−
192−- A little bit of ETH in your management proxy address to pay for the transaction.
193−- The identity number of the sponsor you want to escape from.
194−- The identity number of the sponsor you want to escape to.
195−
196−You can find an identity's number by running ``` `@`~marzod ``` in any Dojo, where `~marzod` is the name of the relevant identity.
197−
198−#### Instructions
199−
200−0. If you have your management proxy in Metamask, you can use Etherscan [here](https://etherscan.io/address/ecliptic.eth#writeContract). Skip steps 1-4.
201−1. Go to either myetherwallet.com or mycrypto.com. Since this is a low-risk operation, and you're signing with a low-value key, it's fine to use their online versions. Sign in with your management mnemonic. (They may still force you to download their tool to log in like this.)
202−2. Navigate to the "interact with contract" page of the tool you're using.
203−3. Specify a contract address of `0x6ac07B7C4601B5CE11de8Dfe6335B871C7C4dd4d`.
204−4. Copy the "contract ABI" from [here](https://etherscan.io/address/ecliptic.eth#code) and paste it into the "ABI/JSON interface" field.
205−5. Select the `escape()` function, passing in two arguments: your identity number, and the number of your desired sponsor.
206−6. Sign and submit the transaction.
207−7. Get in touch with your prospective sponsor, since they won't be notified otherwise. You can do this by contacting them on the network via chat, or joining `~bitbet-bolbel/urbit-community` and asking around.
208−8. Wait for your request to be accepted by the prospective sponsor.
209−9. If your request is not accepted by your prospective sponsor, a last resort, you can make a request to escape to `~marzod`, which is operated by Tlon, the company leading the development of Urbit.
188+To use the network as a planet or star, you must be sponsored by an active star
189+or galaxy, respectively. If your sponsor isn't suiting your needs, you can
190+escape to a different one. This can be done with
191+[Bridge](https://bridge.urbit.org/) following the instructions
192+[here](@/using/operations/using-bridge.md#escaping-your-sponsor).
210193
211194### Continuity breaches
212195
@@ -578,6 +561,37 @@ Syntax `;unset notify`
578561Do not notify when your ship name is mentioned.
579562
580563
564+## S3 {#s3}
565+
566+Amazon S3, which stands for Amazon Simple Storage Service, is a technology that was introduced by Amazon Web Services for cloud storage that has since been extended more broadly into a [standard programming interface](https://en.wikipedia.org/wiki/Amazon_S3#S3_API_and_competing_services).
567+
568+Our S3 support lets you store credentials for your S3 object storage buckets on your Urbit ship; once you have done so, you will get additional functionality for uploading your own media within Chat and Groups (for avatars).
569+
570+To enable S3 support on your ship you'll need to first set up a bucket, and then add its credentials to Landscape using *either* Landscape or the Dojo.
571+
572+### Bucket Setup
573+
574+If you’re using AWS, it will have to support signature v2, not v4. We've found DigitalOcean's Spaces to work well also. The bucket has to be publicly readable, allow CORS from `*` origins, allow GET and PUT methods, and allow `*` headers. Your provider should have details on setting access permissions and CORS.
575+
576+### Add your credentials: Landscape
577+
578+Navigate to your `https://<your-ship-url>/~profile/settings`, or click your sigil in the upper-right corner of the window. Fill out the **S3 Credentials** and **S3 Buckets** sections and you're all set!
579+
580+### Add your credentials: Dojo
581+
582+Once you have gotten your bucket setup, poke the `s3-store` on your ship with your details. You can do this in Dojo or in web Dojo.
583+
584+```
585+:s3-store|set-endpoint 'endpoint.mys3provider.com'
586+:: AWS endpoint example: s3-us-west-2.amazonaws.com
587+:: Digital Ocean endpoint example: sfo2.digitaloceanspaces.com
588+:s3-store|set-access-key-id 'MYACCESSKEYID'
589+:s3-store|set-secret-access-key 'MYSECRETACCESSKEY'
590+:s3-store|set-current-bucket 'yourbucketname'
591+```
592+
593+Done! If you need to peek at s3-store’s state, you can always run :s3-store +dbug (inside Dojo, not web Dojo, unfortunately). You’ll see the additional functionality appear in Groups and Chat.
594+
581595## Shell {#using-the-shell}
582596
583597The Dojo is our shell; it processes system commands and returns output. It's a
@@ -672,6 +686,10 @@ arguments.
672686~your-urbit:dojo> +code
673687```
674688
689+You can change your code to a new randomly generated one by entering `|code
690+%reset`. Please note that this will prevent [Bridge](@/docs/glossary/bridge.md)
691+from being able to derive your code in the future.
692+
675693#### `+curl`
676694
677695Retrieves data from a URL. Accepts a `tape`. Similar to Unix `curl`.
@@ -1331,50 +1349,7 @@ Example:
13311349
13321350### Merge strategies
13331351
1334−`%init` - used if it's the first commit to a desk. Also can be used to
1335−"reinitialize" a desk – revision numbers keep going up, but the new
1336−revision isn't necessarily a descendent of the previously numbered
1337−version, allowing merges to be rerun.
1338−
1339−`%this` - keep what's in Bob's desk, but join the ancestry.
1340−
1341−`%that` - take what's in Alice's desk, but join the ancestry. This is
1342−the reverse of `%this`. This is different from `%init` because the new
1343−commit has both sides in its ancestry.
1344−
1345−`%fine` - "fast-forward" merge. This succeeds if and only if one head is in the
1346−ancestry of the other.
1347−
1348−`%meet`, `%mate`, and `%meld` - find the most recent common ancestor to
1349−use as our merge base.
1350−
1351−A `%meet` merge only succeeds if the changes from the merge base to
1352−Alice's head (hereafter, "Alice's changes") are in different files than
1353−Bob's changes. In this case, the parents are both Alice's and Bob's
1354−heads, and the data is the merge base plus Alice's changed files plus
1355−Bob's changed files.
1356−
1357−A `%mate` merge attempts to merge changes to the same file when both
1358−Alice and Bob change it. If the merge is clean, we use it; otherwise, we
1359−fail. A merge between different types of changes – for example,
1360−deleting a file vs changing it – is always a conflict. If we succeed,
1361−the parents are both Alice's and Bob's heads, and the data is the merge
1362−base plus Alice's changed files plus Bob's changed files plus the merged
1363−files.
1364−
1365−A `%meld` merge will succeed even if there are conflicts. If there are
1366−conflicts in a file, then we use the merge base's version of that file,
1367−and we produce a set of files with conflicts. The parents are both
1368−Alice's and Bob's heads, and the data is the merge base plus Alice's
1369−changed files plus Bob's changed files plus the successfully merged
1370−files plus the merge base's version of the conflicting files.
1371−
1372−`%auto` - meta-strategy. Check to see if Bob's desk exists, and if it
1373−doesn't we use an `%init` merge. Otherwise, we progressively try
1374−`%fine`, `%meet`, and `%mate` until one succeeds. If none succeed, we
1375−merge Bob's desk into a scratch desk. Then, we merge Alice's desk into
1376−the scratch desk with the `%meld` option to force the merge. Finally, we
1377−annotate any conflicts, if we know how.
1352+See [@/docs/tutorials/arvo/clay.md#merge-strategies](Clay merge strategies).
13781353
13791354### Manipulation
13801355
content/voting-instructions.md+8−8
@@ -5,11 +5,11 @@ template = "page_indiced.html"
55hidetitle = "true"
66+++
77
8−## Arvo Stability Vote
8+## Urbit Continuity & Security Vote
99
10−As a galaxy owner, you have the opportunity to participate in one of the first votes conducted on the Azimuth network – a vote on whether Tlon has designated Arvo as stable, the second component in the [roadmap](https://github.com/urbit/azimuth/blob/master/proposals/0xcb1f81e42b5e75f000f94fc71a3ea70cab4bfc6f236b91e717f1b9516e5596b5.txt) embedded in Azimuth.
10+As a galaxy owner, you have the opportunity to participate in one of the first votes conducted on the Azimuth network – a vote on whether Tlon has designated the Urbit network as continuous and confirmed to be secure by a third-party auditer, the third component in the [roadmap](https://github.com/urbit/azimuth/blob/master/proposals/0xcb1f81e42b5e75f000f94fc71a3ea70cab4bfc6f236b91e717f1b9516e5596b5.txt) embedded in Azimuth.
1111
12−You can read more about this milestone [here](/blog/stable-arvo/).
12+You can read more about this milestone [here](/blog/security-and-continuity/).
1313
1414Below are instructions on how to support this document proposal.
1515
@@ -18,19 +18,19 @@ Below are instructions on how to support this document proposal.
1818- Log into [Bridge](https://bridge.urbit.org) with your Voting Proxy (you can use your Ownership Key as well, but that is probably harder to access)
1919- If you're presented with a list of assets, click on your galaxy.
2020- On the asset's overview screen, click Senate.
21−- The page will show a list of the documents that have previously achieved majority, as well as currently open polls. Tlon's latest proposal has the hash of `0x00000000000000000000000000000000000000000000000000000000000000a0`.
22−- For more information on the text of this proposal, see [here](https://github.com/urbit/azimuth/pull/24).
21+- The page will show a list of the documents that have previously achieved majority, as well as currently open polls. Tlon's latest proposal has the hash of `0x00000000000000000000000000000000000000000000000000000000000000e0`.
22+- For more information on the text of this proposal, see [here](https://github.com/urbit/azimuth/pull/34).
2323- Click "support" or "reject" under the hash, then "generate & sign transaction", then "send transaction", to vote on the proposal.
2424- If this proposal achieves majority support, you can see the result by coming back to this page.
2525
2626## Vote using Etherscan (or other explorers)
2727
28−- Read the document being proposed [here](https://github.com/urbit/azimuth/pull/24).
28+- Read the document being proposed [here](https://github.com/urbit/azimuth/pull/34).
2929- If you're going to use Etherscan, you need to have Metamask installed and authenticate with either your Voting Proxy or your Ownership Key.
30−- Create and sign a transaction using your Galaxy Ownership or Voting Proxy on the [Polls contract](https://etherscan.io/address/0x7fecab617c868bb5996d99d95200d2fa708218e4#writeContract) in castDocumentVote with your galaxy number, the document hash from the above document (`0x00000000000000000000000000000000000000000000000000000000000000a0`) and vote as "true" for yes and "false" for no.
30+- Create and sign a transaction using your Galaxy Ownership or Voting Proxy on the [Polls contract](https://etherscan.io/address/0x7fecab617c868bb5996d99d95200d2fa708218e4#writeContract) in castDocumentVote with your galaxy number, the document hash from the above document (`0x00000000000000000000000000000000000000000000000000000000000000e0`) and vote as "true" for yes and "false" for no.
3131- Submit the transaction.
3232
3333## Verify that this proposal has passed
3434
35−- The Polls contract is [here](https://etherscan.io/dapp/0x7fecab617c868bb5996d99d95200d2fa708218e4#readContract). Input the hash (`0x00000000000000000000000000000000000000000000000000000000000000a0`) into "documentHasAchievedMajority." If this returns "true," it means the proposal was passed by the galactic senate.
35+- The Polls contract is [here](https://etherscan.io/dapp/0x7fecab617c868bb5996d99d95200d2fa708218e4#readContract). Input the hash (`0x00000000000000000000000000000000000000000000000000000000000000e0`) into "documentHasAchievedMajority." If this returns "true," it means the proposal was passed by the galactic senate.
3636- If desired, you can verify the above is in fact the real Polls contract by checking "polls" [here](https://etherscan.io/dapp/ecliptic.eth#readContract).
static/_redirects+2
@@ -8,3 +8,5 @@
88/docs/arvo/internals/ /docs/tutorials/arvo/ 301!
99/primer /understanding-urbit/ 301!
1010/install /using/install 301!
11+/install/mac/latest http://github.com/urbit/urbit/releases/latest/download/darwin.tgz
12+/install/linux64/latest http://github.com/urbit/urbit/releases/latest/download/linux64.tgz
templates/index.html+4−1
@@ -19,10 +19,13 @@
1919 <meta name="description" content="Urbit is a simple, durable system for running a personal server that you own 100% and forever.">
2020{% endblock description %}
2121{% block content %}
22+<header class="full ph4 full-bleed-banner f9" style="background-color: #ffc700;">
23+ <p>A network-wide breach has happened. You may need to take action. Please visit <a class="bb" href="/breach">urbit.org/breach</a> for more information.</p>
24+</header>
2225
2326<section class="full lh-copy c2-7-md c3-7-lg mt6 mb6">
2427 <p class="mt0 mb4"><strong>Urbit</strong> is a clean-slate OS and network for the 21st century.</p>
25− <p><strong>Urbit OS</strong> is a reimagining of the operating system as an 'overlay OS.'</p>
28+ <p><strong>Urbit OS</strong> is a reimagining of the operating system as an ‘overlay OS.’</p>
2629 <p class="mb4">It's a compact system for an individual to run their own permanent personal server on any Unix machine with an internet connection.</p>
2730 <p class="mb4"><strong>Urbit ID</strong> is a decentralized digital identity system. Your
2831 Urbit ID is a username, network address, and crypto wallet.</p>
templates/understanding-urbit/list.html+1−1
@@ -58,7 +58,7 @@
5858 <p class="full mt0 mb4 mb4-xl lh-copy">We want Urbit to be a single, simple interface for your whole digital life.</p>
5959 <img class="full ba mb4" src="https://media.urbit.org/site/understanding-urbit/uu-intro-4.png"/>
6060 <p class="full mt0 mb4 mb4-xl lh-copy">Over the years, Urbit has been built in public as an open source project. Anyone can <a class="bb" href="/using/install/">join the network</a> and check out what we’re up to. It’s a bit like signing on to IRC in the early 90s. </p>
61− <p class="full mt0 mb4 mb4-xl lh-copy">In early 2020, we’ll release Urbit OS 1: a minimal interface for group communication, and our first complete interface. OS 1 is a tool to chat, share notes and links, and stay connected. </p>
61+ <p class="full mt0 mb4 mb4-xl lh-copy">In early 2020, we released Urbit OS 1: a minimal interface for group communication, and our first complete interface. OS 1 is a tool to chat, share notes and links, and stay connected. </p>
6262 <p class="full mt0 mb4 mb4-xl lh-copy">OS 1 is the first step toward a truly complete OS for a networked world. </p>
6363 <p class="full mt0 mb4 mb4-xl lh-copy">Over time, Urbit will grow into a system that can bring together all our different modes of communicating: chat, payments, documents, images, biometric data. We want individuals and their communities to be able to both control their software in fact, through the source code, and in action, through a simple interface.</p>
6464 <p class="full mt0 mb4 mb4-xl lh-copy">We want to leave behind a world of apps and services for one where we can bring everything together in one place. And, in doing so, ordinary users can create customized digital environments for their friends and communities.</p>