logos-delivery/tests/all_tests_waku.nim
stubbsta a9210984b2
feat: meter SendService transmissions through RateLimitManager
Wires the relocated RateLimitManager into the messaging layer at the
transmission stage rather than the API entry point:

- MessagingClientConf gains a rateLimit: RateLimitConfig field
  (defaulting to DefaultEpochPeriodSec / DefaultMessagesPerEpoch), and
  MessagingClient.new hands the constructed manager to SendService.
- SendService consults admit() before the first transmission of a
  task, both in send() and in the retry loop. Re-publishes of an
  already-propagated message (firstPropagatedTime set) skip admission:
  they resend the same bytes, which reuse the same RLN proof/nullifier
  and consume no fresh epoch slot.
- An over-budget task parks in the task cache as NextRoundRetry; the
  service loop re-admits it as the epoch budget frees up. The skeleton
  admit() is a pass-through, so behaviour is unchanged today.

Gating transmissions instead of MessagingClient.send keeps SDS repair
rebroadcasts free of API-entry rejection (SDS decides that a repair is
needed; the transmission scheduler decides when it fits the budget)
while every wire transmission still draws from one node-wide budget --
which network-side RLN enforcement applies to repairs regardless of
any local bypass. It is also where RLN proof attachment must happen,
since proofs bind to the epoch current at transmission time.

Adds tests/messaging/test_rate_limit_manager.nim covering the current
disabled + enabled pass-through behaviour, wired into
all_tests_waku.nim.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:00:46 +02:00

96 lines
2.2 KiB
Nim

## Waku v2
import ./test_waku
# Waku core test suite
import
./waku_core/test_namespaced_topics,
./waku_core/test_time,
./waku_core/test_message_digest,
./waku_core/test_peers,
./waku_core/test_published_address
# Waku archive test suite
import
./waku_archive/test_driver_queue_index,
./waku_archive/test_driver_queue_pagination,
./waku_archive/test_driver_queue_query,
./waku_archive/test_driver_queue,
./waku_archive/test_driver_sqlite_query,
./waku_archive/test_driver_sqlite,
./waku_archive/test_retention_policy,
./waku_archive/test_waku_archive,
./waku_archive/test_partition_manager
const os* {.strdefine.} = ""
when os == "Linux" and
# GitHub only supports container actions on Linux
# and we need to start a postgres database in a docker container
defined(postgres):
import
./waku_archive/test_driver_postgres_query,
./waku_archive/test_driver_postgres,
./factory/test_node_factory,
./wakunode_rest/test_rest_store,
./wakunode_rest/test_all
# Waku store test suite
import
./waku_store/test_client,
./waku_store/test_rpc_codec,
./waku_store/test_waku_store,
./waku_store/test_wakunode_store
# Waku store sync suite
import ./waku_store_sync/test_all
import
./node/test_all,
./waku_filter_v2/test_all,
./waku_peer_exchange/test_all,
./waku_lightpush_legacy/test_all,
./waku_lightpush/test_all,
./waku_relay/test_all,
./incentivization/test_all
import
# Waku v2 tests
./test_wakunode,
./test_peer_store_extended,
./test_message_cache,
./test_peer_manager,
./test_peer_storage,
./test_waku_keepalive,
./test_waku_enr,
./test_waku_dnsdisc,
./test_relay_peer_exchange,
./test_waku_netconfig,
./test_waku_switch,
./test_waku_rendezvous,
./test_waku_metadata,
./waku_discv5/test_waku_discv5,
./waku_kademlia/test_waku_kademlia
# Waku Keystore test suite
import ./test_waku_keystore_keyfile, ./test_waku_keystore
import ./waku_rln_relay/test_all
# Node Factory
import ./factory/test_all
# Waku API tests
import ./api/test_all
# Waku tools tests
import ./tools/test_all
# Persistency library tests
import ./persistency/test_all
# Messaging API tests
import ./messaging/test_all
# Reliable Channel API tests
import ./channels/test_all