# M10 session protocol, version 4 Version 4 is [version 3](session-v3.md) plus two server-to-client stream messages, two close reasons and a ghost marker kind, for cross-region handoff (ADR-0096). Everything else is as in v3. The header version is 4. Versions 1-3 were deployed to evolution-dev and are frozen; all three are refused (`unsupported_version`). Once v4 is deployed it is frozen like them. ## Messages (in addition to v3 types 1-15) | Type | Direction | Body | Bytes | |---|---|---|---| | 16 HandoffOffer | server -> client, stream | transfer id (16), destination address, ticket (160) | 312 | | 17 SessionRedirect | server -> client, stream | owner address | 136 | An address is: region u64 (nonzero), endpoint (64 bytes), server name (64 bytes). Each text field is 1-64 printable ASCII characters without spaces (0x21-0x7E), padded with zero bytes. A nonzero byte after the first zero is invalid, and the transfer id must be nonzero. - **HandoffOffer**, while established: the session's probe crossed into the destination region. The ticket ([handoff-ticket-v1](handoff-ticket-v1.md)) goes in `Hello`'s grant slot there. The source then sends `Close(handed_off)`. - **SessionRedirect**, before Welcome: the account's probe is owned by that region. A grant for it is needed there. The region then sends `Close(moved)`. ## Close reasons (in addition to v3's 1-13) - **14 handed_off:** the session ended because its probe crossed into another region. - **15 moved:** the account's probe is owned by another region; a Redirect may precede it. ## Snapshot records Marker upsert (kind 5): the `own` byte becomes a kind. - **0:** another session's marker. - **1:** the receiving session's own marker (sequence and area follow). - **2:** a ghost, a probe being handed to this region, read-only, with no sequence or area. Any other value is malformed.