Add M10.8b signed handoff tickets and ticket admission
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (client) (push) Successful in 12m40s
Foundation / checks (postgres) (push) Canceled after 4s
Foundation / checks (network) (push) Successful in 12m53s
Foundation / checks (tsan) (push) Successful in 7m55s
Foundation / checks (checks) (push) Successful in 31m47s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (client) (push) Successful in 12m40s
Foundation / checks (postgres) (push) Canceled after 4s
Foundation / checks (network) (push) Successful in 12m53s
Foundation / checks (tsan) (push) Successful in 7m55s
Foundation / checks (checks) (push) Successful in 31m47s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
ADR-0096. A source region's handoff key signs a 160-byte ticket for one probe transfer, account and destination; it rides the Hello grant slot and is verified against neighbour keys bound to their regions. SessionControl admits a ticket once per region, superseding like a grant, with the session ending at the client's original grant expiry. RegionSessions makes the destination's durable step first: PostgresHandoffLedger stages and commits the transfer and moves the account's control, idempotently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -535,8 +535,9 @@ traces done (networking/M10_PREDICTION_TRACES.md). 10.7 split (ADR-0095): 10.7a
|
||||
remote-marker interpolation and fractional prediction done; 10.7b client wiring, stale loss
|
||||
view and two-client interpolation traces done. 10.8 split (ADR-0096, the persistence
|
||||
handoff ADR; EXPERIMENT durable probe records): 10.8a schema v12 probe records and the
|
||||
transfer state machine with a PostgreSQL fault matrix done; 10.8b handoff tickets, 10.8c
|
||||
region wiring and 10.8d two-process kill tests follow. 10.9 planned.
|
||||
transfer state machine with a PostgreSQL fault matrix done; 10.8b signed handoff tickets and
|
||||
ticket admission (durable stage, commit and control move) done; 10.8c region wiring and 10.8d
|
||||
two-process kill tests follow. 10.9 planned.
|
||||
|
||||
**Entry:** M9 client/session evidence and M7/M8 dev/stage durability. Read
|
||||
NETWORK_ARCHITECTURE, PERSISTENCE_ARCHITECTURE and ADR-0017. The M9 transport is
|
||||
|
||||
+5
-1
@@ -72,7 +72,11 @@ within about 0.1 m of the true path, and outages show stale. M10.7 is complete.
|
||||
|
||||
A PostgreSQL fault matrix covers restarts at each transition, stale epochs, aborts,
|
||||
partitions and commit/abort races, checking a unique owner and the conserved test inventory.
|
||||
Deploying v12 needs a rebuilt migrations image. Next: 10.8b handoff tickets.
|
||||
Deploying v12 needs a rebuilt migrations image. M10.8b adds signed handoff tickets. A source
|
||||
region's key signs one transfer for one account and destination; the ticket rides the Hello
|
||||
grant slot and is verified against the neighbour keys registered here. The destination then
|
||||
durably stages and commits the transfer and takes the account's control before admitting
|
||||
the session. Next: 10.8c region wiring (edge crossing, ghost, client switch).
|
||||
|
||||
## Previous gate - 2026-10-02
|
||||
|
||||
|
||||
@@ -114,3 +114,32 @@ controllable before M11.
|
||||
The dev migrations image must be rebuilt (the v10 lesson).
|
||||
- A probe's durable position can lag its in-memory position by up to a session:
|
||||
presentation-only state, never biological.
|
||||
|
||||
## M10.8b tickets and ticket admission (2026-10-06)
|
||||
- **Ticket** ([handoff-ticket-v1](../../schemas/network/handoff-ticket-v1.md)): 160 bytes,
|
||||
the same as a grant, so it rides the `Hello` grant slot with no protocol change. Fields:
|
||||
- an "EVO-HANDOFF" marker, version, environment and key id;
|
||||
- the transfer id, account, world, frame, source and destination;
|
||||
- the ticket expiry (at most 120 s ahead) and the session expiry, copied from the
|
||||
client's grant at the source so a crossing never extends a session;
|
||||
- an ECDSA P-256 signature.
|
||||
|
||||
Each region has its own handoff key (`HandoffSigningKey`). A destination registers its
|
||||
neighbours' public keys, each bound to its source region (`HandoffVerifier`, at most
|
||||
32), and accepts a ticket only if the signing key belongs to the claimed source, the world
|
||||
and destination are its own, and the times hold. Grants and tickets never verify as each
|
||||
other.
|
||||
- **Admission.** `RegionSessions` routes a Hello by the ticket marker. A ticket is verified,
|
||||
then `SessionControl::check_handoff` runs: single use per region, the attempt counted,
|
||||
supersedes like a grant, serials untouched. Then the host's `HandoffLedger` makes it
|
||||
durable, and only then does the local `open_handoff` run. The session expiry is the
|
||||
ticket's, capped at the maximum grant lifetime from now. Renewal and release use the
|
||||
ControlLedger under the generation the handoff returned. A handoff ledger without a
|
||||
control ledger is a configuration error.
|
||||
- **PostgreSQL** (`PostgresHandoffLedger`): stage (under the current lease, again after a
|
||||
restart), commit, then `handoff_account_control`, all idempotent, so a retried login
|
||||
converges. Unknown, aborted, foreign-account, foreign-source or foreign-region transfers
|
||||
are refused (`unauthenticated`); a fenced lease gives `shutdown`; undecided gives
|
||||
`capacity`.
|
||||
- Not yet: the source side (freeze at the edge, prepare, release control, offer the ticket),
|
||||
the client switch, keys in evo-server and the dev tool (10.8c).
|
||||
|
||||
@@ -4726,3 +4726,44 @@ run's races ended 11 commits, 13 aborts.
|
||||
Not done:
|
||||
- tickets (10.8b), region wiring (10.8c) and two-process kills (10.8d);
|
||||
- deploying v12 (needs a rebuilt migrations image; a maintainer step).
|
||||
|
||||
## 2026-10-06 — M10.8b handoff tickets and admission (ADR-0096)
|
||||
|
||||
Implemented:
|
||||
- `HandoffSigningKey`, `HandoffVerifier`, `VerifiedHandoffTicket` and `HandoffLedger`
|
||||
(`include/evo/network/handoff_ticket.hpp`; schema `network/handoff-ticket-v1`);
|
||||
- `SessionControl::check_handoff` and `open_handoff`;
|
||||
- `RegionSessions` ticket admission (marker routing, neighbour keys, durable step first,
|
||||
shared session-opening tail);
|
||||
- `PostgresHandoffLedger` (stage, commit, `handoff_account_control`).
|
||||
|
||||
Tests:
|
||||
- `network_control`:
|
||||
- tickets round-trip; a flipped byte every 7 bytes is refused;
|
||||
- wrong source key, scope (world and destination), expiry, lifetime over 120 s, a session
|
||||
already ended, wrong environment, unknown key and invalid claims are all refused;
|
||||
- grants and tickets never verify as each other;
|
||||
- control: a ticket supersedes a grant session, replay is refused, the session expiry is
|
||||
capped, and later grants still open.
|
||||
- `quic_sessions` (loopback QUIC):
|
||||
- no keys: refused;
|
||||
- a handoff ledger without a control ledger: configuration error;
|
||||
- an admitted ticket: the durable step for the session Welcome names, the ticket's session
|
||||
expiry, renewal under the handoff's generation;
|
||||
- replay, another destination, and a refused or undecided durable step: refused
|
||||
(unauthenticated, wrong_scope, capacity).
|
||||
- `probe_handoff_store_tests` (PostgreSQL): the ledger admits and moves ownership and
|
||||
control; a retry converges; another account, an unknown or aborted transfer, and no lease
|
||||
are refused.
|
||||
|
||||
Executed:
|
||||
- **Linux GCC 14:** `postgres-check.sh` with QUIC: 21 suites (race run: 16 commits, 8
|
||||
aborts); preset `quic`: 4/4; `evo-network-tests` and `evo-quic-session-tests`.
|
||||
- **Linux Clang 19:** ASan/UBSan `evo-network-tests`; clang-tidy 19 on the ticket,
|
||||
session-control, region-sessions, ledger and test sources; clang-format 19.
|
||||
- **Windows MSVC 19.44:** preset `quic`: 4/4; `client-network`: 14/14 (built before the
|
||||
formatting pass, which changed whitespace only).
|
||||
|
||||
Not done:
|
||||
- the source side and the client switch (10.8c);
|
||||
- two-process kill tests (10.8d).
|
||||
|
||||
Reference in New Issue
Block a user