From cd634c15abf79542588525f97fcdc4a151d5f0ab Mon Sep 17 00:00:00 2001 From: Ed Asriyan Date: Sat, 8 Aug 2026 02:46:57 +0000 Subject: [PATCH] smp server: fix handshake compatibility by moving server info to SMP v21 --- protocol/simplex-messaging.md | 3 ++- src/Simplex/Messaging/Transport.hs | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/protocol/simplex-messaging.md b/protocol/simplex-messaging.md index 872b35afe..be7bd448f 100644 --- a/protocol/simplex-messaging.md +++ b/protocol/simplex-messaging.md @@ -1,4 +1,4 @@ -Version 20, 2026-05-25 +Version 21, 2026-07-05 # Simplex Messaging Protocol (SMP) @@ -107,6 +107,7 @@ This document describes SMP protocol version 20. Versions 1-5 are discontinued. - v18: support client notices in BLOCKED error - v19: service subscriptions to messages (SUBS, NSUBS, SOKS, ENDS, ALLS commands) - v20: public namespaces resolver (RSLV command, RNAME response) — direct or forwarded via PFWD +- v21: server public information in handshake ## Introduction diff --git a/src/Simplex/Messaging/Transport.hs b/src/Simplex/Messaging/Transport.hs index aef23ae9f..9c9392c21 100644 --- a/src/Simplex/Messaging/Transport.hs +++ b/src/Simplex/Messaging/Transport.hs @@ -169,7 +169,8 @@ smpBlockSize = 16384 -- 17 - create notification credentials with NEW (7/12/2025) -- 18 - support client notices (10/10/2025) -- 19 - service subscriptions to messages (10/20/2025) --- 20 - server public information in handshake (7/5/2026) +-- 20 - public namespaces resolver, RSLV command (6/20/2026) +-- 21 - server public information in handshake (7/5/2026) data SMPVersion @@ -204,7 +205,7 @@ namesSMPVersion :: VersionSMP namesSMPVersion = VersionSMP 20 serverInfoSMPVersion :: VersionSMP -serverInfoSMPVersion = VersionSMP 20 +serverInfoSMPVersion = VersionSMP 21 minClientSMPRelayVersion :: VersionSMP minClientSMPRelayVersion = VersionSMP 14 @@ -213,10 +214,10 @@ minServerSMPRelayVersion :: VersionSMP minServerSMPRelayVersion = VersionSMP 14 currentClientSMPRelayVersion :: VersionSMP -currentClientSMPRelayVersion = VersionSMP 20 +currentClientSMPRelayVersion = VersionSMP 21 currentServerSMPRelayVersion :: VersionSMP -currentServerSMPRelayVersion = VersionSMP 20 +currentServerSMPRelayVersion = VersionSMP 21 -- Max SMP protocol version to be used in e2e encrypted connection between -- client and server, as defined by SMP proxy. Normally set below the current