2 Commits

Author SHA1 Message Date
Shokunin a069f1ca0c Netplay rb: followers apply the dual-initiation tie-break
With three or more seats two guests can mispredict the same tick and both
BEGIN. The tie-break (lower initiator slot wins) ran only on initiators,
so a follower followed whichever BEGIN arrived first and stashed the rest.
On a 4-seat WAN race the host followed slot 3's epoch while slot 1's won;
the seats split across epochs, each waited for baselines that never came,
and the match ended after 20 s at rb_baseline.

The epoch id names its initiator, so a follower now applies the same rule
to the episode it follows (netplay_rb_concurrent_begin): yield during the
handshake and follow the winner, or drop the loser's BEGIN. A follower
seeing a new epoch from the initiator it already follows (abort and
reopen, the only case two seats can produce) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:31:47 -07:00
Shokunin 1633ecf1d0 Netplay rb: per-seat peer frontier; retire a healed fork cap
Two rollback bookkeeping bugs that only show with more than two seats
over a real link:

- g_peer_resolved_through took the highest RESOLVED from any peer. With
  three seats the fastest follower stood in for the others, so the host
  opened loads past the slower followers' frontiers (3P WAN: load 2400 vs
  frontiers 2344 and 2319); every follower refused, episodes aborted and
  the session diverged at 2496 before the race started. Adverts are now
  kept per seat (netplay_peer_frontier.h) and the lowest across the
  peer roster is the frontier.

- The §55 bisect cap (next load < L after a baseline mismatch at L) was
  only cleared by an episode commit. An abort followed by a Live heal
  left it armed for the rest of the session; once its loads left the
  snapshot ring every episode was refused with "no confirmed snap"
  (4P WAN: cap 1928, agreed 3136, ring 2656..3166) and a later fork at
  3150 was never repaired. A live hash-confirmed agreed ADVANCE at or past
  the cap now retires it.

Bumps lib/recomp-net for RB_RESOLVED sender attribution and rb_* queue
retransmit coalescing (RetroPortingToolKit/recomp-net fix/rb-ctrl-queue-dedupe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:54:57 -07:00