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

docs: fix typos and improve clarity in architecture #23255

Closed
wants to merge 1 commit into from

Conversation

tiendn
Copy link

@tiendn tiendn commented Jan 8, 2025

…ation

  • Corrected "fail" to "fails" in staking messages for consistency.
  • Fixed "Best Pratices" to "Best Practices" in sign mode documentation.
  • Clarified the definition of "optimistic proposal" in governance improvements.
  • Enhanced the explanation of error handling in Rosetta documentation.

Summary by CodeRabbit

  • Documentation Updates

    • Enhanced Architecture Decision Records (ADRs) for:
      • Proof of Stake module with epoch-based staking mechanism
      • Governance module improvements introducing multiple choice and optimistic proposals
    • Minor grammatical and spelling corrections in Rosetta documentation
  • Governance Improvements

    • Added support for multiple choice proposals
    • Introduced optimistic proposal type
    • Added new governance parameters for proposal management

…ation

- Corrected "fail" to "fails" in staking messages for consistency.
- Fixed "Best Pratices" to "Best Practices" in sign mode documentation.
- Clarified the definition of "optimistic proposal" in governance improvements.
- Enhanced the explanation of error handling in Rosetta documentation.
@tiendn tiendn requested a review from a team as a code owner January 8, 2025 09:09
Copy link
Contributor

coderabbitai bot commented Jan 8, 2025

📝 Walkthrough

Walkthrough

The pull request introduces significant architectural changes across multiple documentation files. The most substantial modification is in the epoch-based staking design (ADR-039), which proposes a new mechanism for buffering staking weight updates over defined epochs. This approach allows delayed application of staking updates like delegations and unbonds, providing more stability and predictability in validator set management. Additionally, the PR includes minor documentation improvements in governance proposal types (ADR-069) and some grammatical corrections in user documentation.

Changes

File Change Summary
docs/architecture/adr-039-epoched-staking.md Introduced epoch-based staking mechanism with EpochDelegationPool, updated handling of MsgCreateValidator and MsgDelegate to queue execution at epoch boundary
docs/architecture/adr-050-sign-mode-textual-annex1.md Corrected spelling of "Best Practices" section header
docs/architecture/adr-069-gov-improvements.md Added multiple choice and optimistic proposal types, introduced new governance parameters and message types
docs/user/run-node/04-rosetta.md Minor grammatical and capitalization corrections

Sequence Diagram

sequenceDiagram
    participant Delegator
    participant StakingModule
    participant EpochManager
    
    Delegator->>StakingModule: Submit Delegation
    StakingModule->>EpochManager: Queue Delegation
    Note over StakingModule,EpochManager: Delegation stored but not activated
    EpochManager->>StakingModule: Process Epoch Boundary
    StakingModule->>StakingModule: Apply Queued Delegations
Loading

Possibly related PRs

Suggested Labels

C:Store, C:CLI

Suggested Reviewers

  • akhilkumarpilli
  • lucaslopezf
  • testinginprod
  • sontrinh16
  • tac0turtle

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.

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 (3)
docs/architecture/adr-069-gov-improvements.md (2)

62-62: Enhance the definition of optimistic proposal

The definition could be clearer by explicitly stating the default behavior and conditions. Consider expanding it to: "An optimistic proposal is a proposal that automatically passes by default unless a specified threshold of NO votes is reached during the voting period."


66-66: Add validation information for governance parameters

Consider adding information about the validation requirements for these parameters, such as:

  • Valid ranges for optimistic_rejected_threshold
  • Format requirements for addresses in optimistic_authorized_addresses
docs/architecture/adr-039-epoched-staking.md (1)

82-84: Improve message handling documentation clarity

The message handling descriptions could be improved for clarity and consistency:

  1. Add missing comma after "if valid" in MsgEditValidator description
  2. Remove redundant "back" in the return statements
  3. Consider standardizing the structure of each message description

Here's the suggested improvement:

- Move user's self-bond to `EpochDelegationPool` immediately. Queue a message for the epoch boundary to handle the self-bond, taking the funds from the `EpochDelegationPool`. If Epoch execution fails, return back funds from `EpochDelegationPool` to user's account.
- Validate message and if valid queue the message for execution at the end of the Epoch.
- Move user's funds to `EpochDelegationPool` immediately. Queue a message for the epoch boundary to handle the delegation, taking the funds from the `EpochDelegationPool`. If Epoch execution fails, return back funds from `EpochDelegationPool` to user's account.
+ Move user's self-bond to `EpochDelegationPool` immediately. Queue a message for the epoch boundary to handle the self-bond, taking the funds from the `EpochDelegationPool`. If Epoch execution fails, return funds from `EpochDelegationPool` to user's account.
+ Validate message and, if valid, queue the message for execution at the end of the Epoch.
+ Move user's funds to `EpochDelegationPool` immediately. Queue a message for the epoch boundary to handle the delegation, taking the funds from the `EpochDelegationPool`. If Epoch execution fails, return funds from `EpochDelegationPool` to user's account.
🧰 Tools
🪛 LanguageTool

[style] ~82-~82: Consider using just “return”.
Context: ...egationPool. If Epoch execution fails, return back funds from EpochDelegationPool` to use...

(RETURN_BACK)


[uncategorized] ~83-~83: Possible missing comma found.
Context: ...ditValidator**: Validate message and if valid queue the message for execution at the ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~84-~84: Consider using just “return”.
Context: ...egationPool. If Epoch execution fails, return back funds from EpochDelegationPool` to use...

(RETURN_BACK)

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0031a1 and eaac2b8.

📒 Files selected for processing (4)
  • docs/architecture/adr-039-epoched-staking.md (1 hunks)
  • docs/architecture/adr-050-sign-mode-textual-annex1.md (1 hunks)
  • docs/architecture/adr-069-gov-improvements.md (1 hunks)
  • docs/user/run-node/04-rosetta.md (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • docs/architecture/adr-050-sign-mode-textual-annex1.md
  • docs/user/run-node/04-rosetta.md
🧰 Additional context used
📓 Path-based instructions (2)
docs/architecture/adr-039-epoched-staking.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/architecture/adr-069-gov-improvements.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

🪛 LanguageTool
docs/architecture/adr-039-epoched-staking.md

[style] ~82-~82: Consider using just “return”.
Context: ...egationPool. If Epoch execution fails, return back funds from EpochDelegationPool` to use...

(RETURN_BACK)


[uncategorized] ~83-~83: Possible missing comma found.
Context: ...ditValidator**: Validate message and if valid queue the message for execution at the ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~84-~84: Consider using just “return”.
Context: ...egationPool. If Epoch execution fails, return back funds from EpochDelegationPool` to use...

(RETURN_BACK)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Summary

@julienrbrt julienrbrt changed the title docs: fix typos and improve clarity in architecture and user document… docs: fix typos and improve clarity in architecture Jan 8, 2025
@aljo242
Copy link
Contributor

aljo242 commented Jan 8, 2025

No need to update typos on ADRs - these are just records. Closing as this does not fit our CONTRIBUTING guidelines

@aljo242 aljo242 closed this Jan 8, 2025
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.

2 participants