refactor: extract messaging client into top-level messaging folder

Move messaging_client.nim and the delivery_service machinery (send/recv
services, processors, not_delivered_storage) out of waku/ and waku/node/
into a dedicated top-level messaging/ folder.

The delivery services are a messaging-layer concern built on top of the
node, not part of node core, so a sibling folder makes that boundary
explicit. Shared message types (waku/api/types) and the node-owned
subscription_manager are left in place to avoid churn on widely-imported
modules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ivan FB 2026-06-05 00:37:34 +02:00
parent 38d951a2fd
commit 18e17d2ddd
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270
18 changed files with 15 additions and 21 deletions

View File

@ -21,7 +21,7 @@ import stew/byteutils
import libp2p/crypto/crypto as libp2p_crypto
import waku/api/types
import waku/node/delivery_service/send_service
import messaging/delivery_service/send_service
import waku/waku_core/topics
import ./events

View File

@ -13,7 +13,7 @@ import stew/byteutils
import brokers/broker_context
import waku/events/message_events as waku_message_events
import waku/messaging_client
import messaging/messaging_client
import waku/waku_core/topics
import ./reliable_channel

View File

@ -1,7 +1,7 @@
{.push raises: [].}
import std/[tables, strutils, os], results, chronicles
import ../../../common/databases/db_sqlite, ../../../common/databases/common
import waku/common/databases/db_sqlite, waku/common/databases/common
logScope:
topics = "waku node delivery_service"

View File

@ -9,9 +9,7 @@
import results
import
../../../common/databases/db_sqlite,
../../../waku_core/message/message,
../../../node/delivery_service/not_delivered_storage/migrations
waku/common/databases/db_sqlite, waku/waku_core/message/message, ./migrations
const NotDeliveredMessagesDbUrl = "not-delivered-messages.db"

View File

@ -1,14 +1,10 @@
import results, chronos
import chronicles
import
./api/types,
./node/[
waku_node,
subscription_manager,
delivery_service/recv_service,
delivery_service/send_service,
delivery_service/send_service/delivery_task,
]
waku/api/types,
waku/node/[waku_node, subscription_manager],
messaging/delivery_service/[recv_service, send_service],
messaging/delivery_service/send_service/delivery_task
type MessagingClient* = ref object
node: WakuNode

View File

@ -6,7 +6,8 @@ import libp2p/[peerid, peerinfo, crypto/crypto]
import brokers/broker_context
import ../testlib/[common, wakucore, wakunode, testasync]
import ../waku_archive/archive_utils
import waku/messaging_client
import messaging/messaging_client
import messaging/delivery_service/recv_service
import
waku,
@ -17,7 +18,6 @@ import
waku_relay/protocol,
waku_archive,
waku_archive/common as archive_common,
node/delivery_service/recv_service,
]
import waku/factory/waku_conf
import tools/confutils/cli_args

View File

@ -5,7 +5,7 @@ import chronos, testutils/unittests, stew/byteutils
import libp2p/[peerid, peerinfo, multiaddress, crypto/crypto]
import brokers/broker_context
import ../testlib/[common, wakucore, wakunode, testasync]
import waku/messaging_client
import messaging/messaging_client
import
waku,

View File

@ -15,7 +15,6 @@ import
node/health_monitor/protocol_health,
node/health_monitor/topic_health,
node/health_monitor/node_health_monitor,
messaging_client,
node/waku_node/relay,
node/waku_node/store,
node/waku_node/lightpush,
@ -27,6 +26,7 @@ import
import ../testlib/[wakunode, wakucore], ../waku_archive/archive_utils
import waku/node/subscription_manager
import messaging/messaging_client
const MockDLow = 4 # Mocked GossipSub DLow value

View File

@ -1,9 +1,9 @@
import chronicles, chronos, results
import waku/factory/waku
import waku/messaging_client
import messaging/messaging_client
import waku/[requests/health_requests, waku_core, waku_node]
import waku/node/delivery_service/send_service
import messaging/delivery_service/send_service
import waku/node/subscription_manager
import libp2p/peerid
import ../../tools/confutils/cli_args

View File

@ -30,7 +30,6 @@ import
waku_enr/sharding,
waku_enr/multiaddr,
api/types,
messaging_client,
common/logging,
node/peer_manager,
node/health_monitor,
@ -50,6 +49,7 @@ import
persistency/persistency,
],
channels/reliable_channel_manager,
messaging/messaging_client,
./waku_conf,
./waku_state_info