smp server: fix handshake compatibility by moving server info to SMP v21 - #1845
Merged
Conversation
ed-asriyan
force-pushed
the
smp-server-info-fix
branch
from
August 8, 2026 03:10
2d0ecc0 to
cd634c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
private routing
server master -> server 7.0.0.6fails during the transport handshake:Root cause
serverInfoSMPVersionwas defined asVersionSMP 20, the same version already released asnamesSMPVersion(public namespaces resolver, #1784). This made a v20 handshake ambiguous on the wire:serverInfofield.serverInfothat isn't thereThe issue appeared since 62e39ae - rewrote the
SMPServerHandshakeparser from(fmap unLarge <$> smpP) <|> pure NothingtounLarge <$$> smpP, dropping the<|> pure Nothingfallback that had been masking the collision.Fix
Give server info its own protocol version instead of overlapped v20:
serverInfoSMPVersion→VersionSMP 21currentClientSMPRelayVersion/currentServerSMPRelayVersion→ 21With
serverInfoSMPVersion = 21,ifHasServerInfois false for a v20 handshake, so the parser never looks forserverInfo