mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-06-26 11:29:28 +00:00
Rename waku_rln_relay to waku_rln
This commit is contained in:
parent
40d93047e2
commit
4484347cfa
@ -3,13 +3,13 @@ import
|
||||
|
||||
import
|
||||
logos_delivery/waku/[
|
||||
waku_rln_relay/protocol_types,
|
||||
waku_rln_relay/bindings,
|
||||
waku_rln_relay,
|
||||
waku_rln_relay/conversion_utils,
|
||||
waku_rln_relay/group_manager/on_chain/group_manager,
|
||||
waku_rln/protocol_types,
|
||||
waku_rln/bindings,
|
||||
waku_rln,
|
||||
waku_rln/conversion_utils,
|
||||
waku_rln/group_manager/on_chain/group_manager,
|
||||
],
|
||||
tests/waku_rln_relay/utils_onchain
|
||||
tests/waku_rln/utils_onchain
|
||||
|
||||
proc benchmark(
|
||||
manager: OnChainGroupManager, registerCount: int, messageLimit: int
|
||||
|
||||
@ -48,7 +48,7 @@ import
|
||||
./config_chat2
|
||||
|
||||
import libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/pubsub
|
||||
import ../../logos_delivery/waku/waku_rln_relay
|
||||
import ../../logos_delivery/waku/waku_rln
|
||||
|
||||
const Help = """
|
||||
Commands: /[?|help|connect|nick|exit]
|
||||
|
||||
@ -56,7 +56,7 @@ import
|
||||
./config_chat2mix
|
||||
|
||||
import libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/pubsub
|
||||
import ../../logos_delivery/waku/waku_rln_relay
|
||||
import ../../logos_delivery/waku/waku_rln
|
||||
|
||||
logScope:
|
||||
topics = "chat2 mix"
|
||||
|
||||
@ -25,7 +25,7 @@ import
|
||||
discovery/waku_discv5,
|
||||
discovery/waku_dnsdisc,
|
||||
waku_relay,
|
||||
waku_rln_relay,
|
||||
waku_rln,
|
||||
factory/builder,
|
||||
factory/networks_config,
|
||||
],
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import
|
||||
results,
|
||||
logos_delivery/waku/[common/logging, waku_node, waku_rln_relay],
|
||||
logos_delivery/waku/[common/logging, waku_node, waku_rln],
|
||||
./erc_5564_interface as StealthCommitmentFFI,
|
||||
./node_spec,
|
||||
./wire_spec
|
||||
|
||||
@ -15,7 +15,7 @@ import
|
||||
waku_store/client,
|
||||
waku_store/common,
|
||||
waku_relay/protocol,
|
||||
waku_rln_relay/rln_relay,
|
||||
waku_rln/rln,
|
||||
waku_lightpush/client,
|
||||
waku_lightpush/callbacks,
|
||||
events/message_events,
|
||||
|
||||
@ -23,7 +23,7 @@ import
|
||||
../net/net_config,
|
||||
../waku_core,
|
||||
../waku_core/codecs,
|
||||
../waku_rln_relay,
|
||||
../waku_rln,
|
||||
../discovery/waku_dnsdisc,
|
||||
../waku_archive/retention_policy as policy,
|
||||
../waku_archive/retention_policy/builder as policy_builder,
|
||||
|
||||
@ -24,7 +24,7 @@ import
|
||||
waku_core,
|
||||
waku_node,
|
||||
waku_archive,
|
||||
waku_rln_relay,
|
||||
waku_rln,
|
||||
waku_store,
|
||||
waku_filter_v2,
|
||||
waku_relay/protocol,
|
||||
|
||||
@ -13,7 +13,7 @@ import
|
||||
results
|
||||
|
||||
import
|
||||
../waku_rln_relay/rln_relay,
|
||||
../waku_rln/rln,
|
||||
../rest_api/endpoint/builder,
|
||||
../discovery/waku_discv5,
|
||||
../discovery/waku_kademlia,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import logos_delivery/waku/compat/option_valueor
|
||||
import std/[options, sets], chronos, web3, stew/byteutils, stint, results, chronicles
|
||||
|
||||
import logos_delivery/waku/incentivization/rpc, tests/waku_rln_relay/utils_onchain
|
||||
import logos_delivery/waku/incentivization/rpc, tests/waku_rln/utils_onchain
|
||||
|
||||
const SimpleTransferGasUsed = Quantity(21000)
|
||||
const TxReceiptQueryTimeout = 3.seconds
|
||||
|
||||
@ -10,7 +10,7 @@ import
|
||||
libp2p/protocols/pubsub/rpc/messages,
|
||||
logos_delivery/waku/[
|
||||
waku_relay,
|
||||
waku_rln_relay,
|
||||
waku_rln,
|
||||
api/types,
|
||||
events/health_events,
|
||||
events/peer_events,
|
||||
|
||||
@ -4,7 +4,7 @@ import logos_delivery/waku/compat/option_valueor
|
||||
import chronicles, chronos, metrics, metrics/chronos_httpserver
|
||||
import
|
||||
logos_delivery/waku/
|
||||
[net/auto_port, waku_rln_relay/protocol_metrics as rln_metrics, utils/collector],
|
||||
[net/auto_port, waku_rln/protocol_metrics as rln_metrics, utils/collector],
|
||||
./peer_manager,
|
||||
./node_telemetry,
|
||||
./waku_node
|
||||
|
||||
@ -52,7 +52,7 @@ import
|
||||
waku_lightpush as lightpush_protocol,
|
||||
waku_enr,
|
||||
waku_peer_exchange,
|
||||
waku_rln_relay,
|
||||
waku_rln,
|
||||
common/rate_limit/setting,
|
||||
common/callbacks,
|
||||
common/nimchronos,
|
||||
|
||||
@ -30,7 +30,7 @@ import
|
||||
../../waku_lightpush as lightpush_protocol,
|
||||
../peer_manager,
|
||||
../../common/rate_limit/setting,
|
||||
../../waku_rln_relay
|
||||
../../waku_rln
|
||||
|
||||
logScope:
|
||||
topics = "waku node lightpush api"
|
||||
|
||||
@ -28,8 +28,8 @@ import
|
||||
waku_filter_v2,
|
||||
waku_archive,
|
||||
waku_store_sync,
|
||||
waku_rln_relay,
|
||||
waku_rln_relay/adapters/relay as waku_rln_relay_adapter,
|
||||
waku_rln,
|
||||
waku_rln/adapters/relay as waku_rln_adapter,
|
||||
node/waku_node,
|
||||
node/subscription_manager,
|
||||
node/peer_manager,
|
||||
|
||||
@ -13,7 +13,7 @@ import
|
||||
import
|
||||
../../../waku_node,
|
||||
../../../waku_relay/protocol,
|
||||
../../../waku_rln_relay,
|
||||
../../../waku_rln,
|
||||
../../../node/waku_node,
|
||||
../../message_cache,
|
||||
../../handlers,
|
||||
|
||||
@ -77,7 +77,7 @@ proc toIdentityCredentials*(
|
||||
|
||||
proc serialize*(idComms: seq[IDCommitment]): seq[byte] =
|
||||
## serializes a seq of IDCommitments to a byte seq
|
||||
## the serialization is based on https://github.com/status-im/nwaku/blob/37bd29fbc37ce5cf636734e7dd410b1ed27b88c8/waku/v2/protocol/waku_rln_relay/rln.nim#L142
|
||||
## the serialization is based on https://github.com/status-im/nwaku/blob/37bd29fbc37ce5cf636734e7dd410b1ed27b88c8/waku/v2/protocol/waku_rln/rln.nim#L142
|
||||
## the order of serialization is |id_commitment_len<8>|id_commitment<var>|
|
||||
var idCommsBytes = newSeq[byte]()
|
||||
|
||||
|
||||
@ -7,8 +7,8 @@ import
|
||||
../waku_core,
|
||||
../waku_relay,
|
||||
./common,
|
||||
../waku_rln_relay,
|
||||
../waku_rln_relay/protocol_types
|
||||
../waku_rln,
|
||||
../waku_rln/protocol_types
|
||||
|
||||
import std/times, libp2p/peerid, stew/byteutils
|
||||
|
||||
|
||||
@ -5,8 +5,8 @@ import
|
||||
../waku_relay,
|
||||
./common,
|
||||
./protocol_metrics,
|
||||
../waku_rln_relay,
|
||||
../waku_rln_relay/protocol_types
|
||||
../waku_rln,
|
||||
../waku_rln/protocol_types
|
||||
|
||||
import std/times, libp2p/peerid, stew/byteutils
|
||||
|
||||
|
||||
7
logos_delivery/waku/waku_rln.nim
Normal file
7
logos_delivery/waku/waku_rln.nim
Normal file
@ -0,0 +1,7 @@
|
||||
import
|
||||
./waku_rln/group_manager,
|
||||
./waku_rln/conversion_utils,
|
||||
./waku_rln/rln,
|
||||
./waku_rln/contract
|
||||
|
||||
export group_manager, conversion_utils, rln, contract
|
||||
@ -8,7 +8,7 @@ import
|
||||
stew/byteutils,
|
||||
libp2p/protocols/pubsub/pubsub
|
||||
|
||||
import ../rln_relay, ../protocol_types, ../protocol_metrics, ../conversion_utils
|
||||
import ../rln, ../protocol_types, ../protocol_metrics, ../conversion_utils
|
||||
|
||||
import logos_delivery/waku/[waku_relay, waku_core]
|
||||
|
||||
@ -23,7 +23,7 @@ const PathCheckMinInterval* = 30.seconds
|
||||
const RlnCredentialsFilename* = "rlnCredentials.txt"
|
||||
|
||||
# inputs of the membership contract constructor
|
||||
# TODO may be able to make these constants private and put them inside the waku_rln_relay_utils
|
||||
# TODO may be able to make these constants private and put them inside the waku_rln_utils
|
||||
const
|
||||
# in wei
|
||||
MembershipFee* = 0.u256
|
||||
@ -33,9 +33,9 @@ import
|
||||
logos_delivery/waku/
|
||||
[common/error_handling, waku_core, requests/rln_requests, waku_keystore]
|
||||
|
||||
# Re-export the new submodules so existing `import waku_rln_relay`
|
||||
# (and `import waku_rln_relay/rln_relay`) callers continue to see the
|
||||
# moved symbols (WakuRLNRelay, WakuRlnConfig, generateRLNProof, etc.).
|
||||
# Re-export the submodules so existing `import waku_rln`
|
||||
# (and `import waku_rln/rln`) callers see the moved symbols
|
||||
# (WakuRLNRelay, WakuRlnConfig, generateRLNProof, etc.).
|
||||
export types, config, proof, nullifier_log
|
||||
|
||||
logScope:
|
||||
@ -1,7 +0,0 @@
|
||||
import
|
||||
./waku_rln_relay/group_manager,
|
||||
./waku_rln_relay/conversion_utils,
|
||||
./waku_rln_relay/rln_relay,
|
||||
./waku_rln_relay/contract
|
||||
|
||||
export group_manager, conversion_utils, rln_relay, contract
|
||||
@ -15,7 +15,7 @@ import
|
||||
waku_lightpush_legacy,
|
||||
waku_lightpush_legacy/common,
|
||||
waku_lightpush_legacy/protocol_metrics,
|
||||
waku_rln_relay,
|
||||
waku_rln,
|
||||
],
|
||||
../testlib/[wakucore, wakunode, testasync, futures, testutils],
|
||||
../resources/payloads,
|
||||
|
||||
@ -9,7 +9,7 @@ import
|
||||
|
||||
import
|
||||
logos_delivery/waku/
|
||||
[waku_core, node/peer_manager, waku_node, waku_lightpush, waku_rln_relay],
|
||||
[waku_core, node/peer_manager, waku_node, waku_lightpush, waku_rln],
|
||||
../testlib/[wakucore, wakunode, testasync, futures],
|
||||
../resources/payloads,
|
||||
../waku_rln_relay/[rln/waku_rln_relay_utils, utils_onchain]
|
||||
|
||||
@ -17,9 +17,9 @@ import
|
||||
waku_core,
|
||||
waku_node,
|
||||
common/error_handling,
|
||||
waku_rln_relay,
|
||||
waku_rln_relay/bindings,
|
||||
waku_rln_relay/protocol_types,
|
||||
waku_rln,
|
||||
waku_rln/bindings,
|
||||
waku_rln/protocol_types,
|
||||
waku_keystore/keystore,
|
||||
],
|
||||
../waku_store/store_utils,
|
||||
|
||||
@ -5,7 +5,7 @@ import stint
|
||||
|
||||
import
|
||||
logos_delivery/waku/
|
||||
[waku_keystore/protocol_types, waku_rln_relay, waku_rln_relay/protocol_types]
|
||||
[waku_keystore/protocol_types, waku_rln, waku_rln/protocol_types]
|
||||
|
||||
func fromStrToBytesLe*(v: string): seq[byte] =
|
||||
try:
|
||||
|
||||
@ -14,7 +14,7 @@ from std/times import epochTime
|
||||
|
||||
import
|
||||
logos_delivery/waku/[
|
||||
waku_relay, node/waku_node, node/peer_manager, waku_core, waku_node, waku_rln_relay
|
||||
waku_relay, node/waku_node, node/peer_manager, waku_core, waku_node, waku_rln
|
||||
],
|
||||
../waku_store/store_utils,
|
||||
../waku_archive/archive_utils,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import testutils/unittests, results
|
||||
|
||||
import logos_delivery/waku/waku_rln_relay/rln/rln_interface
|
||||
import logos_delivery/waku/waku_rln_relay/rln/wrappers
|
||||
import logos_delivery/waku/waku_rln/rln/rln_interface
|
||||
import logos_delivery/waku/waku_rln/rln/wrappers
|
||||
|
||||
suite "Vec_uint8":
|
||||
suite "toVecUint8":
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import testutils/unittests, results
|
||||
|
||||
import
|
||||
logos_delivery/waku/waku_rln_relay/bindings,
|
||||
logos_delivery/waku/waku_rln_relay/rln/wrappers,
|
||||
logos_delivery/waku/waku_rln/bindings,
|
||||
logos_delivery/waku/waku_rln/rln/wrappers,
|
||||
./waku_rln_relay_utils
|
||||
|
||||
suite "membershipKeyGen":
|
||||
|
||||
@ -2,8 +2,8 @@ import std/options
|
||||
import std/tempfiles
|
||||
|
||||
import
|
||||
logos_delivery/waku/waku_rln_relay,
|
||||
logos_delivery/waku/waku_rln_relay/[
|
||||
logos_delivery/waku/waku_rln,
|
||||
logos_delivery/waku/waku_rln/[
|
||||
group_manager, bindings, conversion_utils, constants, protocol_types, protocol_metrics,
|
||||
nonce_manager,
|
||||
]
|
||||
|
||||
@ -6,9 +6,9 @@ import std/[options, os], results, testutils/unittests, chronos, web3
|
||||
|
||||
import
|
||||
logos_delivery/waku/[
|
||||
waku_rln_relay,
|
||||
waku_rln_relay/conversion_utils,
|
||||
waku_rln_relay/group_manager/on_chain/group_manager,
|
||||
waku_rln,
|
||||
waku_rln/conversion_utils,
|
||||
waku_rln/group_manager/on_chain/group_manager,
|
||||
],
|
||||
./utils_onchain
|
||||
|
||||
|
||||
@ -18,13 +18,13 @@ import
|
||||
|
||||
import
|
||||
logos_delivery/waku/[
|
||||
waku_rln_relay,
|
||||
waku_rln_relay/protocol_types,
|
||||
waku_rln_relay/protocol_metrics,
|
||||
waku_rln_relay/constants,
|
||||
waku_rln_relay/bindings,
|
||||
waku_rln_relay/conversion_utils,
|
||||
waku_rln_relay/group_manager/on_chain/group_manager,
|
||||
waku_rln,
|
||||
waku_rln/protocol_types,
|
||||
waku_rln/protocol_metrics,
|
||||
waku_rln/constants,
|
||||
waku_rln/bindings,
|
||||
waku_rln/conversion_utils,
|
||||
waku_rln/group_manager/on_chain/group_manager,
|
||||
],
|
||||
../testlib/wakucore,
|
||||
./utils_onchain
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{.used.}
|
||||
|
||||
import testutils/unittests, chronos, os
|
||||
import logos_delivery/waku/waku_rln_relay/nonce_manager
|
||||
import logos_delivery/waku/waku_rln/nonce_manager
|
||||
|
||||
suite "Nonce manager":
|
||||
test "should initialize successfully":
|
||||
|
||||
@ -14,9 +14,9 @@ import brokers/broker_context
|
||||
import
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
waku_rln_relay,
|
||||
waku_rln_relay/bindings,
|
||||
waku_rln_relay/protocol_metrics,
|
||||
waku_rln,
|
||||
waku_rln/bindings,
|
||||
waku_rln/protocol_metrics,
|
||||
waku_keystore,
|
||||
],
|
||||
./rln/waku_rln_relay_utils,
|
||||
|
||||
@ -11,7 +11,7 @@ import
|
||||
brokers/broker_context
|
||||
|
||||
import
|
||||
logos_delivery/waku/[waku_core, waku_node, waku_rln_relay],
|
||||
logos_delivery/waku/[waku_core, waku_node, waku_rln],
|
||||
../testlib/[wakucore, futures, wakunode, testutils],
|
||||
./utils_onchain,
|
||||
./rln/waku_rln_relay_utils
|
||||
|
||||
@ -12,7 +12,7 @@ from std/times import epochTime
|
||||
|
||||
import
|
||||
../../../logos_delivery/waku/
|
||||
[node/waku_node, node/peer_manager, waku_core, waku_node, waku_rln_relay],
|
||||
[node/waku_node, node/peer_manager, waku_core, waku_node, waku_rln],
|
||||
../waku_store/store_utils,
|
||||
../waku_archive/archive_utils,
|
||||
../testlib/[wakucore, futures, assertions]
|
||||
|
||||
@ -21,10 +21,10 @@ import
|
||||
|
||||
import
|
||||
logos_delivery/waku/[
|
||||
waku_rln_relay,
|
||||
waku_rln_relay/protocol_types,
|
||||
waku_rln_relay/constants,
|
||||
waku_rln_relay/bindings,
|
||||
waku_rln,
|
||||
waku_rln/protocol_types,
|
||||
waku_rln/constants,
|
||||
waku_rln/bindings,
|
||||
],
|
||||
../testlib/common
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ import
|
||||
rest_api/endpoint/responses,
|
||||
rest_api/endpoint/health/handlers as health_rest_interface,
|
||||
rest_api/endpoint/health/client as health_rest_client,
|
||||
waku_rln_relay,
|
||||
waku_rln,
|
||||
node/health_monitor,
|
||||
],
|
||||
../testlib/common,
|
||||
|
||||
@ -21,7 +21,7 @@ import
|
||||
rest_api/endpoint/relay/handlers as relay_rest_interface,
|
||||
rest_api/endpoint/relay/client as relay_rest_client,
|
||||
waku_relay,
|
||||
waku_rln_relay,
|
||||
waku_rln,
|
||||
],
|
||||
../testlib/wakucore,
|
||||
../testlib/wakunode,
|
||||
|
||||
@ -8,9 +8,9 @@ import chronicles, results, std/[tempfiles, sequtils]
|
||||
import
|
||||
logos_delivery/waku/[
|
||||
waku_keystore,
|
||||
waku_rln_relay/bindings,
|
||||
waku_rln_relay/conversion_utils,
|
||||
waku_rln_relay/group_manager/on_chain,
|
||||
waku_rln/bindings,
|
||||
waku_rln/conversion_utils,
|
||||
waku_rln/group_manager/on_chain,
|
||||
]
|
||||
|
||||
logScope:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user