feat: support setting default config.toml values
Description
This should enable us to reduce block time in code, without coordinating with all nodes, it will override config.toml timeout_commit field. Can be skipped in e2e tests or localnet with a flag.
How Has This Been Tested?
- [ ] Tested CCTX in localnet
- [ ] Tested in development environment
- [ ] Go unit tests
- [ ] Go integration tests
- [ ] Tested via GitHub Actions
Summary by CodeRabbit
-
New Features
- Added automatic override of the consensus
TimeoutCommitsetting to 5 seconds in the configuration file when starting the node, improving default behavior. - Introduced a new
--skip-config-overrideflag to allow users to opt out of automatic configuration overrides during node startup.
- Added automatic override of the consensus
-
Chores
- Updated documentation to reflect the new configuration override feature.
[!IMPORTANT]
Review skipped
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
📝 Walkthrough
Walkthrough
The changes introduce an automatic override for the Tendermint config.toml default values, specifically setting the consensus TimeoutCommit to 5 seconds during the start command, unless bypassed via a new --skip-config-override flag. The changelog and startup scripts are updated to reflect and utilize this new behavior.
Changes
| File(s) | Change Summary |
|---|---|
| changelog.md | Updated to document the new feature allowing default values in config.toml, referencing pull request #3882. |
| cmd/zetacored/root.go | Added override logic for Tendermint config defaults in the start command, new skip flag, and relevant refactors. |
| contrib/localnet/scripts/start-zetacored.sh | Modified to pass the --skip-config-override flag to the startup command, disabling automatic config overrides. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant Script
participant zetacored
participant ConfigOverride
User->>Script: Run start-zetacored.sh
Script->>zetacored: Execute start command with --skip-config-override
zetacored->>ConfigOverride: Check skip-config-override flag
alt Flag is set
ConfigOverride-->>zetacored: Skip config override
else Flag is not set
ConfigOverride->>zetacored: Override config.toml defaults (TimeoutCommit = 5s)
end
zetacored->>User: Node starts with appropriate config
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 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.Explain this complex logic.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai explain this code block.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin 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 explain its main purpose.@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.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
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.
@skosito need to run make generate?
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 64.94%. Comparing base (
194548f) to head (0dc193d). Report is 2 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #3882 +/- ##
========================================
Coverage 64.94% 64.94%
========================================
Files 470 470
Lines 34391 34391
========================================
Hits 22336 22336
Misses 11024 11024
Partials 1031 1031
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
i will look into upgrade tests failing
@lumtis @kingpinXD i fixed upgrade tests like this https://github.com/zeta-chain/node/pull/3882/commits/97a017839db2280b58766da7cc506d5641ec7ecc
old binary doesn't have this old flag, i think this should be ok we can remove the check after new release, please let me know if we did things like this differently
@lumtis @kingpinXD i fixed upgrade tests like this 97a0178
old binary doesn't have this old flag, i think this should be ok we can remove the check after new release, please let me know if we did things like this differently
lgtm , maybe we can track in an issue . It up to you though .
@lumtis @kingpinXD i fixed upgrade tests like this 97a0178 old binary doesn't have this old flag, i think this should be ok we can remove the check after new release, please let me know if we did things like this differently
lgtm , maybe we can track in an issue . It up to you though .
will add the issue, for some reason actual test is failing, before they weren't even starting, will investigate more, not sure yet how it can be related to this change