Space
The definition of a space, an account's namespace made of the node tree under a deterministic root node, with the owner as its permanent admin.

Part of Stem. This page defines space, space root and owner.

A space is the set of nodes owned by one account key, arranged as a tree under the space root, a node whose id every peer can derive from the key alone; the account key is the owner of the space and a permanent admin of everything in it.

An account is an Ed25519 key pair, as in Identity. Seen from the outside, that key is a name people follow and address. Seen from the inside, it is a namespace in which node ids are unique and a tree in which every node has a parent. Stem calls the namespace and the tree together a space, and names the space by the account's principal.

The space root

Every space has exactly one root node. Its creating Node blob is deterministic: signed by the owner with ts 0, kind space, no id, no parent, no name, and a heads target naming the owner's deterministic genesis Change (the same empty Change with ts 0 that HM24 uses for the home document). Ed25519 signatures are deterministic, so every device of the account produces the same bytes, and the CID of that blob is the root id. The bare URL hm://<owner> is an alias for hm://<owner>/<rootId>. Later Node blobs for the root carry that CID in id and still omit parent; every other node names a parent, and top-level nodes name the root id. Its state is a document whose attributes carry what HM24 split between the Profile blob and the home document's metadata (name, icon, description, alias, the site relationship) and whose blocks are the home page. Only the owner may sign Node blobs for the root. Every other node in the space descends from it, so a grant whose subject omits the node (meaning the root) covers the whole space, and the readers of the root are the members of the space. Other keys may create nodes anywhere below the root when they hold write on the parent; they set space to the owner and need no signature from the owner.

The owner

The owner is the account whose key is the space. The owner holds admin on the root by definition, with no grant and no revocation able to change that. Every chain of delegated authority in a space begins at the owner. An owner can be aliased to another account through the root's alias attribute, which is how key migration works, but ownership of the space itself never transfers.

Cross-space relationships

A node's parent is always in the same space. A node in one space refers to a node in another by a node reference, which is what links, comment targets and redirects use. Groups are not spaces: a Group is a blob owned by an account and has no tree. Open: whether a sub-space, a child node with its own key, is ever needed; Stem does not define one.

Where it is used

Today (HM24)

The protocol overview already says a space is "the namespace of documents that key owns: the same key, seen from the other side". What changes is the root: today the home document is the document at the empty path and the profile is a separate blob, and the two are merged by clients. The roadmap decided that home documents become profiles anchored at a fixed node id with a deterministic timestamp so that devices converge; Stem's deterministic root Node blob is that id.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime