Skip to content

smp server: fix handshake compatibility by moving server info to SMP v21 - #1845

Merged
epoberezkin merged 1 commit into
masterfrom
smp-server-info-fix
Aug 8, 2026
Merged

smp server: fix handshake compatibility by moving server info to SMP v21#1845
epoberezkin merged 1 commit into
masterfrom
smp-server-info-fix

Conversation

@ed-asriyan

Copy link
Copy Markdown
Member

Problem

private routing server master -> server 7.0.0.6 fails during the transport handshake:

Forwarding server: smp://…@localhost:5223
Error: TRANSPORT {transportErr = TEHandshake {handshakeErr = PARSE}}

Root cause

serverInfoSMPVersion was defined as VersionSMP 20, the same version already released as namesSMPVersion (public namespaces resolver, #1784). This made a v20 handshake ambiguous on the wire:

  • Released v20 (namespaces) servers advertise max version 20 but send no serverInfo field.
  • Server expects serverInfo that isn't there

The issue appeared since 62e39ae - rewrote the SMPServerHandshake parser from (fmap unLarge <$> smpP) <|> pure Nothing to unLarge <$$> smpP, dropping the <|> pure Nothing fallback that had been masking the collision.

Fix

Give server info its own protocol version instead of overlapped v20:

  • serverInfoSMPVersionVersionSMP 21
  • currentClientSMPRelayVersion / currentServerSMPRelayVersion → 21

With serverInfoSMPVersion = 21, ifHasServerInfo is false for a v20 handshake, so the parser never looks for serverInfo

@ed-asriyan
ed-asriyan force-pushed the smp-server-info-fix branch from 2d0ecc0 to cd634c1 Compare August 8, 2026 03:10
@epoberezkin
epoberezkin merged commit e3d5342 into master Aug 8, 2026
9 of 18 checks passed
@epoberezkin
epoberezkin deleted the smp-server-info-fix branch August 8, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants