Add CultMesh authority lease checks

This commit is contained in:
Meta Vens 2026-05-20 01:49:18 +01:00
commit e5e993e7aa
7 changed files with 211 additions and 0 deletions

View file

@ -14,6 +14,7 @@ Namespace: `GameCult.Mesh`
- `CultMesh.CreatePeerCatalog()`
- `CultMesh.CreateVerseDiscoveryClient(...)`
- `CultMesh.CreatePeerExchangeClient(...)`
- `CultMesh.CreateAuthorityLeaseCatalog()`
- `CultMesh.CreateClient(...)`
- `CultMesh.ConnectClient(...)`
@ -66,6 +67,14 @@ upsert them into a local catalog.
Peer cards are discovery hints; authority still requires a valid lease or
signature for the target Verse.
### Authority Leases
`CultMeshAuthorityLease` grants one peer specific roles for a Verse, optionally
scoped to shard ids and bounded by time. `CultMeshAuthorityLeaseCatalog` checks
whether a peer card is authorized for a requested role and shard. This keeps
peer exchange separate from authority instead of letting contact gossip mutate
the world.
### Shard Authority
Each shard has one primary writer for now. Non-primary writes are rejected or