fix: Fix voucher verification and data transfer limits in Circuit Relay v2
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 624
- Forks
- 256
- Avg merge
- 1d 34m
- Merged PRs (30d)
- 47
Description
Description
The voucher verification was accepting all vouchers regardless of validity, and data transfer limits were not being properly enforced due to redundant checking logic.
Ref impl- https://github.com/libp2p/go-libp2p/blob/master/p2p/protocol/circuitv2/client/reservation.go
Motivation
These fixes are essential for:
Security: Prevents unauthorized relay usage through proper voucher validation
Resource Protection: Ensures data transfer limits are correctly enforced to prevent relay overload
Current Implementation
Voucher verification always returned True, accepting any voucher regardless of validity
Are you planning to do it yourself in a pull request ?
Yes
Tracks #691
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Circuit Relay v2 voucher verification and data transfer limit code, then compare its behavior with the referenced go-libp2p reservation.go implementation. Verify that invalid vouchers are rejected and that transfer limits are enforced without redundant checks; add or run the relevant tests for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100