-
Notifications
You must be signed in to change notification settings - Fork 98
Make auto-path finding quality threshold configurable #6823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR adds the `network.quality_auto_path_threshold` (defaults to 0.95) to allow the auto-path finding algorithm to ignore nodes, which have lower quality than this threshold.
Warning Rate limit exceeded@NumberFour8 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 28 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request introduces a modification in the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
transport/api/src/lib.rs
(1 hunks)transport/network/src/config.rs
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: hoprd / docker
- GitHub Check: hopli / docker
- GitHub Check: Docs / Rust docs
- GitHub Check: tests-smoke-websocket
- GitHub Check: tests-smart-contracts
- GitHub Check: tests-unit-nightly
- GitHub Check: Linter
- GitHub Check: tests-unit
🔇 Additional comments (3)
transport/network/src/config.rs (2)
17-17
: LGTM! The default threshold value is appropriate.The default value of 0.95 for
DEFAULT_AUTO_PATH_QUALITY_THRESHOLD
is a reasonable choice as it ensures high-quality paths are selected.
159-162
: LGTM! The helper function follows the established pattern.The implementation of
quality_auto_path_threshold()
is consistent with other similar functions in the file.transport/api/src/lib.rs (1)
253-255
: LGTM! The configuration usage is appropriate.The change correctly uses the new
quality_auto_path_threshold
for path selection instead ofquality_bad_threshold
. This is a better choice as auto-path finding should prioritize high-quality paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
transport/api/src/lib.rs
(1 hunks)transport/network/src/config.rs
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: hoprd / docker
- GitHub Check: hopli / docker
- GitHub Check: Docs / Rust docs
- GitHub Check: tests-smoke-websocket
- GitHub Check: tests-smart-contracts
- GitHub Check: tests-unit-nightly
- GitHub Check: Linter
- GitHub Check: tests-unit
🔇 Additional comments (2)
transport/network/src/config.rs (1)
17-17
: Consider if 0.95 is too restrictive for a default threshold.The default auto-path quality threshold of 0.95 (95%) is quite high and might be too restrictive, potentially limiting the number of available paths. Consider if a lower default value would be more appropriate while still maintaining acceptable quality standards.
✅ Verification successful
The 0.95 threshold is indeed too restrictive and should be lowered
The default auto-path quality threshold of 0.95 (95%) is significantly higher than other quality thresholds in the codebase:
- Network considers nodes "bad" at 0.1 (10%)
- DFS path selector uses 0.2 (20%) by default
- Promiscuous strategy uses 0.5 (50%)
Consider lowering it to 0.5-0.6 range to align with other components while still maintaining good quality standards.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check current quality metrics across nodes to assess impact rg -A 5 "quality.*=.*0\.[0-9]+"Length of output: 2229
Script:
#!/bin/bash # Search for quality-related constants and documentation rg -i "quality.*threshold|quality.*score" -A 3 -B 1 # Search for comments explaining quality metrics rg -i "quality" -g "*.md" -A 3 -B 1Length of output: 65869
transport/api/src/lib.rs (1)
253-255
: LGTM!The change correctly updates the DfsPathSelectorConfig to use the new quality_auto_path_threshold while maintaining other default configuration values.
This PR adds the
network.quality_auto_path_threshold
(defaults to 0.95) to allow the auto-path finding algorithm to ignore nodes, which have lower quality than this threshold.