You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test_relay_enforces_voucher_and_transfer_limits_combined()
Simulate a full connection using a voucher, attempt over-transfer, and verify both validation and enforcement.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
@guha-rahul : Thank you so much Rahul for enabling voucher verification and data transfer limit enforcement in a relay protocol.
Wish if you should add test coverage for:
Voucher Validation Tests
Suggested file:
tests/relay/circuit_v2/test_voucher_validation.py
Tests to include:
test_valid_voucher_is_accepted()
Simulate a valid signed voucher and assert it's accepted.
test_invalid_voucher_is_rejected()
Use a tampered or unsigned voucher and assert rejection.
test_expired_voucher_is_rejected()
Create a voucher with a past expiration time and verify it's rejected.
test_voucher_from_untrusted_peer_is_rejected()
Test with a voucher signed by an unauthorized peer or entity.
Data Transfer Limit Enforcement Tests
Suggested file:
tests/relay/circuit_v2/test_data_transfer_limits.py
Tests to include:
test_transfer_within_limit_is_allowed()
Send data below the cap and ensure the connection is maintained.
test_transfer_exceeding_limit_is_terminated()
Exceed limit and assert that the relay drops or throttles the connection.
test_limit_enforced_per_reservation()
Ensure per-peer or per-reservation limits are honored across multiple sessions.
Integration-Level Test (Optional but Useful)
Suggested file:
tests/relay/circuit_v2/test_relay_integration.py
Tests to include:
test_relay_enforces_voucher_and_transfer_limits_combined()
Simulate a full connection using a voucher, attempt over-transfer, and verify both validation and enforcement.
Beta Was this translation helpful? Give feedback.
All reactions