[experimental] replace static peer endpoints with signed identity tokens
maceip opened ·
## summary exploration to replace static peer endpoints with signed identity tokens as the primary peer endpoint selection method, while keeping the existing bucket-based ownership model intact.
## what changed - added identity token and transport-hint fields to node lease metadata in [crates/logic/lib.rs](https://github.com/maceip/celld-fabric/blob/main/crates/logic/lib.rs) and [crates/celld/ownership_store.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/ownership_store.rs) - added staged peer transport policy support: - locator identity preference in [crates/logic/lib.rs](https://github.com/maceip/celld-fabric/blob/main/crates/logic/lib.rs) and [crates/celld/main.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/main.rs) - relay token and alias preference in [crates/logic/lib.rs](https://github.com/maceip/celld-fabric/blob/main/crates/logic/lib.rs), [crates/celld/peer_transport.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/peer_transport.rs), and [crates/celld/main.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/main.rs) - quic capability url preference in [crates/logic/lib.rs](https://github.com/maceip/celld-fabric/blob/main/crates/logic/lib.rs), [crates/celld/peer_transport.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/peer_transport.rs), and [crates/celld/main.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/main.rs) - commitment lookup preference in [crates/celld/peer_transport.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/peer_transport.rs) and [crates/celld/main.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/main.rs) - added peer transport resolver logic in core runtime and dispatch paths in [crates/celld/peer_transport.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/peer_transport.rs) and [crates/celld/main.rs](https://github.com/maceip/celld-fabric/blob/main/crates/celld/main.rs) - documented staged behavior and new env vars in [docs/README.md](https://github.com/maceip/celld-fabric/blob/main/docs/README.md) - added a local-only fabric dev harness and deployable example projects in [dev-harness/fabric/README.md](https://github.com/maceip/celld-fabric/blob/main/dev-harness/fabric/README.md), [dev-harness/fabric/examples/README.md](https://github.com/maceip/celld-fabric/blob/main/dev-harness/fabric/examples/README.md), and [dev-harness/fabric/examples](https://github.com/maceip/celld-fabric/blob/main/dev-harness/fabric/examples) - updated the root readme to describe identity-based peer endpoint selection in [README.md](https://github.com/maceip/celld-fabric/blob/main/README.md) ## why tho reverse dns and static IPs (that we get for free from aws) are location labels, not identity: they can be reassigned, changed, or cached stale, so the same ip↔hostname pair can point to a different machine over time. TLS endpoint trust is tied to hostname/cert binding, so when addresses churn, host-based verification tracks routing details instead of a durable peer identity, increasing ambiguity in who is actually at the other end.
## rollout plan - start with preferred modes that keep fallback behavior - validate mixed-fleet behavior and failure handling - move to stricter modes only after token coverage is complete
## notes this is not a full network rewrite. it is a compatibility-first change to peer endpoint selection that reduces direct dependence on bare ip:port in the normal path. the beauty in using s3 for the control plane & universal façade was motivation in using DNS similarly
- MA
> 协议选型理由能展开说说吗 🚀⚙️😄
the lazyman will use ip;:host as it's `free` from cloud. celld knows this and is loud about it, and also smartly punts on client <> server authn; as a result TLS is challenged. So how can we try to address this? what do pkar, scuttlebutt, dat, etcd, k8s, mtls, vellid, ipfs do? there's no shortage of smart solutions out there, some of them even ietf standards.
but why epochdns? why peer routing ? why quic? I was looking for a universal facade to support celld with server to server state transitions and identity: so we have SMTP, DNS, Newsgroups, Certificate Transparency, Ethereum.. but DNS just felt right so I set out to "abuse" it in the right ways and account for TTL lag, envelope size restrictions, and here we are