Add phone number addressing proposal#145
Conversation
hannobraun
left a comment
There was a problem hiding this comment.
Just gave the proposal a quick read, and I think it's a stroke of genius! Having networks that can move to other networks is really neat, and this
Under Phone Number Addressing, these concepts are all merged, meaning that a specific address now always refers to a socket.
blew my mind! 🤯
Should work for IPv6 too, though I'm sure that would break all kinds of assumptions at all the layers.
(Despite my enthusiastic response, I'd like to note that I haven't understood this at a deep enough level yet, so I can't say how well it would work in practice.)
Anyway, I found a few minor issues in the document and left comments.
| An Apex entity is able to use the entire 32-bit address space as it sees fit, as it has no upstream network that it needs to "fit within". However, Apex entities may still want to be conservative in how they use this space for two reasons: | ||
|
|
||
| 1. The existence as an "Apex" may be temporary, if they later join a network as a "downstream" or "child" entity | ||
| 2. The smaller addresses uses, the more compact they will be when transmitting. |
There was a problem hiding this comment.
| 2. The smaller addresses uses, the more compact they will be when transmitting. | |
| 2. The smaller the addresses they use, the more compact those will be when transmitting. |
| 1. The existence as an "Apex" may be temporary, if they later join a network as a "downstream" or "child" entity | ||
| 2. The smaller addresses uses, the more compact they will be when transmitting. | ||
|
|
||
| Currently, it is suggested that Apex entity make a best guess at the maximum address space needed for all downstream entities, including its own local sockets. |
There was a problem hiding this comment.
| Currently, it is suggested that Apex entity make a best guess at the maximum address space needed for all downstream entities, including its own local sockets. | |
| Currently, it is suggested that Apex entities make a best guess at the maximum address space needed for all downstream entities, including their own local sockets. |
|
|
||
| ### Downstream Entities | ||
|
|
||
| Devices that are connected to another device are referred to as "Downstream" entities. They may be directly connected to an Apex entity, or to another Downstream entity with or more "hops" to the Apex entity. |
There was a problem hiding this comment.
| Devices that are connected to another device are referred to as "Downstream" entities. They may be directly connected to an Apex entity, or to another Downstream entity with or more "hops" to the Apex entity. | |
| Devices that are connected to another device are referred to as "Downstream" entities. They may be directly connected to an Apex entity, or to another Downstream entity with one or more "hops" to the Apex entity. |
|
|
||
| ## Any/All messages | ||
|
|
||
| In the previous system, port `0` was reserved as the "Any" port, which ergot would attempt to find a single port that matched the requested characteristics. Port `255` was reserved as the "All" port, which ergot would flood to all sockets and interfaces, except for the source interface, until the TTL was consumed. |
There was a problem hiding this comment.
which ergot would attempt to find a single port that matched the requested characteristics.
I can tell that the grammar here is not right, but not knowing how the previous system works, I'm not sure how to correct it.
| As descrived, this generally requires: | ||
|
|
||
| 1. All devices know their own range (e.g. E's socket knows it is `03^6`) | ||
| 2. The profile of a device knows it's parents range, and it's own offset in that range (e.g. E's profile knows it is 180^9, so its socket is `183^9` |
There was a problem hiding this comment.
| 2. The profile of a device knows it's parents range, and it's own offset in that range (e.g. E's profile knows it is 180^9, so its socket is `183^9` | |
| 2. The profile of a device knows its parent's range, and its own offset in that range (e.g. E's profile knows it is 180^9, so its socket is `183^9` |
Seed routes and bus node_id claims had independent but near-identical lease lifecycles (active/tombstone state, expiry→tombstone GC, token-checked refresh with extend+rotate, grace anchored to expiration). Extract that lifecycle into a representation-agnostic LeaseKind + LeaseTable<K, X>, so it is written once and both tables reuse it. The key type K is the leased value: an assigned net_id (u16) for seed routes, a node_id (u8) for claims. This is also the seam for phone-number addressing (jamesmunns#145): the tree's parent→child allocation is the same lease lifecycle with K becoming an address range, so only K and the wire format change, not the machinery. - LeaseKind::{active,is_active,gc_retain,refresh}; LeaseTable::{gc, contains_key,by_key,get,get_mut,push} - seed_routes: LeaseTable<u16,u8,S> (extra=via_ident); node_claims: LeaseTable<u8,u64,C> (extra=nonce) - Unify refresh lookup to (key, scope) for both. Behaviour change: a seed refresh from the wrong source_net now returns UnknownNetId rather than BadRequest (the lease simply isn't found for that requester); test updated - No functional change otherwise; all 115 tests pass
Mirror how seed routing is documented (book feature + notes design record): - notes/2026-06-01-bus-address-claim.md: design record — the central-arbiter choice and why it beats AppleTalk-style probing given a router, the one-router-per-segment assumption, the claim/lease/refresh/tombstone lifecycle, net_id reuse, the shared LeaseTable<K>, threat model, and the phone-number-addressing (jamesmunns#145) seam - book/_02 Major Concepts: note how Node IDs are claimed on a bus segment - book/_03 Feature Overview: new "Shared bus segment" topology under Connectivity-Now, and update the "Soon" RS-485/Radio bullet (Node ID addressing is now provided by the claim protocol)
A work in progress proposal to discuss Phone Number Addressing