Skip to content
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

Reduce down time on restart #651

Merged
merged 4 commits into from
Feb 21, 2025
Merged

Conversation

jeandemeusy
Copy link
Collaborator

@jeandemeusy jeandemeusy commented Feb 19, 2025

With those parameters, the average down time during a restart of the CT pod is around 2min, which is a nice improvement from the delay on prod until now which is around 15min.

As the staging and prod parameters set for execution delays are the same, the same delay is expected on prod.

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Adjusted configuration settings to optimize system performance and resource allocation.
    • Streamlined operational thresholds across environments, ensuring balanced load management.
    • Enhanced the data retrieval process for improved system responsiveness.
    • Updated version tag for the core component in production configuration.

Copy link
Contributor

coderabbitai bot commented Feb 19, 2025

📝 Walkthrough

Walkthrough

This pull request updates configuration values in both production and staging files by modifying various operational flags. In each file, numerical parameters have been adjusted—most values are reduced significantly, with one parameter in staging increased. The changes affect flags related to economic modeling, ticketing, peer connectivity, topology settings, subgraph rotation, rewards/allocations, and node operations, as well as a minor formatting fix.

Changes

File(s) Change Summary
ct-app/.../core_prod_config.yaml Updated flags: applyEconomicModel 60→30, ticketParameters 120→60, connectedPeers 120→30, topology 600→30, rotateSubgraphs 300→60; rewards/limits (peersRewards, registeredNodes, allocations, EOABalances, NFTHolders, safeFundings) 600→300; node settings: healthcheck 30→15, retrievePeers 120→60.
ct-app/.../core_staging_config.yaml Updated flags: applyEconomicModel 60→30, ticketParameters 120→60, connectedPeers 120→30, topology 60→30, rotateSubgraphs 300→60; rewards/limits adjusted to 300; node settings: healthcheck 30→15, retrievePeers 120→60, retrieveChannels 60→120; removed extra space in observeMessageQueue.
helm/.../values-prod.yaml Updated tag for core component from v3.8.2 to v3.8.3.

Possibly related PRs

Suggested labels

status:done, hotfix

Suggested reviewers

  • Teebor-Choka

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (4)
ct-app/.configs/core_staging_config.yaml (2)

36-36: Boolean Flag Formatting Note
The line observeMessageQueue: On # should only be On / Off is correct per the inline note; however, consider whether switching to a boolean value (e.g., true/false) might improve consistency and reduce ambiguity across your configuration files.


21-21: Trailing Spaces Cleanup
Static analysis flagged trailing spaces on this line. Please remove any extra whitespace to conform to YAML lint standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 21-21: trailing spaces

(trailing-spaces)

ct-app/.configs/core_prod_config.yaml (2)

39-41: Peer Communication Flag Format
The messageRelayRequest: On flag continues to use a string value. If your system supports boolean flags, consider standardizing (e.g., true/false) for better consistency across different modules.


21-21: Trailing Spaces Cleanup
Similar to the staging configuration, static analysis flagged trailing spaces on this line. Removing such extra whitespaces will help maintain YAML format consistency.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 21-21: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5bf2c0d and 6ebd42a.

📒 Files selected for processing (2)
  • ct-app/.configs/core_prod_config.yaml (1 hunks)
  • ct-app/.configs/core_staging_config.yaml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
ct-app/.configs/core_staging_config.yaml

[error] 21-21: trailing spaces

(trailing-spaces)

ct-app/.configs/core_prod_config.yaml

[error] 21-21: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and push container image
🔇 Additional comments (14)
ct-app/.configs/core_staging_config.yaml (5)

7-8: Parameter Adjustments in the “core” Section
The values for applyEconomicModel: 30 and ticketParameters: 60 have been reduced (halved) to meet the intended operational adjustments. Please verify that these lower thresholds still satisfy the intended economic modulation without unexpectedly affecting distribution timing.


10-11: Network Configuration Updates
The changes for connectedPeers: 30 and topology: 30 are consistent with the overall reduction strategy. Confirm that these reduced values maintain sufficient connectivity for your staging environment.


13-13: Subgraph Rotation Frequency
The update to rotateSubgraphs: 60 represents a significant reduction. Ensure that the increased frequency (or decreased interval) does not strain related services or impact stability.


15-20: Core Reward and Allocation Settings
The modifications for peersRewards, registeredNodes, allocations, EOABalances, NFTHolders, and safeFundings (all set to 300) appear uniformly applied. It’s important to test these values in operational scenarios to verify they produce the anticipated reduction in delay before distribution post-restart.


23-25: Node Section Adjustments
The updates—healthcheck: 15, retrievePeers: 60, and retrieveChannels: 120—reduce the operational waiting periods. Verify that these changes provide improved responsiveness without compromising service stability.

ct-app/.configs/core_prod_config.yaml (9)

7-8: Production “core” Section Parameter Updates
The changes for applyEconomicModel: 30 and ticketParameters: 60 mirror the staging adjustments and appear consistent. Confirm that these revised values align with production performance expectations.


10-11: Adjusted Network Parameters
Reducing connectedPeers to 30 and topology to 30 is a drastic shift from previous configurations. Make sure that these lower numbers do not inadvertently limit network resilience during high load in production.


13-13: Subgraph Rotation Setting
The production change to rotateSubgraphs: 60 should be evaluated to ensure it does not lead to overly frequent subgraph updates which might affect downstream services or synchronization.


15-20: Core Rewards and Allocation Adjustments
The parameters for peersRewards, registeredNodes, allocations, EOABalances, NFTHolders, and safeFundings have been uniformly set to 300. This consistency is good; please validate that these values integrate well into the broader production logic.


23-25: Node Configuration Revisions
The updated healthcheck: 15 and retrievePeers: 60 (with retrieveChannels: 120 and retrieveBalances: 300) reduce service delay. Double-check that these adjustments contribute effectively to reducing the delay before distribution after restart while not affecting critical node health assessments.


28-32: Channel Operations Settings
The values for channel operations (from openChannels to closeIncomingChannels: Off) remain unchanged. Ensure these default values still work harmoniously with the reduced delays in other sections.


34-37: Message Queue and Relay Configurations
The settings observeMessageQueue: On and observeRelayedMessages: 15 appear appropriate. They should be tested in context to verify that message processing and relaying behaviors meet the revised performance criteria.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 35-35: trailing spaces

(trailing-spaces)


47-57: Economic Model Legacy Parameters in Production
The legacy economic model settings—including NFTThreshold: 30000, apr: 12.5, and coefficient adjustments (c: 75000, l: 10000)—differ significantly from the staging defaults. Please ensure these production-specific modifications have been thoroughly reviewed with the economic model stakeholders to avoid unintended financial implications.


68-72: Sigmoid Model Adjustments for Production Scaling
The updates to the sigmoid parameters (maxAPR: 15, networkCapacity: 2000, and totalTokenSupply: 450000000) represent a major shift for production scaling. It is advisable to simulate these changes to confirm that they yield the intended impact on system behavior and financial modeling.

@jeandemeusy jeandemeusy changed the title Reduce delay before distribution after restart Reduce down time on restart Feb 19, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
ct-app/.configs/core_staging_config.yaml (2)

21-21: Remove Trailing Spaces.
YAMLlint has flagged trailing spaces on this line. Please remove any extraneous whitespace to comply with YAML formatting standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 21-21: trailing spaces

(trailing-spaces)


36-36: Observation Queue Formatting.
The setting observeMessageQueue is set to "On" with an inline comment noting the acceptable values. To avoid potential parsing issues, ensure that the value is strictly "On" (or "Off") without additional formatting artifacts.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between befe41f and f2c1b61.

📒 Files selected for processing (1)
  • ct-app/.configs/core_staging_config.yaml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
ct-app/.configs/core_staging_config.yaml

[error] 21-21: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and push container image
🔇 Additional comments (6)
ct-app/.configs/core_staging_config.yaml (6)

7-8: Parameter Reduction for Economic Model and Ticket Settings.
The values for applyEconomicModel (30) and ticketParameters (60) are reduced, likely to help minimize restart delays. Please validate these adjustments with relevant performance benchmarks.


10-11: Updated Core Network Parameters.
The connectedPeers and topology values have been lowered to 30. Confirm that these reduced thresholds continue to support necessary network connectivity and do not adversely impact system stability.


13-13: Rotation Parameter Tuning.
The value for rotateSubgraphs is now set to 60, which should quicken subgraph rotations. Ensure that this new rate meets operational requirements without introducing instability in the subgraph management.


15-20: Uniform Value Setting for Reward and Funding Parameters.
Parameters peersRewards, registeredNodes, allocations, EOABalances, NFTHolders, and safeFundings are all updated to 300. Confirm that these uniform reductions align with your performance objectives and do not adversely affect related processes.


23-25: Node Configuration Adjustments.
Within the node section, healthcheck is decreased to 15 and retrievePeers to 60, which is consistent with the overall reduction theme. However, note that retrieveChannels is increased to 120. Please verify that this increase is intentional and calibrated to support channel processing requirements.


47-47: Clarification on NFTThreshold Value.
The line NFTThreshold: ~ uses the YAML null indicator ~. Please confirm whether this is intended to represent a null value or if a specific numeric threshold should be provided.

@jeandemeusy jeandemeusy merged commit 45498f6 into main Feb 21, 2025
3 checks passed
@jeandemeusy jeandemeusy deleted the jean/reduce-delay-before-distribution branch February 21, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant