-
Notifications
You must be signed in to change notification settings - Fork 97
Improve config files examples coherency #6785
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
Improve config files examples coherency #6785
Conversation
📝 WalkthroughWalkthroughThe pull request modifies configuration files across multiple components of the HOPR protocol, focusing on changes to ticket redemption and aggregation strategies. Key modifications include renaming the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (7)
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: 0
🧹 Nitpick comments (2)
sdk/default.cfg.yaml (1)
24-24
: Add newline at end of file.The file is missing a newline character at the end, which is a POSIX requirement.
minimum_redeem_ticket_value: "0 HOPR" +
🧰 Tools
🪛 yamllint (1.35.1)
[error] 24-24: no new line character at the end of file
(new-line-at-end-of-file)
hoprd/hoprd/example_cfg.yaml (1)
107-110
: LGTM! New parameters enhance ticket redemption control.The addition of
redeem_all_on_close
andminimum_redeem_ticket_value
parameters provides better control over the ticket redemption process.Add descriptive comments for new parameters.
Consider adding detailed comments for the new parameters to maintain consistency with the documentation style of other parameters in this example configuration file.
- # If set, all tickets will be redeemed on channel closure. + # If set to true, all tickets (including non-aggregated ones) will be redeemed when + # a channel transitions to the PendingToClose state. This can lead to higher gas costs + # if there are many small-value tickets. redeem_all_on_close: true - # Sets the minimum value of a ticket to be able to redeem it. + # Specifies the minimum value that a ticket must have to be eligible for redemption. + # This helps prevent redemption of very small tickets that might cost more in gas + # than the ticket value itself. Format: "<amount> HOPR" minimum_redeem_ticket_value: "0 HOPR"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
deploy/compose/hoprd_data/hoprd.cfg.yaml
(1 hunks)hoprd/hoprd/example_cfg.yaml
(1 hunks)sdk/default.cfg.yaml
(1 hunks)
🧰 Additional context used
🪛 yamllint (1.35.1)
sdk/default.cfg.yaml
[error] 24-24: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: hoprd / docker
- GitHub Check: hopli / docker
- GitHub Check: Docs / Rust docs
🔇 Additional comments (2)
sdk/default.cfg.yaml (1)
24-24
: LGTM! Default value for minimum_redeem_ticket_value is appropriate.Setting
minimum_redeem_ticket_value: "0 HOPR"
as the default allows redeeming tickets of any value, which is a sensible default configuration.🧰 Tools
🪛 yamllint (1.35.1)
[error] 24-24: no new line character at the end of file
(new-line-at-end-of-file)
deploy/compose/hoprd_data/hoprd.cfg.yaml (1)
18-18
: LGTM! Production-appropriate minimum redemption value.Setting
minimum_redeem_ticket_value: "2000000000000000000 HOPR"
is appropriate for production deployment as it prevents micro-redemptions that could lead to higher gas costs.
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
🧹 Nitpick comments (1)
hoprd/hoprd/example_cfg.yaml (1)
107-110
: Add documentation comments for the new parameters.The new parameters are well-placed and follow consistent naming patterns. However, they would benefit from documentation comments like other parameters in the file.
Add documentation comments:
redeem_only_aggregated: true + # If set, the strategy will attempt to redeem all tickets when a channel is being closed, + # regardless of their aggregation status. redeem_all_on_close: true + # Minimum value that a ticket must have to be considered for redemption. + # Set to "0 HOPR" to allow redemption of all tickets. minimum_redeem_ticket_value: "0 HOPR"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
hoprd/hoprd/example_cfg.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: Docs / Rust docs
- GitHub Check: tests-unit
- GitHub Check: tests-unit-nightly
- GitHub Check: tests-smart-contracts
- GitHub Check: tests-smoke-websocket
- GitHub Check: Linter
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: 0
🧹 Nitpick comments (1)
hoprd/hoprd/example_cfg.yaml (1)
109-110
: Consider documenting the minimum ticket value thresholdThe
minimum_redeem_ticket_value
is set to "90000000000000000 HOPR" (0.09 HOPR). Consider adding a comment explaining:
- The rationale behind this specific threshold
- The implications of setting it too high or too low
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
hoprd/hoprd/example_cfg.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: hoprd / docker
- GitHub Check: hopli / docker
- GitHub Check: tests-smoke-websocket
- GitHub Check: tests-unit-nightly
- GitHub Check: Linter
- GitHub Check: tests-unit
🔇 Additional comments (2)
hoprd/hoprd/example_cfg.yaml (2)
107-110
: Configuration inconsistencies detected across filesThe values and parameters in the
!AutoRedeeming
strategy differ across configuration files:
minimum_redeem_ticket_value
varies significantly across filesredeem_all_on_close
parameter exists here but other files useredeem_only_aggregated
Let's verify the configuration consistency:
#!/bin/bash # Description: Check for consistency of the new parameters across config files # Expected: Same default values in other config files echo "Searching for config files containing the parameters..." rg --type yaml --hidden -l "redeem_all_on_close|minimum_redeem_ticket_value" echo -e "\nShowing parameter values across files..." rg --type yaml --hidden -B1 -A1 "redeem_all_on_close|minimum_redeem_ticket_value"
107-108
: Document the relationship betweenredeem_all_on_close
andredeem_only_aggregated
The configuration has both
redeem_all_on_close: true
andredeem_only_aggregated: true
, which seems contradictory. Please clarify:
- The precedence between these parameters
- The behavior when both are set to
true
Co-authored-by: Lukas <lukas.pohanka@inina.net> Co-authored-by: Tibor <9529609+Teebor-Choka@users.noreply.github.com>
Aligns the config file examples with the code, by adding/renaming/removing parameters.