Egor Rachkovskii 639dffc505
Fix nim waku daily failures (#169)
* Add REST API traffic bypass for network conditions manipulation

- Introduced methods to apply packet loss only to P2P traffic, excluding REST API traffic.
- Simplified test cases to leverage new differentiated packet loss handling.
- Removed unused and legacy metrics/tests for cleaner configuration and coverage.

* Refactor network conditions setup to streamline command execution

* Pin priomap so libp2p traffic actually hits netem

The default prio qdisc priomap routes SO_PRIORITY 6 and 7 to band 0,
which is our REST bypass class 1:1. libp2p/gossipsub packets set a high
SO_PRIORITY on their sockets, so they were silently escaping the netem
impairment via the priomap rather than through the u32 filter. The
result: test_relay_packet_loss_correlated_vs_uncorrelated became green
by accident because no loss was ever applied to relay traffic.

Forcing priomap to 1 1 1 1 ... on all 16 slots routes every SO_PRIORITY
value to band 1 (netem). The u32 filter remains the only path to 1:1,
so REST stays isolated and libp2p now takes the configured loss.

Verified in alpine netns: with SO_PRIORITY=6, 50 packets to a non-REST
port ended up in 1:1 under the old rules (0 drops); with the forced
priomap they land in 1:2 and see the expected ~50% drop rate.

* Refactor P2P traffic loss handling; isolate REST API traffic

- Added `_p2p_iface` to dynamically detect libp2p interface tied to the Waku network.
- Introduced `add_packet_loss_p2p_only` and `add_packet_loss_correlated_p2p_only` for targeted packet loss on libp2p traffic.
- Replaced REST API traffic bypass logic with simplified P2P interface-based tc rules.
- Updated tests to use `clear_p2p` for cleanup, ensuring REST traffic remains unaffected.

---------

Co-authored-by: Egor Rachkovskii <egorrachkovskii@status.im>
2026-04-14 14:25:36 +01:00
2026-03-02 10:13:56 +01:00
2025-09-23 09:38:51 +00:00
2026-04-14 14:25:36 +01:00
2026-04-14 14:25:36 +01:00
2023-11-01 14:02:29 +02:00
2025-02-05 13:55:44 +02:00
2025-01-06 15:29:33 +02:00

logos-messaging-interop-tests

Logos Messaging endtoend (e2e) interoperability test framework for the Waku v2 protocol. It exercises multiple clients (logos-messaging-nim, jswaku, gowaku…) in realistic network topologies and reports results via Allure.

Setup & contribution

# Use sparse checkout since the repo has large history
git clone --depth=1 git@github.com:logos-messaging/logos-messaging-interop-tests.git
cd logos-messaging-interop-tests

# create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate

# install python dependencies + prepare git hooks
pip install -r requirements.txt
pre-commit install

Tip

You can override any default variable defined in src/env_vars.py either • by exporting it before the pytest call, or • by creating a .env file at the repository root.

Running tests locally

Run one specific test:

pytest -k test_unsubscribe_from_some_content_topics

Run an entire test class / suite:

pytest -k TestRelaySubscribe

All usual pytest selectors (-k, -m, -q, etc.) work.

Waku logs can be found in log/docker folder while test log can be seen either in the terminal or in the log folder.

Continuous Integration (CI)

Daily build on nwaku:latest

Every day the workflow nim_waku_daily.yml triggers against the image wakuorg/nwaku:latest.

To launch it manually:

  1. Open https://github.com/logos-messaging/logos-messaging-interop-tests/actions/workflows/nim_waku_daily.yml.
  2. Click Run workflow.
  3. Pick the branch you want to test (defaults to master) and press Run workflow.

Ondemand matrix against custom logos-messaging-nim versions

Use interop_tests.yml when you need to test a PR or a historical image:

  1. Open https://github.com/logos-messaging/logos-messaging-interop-tests/actions/workflows/interop_tests.yml.
  2. Press Run workflow and choose the branch.
  3. In the workflow inputs field set the nwaku_image you want, e.g. wakuorg/nwaku:v0.32.0.

Viewing the results

  • When the job finishes GitHub will display an Allure Report link in the run summary.
  • The bot also posts the same link in the Waku / testreports Discord channel.

Updating the CI job used from logos-messaging-nim

In the logos-messaging-nim repository itself the file .github/workflows/test_PR_image.yml pins the interop test version to SMOKE_TEST_STABLE.

To update it, move the SMOKE_TEST_STABLE tag to point to the desired commit in waku-interop-tests.

License

Licensed under either of:

at your option.

Languages
Python 87%
Shell 13%