chore: refactor relative path to better absolute (#2861)

This commit is contained in:
Darshan K 2024-07-06 03:33:38 +05:30 committed by GitHub
parent 3a93d13067
commit 8da2a9c0a5
146 changed files with 617 additions and 568 deletions

View File

@ -3,11 +3,13 @@ import
std/sequtils,
stew/results,
options,
../../waku/waku_rln_relay/protocol_types,
../../waku/waku_rln_relay/rln,
../../waku/waku_rln_relay,
../../waku/waku_rln_relay/conversion_utils,
../../waku/waku_rln_relay/group_manager/static/group_manager
waku/[
waku_rln_relay/protocol_types,
waku_rln_relay/rln,
waku_rln_relay,
waku_rln_relay/conversion_utils,
waku_rln_relay/group_manager/static/group_manager,
]
import std/[times, os]

View File

@ -31,18 +31,20 @@ import
nameresolving/dnsresolver,
] # define DNS resolution
import
../../waku/waku_core,
../../waku/waku_lightpush/common,
../../waku/waku_lightpush/rpc,
../../waku/waku_enr,
../../waku/discovery/waku_dnsdisc,
../../waku/waku_store_legacy,
../../waku/waku_node,
../../waku/node/waku_metrics,
../../waku/node/peer_manager,
../../waku/factory/builder,
../../waku/common/utils/nat,
../../waku/waku_relay,
waku/[
waku_core,
waku_lightpush/common,
waku_lightpush/rpc,
waku_enr,
discovery/waku_dnsdisc,
waku_store_legacy,
waku_node,
node/waku_metrics,
node/peer_manager,
factory/builder,
common/utils/nat,
waku_relay,
],
./config_chat2
import libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/pubsub

View File

@ -10,7 +10,7 @@ import
nimcrypto/utils,
std/strutils,
regex
import ../../../waku/waku_core
import waku/waku_core
type
Fleet* = enum

View File

@ -1,3 +1,4 @@
-d:chronicles_line_numbers
-d:chronicles_runtime_filtering:on
-d:discv5_protocol_id:d5waku
path = "../.."

View File

@ -13,16 +13,18 @@ import
eth/net/nat,
json_rpc/rpcserver,
# Matterbridge client imports
../../waku/common/utils/matterbridge_client,
# Waku v2 imports
libp2p/crypto/crypto,
libp2p/errors,
../../../waku/waku_core,
../../../waku/waku_node,
../../../waku/node/peer_manager,
../../waku/waku_filter_v2,
../../waku/waku_store,
../../waku/factory/builder,
waku/[
waku_core,
waku_node,
node/peer_manager,
waku_filter_v2,
waku_store,
factory/builder,
common/utils/matterbridge_client,
],
# Chat 2 imports
../chat2/chat2,
# Common cli config
@ -178,6 +180,7 @@ proc new*(
let nodev2 = block:
var builder = WakuNodeBuilder.init()
builder.withNodeKey(nodev2Key)
builder
.withNetworkConfigurationDetails(
nodev2BindIp, nodev2BindPort, nodev2ExtIp, nodev2ExtPort
@ -239,7 +242,7 @@ proc stop*(cmb: Chat2MatterBridge) {.async: (raises: [Exception]).} =
{.pop.}
# @TODO confutils.nim(775, 17) Error: can raise an unlisted exception: ref IOError
when isMainModule:
import ../../../waku/common/utils/nat, ../../waku/waku_api/message_cache
import waku/common/utils/nat, waku/waku_api/message_cache
let
rng = newRng()

View File

@ -1,3 +1,4 @@
-d:chronicles_line_numbers
-d:chronicles_runtime_filtering:on
-d:discv5_protocol_id:d5waku
path = "../.."

View File

@ -13,11 +13,7 @@ import
json_serialization as js,
times
import
../../../waku/common/logging,
../../../waku/node/peer_manager,
../../../waku/waku_node,
../../../waku/waku_core,
../../../waku/waku_filter_v2/client,
waku/[common/logging, node/peer_manager, waku_node, waku_core, waku_filter_v2/client],
./tester_config,
./tester_message,
./statistics

View File

@ -7,11 +7,7 @@ import
stew/results,
json_serialization as js
import
../../../waku/common/logging,
../../../waku/waku_node,
../../../waku/node/peer_manager,
../../../waku/waku_core,
../../../waku/waku_lightpush/client,
waku/[common/logging, waku_node, node/peer_manager, waku_core, waku_lightpush/client],
./tester_config,
./tester_message

View File

@ -11,12 +11,14 @@ import
confutils
import
../../waku/common/logging,
../../waku/factory/waku,
../../waku/factory/external_config,
../../waku/node/health_monitor,
../../waku/node/waku_metrics,
../../waku/waku_api/rest/builder as rest_server_builder,
waku/[
common/logging,
factory/waku,
factory/external_config,
node/health_monitor,
node/waku_metrics,
waku_api/rest/builder as rest_server_builder,
],
./tester_config,
./lightpush_publisher,
./filter_subscriber

View File

@ -15,11 +15,13 @@ import
secp256k1,
json
import
../../waku/common/confutils/envvar/defs as confEnvvarDefs,
../../waku/common/confutils/envvar/std/net as confEnvvarNet,
../../waku/common/logging,
../../waku/factory/external_config,
../../waku/waku_core
waku/[
common/confutils/envvar/defs as confEnvvarDefs,
common/confutils/envvar/std/net as confEnvvarNet,
common/logging,
factory/external_config,
waku/waku_core,
]
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet

View File

@ -18,16 +18,18 @@ import
metrics/chronos_httpserver,
presto/[route, server, client]
import
../../waku/waku_core,
../../waku/node/peer_manager,
../../waku/waku_node,
../../waku/waku_enr,
../../waku/discovery/waku_discv5,
../../waku/discovery/waku_dnsdisc,
../../waku/waku_relay,
../../waku/waku_rln_relay,
../../waku/factory/builder,
../../waku/factory/networks_config,
waku/[
waku_core,
node/peer_manager,
waku_node,
waku_enr,
discovery/waku_discv5,
discovery/waku_dnsdisc,
waku_relay,
waku_rln_relay,
factory/builder,
factory/networks_config,
],
./networkmonitor_metrics,
./networkmonitor_config,
./networkmonitor_utils

View File

@ -1,3 +1,4 @@
-d:chronicles_line_numbers
-d:chronicles_runtime_filtering:on
-d:discv5_protocol_id:d5waku
-d:discv5_protocol_id:d5waku
path = "../.."

View File

@ -1,3 +1,4 @@
-d:chronicles_line_numbers
-d:chronicles_runtime_filtering:on
-d:discv5_protocol_id:d5waku
path = "../.."

View File

@ -12,11 +12,7 @@ import
libp2p/multicodec
import
./certsgenerator,
../../waku/waku_enr,
../../waku/node/peer_manager,
../../waku/waku_core,
../../waku/waku_node,
../../waku/factory/builder
waku/[waku_enr, node/peer_manager, waku_core, waku_node, factory/builder]
# protocols and their tag
const ProtocolsTable = {

View File

@ -7,3 +7,4 @@
-d:chronicles_disabled_topics="eth,dnsdisc.client"
# Results in empty output for some reason
#-d:"chronicles_enabled_topics=GossipSub:TRACE,WakuRelay:TRACE"
path = "../.."

View File

@ -11,12 +11,14 @@ import
import
../../tools/rln_keystore_generator/rln_keystore_generator,
../../tools/rln_db_inspector/rln_db_inspector,
../../waku/common/logging,
../../waku/factory/external_config,
../../waku/factory/waku,
../../waku/node/health_monitor,
../../waku/node/waku_metrics,
../../waku/waku_api/rest/builder as rest_server_builder
waku/[
common/logging,
factory/external_config,
factory/waku,
node/health_monitor,
node/waku_metrics,
waku_api/rest/builder as rest_server_builder,
]
logScope:
topics = "wakunode main"

View File

@ -2,11 +2,7 @@
## subscribe to messages without relay
import chronicles, chronos, stew/byteutils, stew/results
import
../../../waku/common/logging,
../../../waku/node/peer_manager,
../../../waku/waku_core,
../../../waku/waku_filter_v2/client
import waku/[common/logging, node/peer_manager, waku_core, waku_filter_v2/client]
const
FilterPeer =

View File

@ -2,11 +2,7 @@
## use lightpush to publish messages without relay
import chronicles, chronos, stew/byteutils, stew/results
import
../../../waku/common/logging,
../../../waku/node/peer_manager,
../../../waku/waku_core,
../../../waku/waku_lightpush/client
import waku/[common/logging, node/peer_manager, waku_core, waku_lightpush/client]
const
LightpushPeer =

View File

@ -2,3 +2,4 @@
-d:chronicles_log_level="DEBUG"
-d:chronicles_runtime_filtering=on
-d:discv5_protocol_id="d5waku"
path = "../"

View File

@ -10,13 +10,15 @@ import
eth/p2p/discoveryv5/enr
import
../../../waku/common/logging,
../../../waku/node/peer_manager,
../../../waku/waku_core,
../../../waku/waku_node,
../../../waku/waku_enr,
../../../waku/discovery/waku_discv5,
../../../waku/factory/builder
waku/[
common/logging,
node/peer_manager,
waku_core,
waku_node,
waku_enr,
discovery/waku_discv5,
factory/builder,
]
proc now*(): Timestamp =
getNanosecondTime(getTime().toUnixFloat())

View File

@ -10,14 +10,16 @@ import
eth/p2p/discoveryv5/enr
import
../../../waku/common/logging,
../../../waku/node/peer_manager,
../../../waku/waku_core,
../../../waku/waku_node,
../../../waku/waku_enr,
../../../waku/discovery/waku_discv5,
../../../waku/factory/builder,
../../../waku/waku_relay
waku/[
common/logging,
node/peer_manager,
waku_core,
waku_node,
waku_enr,
discovery/waku_discv5,
factory/builder,
waku_relay,
]
# An accesible bootstrap node. See waku.sandbox fleets.status.im
const bootstrapNode =

View File

@ -8,3 +8,4 @@
-d:chronicles_log_level=INFO
# Results in empty output for some reason
#-d:"chronicles_enabled_topics=GossipSub:TRACE,WakuRelay:TRACE"
path = "../../"

View File

@ -1,7 +1,7 @@
{.push raises: [].}
import
../../waku/common/logging, ../../waku/factory/[waku, networks_config, external_config]
waku/[common/logging, factory/[waku, networks_config, external_config]]
import
std/[options, strutils, os, sequtils],
stew/shims/net as stewNet,

View File

@ -2,9 +2,9 @@
import
stew/results,
../../waku/common/logging,
../../waku/waku_node,
../../waku/waku_rln_relay,
waku/[common/logging,
waku_node,
waku_rln_relay,],
./erc_5564_interface as StealthCommitmentFFI,
./node_spec,
./wire_spec

View File

@ -1,7 +1,7 @@
import std/[times, options]
import confutils, chronicles, chronos, stew/results
import ../../waku/waku_core, ../../waku/common/protobuf
import waku/[waku_core, common/protobuf]
import libp2p/protobuf/minprotobuf
export

View File

@ -1,7 +1,7 @@
{.used.}
import std/strutils, stew/[results, byteutils], testutils/unittests
import ../../waku/common/base64
import waku/common/base64
suite "Waku Common - stew base64 wrapper":
const TestData =

View File

@ -9,8 +9,8 @@ import
confutils/defs,
confutils/std/net
import
../../waku/common/confutils/envvar/defs as confEnvvarDefs,
../../waku/common/confutils/envvar/std/net as confEnvvarNet
waku/common/confutils/envvar/defs as confEnvvarDefs,
waku/common/confutils/envvar/std/net as confEnvvarNet
type ConfResult[T] = Result[T, string]

View File

@ -1,7 +1,7 @@
{.used.}
import std/options, stew/results, stew/shims/net, testutils/unittests
import ../../waku/common/enr, ../testlib/wakucore
import waku/common/enr, ../testlib/wakucore
suite "nim-eth ENR - builder and typed record":
test "Non-supported private key (ECDSA)":

View File

@ -1,7 +1,7 @@
{.used.}
import testutils/unittests
import ../../waku/common/envvar_serialization/utils
import waku/common/envvar_serialization/utils
suite "nim-envvar-serialization - utils":
test "construct env var key":

View File

@ -1,7 +1,7 @@
{.used.}
import testutils/unittests, stew/results
import ../../waku/common/utils/parse_size_units
import waku/common/utils/parse_size_units
suite "Size serialization test":
test "parse normal sizes":

View File

@ -1,7 +1,7 @@
{.used.}
import testutils/unittests
import ../../waku/common/protobuf
import waku/common/protobuf
## Fixtures

View File

@ -1,7 +1,7 @@
{.used.}
import std/[strutils, os], stew/results, testutils/unittests
import ../../waku/common/databases/db_sqlite {.all.}, ../waku_archive/archive_utils
import waku/common/databases/db_sqlite {.all.}, ../waku_archive/archive_utils
template sourceDir(): string =
currentSourcePath.rsplit(DirSep, 1)[0]

View File

@ -2,7 +2,7 @@
import testutils/unittests, chronos
import ../testlib/wakunode, ../../waku/factory/node_factory, ../../waku/waku_node
import ../testlib/wakunode, waku/factory/node_factory, waku/waku_node
suite "Node Factory":
test "Set up a node based on default configurations":

View File

@ -6,27 +6,20 @@ import
chronos,
libp2p/crypto/crypto
import
../../../waku/incentivization/rpc,
../../../waku/incentivization/rpc_codec
import waku/incentivization/rpc, waku/incentivization/rpc_codec
suite "Waku Incentivization Eligibility Codec":
asyncTest "encode eligibility proof":
var byteSequence: seq[byte] = @[1, 2, 3, 4, 5, 6, 7, 8]
let epRpc = EligibilityProof(proofOfPayment: some(byteSequence))
let encoded = encode(epRpc)
let decoded = EligibilityProof.decode(encoded.buffer).get()
check:
epRpc == decoded
asyncTest "encode eligibility proof":
var byteSequence: seq[byte] = @[1, 2, 3, 4, 5, 6, 7, 8]
let epRpc = EligibilityProof(proofOfPayment: some(byteSequence))
let encoded = encode(epRpc)
let decoded = EligibilityProof.decode(encoded.buffer).get()
check:
epRpc == decoded
asyncTest "encode eligibility status":
let esRpc = EligibilityStatus(
statusCode: uint32(200),
statusDesc: some("OK")
)
let encoded = encode(esRpc)
let decoded = EligibilityStatus.decode(encoded.buffer).get()
check:
esRpc == decoded
asyncTest "encode eligibility status":
let esRpc = EligibilityStatus(statusCode: uint32(200), statusDesc: some("OK"))
let encoded = encode(esRpc)
let decoded = EligibilityStatus.decode(encoded.buffer).get()
check:
esRpc == decoded

View File

@ -1,2 +1,3 @@
-d:chronicles_line_numbers
-d:discv5_protocol_id=d5waku
path = "../"

View File

@ -1,13 +1,13 @@
import std/[options], stew/results, testutils/unittests
import
../../../../waku/[node/peer_manager/peer_store/migrations],
waku/node/peer_manager/peer_store/migrations,
../../waku_archive/archive_utils,
../../testlib/[simple_mock]
import std/[tables, strutils, os], stew/results, chronicles
import ../../../../waku/[common/databases/db_sqlite, common/databases/common]
import waku/common/databases/db_sqlite, waku/common/databases/common
suite "Migrations":
test "migrate ok":

View File

@ -1,8 +1,6 @@
import stew/results, testutils/unittests
import
../../../../waku/node/peer_manager/peer_store/peer_storage,
../../../../waku/waku_core/peers
import waku/node/peer_manager/peer_store/peer_storage, waku/waku_core/peers
suite "PeerStorage":
var peerStorage {.threadvar.}: PeerStorage

View File

@ -8,9 +8,7 @@ import
eth/p2p/discoveryv5/enr,
nimcrypto/utils
import
../../../../waku/waku_core/peers,
../../../../waku/node/peer_manager/peer_store/waku_peer_storage
import waku/waku_core/peers, waku/node/peer_manager/peer_store/waku_peer_storage
proc `==`(a, b: RemotePeerInfo): bool =
let comparisons =

View File

@ -1,7 +1,7 @@
import std/options, stew/results, libp2p/peerstore
import
../../../../waku/node/peer_manager/[waku_peer_store, peer_store/waku_peer_storage],
waku/node/peer_manager/[waku_peer_store, peer_store/waku_peer_storage],
../../../waku_archive/archive_utils
proc newTestWakuPeerStorage*(path: Option[string] = string.none()): WakuPeerStorage =

View File

@ -6,10 +6,11 @@ import
testutils/unittests
import
../../../waku/[node/waku_node, waku_core],
waku/node/waku_node,
waku/waku_core,
../../waku_lightpush/[lightpush_utils],
../../testlib/[wakucore, wakunode, futures, testasync],
../../../../waku/node/peer_manager/peer_manager
waku/node/peer_manager/peer_manager
suite "Peer Manager":
suite "onPeerMetadata":

View File

@ -10,7 +10,7 @@ import
libp2p/[peerstore, crypto/crypto]
import
../../../waku/[
waku/[
waku_core,
node/peer_manager,
node/waku_node,

View File

@ -8,7 +8,7 @@ import
libp2p/crypto/crypto
import
../../../waku/[
waku/[
common/paging,
node/waku_node,
node/peer_manager,

View File

@ -11,7 +11,7 @@ import
libp2p/[peerstore, crypto/crypto]
import
../../../waku/[
waku/[
waku_core,
node/peer_manager,
node/waku_node,
@ -23,7 +23,7 @@ import
waku_lightpush/client,
waku_lightpush/protocol_metrics,
waku_lightpush/rpc,
waku_rln_relay
waku_rln_relay,
],
../testlib/[assertions, common, wakucore, wakunode, testasync, futures, testutils],
../resources/payloads
@ -91,12 +91,11 @@ suite "Waku Lightpush - End To End":
suite "Waku LightPush Validation Tests":
asyncTest "Validate message size exceeds limit":
let
msgOverLimit = fakeWakuMessage(
contentTopic = contentTopic,
payload = getByteSequence(DefaultMaxWakuMessageSize + 64 * 1024),
)
let msgOverLimit = fakeWakuMessage(
contentTopic = contentTopic,
payload = getByteSequence(DefaultMaxWakuMessageSize + 64 * 1024),
)
# When the client publishes an over-limit message
let publishResponse = await client.lightpushPublish(
some(pubsubTopic), msgOverLimit, serverRemotePeerInfo
@ -104,7 +103,8 @@ suite "Waku Lightpush - End To End":
check:
publishResponse.isErr()
publishResponse.error == fmt"Message size exceeded maximum of {DefaultMaxWakuMessageSize} bytes"
publishResponse.error ==
fmt"Message size exceeded maximum of {DefaultMaxWakuMessageSize} bytes"
suite "RLN Proofs as a Lightpush Service":
var
@ -143,7 +143,6 @@ suite "RLN Proofs as a Lightpush Service":
rlnRelayTreePath: genTempPath("rln_tree", "wakunode"),
)
await allFutures(server.start(), client.start())
await server.start()
@ -176,4 +175,4 @@ suite "RLN Proofs as a Lightpush Service":
echo "Publish failed: ", publishResponse.error()
# Then the message is relayed to the server
assertResultOk publishResponse
assertResultOk publishResponse

View File

@ -13,7 +13,7 @@ import
eth/p2p/discoveryv5/enr
import
../../../waku/[
waku/[
waku_node,
discovery/waku_discv5,
waku_peer_exchange,

View File

@ -13,7 +13,7 @@ import
from times import getTime, toUnix
import
../../../waku/[
waku/[
waku_core,
node/peer_manager,
node/waku_node,

View File

@ -12,8 +12,7 @@ import
from std/times import epochTime
import
../../../waku/
[node/waku_node, node/peer_manager, waku_core, waku_node, waku_rln_relay],
waku/[node/waku_node, node/peer_manager, waku_core, waku_node, waku_rln_relay],
../waku_store/store_utils,
../waku_archive/archive_utils,
../waku_relay/utils,

View File

@ -17,7 +17,7 @@ import
libp2p/protocols/pubsub/pubsub
import
../../../waku/[
waku/[
waku_core/topics/pubsub_topic,
waku_core/topics/sharding,
node/waku_node,
@ -31,7 +31,7 @@ import
../waku_archive/archive_utils,
../testlib/[assertions, common, wakucore, wakunode, testasync, futures, testutils]
import ../../../waku/waku_relay/protocol
import waku_relay/protocol
const
listenIp = ValidIpAddress.init("0.0.0.0")

View File

@ -8,7 +8,7 @@ import
libp2p/crypto/crypto
import
../../../waku/[
waku/[
common/paging,
node/waku_node,
node/peer_manager,

View File

@ -1,7 +1,6 @@
import std/options, results
import
../../../waku/
[node/peer_manager, node/waku_node, waku_enr/sharding, common/enr/typed_record],
waku/[node/peer_manager, node/waku_node, waku_enr/sharding, common/enr/typed_record],
../testlib/[wakucore]
proc relayShards*(node: WakuNode): RelayShards =

View File

@ -1,7 +1,7 @@
{.used.}
import std/[sets, random], stew/[results, byteutils], testutils/unittests
import ../../waku/waku_core, ../../waku/waku_api/message_cache, ./testlib/wakucore
import waku/waku_core, waku/waku_api/message_cache, ./testlib/wakucore
randomize()

View File

@ -17,18 +17,20 @@ import
libp2p/protocols/pubsub/rpc/message,
libp2p/peerid
import
../../waku/common/databases/db_sqlite,
../../waku/node/peer_manager/peer_manager,
../../waku/node/peer_manager/peer_store/waku_peer_storage,
../../waku/waku_node,
../../waku/waku_core,
../../waku/waku_enr/capabilities,
../../waku/waku_relay/protocol,
../../waku/waku_filter_v2/common,
../../waku/waku_store/common,
../../waku/waku_lightpush/common,
../../waku/waku_peer_exchange,
../../waku/waku_metadata,
waku/[
common/databases/db_sqlite,
node/peer_manager/peer_manager,
node/peer_manager/peer_store/waku_peer_storage,
waku_node,
waku_core,
waku_enr/capabilities,
waku_relay/protocol,
waku_filter_v2/common,
waku_store/common,
waku_lightpush/common,
waku_peer_exchange,
waku_metadata,
],
./testlib/common,
./testlib/testutils,
./testlib/wakucore,

View File

@ -2,10 +2,12 @@
import std/options, testutils/unittests, eth/p2p/discoveryv5/enr, libp2p/crypto/crypto
import
../../waku/common/databases/db_sqlite,
../../waku/node/peer_manager/peer_manager,
../../waku/node/peer_manager/peer_store/waku_peer_storage,
../../waku/waku_enr,
waku/[
common/databases/db_sqlite,
node/peer_manager/peer_manager,
node/peer_manager/peer_store/waku_peer_storage,
waku_enr,
],
./testlib/wakucore
suite "Peer Storage":

View File

@ -9,9 +9,7 @@ import
libp2p/multiaddress,
testutils/unittests
import
../../waku/node/peer_manager/peer_manager,
../../waku/node/peer_manager/waku_peer_store,
../../waku/waku_node,
waku/[node/peer_manager/peer_manager, node/peer_manager/waku_peer_store, waku_node],
./testlib/wakucore
suite "Extended nim-libp2p Peer Store":

View File

@ -10,8 +10,7 @@ import
libp2p/crypto/crypto,
libp2p/protocols/pubsub/gossipsub
import
../../waku/waku_core, ../../waku/waku_node, ./testlib/wakucore, ./testlib/wakunode
import waku/waku_core, waku/waku_node, ./testlib/wakucore, ./testlib/wakunode
procSuite "Relay (GossipSub) Peer Exchange":
asyncTest "Mount relay without peer exchange handler":

View File

@ -1,11 +1,7 @@
{.used.}
import testutils/unittests
import
stew/results,
../../waku/waku_core/message,
../../waku/waku_core/time,
./testlib/common
import stew/results, waku/waku_core/message, waku/waku_core/time, ./testlib/common
suite "Waku Payload":
test "Encode/Decode waku message with timestamp":

View File

@ -11,9 +11,9 @@ import
eth/keys,
dnsdisc/builder
import
../../waku/node/peer_manager,
../../waku/waku_node,
../../waku/discovery/waku_dnsdisc,
waku/node/peer_manager,
waku/waku_node,
waku/discovery/waku_dnsdisc,
./testlib/common,
./testlib/wakucore,
./testlib/wakunode

View File

@ -1,7 +1,7 @@
{.used.}
import std/[options, sequtils], stew/results, testutils/unittests
import ../../waku/waku_core, ../../waku/waku_enr, ./testlib/wakucore
import waku/waku_core, waku/waku_enr, ./testlib/wakucore
suite "Waku ENR - Capabilities bitfield":
test "check capabilities support":

View File

@ -11,8 +11,7 @@ import
libp2p/stream/bufferstream,
libp2p/stream/connection,
libp2p/crypto/crypto
import
../../waku/waku_core, ../../waku/waku_node, ./testlib/wakucore, ./testlib/wakunode
import waku/waku_core, waku/waku_node, ./testlib/wakucore, ./testlib/wakunode
suite "Waku Keepalive":
asyncTest "handle ping keepalives":

View File

@ -1,9 +1,9 @@
{.used.}
import std/[os, json], chronos, testutils/unittests
import ../../waku/waku_keystore, ./testlib/common
import waku/waku_keystore, ./testlib/common
from ../../waku/waku_noise/noise_utils import randomSeqByte
from waku/waku_noise/noise_utils import randomSeqByte
procSuite "Credentials test suite":
let testAppInfo = AppInfo(application: "test", appIdentifier: "1234", version: "0.1")

View File

@ -1,9 +1,9 @@
{.used.}
import std/[json, os], stew/byteutils, testutils/unittests, chronos, eth/keys
import ../../waku/waku_keystore, ./testlib/common
import waku/waku_keystore, ./testlib/common
from ../../waku/waku_noise/noise_utils import randomSeqByte
from waku/waku_noise/noise_utils import randomSeqByte
suite "KeyFile test suite":
test "Create/Save/Load single keyfile":

View File

@ -14,11 +14,14 @@ import
eth/keys,
eth/p2p/discoveryv5/enr
import
../../waku/waku_node,
../../waku/waku_core/topics,
../../waku/node/peer_manager,
../../waku/discovery/waku_discv5,
../../waku/waku_metadata,
waku/
[
waku_node,
waku_core/topics,
node/peer_manager,
discovery/waku_discv5,
waku_metadata,
],
./testlib/wakucore,
./testlib/wakunode

View File

@ -2,9 +2,9 @@
import chronos, confutils/toml/std/net, libp2p/multiaddress, testutils/unittests
import ./testlib/wakunode, ../../waku/waku_enr/capabilities
import ./testlib/wakunode, waku/waku_enr/capabilities
include ../../waku/node/config
include waku/node/config
proc defaultTestWakuFlags(): CapabilitiesBitfield =
CapabilitiesBitfield.init(

View File

@ -9,12 +9,14 @@ import
libp2p/protobuf/minprotobuf,
stew/endians2
import
../../waku/utils/noise as waku_message_utils,
../../waku/waku_noise/noise_types,
../../waku/waku_noise/noise_utils,
../../waku/waku_noise/noise,
../../waku/waku_noise/noise_handshake_processing,
../../waku/waku_core,
waku/[
utils/noise as waku_message_utils,
waku_noise/noise_types,
waku_noise/noise_utils,
waku_noise/noise,
waku_noise/noise_handshake_processing,
waku_core,
],
./testlib/common
procSuite "Waku Noise":

View File

@ -2,12 +2,14 @@
import std/tables, stew/[results, byteutils], testutils/unittests
import
../../waku/common/protobuf,
../../waku/utils/noise as waku_message_utils,
../../waku/waku_noise/noise_types,
../../waku/waku_noise/noise_utils,
../../waku/waku_noise/noise_handshake_processing,
../../waku/waku_core,
waku/[
common/protobuf,
utils/noise as waku_message_utils,
waku_noise/noise_types,
waku_noise/noise_utils,
waku_noise/noise_handshake_processing,
waku_core,
],
./testlib/common
procSuite "Waku Noise Sessions":

View File

@ -2,10 +2,7 @@
import std/[options, sequtils, tables], testutils/unittests, chronos, chronicles
import
../../waku/waku_metadata,
../../waku/waku_metadata/rpc,
./testlib/wakucore,
./testlib/wakunode
waku/waku_metadata, waku/waku_metadata/rpc, ./testlib/wakucore, ./testlib/wakunode
procSuite "Waku Protobufs":
# TODO: Missing test coverage in many encode/decode protobuf functions

View File

@ -2,7 +2,7 @@
import chronos, testutils/unittests, libp2p, libp2p/protocols/rendezvous
import ../../waku/node/waku_switch, ./testlib/common, ./testlib/wakucore
import waku/node/waku_switch, ./testlib/common, ./testlib/wakucore
proc newRendezvousClientSwitch(rdv: RendezVous): Switch =
SwitchBuilder

View File

@ -8,7 +8,7 @@ import
libp2p/protocols/connectivity/relay/relay,
libp2p/protocols/connectivity/relay/client,
stew/byteutils
import ../../waku/node/waku_switch, ./testlib/common, ./testlib/wakucore
import waku/node/waku_switch, ./testlib/common, ./testlib/wakucore
proc newCircuitRelayClientSwitch(relayClient: RelayClient): Switch =
SwitchBuilder

View File

@ -17,11 +17,7 @@ import
libp2p/nameresolving/mockresolver,
eth/p2p/discoveryv5/enr
import
../../waku/waku_core,
../../waku/waku_node,
../../waku/node/peer_manager,
../../waku/waku_relay,
../../waku/waku_peer_exchange,
waku/[waku_core, waku_node, node/peer_manager, waku_relay, waku_peer_exchange],
./testlib/wakucore,
./testlib/wakunode

View File

@ -2,10 +2,7 @@
import std/options, stew/shims/net as stewNet, testutils/unittests, chronos
import
../../waku/waku_core,
../../waku/waku_lightpush/common,
../../waku/node/peer_manager,
../../waku/waku_node,
waku/[waku_core, waku_lightpush/common, node/peer_manager, waku_node],
./testlib/wakucore,
./testlib/wakunode

View File

@ -1,6 +1,6 @@
import chronos
import ../../../waku/[waku_core/message, waku_store, waku_store_legacy]
import waku/[waku_core/message, waku_store, waku_store_legacy]
const
FUTURE_TIMEOUT* = 1.seconds

View File

@ -1,9 +1,11 @@
import chronicles, chronos
import
../../../waku/waku_archive,
../../../waku/waku_archive/driver as driver_module,
../../../waku/waku_archive/driver/builder,
../../../waku/waku_archive/driver/postgres_driver
waku/[
waku_archive,
waku_archive/driver as driver_module,
waku_archive/driver/builder,
waku_archive/driver/postgres_driver,
]
const storeMessageDbUrl = "postgres://postgres:test123@localhost:5432/postgres"

View File

@ -1,6 +1,6 @@
import std/[tables, sequtils, options]
import ../../../waku/waku_core/topics, ../testlib/wakucore
import waku/waku_core/topics, ../testlib/wakucore
proc `==`*(
table: Table[pubsub_topic.NsPubsubTopic, seq[NsContentTopic]],

View File

@ -7,7 +7,7 @@ import
libp2p/builders,
libp2p/crypto/crypto as libp2p_keys,
eth/keys as eth_keys
import ../../../waku/waku_core, ./common
import waku/waku_core, ./common
export switch

View File

@ -9,14 +9,16 @@ import
libp2p/crypto/crypto as libp2p_keys,
eth/keys as eth_keys
import
../../../waku/waku_node,
../../../waku/waku_core/topics,
../../../waku/node/peer_manager,
../../../waku/waku_enr,
../../../waku/discovery/waku_discv5,
../../../waku/factory/external_config,
../../../waku/factory/internal_config,
../../../waku/factory/builder,
waku/[
waku_node,
waku_core/topics,
node/peer_manager,
waku_enr,
discovery/waku_discv5,
factory/external_config,
factory/internal_config,
factory/builder,
],
./common
# Waku node

View File

@ -3,7 +3,7 @@
import std/options, stew/results, chronos, libp2p/crypto/crypto
import
../../../waku/[
waku/[
node/peer_manager,
waku_core,
waku_archive,

View File

@ -2,10 +2,12 @@
import std/[sequtils, options], testutils/unittests, chronos
import
../../../waku/waku_archive,
../../../waku/waku_archive/driver/postgres_driver,
../../../waku/waku_core,
../../../waku/waku_core/message/digest,
waku/[
waku_archive,
waku_archive/driver/postgres_driver,
waku_core,
waku_core/message/digest,
],
../testlib/wakucore,
../testlib/testasync,
../testlib/postgres

View File

@ -6,11 +6,13 @@ import
chronos,
chronicles
import
../../../waku/waku_archive,
../../../waku/waku_archive/driver as driver_module,
../../../waku/waku_archive/driver/postgres_driver,
../../../waku/waku_core,
../../../waku/waku_core/message/digest,
waku/[
waku_archive,
waku_archive/driver as driver_module,
waku_archive/driver/postgres_driver,
waku_core,
waku_core/message/digest,
],
../testlib/common,
../testlib/wakucore,
../testlib/testasync,

View File

@ -2,10 +2,12 @@
import std/options, stew/results, testutils/unittests
import
../../../waku/waku_archive,
../../../waku/waku_archive/driver/queue_driver/queue_driver {.all.},
../../../waku/waku_archive/driver/queue_driver/index,
../../../waku/waku_core
waku/[
waku_archive,
waku_archive/driver/queue_driver/queue_driver {.all.},
waku_archive/driver/queue_driver/index,
waku_core,
]
# Helper functions

View File

@ -1,7 +1,7 @@
{.used.}
import std/[times, random], stew/byteutils, testutils/unittests, nimcrypto
import ../../../waku/waku_core, ../../../waku/waku_archive/driver/queue_driver/index
import waku/waku_core, waku/waku_archive/driver/queue_driver/index
var rng = initRand()

View File

@ -3,10 +3,12 @@
import
std/[options, sequtils, algorithm], testutils/unittests, libp2p/protobuf/minprotobuf
import
../../../waku/waku_archive,
../../../waku/waku_archive/driver/queue_driver/queue_driver {.all.},
../../../waku/waku_archive/driver/queue_driver/index,
../../../waku/waku_core,
waku/[
waku_archive,
waku_archive/driver/queue_driver/queue_driver {.all.},
waku_archive/driver/queue_driver/index,
waku_core,
],
../testlib/common,
../testlib/wakucore

View File

@ -3,10 +3,13 @@
import
std/[options, sequtils, random, algorithm], testutils/unittests, chronos, chronicles
import
../../../waku/waku_archive,
../../../waku/waku_archive/driver/queue_driver,
../../../waku/waku_core,
../../../waku/waku_core/message/digest,
waku/
[
waku_archive,
waku_archive/driver/queue_driver,
waku_core,
waku_core/message/digest,
],
../testlib/common,
../testlib/wakucore

View File

@ -2,10 +2,12 @@
import std/sequtils, testutils/unittests, chronos
import
../../../waku/common/databases/db_sqlite,
../../../waku/waku_archive,
../../../waku/waku_archive/driver/sqlite_driver,
../../../waku/waku_core,
waku/[
common/databases/db_sqlite,
waku_archive,
waku_archive/driver/sqlite_driver,
waku_core,
],
../waku_archive/archive_utils,
../testlib/common,
../testlib/wakucore

View File

@ -4,11 +4,13 @@ import
std/[options, sequtils, random, algorithm], testutils/unittests, chronos, chronicles
import
../../../waku/common/databases/db_sqlite,
../../../waku/waku_archive,
../../../waku/waku_archive/driver/sqlite_driver,
../../../waku/waku_core,
../../../waku/waku_core/message/digest,
waku/[
common/databases/db_sqlite,
waku_archive,
waku_archive/driver/sqlite_driver,
waku_core,
waku_core/message/digest,
],
../testlib/common,
../testlib/wakucore,
../waku_archive/archive_utils

View File

@ -1,9 +1,7 @@
{.used.}
import testutils/unittests, chronos
import
../../../waku/waku_archive/driver/postgres_driver/partitions_manager,
../../../waku/waku_core/time
import waku/waku_archive/driver/postgres_driver/partitions_manager, waku/waku_core/time
suite "Partition Manager":
test "Calculate end partition time":

View File

@ -2,14 +2,16 @@
import std/[sequtils, times], stew/results, testutils/unittests, chronos
import
../../../waku/common/databases/db_sqlite,
../../../waku/waku_core,
../../../waku/waku_core/message/digest,
../../../waku/waku_archive,
../../../waku/waku_archive/driver/sqlite_driver,
../../../waku/waku_archive/retention_policy,
../../../waku/waku_archive/retention_policy/retention_policy_capacity,
../../../waku/waku_archive/retention_policy/retention_policy_size,
waku/[
common/databases/db_sqlite,
waku_core,
waku_core/message/digest,
waku_archive,
waku_archive/driver/sqlite_driver,
waku_archive/retention_policy,
waku_archive/retention_policy/retention_policy_capacity,
waku_archive/retention_policy/retention_policy_size,
],
../waku_archive/archive_utils,
../testlib/common,
../testlib/wakucore

View File

@ -8,12 +8,14 @@ import
libp2p/crypto/crypto
import
../../../waku/common/databases/db_sqlite,
../../../waku/common/paging,
../../../waku/waku_core,
../../../waku/waku_core/message/digest,
../../../waku/waku_archive/driver/sqlite_driver,
../../../waku/waku_archive,
waku/[
common/databases/db_sqlite,
common/paging,
waku_core,
waku_core/message/digest,
waku_archive/driver/sqlite_driver,
waku_archive,
],
../waku_archive/archive_utils,
../testlib/common,
../testlib/wakucore

View File

@ -1,7 +1,7 @@
{.used.}
import std/sequtils, stew/byteutils, stew/endians2, testutils/unittests
import ../../../waku/waku_core, ../testlib/wakucore
import waku/waku_core, ../testlib/wakucore
suite "Waku Message - Deterministic hashing":
test "digest computation - empty meta field":

View File

@ -1,7 +1,7 @@
{.used.}
import std/options, stew/results, testutils/unittests
import ../../../waku/waku_core/topics
import waku/waku_core/topics
suite "Waku Message - Content topics namespacing":
test "Stringify namespaced content topic":

View File

@ -2,7 +2,7 @@
import
stew/results, testutils/unittests, libp2p/multiaddress, libp2p/peerid, libp2p/errors
import ../../waku/waku_core
import waku/waku_core
suite "Waku Core - Peers":
test "Peer info parses correctly":

View File

@ -1,7 +1,7 @@
{.used.}
import testutils/unittests
import ../../waku/waku_core/time
import waku/waku_core/time
suite "Waku Core - Time":
test "Test timestamp conversion":

View File

@ -2,7 +2,7 @@
import std/[options], testutils/unittests, results
import ../../../../waku/[waku_core/topics/pubsub_topic], ../../testlib/[wakucore]
import waku/waku_core/topics/pubsub_topic, ../../testlib/[wakucore]
suite "Static Sharding Functionality":
test "Shard Cluster Identification":

View File

@ -1,6 +1,6 @@
import std/[options, tables], testutils/unittests
import ../../../../waku/waku_core/topics, ../../testlib/[wakucore, tables, testutils]
import waku/waku_core/topics, ../../testlib/[wakucore, tables, testutils]
const GenerationZeroShardsCount = 8
const ClusterId = 1

View File

@ -11,7 +11,7 @@ import
eth/keys as eth_keys
import
../../../waku/[waku_core/topics, waku_enr, discovery/waku_discv5, common/enr],
waku/[waku_core/topics, waku_enr, discovery/waku_discv5, common/enr],
../testlib/[wakucore, testasync, assertions, futures],
../waku_enr/utils,
./utils

View File

@ -6,7 +6,7 @@ import
eth/keys as eth_keys
import
../../../waku/
waku/
[waku_core/topics, waku_enr, discovery/waku_discv5, node/peer_manager/peer_manager],
../testlib/[common, wakucore]

View File

@ -9,7 +9,7 @@ import
eth/keys as eth_keys
import
../../../waku/[waku_enr, discovery/waku_discv5, waku_core, common/enr],
waku/[waku_enr, discovery/waku_discv5, waku_core, common/enr],
../testlib/wakucore,
../waku_discv5/utils,
./utils

View File

@ -7,7 +7,7 @@ import
eth/keys as eth_keys
import
../../../waku/[waku_core/topics, waku_enr, discovery/waku_discv5, waku_enr/sharding],
waku/[waku_core/topics, waku_enr, discovery/waku_discv5, waku_enr/sharding],
../testlib/[common, wakucore]
proc newTestEnrRecord*(

View File

@ -10,8 +10,9 @@ import
libp2p/peerstore
import
../../../waku/[node/peer_manager, waku_core],
../../../waku/waku_filter_v2/[common, client, subscriptions, protocol, rpc_codec],
waku/node/peer_manager,
waku/waku_core,
waku/waku_filter_v2/[common, client, subscriptions, protocol, rpc_codec],
../testlib/[wakucore, testasync, testutils, futures, sequtils],
./waku_filter_utils,
../resources/payloads

View File

@ -7,11 +7,13 @@ import
chronicles,
libp2p/peerstore
import
../../../waku/node/peer_manager,
../../../waku/waku_filter_v2,
../../../waku/waku_filter_v2/rpc,
../../../waku/waku_filter_v2/subscriptions,
../../../waku/waku_core,
waku/[
node/peer_manager,
waku_filter_v2,
waku_filter_v2/rpc,
waku_filter_v2/subscriptions,
waku_core,
],
../testlib/common,
../testlib/wakucore,
./waku_filter_utils

View File

@ -1,7 +1,7 @@
import std/[options, tables, sets, sequtils, algorithm], chronos, chronicles, os
import
../../../waku/[
waku/[
node/peer_manager,
waku_filter_v2,
waku_filter_v2/client,

View File

@ -3,10 +3,10 @@
import std/options, chronicles, chronos, libp2p/crypto/crypto
import
../../waku/node/peer_manager,
../../waku/waku_core,
../../waku/waku_lightpush,
../../waku/waku_lightpush/[client, common],
waku/node/peer_manager,
waku/waku_core,
waku/waku_lightpush,
waku/waku_lightpush/[client, common],
../testlib/[common, wakucore]
proc newTestWakuLightpushNode*(

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