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

chore: slightly increase blocktime #9021

Merged
merged 3 commits into from
Mar 10, 2025
Merged

Conversation

PaddyMc
Copy link
Collaborator

@PaddyMc PaddyMc commented Mar 7, 2025

What is the purpose of the change

Slightly increase blocktime

@PaddyMc PaddyMc added V:state/compatible/backport State machine compatible PR, should be backported A:backport/v29.x backport patches to v8.x branch labels Mar 7, 2025
Copy link
Contributor

coderabbitai bot commented Mar 7, 2025

Walkthrough

This pull request introduces a new entry in the CHANGELOG.md documenting a slight increase in block time and updates the consensus configuration in cmd/osmosisd/cmd/root.go. The configuration changes adjust the timeout values used in commit and propose operations. These modifications update timing parameters without altering existing functionalities.

Changes

File(s) Summary of Changes
CHANGELOG.md Added a new "Unreleased" entry: [#9021] chore: slightly increase blocktime to document the block time increase.
cmd/osmosisd/cmd/root.go Updated consensus configuration: changed timeout_commit from "500ms" to "550ms" and timeout_propose from "1.8s" to "1.6s".

Possibly related PRs

Suggested labels

V:state/compatible/no_backport, A:no-changelog

Suggested reviewers

  • czarcas7ic
  • ValarDragon

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e6ef40a and ad1d578.

📒 Files selected for processing (1)
  • cmd/osmosisd/cmd/root.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/osmosisd/cmd/root.go
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: go-split-test-files
  • GitHub Check: e2e
  • GitHub Check: Run golangci-lint
  • GitHub Check: Summary

🪧 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.
  • @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 (1)
cmd/osmosisd/cmd/root.go (1)

141-162:

❓ Verification inconclusive

Verify the impact on network performance

The adjustment to consensus timeouts will slightly increase block times as intended, potentially improving network stability by allowing more time for consensus operations.

These timeout adjustments should be monitored after deployment to ensure they achieve the desired balance between block time and network stability. Consider measuring:

  1. Actual block times before and after the change
  2. Rate of consensus timeouts
  3. Network participation metrics

🏁 Script executed:

#!/bin/bash
# Check for references to consensus parameters in the codebase
echo "Searching for consensus parameter references..."
rg -A 2 -B 2 "timeout_commit|timeout_propose" --type go

Length of output: 816


Monitor Consensus Timeout Impact & Performance Metrics

The changes in consensus timeout values (timeout_commit at 550ms and timeout_propose at 1.9s) in cmd/osmosisd/cmd/root.go are correctly applied as confirmed by the reference search. These adjustments are expected to slightly increase block times, potentially enhancing network stability by allowing more time for consensus operations. Please ensure you monitor the following after deployment:

  • Actual block times before and after the change
  • Rates of consensus timeouts
  • Network participation metrics

This will help confirm that the new timeout settings provide the desired balance between block time and stability.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0da1096 and e6ef40a.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • cmd/osmosisd/cmd/root.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: go (03)
  • GitHub Check: go (02)
  • GitHub Check: go (01)
  • GitHub Check: go (00)
  • GitHub Check: e2e
  • GitHub Check: Summary
🔇 Additional comments (3)
cmd/osmosisd/cmd/root.go (2)

149-151: Timeout commit increased by 10%

This change increases the timeout_commit value from 500ms to 550ms, which is a 10% increase. This aligns with the PR objective of slightly increasing block time.


154-156: Timeout propose increased by 5.6%

This change increases the timeout_propose value from 1.8s to 1.9s, which is approximately a 5.6% increase. This complements the timeout_commit increase to achieve the desired block time adjustment.

CHANGELOG.md (1)

56-56: Ensure Changelog Entry Clarity and Consistency

The newly added line
* [#9021](https://github.com/osmosis-labs/osmosis/pull/9021) chore: slightly increase blocktime
is well-formatted and follows the established pattern for changelog entries. It correctly includes the issue/PR reference and a concise description. Please double-check that this documentation accurately reflects the corresponding consensus configuration update (i.e., the timeout changes) and that its placement under the "State Compatible" section is appropriate for a minor blocktime adjustment.

},
{
Section: "consensus",
Key: "timeout_propose",
Value: "1.8s",
Value: "1.9s",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep timeout propose where it is, otw LGTM!

Copy link
Member

@ValarDragon ValarDragon Mar 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context, this is is saying "if the proposer is offline, how long do we wait for round 2".

Our blocktime is 1.3s (maybe 1.5s), 1.8s is already way longer! Seeing that its 1.8s, I'd actually love to lower it. If your in favor, can we do 1.6s in this PR? My mental model is 1s would be a good conservative parameterization for where are rn. However, don't want need to bundle in now.

This timeout propose actually can/should be lower than average blocktime.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to 1.6s, thanks for your input 🙇

@ValarDragon ValarDragon merged commit 3830890 into main Mar 10, 2025
18 of 19 checks passed
@ValarDragon ValarDragon deleted the chore/slightly-increase-blocktime branch March 10, 2025 15:56
mergify bot pushed a commit that referenced this pull request Mar 10, 2025
* chore: slightly increase blocktime

* chore: change CHANGELOG.md

* chore: reduce timeout commit to 1.6s

(cherry picked from commit 3830890)
@ValarDragon ValarDragon added the A:backport/v28.x backport patches to v28.x branch label Mar 10, 2025
mergify bot pushed a commit that referenced this pull request Mar 10, 2025
* chore: slightly increase blocktime

* chore: change CHANGELOG.md

* chore: reduce timeout commit to 1.6s

(cherry picked from commit 3830890)
PaddyMc added a commit that referenced this pull request Mar 10, 2025
* chore: slightly increase blocktime

* chore: change CHANGELOG.md

* chore: reduce timeout commit to 1.6s

(cherry picked from commit 3830890)

Co-authored-by: PaddyMc <[email protected]>
PaddyMc added a commit that referenced this pull request Mar 10, 2025
* chore: slightly increase blocktime

* chore: change CHANGELOG.md

* chore: reduce timeout commit to 1.6s

(cherry picked from commit 3830890)

Co-authored-by: PaddyMc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v28.x backport patches to v28.x branch A:backport/v29.x backport patches to v8.x branch V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants