chore: flatten waku v2 protocols folder

This commit is contained in:
Lorenzo Delgado 2023-04-18 15:22:10 +02:00 committed by GitHub
parent 111dc1ad19
commit cc85f7f213
183 changed files with 320 additions and 323 deletions

View File

@ -23,12 +23,12 @@ import libp2p/[switch, # manage transports, a single entry poi
protocols/secure/secio, # define the protocol of secure input / output, allows encrypted communication that uses public keys to validate signed messages instead of a certificate authority like in TLS protocols/secure/secio, # define the protocol of secure input / output, allows encrypted communication that uses public keys to validate signed messages instead of a certificate authority like in TLS
nameresolving/dnsresolver]# define DNS resolution nameresolving/dnsresolver]# define DNS resolution
import import
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_lightpush, ../../waku/v2/waku_lightpush,
../../waku/v2/protocol/waku_lightpush/rpc, ../../waku/v2/waku_lightpush/rpc,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v2/protocol/waku_dnsdisc, ../../waku/v2/waku_dnsdisc,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_metrics, ../../waku/v2/node/waku_metrics,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
@ -43,7 +43,7 @@ when defined(rln):
libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/rpc/messages,
libp2p/protocols/pubsub/pubsub libp2p/protocols/pubsub/pubsub
import import
../../waku/v2/protocol/waku_rln_relay ../../waku/v2/waku_rln_relay
const Help = """ const Help = """
Commands: /[?|help|connect|nick|exit] Commands: /[?|help|connect|nick|exit]

View File

@ -7,7 +7,7 @@ import
nimcrypto/utils, nimcrypto/utils,
eth/keys eth/keys
import import
../../../waku/v2/protocol/waku_message ../../../waku/v2/waku_message
type type
Fleet* = enum Fleet* = enum

View File

@ -14,12 +14,12 @@ import
# Waku v2 imports # Waku v2 imports
libp2p/crypto/crypto, libp2p/crypto/crypto,
libp2p/errors, libp2p/errors,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
# Chat 2 imports # Chat 2 imports
../chat2/chat2, ../chat2/chat2,
# Common cli config # Common cli config

View File

@ -8,7 +8,7 @@ import
libp2p/crypto/crypto libp2p/crypto/crypto
import import
../../waku/v1/protocol/waku_protocol, ../../waku/v1/protocol/waku_protocol,
../../waku/v2/protocol/waku_message ../../waku/v2/waku_message
const const

View File

@ -25,9 +25,9 @@ import
libp2p/crypto/crypto, libp2p/crypto/crypto,
libp2p/nameresolving/nameresolver, libp2p/nameresolving/nameresolver,
../../waku/v2/utils/time, ../../waku/v2/utils/time,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/node/message_cache, ../../waku/v2/node/message_cache,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,

View File

@ -30,22 +30,22 @@ import
../../waku/v2/node/peer_manager/peer_store/migrations as peer_store_sqlite_migrations, ../../waku/v2/node/peer_manager/peer_store/migrations as peer_store_sqlite_migrations,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_metrics, ../../waku/v2/node/waku_metrics,
../../waku/v2/protocol/waku_archive, ../../waku/v2/waku_archive,
../../waku/v2/protocol/waku_archive/driver/queue_driver, ../../waku/v2/waku_archive/driver/queue_driver,
../../waku/v2/protocol/waku_archive/driver/sqlite_driver, ../../waku/v2/waku_archive/driver/sqlite_driver,
../../waku/v2/protocol/waku_archive/driver/sqlite_driver/migrations as archive_driver_sqlite_migrations, ../../waku/v2/waku_archive/driver/sqlite_driver/migrations as archive_driver_sqlite_migrations,
../../waku/v2/protocol/waku_archive/retention_policy, ../../waku/v2/waku_archive/retention_policy,
../../waku/v2/protocol/waku_archive/retention_policy/retention_policy_capacity, ../../waku/v2/waku_archive/retention_policy/retention_policy_capacity,
../../waku/v2/protocol/waku_archive/retention_policy/retention_policy_time, ../../waku/v2/waku_archive/retention_policy/retention_policy_time,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_lightpush, ../../waku/v2/waku_lightpush,
../../waku/v2/protocol/waku_enr, ../../waku/v2/waku_enr,
../../waku/v2/protocol/waku_dnsdisc, ../../waku/v2/waku_dnsdisc,
../../waku/v2/protocol/waku_discv5, ../../waku/v2/waku_discv5,
../../waku/v2/protocol/waku_message/topics/pubsub_topic, ../../waku/v2/waku_message/topics/pubsub_topic,
../../waku/v2/protocol/waku_peer_exchange, ../../waku/v2/waku_peer_exchange,
../../waku/v2/protocol/waku_relay/validators, ../../waku/v2/waku_relay/validators,
../../waku/v2/utils/peers, ../../waku/v2/utils/peers,
./wakunode2_setup_rest, ./wakunode2_setup_rest,
./wakunode2_setup_rpc, ./wakunode2_setup_rpc,
@ -53,7 +53,7 @@ import
when defined(rln): when defined(rln):
import import
../../waku/v2/protocol/waku_rln_relay ../../waku/v2/waku_rln_relay
logScope: logScope:

View File

@ -13,9 +13,9 @@ import
../../../waku/common/logging, ../../../waku/common/logging,
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_enr, ../../../waku/v2/waku_enr,
../../../waku/v2/protocol/waku_discv5, ../../../waku/v2/waku_discv5,
../../../waku/v2/utils/time ../../../waku/v2/utils/time
proc now*(): Timestamp = proc now*(): Timestamp =

View File

@ -13,9 +13,9 @@ import
../../../waku/common/logging, ../../../waku/common/logging,
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_enr, ../../../waku/v2/waku_enr,
../../../waku/v2/protocol/waku_discv5 ../../../waku/v2/waku_discv5
# An accesible bootstrap node. See wakuv2.prod fleets.status.im # An accesible bootstrap node. See wakuv2.prod fleets.status.im
const bootstrapNode = "enr:-Nm4QOdTOKZJKTUUZ4O_W932CXIET-M9NamewDnL78P5u9DOGnZl" & const bootstrapNode = "enr:-Nm4QOdTOKZJKTUUZ4O_W932CXIET-M9NamewDnL78P5u9DOGnZl" &

View File

@ -5,7 +5,7 @@ import
testutils/unittests, testutils/unittests,
chronicles chronicles
import import
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/node/message_cache, ../../waku/v2/node/message_cache,
./testlib/common, ./testlib/common,
./testlib/wakucore ./testlib/wakucore

View File

@ -21,11 +21,11 @@ import
../../waku/v2/node/peer_manager/peer_manager, ../../waku/v2/node/peer_manager/peer_manager,
../../waku/v2/node/peer_manager/peer_store/waku_peer_storage, ../../waku/v2/node/peer_manager/peer_store/waku_peer_storage,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/protocol/waku_relay, ../../waku/v2/waku_relay,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_lightpush, ../../waku/v2/waku_lightpush,
../../waku/v2/protocol/waku_peer_exchange, ../../waku/v2/waku_peer_exchange,
./testlib/common, ./testlib/common,
./testlib/testutils, ./testlib/testutils,
./testlib/wakucore, ./testlib/wakucore,

View File

@ -3,7 +3,7 @@
import import
testutils/unittests testutils/unittests
import import
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/utils/compat, ../../waku/v2/utils/compat,
../../waku/v2/utils/time, ../../waku/v2/utils/time,
./testlib/common ./testlib/common

View File

@ -11,8 +11,8 @@ import
eth/p2p/discoveryv5/enr eth/p2p/discoveryv5/enr
import import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_discv5, ../../waku/v2/waku_discv5,
./testlib/common, ./testlib/common,
./testlib/wakucore, ./testlib/wakucore,
./testlib/wakunode ./testlib/wakunode

View File

@ -13,7 +13,7 @@ import
import import
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/protocol/waku_dnsdisc, ../../waku/v2/waku_dnsdisc,
./testlib/common, ./testlib/common,
./testlib/wakucore, ./testlib/wakucore,
./testlib/wakunode ./testlib/wakunode

View File

@ -5,8 +5,8 @@ import
stew/results, stew/results,
testutils/unittests testutils/unittests
import import
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_enr, ../../waku/v2/waku_enr,
./testlib/wakucore ./testlib/wakucore

View File

@ -8,9 +8,9 @@ import
libp2p/crypto/crypto libp2p/crypto/crypto
import import
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_filter/client, ../../waku/v2/waku_filter/client,
./testlib/common, ./testlib/common,
./testlib/wakucore ./testlib/wakucore

View File

@ -4,10 +4,10 @@ import
std/[algorithm, json, options, os], std/[algorithm, json, options, os],
testutils/unittests, chronos, stint testutils/unittests, chronos, stint
import import
../../waku/v2/protocol/waku_keystore, ../../waku/v2/waku_keystore,
./testlib/common ./testlib/common
from ../../waku/v2/protocol/waku_noise/noise_utils import randomSeqByte from ../../waku/v2/waku_noise/noise_utils import randomSeqByte
procSuite "Credentials test suite": procSuite "Credentials test suite":

View File

@ -6,10 +6,10 @@ import
testutils/unittests, chronos, testutils/unittests, chronos,
eth/keys eth/keys
import import
../../waku/v2/protocol/waku_keystore, ../../waku/v2/waku_keystore,
./testlib/common ./testlib/common
from ../../waku/v2/protocol/waku_noise/noise_utils import randomSeqByte from ../../waku/v2/waku_noise/noise_utils import randomSeqByte
suite "KeyFile test suite": suite "KeyFile test suite":

View File

@ -7,9 +7,9 @@ import
libp2p/crypto/crypto libp2p/crypto/crypto
import import
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_lightpush, ../../waku/v2/waku_lightpush,
../../waku/v2/protocol/waku_lightpush/client, ../../waku/v2/waku_lightpush/client,
./testlib/common, ./testlib/common,
./testlib/wakucore ./testlib/wakucore

View File

@ -5,9 +5,9 @@ import
stew/byteutils, stew/byteutils,
testutils/unittests testutils/unittests
import import
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_message/codec, ../../waku/v2/waku_message/codec,
../../waku/v2/protocol/waku_message/digest, ../../waku/v2/waku_message/digest,
./testlib/wakucore ./testlib/wakucore
suite "Waku Message - Deterministic hashing": suite "Waku Message - Deterministic hashing":

View File

@ -4,7 +4,7 @@ import
stew/results, stew/results,
testutils/unittests testutils/unittests
import import
../../waku/v2/protocol/waku_message/topics ../../waku/v2/waku_message/topics
suite "Waku Message - Content topics namespacing": suite "Waku Message - Content topics namespacing":

View File

@ -10,11 +10,11 @@ import
stew/endians2 stew/endians2
import import
../../waku/v2/utils/noise as waku_message_utils, ../../waku/v2/utils/noise as waku_message_utils,
../../waku/v2/protocol/waku_noise/noise_types, ../../waku/v2/waku_noise/noise_types,
../../waku/v2/protocol/waku_noise/noise_utils, ../../waku/v2/waku_noise/noise_utils,
../../waku/v2/protocol/waku_noise/noise, ../../waku/v2/waku_noise/noise,
../../waku/v2/protocol/waku_noise/noise_handshake_processing, ../../waku/v2/waku_noise/noise_handshake_processing,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
./testlib/common ./testlib/common

View File

@ -7,10 +7,10 @@ import
import import
../../waku/common/protobuf, ../../waku/common/protobuf,
../../waku/v2/utils/noise as waku_message_utils, ../../waku/v2/utils/noise as waku_message_utils,
../../waku/v2/protocol/waku_noise/noise_types, ../../waku/v2/waku_noise/noise_types,
../../waku/v2/protocol/waku_noise/noise_utils, ../../waku/v2/waku_noise/noise_utils,
../../waku/v2/protocol/waku_noise/noise_handshake_processing, ../../waku/v2/waku_noise/noise_handshake_processing,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
./testlib/common ./testlib/common
procSuite "Waku Noise Sessions": procSuite "Waku Noise Sessions":

View File

@ -14,10 +14,10 @@ import
import import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/protocol/waku_discv5, ../../waku/v2/waku_discv5,
../../waku/v2/protocol/waku_peer_exchange, ../../waku/v2/waku_peer_exchange,
../../waku/v2/protocol/waku_peer_exchange/rpc, ../../waku/v2/waku_peer_exchange/rpc,
../../waku/v2/protocol/waku_peer_exchange/rpc_codec, ../../waku/v2/waku_peer_exchange/rpc_codec,
./testlib/wakucore, ./testlib/wakucore,
./testlib/wakunode ./testlib/wakunode

View File

@ -19,9 +19,9 @@ import
import import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_relay, ../../waku/v2/waku_relay,
../../waku/v2/protocol/waku_peer_exchange, ../../waku/v2/waku_peer_exchange,
../../waku/v2/utils/peers, ../../waku/v2/utils/peers,
./testlib/wakucore, ./testlib/wakucore,
./testlib/wakunode ./testlib/wakunode

View File

@ -9,7 +9,7 @@ import
import import
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/utils/peers, ../../waku/v2/utils/peers,
./testlib/common, ./testlib/common,
./testlib/wakucore, ./testlib/wakucore,

View File

@ -8,8 +8,8 @@ import
libp2p/crypto/crypto, libp2p/crypto/crypto,
libp2p/switch libp2p/switch
import import
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_lightpush, ../../waku/v2/waku_lightpush,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/utils/peers, ../../waku/v2/utils/peers,
../../waku/v2/waku_node, ../../waku/v2/waku_node,

View File

@ -8,7 +8,7 @@ import
libp2p/crypto/crypto as libp2p_keys, libp2p/crypto/crypto as libp2p_keys,
eth/keys as eth_keys eth/keys as eth_keys
import import
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
./common ./common
export switch export switch

View File

@ -11,8 +11,8 @@ import
import import
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/protocol/waku_enr, ../../../waku/v2/waku_enr,
../../../waku/v2/protocol/waku_discv5, ../../../waku/v2/waku_discv5,
./common ./common

View File

@ -5,10 +5,10 @@ import
stew/results, stew/results,
testutils/unittests testutils/unittests
import import
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/queue_driver/queue_driver {.all.}, ../../../waku/v2/waku_archive/driver/queue_driver/queue_driver {.all.},
../../../waku/v2/protocol/waku_archive/driver/queue_driver/index, ../../../waku/v2/waku_archive/driver/queue_driver/index,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/utils/time ../../../waku/v2/utils/time

View File

@ -6,8 +6,8 @@ import
testutils/unittests, testutils/unittests,
nimcrypto nimcrypto
import import
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_archive/driver/queue_driver/index, ../../../waku/v2/waku_archive/driver/queue_driver/index,
../../../waku/v2/utils/time ../../../waku/v2/utils/time

View File

@ -5,10 +5,10 @@ import
testutils/unittests, testutils/unittests,
libp2p/protobuf/minprotobuf libp2p/protobuf/minprotobuf
import import
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/queue_driver/queue_driver {.all.}, ../../../waku/v2/waku_archive/driver/queue_driver/queue_driver {.all.},
../../../waku/v2/protocol/waku_archive/driver/queue_driver/index, ../../../waku/v2/waku_archive/driver/queue_driver/index,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/utils/time, ../../../waku/v2/utils/time,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -6,9 +6,9 @@ import
chronos, chronos,
chronicles chronicles
import import
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/queue_driver, ../../../waku/v2/waku_archive/driver/queue_driver,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -6,9 +6,9 @@ import
chronos chronos
import import
../../../waku/common/sqlite, ../../../waku/common/sqlite,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/sqlite_driver, ../../../waku/v2/waku_archive/driver/sqlite_driver,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -7,9 +7,9 @@ import
chronicles chronicles
import import
../../../waku/common/sqlite, ../../../waku/common/sqlite,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/sqlite_driver, ../../../waku/v2/waku_archive/driver/sqlite_driver,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -7,11 +7,11 @@ import
chronos chronos
import import
../../../waku/common/sqlite, ../../../waku/common/sqlite,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/sqlite_driver, ../../../waku/v2/waku_archive/driver/sqlite_driver,
../../../waku/v2/protocol/waku_archive/retention_policy, ../../../waku/v2/waku_archive/retention_policy,
../../../waku/v2/protocol/waku_archive/retention_policy/retention_policy_capacity, ../../../waku/v2/waku_archive/retention_policy/retention_policy_capacity,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/utils/time, ../../../waku/v2/utils/time,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -7,9 +7,9 @@ import
libp2p/crypto/crypto libp2p/crypto/crypto
import import
../../../waku/common/sqlite, ../../../waku/common/sqlite,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_archive/driver/sqlite_driver, ../../../waku/v2/waku_archive/driver/sqlite_driver,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/utils/time, ../../../waku/v2/utils/time,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -8,10 +8,10 @@ import
libp2p/peerstore libp2p/peerstore
import import
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/protocol/waku_filter_v2, ../../../waku/v2/waku_filter_v2,
../../../waku/v2/protocol/waku_filter_v2/client, ../../../waku/v2/waku_filter_v2/client,
../../../waku/v2/protocol/waku_filter_v2/rpc, ../../../waku/v2/waku_filter_v2/rpc,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -8,10 +8,10 @@ import
libp2p/peerstore libp2p/peerstore
import import
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/protocol/waku_filter_v2, ../../../waku/v2/waku_filter_v2,
../../../waku/v2/protocol/waku_filter_v2/rpc, ../../../waku/v2/waku_filter_v2/rpc,
../../../waku/v2/protocol/waku_filter_v2/subscriptions, ../../../waku/v2/waku_filter_v2/subscriptions,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -10,8 +10,8 @@ import
libp2p/protocols/pubsub/rpc/messages libp2p/protocols/pubsub/rpc/messages
import import
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_relay, ../../../waku/v2/waku_relay,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -18,12 +18,12 @@ import
libp2p/multihash, libp2p/multihash,
secp256k1 secp256k1
import import
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/utils/peers, ../../waku/v2/utils/peers,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/protocol/waku_relay, ../../waku/v2/waku_relay,
../../waku/v2/protocol/waku_relay/validators, ../../waku/v2/waku_relay/validators,
../testlib/testutils, ../testlib/testutils,
../testlib/common, ../testlib/common,
../testlib/wakucore, ../testlib/wakucore,

View File

@ -18,12 +18,12 @@ import
libp2p/crypto/crypto, libp2p/crypto/crypto,
eth/keys eth/keys
import import
../../../waku/v2/protocol/waku_rln_relay/protocol_types, ../../../waku/v2/waku_rln_relay/protocol_types,
../../../waku/v2/protocol/waku_rln_relay/constants, ../../../waku/v2/waku_rln_relay/constants,
../../../waku/v2/protocol/waku_rln_relay/contract, ../../../waku/v2/waku_rln_relay/contract,
../../../waku/v2/protocol/waku_rln_relay/rln, ../../../waku/v2/waku_rln_relay/rln,
../../../waku/v2/protocol/waku_rln_relay/conversion_utils, ../../../waku/v2/waku_rln_relay/conversion_utils,
../../../waku/v2/protocol/waku_rln_relay/group_manager/on_chain/group_manager, ../../../waku/v2/waku_rln_relay/group_manager/on_chain/group_manager,
../testlib/common, ../testlib/common,
./utils ./utils

View File

@ -9,10 +9,10 @@ import
testutils/unittests, testutils/unittests,
stew/results, stew/results,
options, options,
../../../waku/v2/protocol/waku_rln_relay/protocol_types, ../../../waku/v2/waku_rln_relay/protocol_types,
../../../waku/v2/protocol/waku_rln_relay/rln, ../../../waku/v2/waku_rln_relay/rln,
../../../waku/v2/protocol/waku_rln_relay/conversion_utils, ../../../waku/v2/waku_rln_relay/conversion_utils,
../../../waku/v2/protocol/waku_rln_relay/group_manager/static/group_manager ../../../waku/v2/waku_rln_relay/group_manager/static/group_manager
import import
stew/shims/net, stew/shims/net,

View File

@ -11,11 +11,11 @@ import
stint, stint,
libp2p/crypto/crypto libp2p/crypto/crypto
import import
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_rln_relay, ../../../waku/v2/waku_rln_relay,
../../../waku/v2/protocol/waku_rln_relay/rln, ../../../waku/v2/waku_rln_relay/rln,
../../../waku/v2/protocol/waku_rln_relay/protocol_metrics, ../../../waku/v2/waku_rln_relay/protocol_metrics,
../../../waku/v2/protocol/waku_keystore, ../../../waku/v2/waku_keystore,
../testlib/common ../testlib/common
const RlnRelayPubsubTopic = "waku/2/rlnrelay/proto" const RlnRelayPubsubTopic = "waku/2/rlnrelay/proto"

View File

@ -15,9 +15,9 @@ import
eth/keys eth/keys
import import
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_rln_relay, ../../../waku/v2/waku_rln_relay,
../../../waku/v2/protocol/waku_keystore, ../../../waku/v2/waku_keystore,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../testlib/wakucore, ../testlib/wakucore,
../testlib/wakunode ../testlib/wakunode

View File

@ -10,8 +10,8 @@ import
../../waku/common/sqlite, ../../waku/common/sqlite,
../../waku/v2/node/message_store/sqlite_store, ../../waku/v2/node/message_store/sqlite_store,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
./testlib/common, ./testlib/common,
./testlib/switch ./testlib/switch

View File

@ -6,8 +6,8 @@ import
chronos chronos
import import
../../../waku/common/protobuf, ../../../waku/common/protobuf,
../../../waku/v2/protocol/waku_store/rpc, ../../../waku/v2/waku_store/rpc,
../../../waku/v2/protocol/waku_store/rpc_codec, ../../../waku/v2/waku_store/rpc_codec,
../../../waku/v2/utils/time, ../../../waku/v2/utils/time,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -8,9 +8,9 @@ import
libp2p/crypto/crypto libp2p/crypto/crypto
import import
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_store, ../../../waku/v2/waku_store,
../../../waku/v2/protocol/waku_store/client, ../../../waku/v2/waku_store/client,
../testlib/common, ../testlib/common,
../testlib/wakucore ../testlib/wakucore

View File

@ -15,11 +15,11 @@ import
import import
../../../waku/common/sqlite, ../../../waku/common/sqlite,
../../../waku/v2/node/peer_manager, ../../../waku/v2/node/peer_manager,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/sqlite_driver, ../../../waku/v2/waku_archive/driver/sqlite_driver,
../../../waku/v2/protocol/waku_store, ../../../waku/v2/waku_store,
../../../waku/v2/protocol/waku_filter, ../../../waku/v2/waku_filter,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../testlib/common, ../testlib/common,

View File

@ -14,11 +14,11 @@ import
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/node/jsonrpc/admin/handlers as admin_api, ../../../waku/v2/node/jsonrpc/admin/handlers as admin_api,
../../../waku/v2/node/jsonrpc/admin/client as admin_api_client, ../../../waku/v2/node/jsonrpc/admin/client as admin_api_client,
../../../waku/v2/protocol/waku_relay, ../../../waku/v2/waku_relay,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/queue_driver, ../../../waku/v2/waku_archive/driver/queue_driver,
../../../waku/v2/protocol/waku_store, ../../../waku/v2/waku_store,
../../../waku/v2/protocol/waku_filter, ../../../waku/v2/waku_filter,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../testlib/wakucore, ../testlib/wakucore,
../testlib/wakunode ../testlib/wakunode

View File

@ -13,10 +13,10 @@ import
../../../waku/v2/node/message_cache, ../../../waku/v2/node/message_cache,
../../../waku/v2/node/jsonrpc/filter/handlers as filter_api, ../../../waku/v2/node/jsonrpc/filter/handlers as filter_api,
../../../waku/v2/node/jsonrpc/filter/client as filter_api_client, ../../../waku/v2/node/jsonrpc/filter/client as filter_api_client,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_filter, ../../../waku/v2/waku_filter,
../../../waku/v2/protocol/waku_filter/rpc, ../../../waku/v2/waku_filter/rpc,
../../../waku/v2/protocol/waku_filter/client, ../../../waku/v2/waku_filter/client,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../testlib/wakucore, ../testlib/wakucore,
../testlib/wakunode ../testlib/wakunode

View File

@ -14,8 +14,8 @@ import
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/node/jsonrpc/relay/handlers as relay_api, ../../../waku/v2/node/jsonrpc/relay/handlers as relay_api,
../../../waku/v2/node/jsonrpc/relay/client as relay_api_client, ../../../waku/v2/node/jsonrpc/relay/client as relay_api_client,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_relay, ../../../waku/v2/waku_relay,
../../../waku/v2/utils/compat, ../../../waku/v2/utils/compat,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../testlib/common, ../testlib/common,

View File

@ -12,11 +12,11 @@ import
../../../waku/v2/waku_node, ../../../waku/v2/waku_node,
../../../waku/v2/node/jsonrpc/store/handlers as store_api, ../../../waku/v2/node/jsonrpc/store/handlers as store_api,
../../../waku/v2/node/jsonrpc/store/client as store_api_client, ../../../waku/v2/node/jsonrpc/store/client as store_api_client,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/queue_driver, ../../../waku/v2/waku_archive/driver/queue_driver,
../../../waku/v2/protocol/waku_store, ../../../waku/v2/waku_store,
../../../waku/v2/protocol/waku_store/rpc, ../../../waku/v2/waku_store/rpc,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../../../waku/v2/utils/time, ../../../waku/v2/utils/time,
../../v2/testlib/common, ../../v2/testlib/common,

View File

@ -17,8 +17,8 @@ import
../../waku/v2/node/rest/relay/handlers as relay_api, ../../waku/v2/node/rest/relay/handlers as relay_api,
../../waku/v2/node/rest/relay/client as relay_api_client, ../../waku/v2/node/rest/relay/client as relay_api_client,
../../waku/v2/node/rest/relay/topic_cache, ../../waku/v2/node/rest/relay/topic_cache,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_relay, ../../waku/v2/waku_relay,
../../waku/v2/utils/time, ../../waku/v2/utils/time,
../testlib/wakucore, ../testlib/wakucore,
../testlib/wakunode ../testlib/wakunode

View File

@ -9,7 +9,7 @@ import
../../waku/common/base64, ../../waku/common/base64,
../../waku/v2/node/rest/serdes, ../../waku/v2/node/rest/serdes,
../../waku/v2/node/rest/relay/types, ../../waku/v2/node/rest/relay/types,
../../waku/v2/protocol/waku_message ../../waku/v2/waku_message

View File

@ -17,10 +17,10 @@ import
../../../waku/v2/node/rest/store/handlers as store_api, ../../../waku/v2/node/rest/store/handlers as store_api,
../../../waku/v2/node/rest/store/client as store_api_client, ../../../waku/v2/node/rest/store/client as store_api_client,
../../../waku/v2/node/rest/store/types, ../../../waku/v2/node/rest/store/types,
../../../waku/v2/protocol/waku_message, ../../../waku/v2/waku_message,
../../../waku/v2/protocol/waku_archive, ../../../waku/v2/waku_archive,
../../../waku/v2/protocol/waku_archive/driver/queue_driver, ../../../waku/v2/waku_archive/driver/queue_driver,
../../../waku/v2/protocol/waku_store as waku_store, ../../../waku/v2/waku_store as waku_store,
../../../waku/v2/utils/peers, ../../../waku/v2/utils/peers,
../../../waku/v2/utils/time, ../../../waku/v2/utils/time,
../../v2/testlib/common, ../../v2/testlib/common,

View File

@ -7,7 +7,7 @@ import
chronos, chronos,
libp2p/switch libp2p/switch
import import
../../waku/v2/protocol/waku_message ../../waku/v2/waku_message
import import
../../apps/wakubridge/message_compat ../../apps/wakubridge/message_compat

View File

@ -17,7 +17,7 @@ import
eth/keys eth/keys
import import
../../waku/v1/protocol/waku_protocol, ../../waku/v1/protocol/waku_protocol,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/utils/compat, ../../waku/v2/utils/compat,
../../waku/v2/utils/peers, ../../waku/v2/utils/peers,

View File

@ -22,10 +22,10 @@ import
../../apps/wakunode2/wakunode2, ../../apps/wakunode2/wakunode2,
../../waku/v2/node/peer_manager, ../../waku/v2/node/peer_manager,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/protocol/waku_enr, ../../waku/v2/waku_enr,
../../waku/v2/protocol/waku_discv5, ../../waku/v2/waku_discv5,
../../waku/v2/protocol/waku_dnsdisc, ../../waku/v2/waku_dnsdisc,
../../waku/v2/utils/peers, ../../waku/v2/utils/peers,
./networkmonitor_metrics, ./networkmonitor_metrics,
./networkmonitor_config, ./networkmonitor_config,

View File

@ -9,8 +9,8 @@ import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_payload, ../../waku/v2/node/waku_payload,
../../waku/v2/node/jsonrpc/jsonrpc_types, ../../waku/v2/node/jsonrpc/jsonrpc_types,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v1/node/rpc/hexstrings ../../waku/v1/node/rpc/hexstrings
from strutils import rsplit from strutils import rsplit

View File

@ -9,8 +9,8 @@ import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_payload, ../../waku/v2/node/waku_payload,
../../waku/v2/node/jsonrpc/jsonrpc_types, ../../waku/v2/node/jsonrpc/jsonrpc_types,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v1/node/rpc/hexstrings ../../waku/v1/node/rpc/hexstrings
from strutils import rsplit from strutils import rsplit

View File

@ -9,8 +9,8 @@ import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_payload, ../../waku/v2/node/waku_payload,
../../waku/v2/node/jsonrpc/jsonrpc_types, ../../waku/v2/node/jsonrpc/jsonrpc_types,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_store/rpc, ../../waku/v2/waku_store/rpc,
../../waku/v1/node/rpc/hexstrings ../../waku/v1/node/rpc/hexstrings

View File

@ -8,8 +8,8 @@ import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_payload, ../../waku/v2/node/waku_payload,
../../waku/v2/node/jsonrpc/jsonrpc_types, ../../waku/v2/node/jsonrpc/jsonrpc_types,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v1/node/rpc/hexstrings ../../waku/v1/node/rpc/hexstrings

View File

@ -9,8 +9,8 @@ import
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_payload, ../../waku/v2/node/waku_payload,
../../waku/v2/node/jsonrpc/jsonrpc_types, ../../waku/v2/node/jsonrpc/jsonrpc_types,
../../waku/v2/protocol/waku_filter, ../../waku/v2/waku_filter,
../../waku/v2/protocol/waku_store, ../../waku/v2/waku_store,
../../waku/v1/node/rpc/hexstrings ../../waku/v1/node/rpc/hexstrings
from strutils import rsplit from strutils import rsplit

View File

@ -6,9 +6,9 @@ import
json_rpc/[rpcclient, rpcserver], json_rpc/[rpcclient, rpcserver],
libp2p/protobuf/minprotobuf libp2p/protobuf/minprotobuf
import import
../../waku/v2/protocol/waku_filter/rpc, ../../waku/v2/waku_filter/rpc,
../../waku/v2/protocol/waku_store/rpc, ../../waku/v2/waku_store/rpc,
../../waku/v2/protocol/waku_message, ../../waku/v2/waku_message,
../../waku/v2/utils/time, ../../waku/v2/utils/time,
../../waku/v2/waku_node, ../../waku/v2/waku_node,
../../waku/v2/node/waku_payload, ../../waku/v2/node/waku_payload,

View File

@ -12,8 +12,8 @@ import
libp2p/builders, libp2p/builders,
libp2p/nameresolving/nameresolver libp2p/nameresolving/nameresolver
import import
../protocol/waku_enr, ../waku_enr,
../protocol/waku_discv5, ../waku_discv5,
./config, ./config,
./peer_manager, ./peer_manager,
./waku_node ./waku_node

View File

@ -9,7 +9,7 @@ import
stew/shims/net, stew/shims/net,
libp2p/multiaddress libp2p/multiaddress
import import
../protocol/waku_enr ../waku_enr
type NetConfig* = object type NetConfig* = object

View File

@ -9,9 +9,9 @@ import
json_rpc/rpcserver, json_rpc/rpcserver,
libp2p/[peerinfo, switch] libp2p/[peerinfo, switch]
import import
../../../protocol/waku_store, ../../../waku_store,
../../../protocol/waku_filter, ../../../waku_filter,
../../../protocol/waku_relay, ../../../waku_relay,
../../peer_manager, ../../peer_manager,
../../waku_node, ../../waku_node,
./types ./types

View File

@ -7,8 +7,8 @@ import
std/[os, strutils], std/[os, strutils],
json_rpc/rpcclient json_rpc/rpcclient
import import
../../../protocol/waku_message, ../../../waku_message,
../../../protocol/waku_filter/rpc ../../../waku_filter/rpc
template sourceDir: string = currentSourcePath.rsplit(DirSep, 1)[0] template sourceDir: string = currentSourcePath.rsplit(DirSep, 1)[0]

View File

@ -8,10 +8,10 @@ import
chronicles, chronicles,
json_rpc/rpcserver json_rpc/rpcserver
import import
../../../protocol/waku_message, ../../../waku_message,
../../../protocol/waku_filter, ../../../waku_filter,
../../../protocol/waku_filter/rpc, ../../../waku_filter/rpc,
../../../protocol/waku_filter/client, ../../../waku_filter/client,
../../message_cache, ../../message_cache,
../../peer_manager, ../../peer_manager,
../../waku_node ../../waku_node

View File

@ -4,7 +4,7 @@ import
json_rpc/rpcserver json_rpc/rpcserver
import import
../../../common/base64, ../../../common/base64,
../../protocol/waku_message, ../../waku_message,
../../utils/time ../../utils/time

View File

@ -7,7 +7,7 @@ import
std/[os, strutils], std/[os, strutils],
json_rpc/rpcclient json_rpc/rpcclient
import import
../../../protocol/waku_message, ../../../waku_message,
../../../utils/compat, ../../../utils/compat,
./types ./types

View File

@ -11,8 +11,8 @@ import
nimcrypto/sysrand nimcrypto/sysrand
import import
../../../../common/base64, ../../../../common/base64,
../../../protocol/waku_message, ../../../waku_message,
../../../protocol/waku_relay, ../../../waku_relay,
../../../utils/compat, ../../../utils/compat,
../../../utils/time, ../../../utils/time,
../../waku_node, ../../waku_node,

View File

@ -7,7 +7,7 @@ import
std/[os, strutils], std/[os, strutils],
json_rpc/rpcclient json_rpc/rpcclient
import import
../../../protocol/waku_store/rpc, ../../../waku_store/rpc,
../../../utils/time, ../../../utils/time,
./types ./types

View File

@ -8,8 +8,8 @@ import
chronicles, chronicles,
json_rpc/rpcserver json_rpc/rpcserver
import import
../../../protocol/waku_store, ../../../waku_store,
../../../protocol/waku_store/rpc, ../../../waku_store/rpc,
../../../utils/time, ../../../utils/time,
../../waku_node, ../../waku_node,
../../peer_manager, ../../peer_manager,

View File

@ -6,7 +6,7 @@ else:
import import
std/options std/options
import import
../../../protocol/waku_store/rpc, ../../../waku_store/rpc,
../message ../message
export message export message

View File

@ -10,9 +10,9 @@ import
chronos, chronos,
libp2p/protocols/pubsub libp2p/protocols/pubsub
import import
../protocol/waku_message ../waku_message
logScope: logScope:
topics = "waku node message_cache" topics = "waku node message_cache"
const DefaultMessageCacheCapacity*: uint = 30 # Max number of messages cached per topic @TODO make this configurable const DefaultMessageCacheCapacity*: uint = 30 # Max number of messages cached per topic @TODO make this configurable
@ -27,7 +27,7 @@ type MessageCache*[K] = ref object
func init*[K](T: type MessageCache[K], capacity=DefaultMessageCacheCapacity): T = func init*[K](T: type MessageCache[K], capacity=DefaultMessageCacheCapacity): T =
MessageCache[K]( MessageCache[K](
capacity: capacity, capacity: capacity,
table: initTable[K, seq[WakuMessage]]() table: initTable[K, seq[WakuMessage]]()
) )
@ -39,7 +39,7 @@ proc subscribe*[K](t: MessageCache[K], topic: K) =
return return
t.table[topic] = @[] t.table[topic] = @[]
proc unsubscribe*[K](t: MessageCache[K], topic: K) = proc unsubscribe*[K](t: MessageCache[K], topic: K) =
if not t.isSubscribed(topic): if not t.isSubscribed(topic):
return return
t.table.del(topic) t.table.del(topic)
@ -55,10 +55,10 @@ proc addMessage*[K](t: MessageCache, topic: K, msg: WakuMessage) =
if messages.len >= t.capacity.int: if messages.len >= t.capacity.int:
trace "Topic cache capacity reached", topic=topic trace "Topic cache capacity reached", topic=topic
# Message cache on this topic exceeds maximum. Delete oldest. # Message cache on this topic exceeds maximum. Delete oldest.
# TODO: this may become a bottle neck if called as the norm rather than # TODO: this may become a bottle neck if called as the norm rather than
# exception when adding messages. Performance profile needed. # exception when adding messages. Performance profile needed.
messages.delete(0,0) messages.delete(0,0)
messages.add(msg) messages.add(msg)
# Replace indexed entry with copy # Replace indexed entry with copy

View File

@ -12,7 +12,7 @@ import
libp2p/multistream, libp2p/multistream,
libp2p/muxers/muxer libp2p/muxers/muxer
import import
../../protocol/waku_relay, ../../waku_relay,
../../utils/peers, ../../utils/peers,
../../utils/heartbeat, ../../utils/heartbeat,
./peer_store/peer_storage, ./peer_store/peer_storage,

View File

@ -11,7 +11,7 @@ import
json_serialization/std/options, json_serialization/std/options,
presto/[route, client, common] presto/[route, client, common]
import import
../../../protocol/waku_message, ../../../waku_message,
../serdes, ../serdes,
../responses, ../responses,
./types ./types

View File

@ -7,8 +7,8 @@ import
chronos, chronos,
chronicles chronicles
import import
../../../protocol/waku_relay, ../../../waku_relay,
../../../protocol/waku_message, ../../../waku_message,
../../message_cache ../../message_cache
export message_cache export message_cache

View File

@ -11,7 +11,7 @@ import
presto/[route, client, common] presto/[route, client, common]
import import
../../../../common/base64, ../../../../common/base64,
../../../protocol/waku_message, ../../../waku_message,
../serdes ../serdes

View File

@ -9,7 +9,7 @@ import
json_serialization/std/options, json_serialization/std/options,
presto/[route, client] presto/[route, client]
import import
../../../protocol/waku_store/common, ../../../waku_store/common,
../serdes, ../serdes,
../responses, ../responses,
./types ./types

View File

@ -11,8 +11,8 @@ import
presto/route presto/route
import import
../../../../common/base64, ../../../../common/base64,
../../../protocol/waku_message/topics/content_topic, ../../../waku_message/topics/content_topic,
../../../protocol/waku_store/common, ../../../waku_store/common,
../../../utils/time, ../../../utils/time,
../../waku_node, ../../waku_node,
../../peer_manager, ../../peer_manager,

View File

@ -11,12 +11,12 @@ import
json_serialization/std/options, json_serialization/std/options,
presto/[route, client, common] presto/[route, client, common]
import import
../../../protocol/waku_store/common as waku_store_common, ../../../waku_store/common as waku_store_common,
../../../../common/base64, ../../../../common/base64,
../../../utils/time, ../../../utils/time,
../../../protocol/waku_message/topics/content_topic, ../../../waku_message/topics/content_topic,
../../../protocol/waku_message/topics/pubsub_topic, ../../../waku_message/topics/pubsub_topic,
../../../protocol/waku_message/message, ../../../waku_message/message,
../serdes ../serdes
@ -30,7 +30,7 @@ type
digest*: MessageDigest digest*: MessageDigest
StoreRequestRest* = object StoreRequestRest* = object
# inspired by https://github.com/waku-org/nwaku/blob/f95147f5b7edfd45f914586f2d41cd18fb0e0d18/waku/v2/protocol/waku_store/common.nim#L52 # inspired by https://github.com/waku-org/nwaku/blob/f95147f5b7edfd45f914586f2d41cd18fb0e0d18/waku/v2//waku_store/common.nim#L52
pubsubTopic*: Option[PubsubTopic] pubsubTopic*: Option[PubsubTopic]
contentTopics*: seq[ContentTopic] contentTopics*: seq[ContentTopic]
cursor*: Option[HistoryCursorRest] cursor*: Option[HistoryCursorRest]
@ -71,7 +71,7 @@ proc parseMsgDigest*(input: Option[string]):
return err(base64Decoded.error) return err(base64Decoded.error)
let base64DecodedArr = base64Decoded.get() let base64DecodedArr = base64Decoded.get()
# Next snippet inspired by "nwaku/waku/v2/protocol/waku_archive/archive.nim" # Next snippet inspired by "nwaku/waku/v2/waku_archive/archive.nim"
# TODO: Improve coherence of MessageDigest type # TODO: Improve coherence of MessageDigest type
messageDigest = block: messageDigest = block:
var data: array[32, byte] var data: array[32, byte]

View File

@ -10,13 +10,13 @@ import
metrics, metrics,
metrics/chronos_httpserver metrics/chronos_httpserver
import import
../protocol/waku_filter/protocol_metrics as filter_metrics, ../waku_filter/protocol_metrics as filter_metrics,
../utils/collector, ../utils/collector,
./peer_manager, ./peer_manager,
./waku_node ./waku_node
when defined(rln): when defined(rln):
import ../protocol/waku_rln_relay/protocol_metrics as rln_metrics import ../waku_rln_relay/protocol_metrics as rln_metrics
const LogInterval = 30.seconds const LogInterval = 30.seconds

View File

@ -24,20 +24,20 @@ import
libp2p/transports/tcptransport, libp2p/transports/tcptransport,
libp2p/transports/wstransport libp2p/transports/wstransport
import import
../protocol/waku_message, ../waku_message,
../protocol/waku_relay, ../waku_relay,
../protocol/waku_archive, ../waku_archive,
../protocol/waku_store, ../waku_store,
../protocol/waku_store/client as store_client, ../waku_store/client as store_client,
../protocol/waku_filter as legacy_filter, #TODO: support for legacy filter protocol will be removed ../waku_filter as legacy_filter, #TODO: support for legacy filter protocol will be removed
../protocol/waku_filter/client as filter_client, #TODO: support for legacy filter protocol will be removed ../waku_filter/client as filter_client, #TODO: support for legacy filter protocol will be removed
../protocol/waku_filter_v2, ../waku_filter_v2,
../protocol/waku_lightpush, ../waku_lightpush,
../protocol/waku_lightpush/client as lightpush_client, ../waku_lightpush/client as lightpush_client,
../protocol/waku_enr, ../waku_enr,
../protocol/waku_dnsdisc, ../waku_dnsdisc,
../protocol/waku_discv5, ../waku_discv5,
../protocol/waku_peer_exchange, ../waku_peer_exchange,
../utils/peers, ../utils/peers,
../utils/time, ../utils/time,
./config, ./config,
@ -46,7 +46,7 @@ import
when defined(rln): when defined(rln):
import import
../protocol/waku_rln_relay ../waku_rln_relay
declarePublicGauge waku_version, "Waku version info (in git describe format)", ["version"] declarePublicGauge waku_version, "Waku version info (in git describe format)", ["version"]
declarePublicCounter waku_node_messages, "number of messages received", ["type"] declarePublicCounter waku_node_messages, "number of messages received", ["type"]

View File

@ -1,3 +0,0 @@
# Waku v2 protocol
This folder contains implementations of [Waku v2 protocols](https://specs.vac.dev/specs/waku/v2/waku-v2.html).

View File

@ -10,7 +10,7 @@ import
eth/keys eth/keys
import import
../../whisper/whisper_types, ../../whisper/whisper_types,
../protocol/waku_message ../waku_message
export whisper_types, keys, options export whisper_types, keys, options

View File

@ -6,9 +6,9 @@ else:
import import
stew/results stew/results
import import
../protocol/waku_message, ../waku_message,
../protocol/waku_noise/noise_types, ../waku_noise/noise_types,
../protocol/waku_noise/noise_utils ../waku_noise/noise_utils
# Decodes a WakuMessage to a PayloadV2 # Decodes a WakuMessage to a PayloadV2

View File

@ -11,7 +11,7 @@ import
chronos, chronos,
metrics metrics
import import
../../utils/time, ../utils/time,
../waku_message, ../waku_message,
./common, ./common,
./archive_metrics, ./archive_metrics,

View File

@ -9,7 +9,7 @@ import
stew/byteutils, stew/byteutils,
nimcrypto/sha2 nimcrypto/sha2
import import
../../utils/time, ../utils/time,
../waku_message ../waku_message

View File

@ -7,7 +7,7 @@ import
std/options, std/options,
stew/results stew/results
import import
../../utils/time, ../utils/time,
../waku_message, ../waku_message,
./common ./common

View File

@ -7,8 +7,8 @@ import
stew/byteutils, stew/byteutils,
nimcrypto/sha2 nimcrypto/sha2
import import
../../../../protocol/waku_message, ../../../waku_message,
../../../../utils/time, ../../../utils/time,
../../common ../../common

View File

@ -9,8 +9,8 @@ import
stew/sorted_set, stew/sorted_set,
chronicles chronicles
import import
../../../../protocol/waku_message, ../../../waku_message,
../../../../utils/time, ../../../utils/time,
../../common, ../../common,
../../driver, ../../driver,
./index ./index

View File

@ -5,8 +5,8 @@ else:
import import
../../../../protocol/waku_message, ../../../waku_message,
../../../../utils/time, ../../../utils/time,
../../common ../../common
type DbCursor* = (Timestamp, seq[byte], PubsubTopic) type DbCursor* = (Timestamp, seq[byte], PubsubTopic)

View File

@ -5,17 +5,17 @@ import
stew/results, stew/results,
chronicles chronicles
import import
../../../../../common/sqlite, ../../../../common/sqlite,
../../../../../common/sqlite/migrations ../../../../common/sqlite/migrations
logScope: logScope:
topics = "message_store.migration" topics = "waku archive migration"
const SchemaVersion* = 7 # increase this when there is an update in the database schema const SchemaVersion* = 7 # increase this when there is an update in the database schema
template projectRoot: string = currentSourcePath.rsplit(DirSep, 1)[0] / ".." / ".." / ".." / ".." / ".." template projectRoot: string = currentSourcePath.rsplit(DirSep, 1)[0] / ".." / ".." / ".." / ".."
const MessageStoreMigrationPath: string = projectRoot / "migrations" / "message_store" const MessageStoreMigrationPath: string = projectRoot / "migrations" / "message_store"

View File

@ -9,9 +9,9 @@ import
stew/[results, byteutils], stew/[results, byteutils],
sqlite3_abi sqlite3_abi
import import
../../../../../common/sqlite, ../../../../common/sqlite,
../../../../protocol/waku_message, ../../../waku_message,
../../../../utils/time, ../../../utils/time,
./cursor ./cursor

Some files were not shown because too many files have changed in this diff Show More