core: drop agent versions in simplexmq (#7360)

* core: adapt to dropped agent versions

* refactor

* remove comments

* api types, protocol tests

* fix test

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
shandEvgeny Poberezkin authored and GitHub committed 2026-08-18 22:50:59 +01:00
1 parent 1160215570
commit cbfdf63f4b
12 files changed
+33 -34

No files matched your search

+4 -6
View File
@@ -50,7 +50,7 @@ import Simplex.FileTransfer.Server.Store
import Simplex.FileTransfer.Transport (alpnSupportedXFTPhandshakes, supportedFileServerVRange)
import Simplex.Messaging.Agent (disposeAgentClient)
import Simplex.Messaging.Agent.Env.SQLite
import Simplex.Messaging.Agent.Protocol (duplexHandshakeSMPAgentVersion, pqdrSMPAgentVersion, supportedSMPAgentVRange)
import Simplex.Messaging.Agent.Protocol (supportedSMPAgentVRange)
import Simplex.Messaging.Agent.RetryInterval
import Simplex.Messaging.Agent.Store.Entity (SDBStored (..))
import Simplex.Messaging.Agent.Store.Interface (closeDBStore)
@@ -58,8 +58,6 @@ import Simplex.Messaging.Agent.Store.Shared (MigrationConfig (..), MigrationConf
import qualified Simplex.Messaging.Agent.Store.DB as DB
import Simplex.Messaging.Client (ProtocolClientConfig (..))
import Simplex.Messaging.Client.Agent (defaultSMPClientAgentConfig)
import Simplex.Messaging.Crypto.Ratchet (supportedE2EEncryptVRange)
import qualified Simplex.Messaging.Crypto.Ratchet as CR
import Simplex.Messaging.Protocol (ProtocolType (..))
import Simplex.Messaging.Server (runSMPServerBlocking)
import Simplex.Messaging.Server.Env.STM (ServerConfig (..), ServerStoreCfg (..), StartOptions (..), StorePaths (..), defaultMessageExpiration, defaultIdleQueueInterval, defaultNtfExpiration, defaultInactiveClientExpiration)
@@ -234,7 +232,7 @@ testAgentCfgVPrev =
testAgentCfg
{ smpClientVRange = prevRange $ smpClientVRange testAgentCfg,
smpAgentVRange = prevRange supportedSMPAgentVRange,
e2eEncryptVRange = prevRange supportedE2EEncryptVRange,
-- e2eEncryptVRange = prevRange supportedE2EEncryptVRange,
smpCfg = (smpCfg testAgentCfg) {serverVRange = prevRange $ serverVRange $ smpCfg testAgentCfg}
}
@@ -242,8 +240,8 @@ testAgentCfgV1 :: AgentConfig
testAgentCfgV1 =
testAgentCfg
{ smpClientVRange = v1Range,
smpAgentVRange = mkVersionRange duplexHandshakeSMPAgentVersion pqdrSMPAgentVersion,
e2eEncryptVRange = mkVersionRange CR.kdfX3DHE2EEncryptVersion CR.pqRatchetE2EEncryptVersion,
smpAgentVRange = versionToRange (Version 6),
e2eEncryptVRange = versionToRange(Version 3),
smpCfg = (smpCfg testAgentCfg) {serverVRange = versionToRange minClientSMPRelayVersion}
}