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: remaining docs from versioned gas scheduler variables #3914

Merged
merged 2 commits into from
Sep 30, 2024
Merged

Conversation

ninabarbakadze
Copy link
Member

@ninabarbakadze ninabarbakadze commented Sep 26, 2024

Overview

Copy link

github-actions bot commented Sep 26, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://celestiaorg.github.io/celestia-app/pr-preview/pr-3914/
on branch gh-pages at 2024-09-26 13:27 UTC

@ninabarbakadze ninabarbakadze marked this pull request as ready for review September 26, 2024 13:14
@ninabarbakadze ninabarbakadze requested review from liamsi and a team as code owners September 26, 2024 13:14
@ninabarbakadze ninabarbakadze requested review from cmwaters and staheri14 and removed request for a team September 26, 2024 13:14
Copy link
Contributor

coderabbitai bot commented Sep 26, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces new documentation entries for "AnteHandler v3" and "Parameters v3" in the SUMMARY.md, ante_handler.md, and parameters.md files. A new file ante_handler_v3.md is created to define the AnteHandler for app version 3, detailing the criteria for transaction processing and associated side effects.

Changes

Files Change Summary
specs/src/SUMMARY.md, specs/src/ante_handler.md, specs/src/parameters.md Added new entries for [AnteHandler v3](./ante_handler_v3.md) and [Parameters v3](./parameters_v3.md), expanding the documentation for both specifications.
specs/src/ante_handler_v3.md Introduced AnteHandler for app version 3, detailing transaction processing criteria and side effects.

Assessment against linked issues

Objective Addressed Explanation
Add a params v3 page to the specs ( #3762 )
Mark blob.GasPerBlobByte and auth.TxSizeCostPerByte as non-governance modifiable on that page ( #3762 ) The specific marking of parameters as non-governance modifiable is not detailed in the PR.

Possibly related PRs

Suggested labels

WS: V2 ✌️, external

Suggested reviewers

  • cmwaters
  • rootulp
  • evan-forbes

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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 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: 1

🧹 Outside diff range and nitpick comments (6)
specs/src/parameters.md (1)

7-7: Consider adding brief context about Parameters v3

While the addition of the v3 link is good, it might be helpful to provide a brief description of what's new or different in v3 compared to v1 and v2. This context could help users understand when to refer to which version.

Consider adding a short description, for example:

 - [Parameters v2](./parameters_v2.md)
-
- [Parameters v3](./parameters_v3.md)
+
+- [Parameters v3](./parameters_v3.md) (Includes updated gas scheduler variables)
specs/src/SUMMARY.md (2)

27-27: LGTM! Consider adding a brief description.

The addition of the "Parameters v3" entry is well-placed and follows the existing structure and formatting conventions. This change aligns with the PR objective of adding a new parameters page to the specifications.

To improve clarity, consider adding a brief description of what's new or different in Parameters v3. This could be done by adding a short comment next to the link, for example:

  - [Parameters v3](./parameters_v3.md) <!-- New gas scheduler variables -->

This would provide users with a quick overview of what to expect in the new document without having to navigate to it.


Inconsistent Versioning Detected Across Sections

The verification shows that only "State Machine Modules" includes versioning (v2), while other sections like "Parameters" have different version numbers. To maintain consistency and clarity:

  • Update all sections to follow a uniform versioning scheme.
  • Add a brief explanation of the versioning strategy at the beginning of the document.
🔗 Analysis chain

Line range hint 1-27: Verify consistency of versioning across all sections

The addition of "Parameters v3" maintains the versioning approach used in other sections of the document. To ensure overall consistency and completeness:

  1. Verify if other sections (e.g., AnteHandler, State Machine Modules) require updates to include their latest versions.
  2. Consider adding a brief note at the beginning of the document explaining the versioning system used throughout the specifications.

To assist in this verification, you can run the following script to check for inconsistencies in versioning across sections:

This script will help identify any sections that may need updating to maintain consistency with the newly added "Parameters v3".

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for inconsistencies in versioning across sections

# Test: List all versioned entries and their latest versions
echo "Versioned entries and their latest versions:"
rg -n '(\w+) v\d+' specs/src/SUMMARY.md | awk -F':' '{print $2}' | sort | awk '{a[$1]=$0} END{for(i in a) print a[i]}'

echo -e "\nSections with only one version:"
rg -n '(\w+) v1' specs/src/SUMMARY.md | awk -F':' '{print $2}' | awk '{print $1}' | sort | uniq -u

echo -e "\nSections with multiple versions:"
rg -n '(\w+) v\d+' specs/src/SUMMARY.md | awk -F':' '{print $2}' | awk '{print $1}' | sort | uniq -d

Length of output: 641

🧰 Tools
🪛 LanguageTool

[duplication] ~24-~24: Possible typo: you repeated a word
Context: ...s v2](./state_machine_modules_v2.md) - Parameters - Parameters v1 - [Parameters...

(ENGLISH_WORD_REPEAT_RULE)

specs/src/ante_handler_v3.md (3)

1-19: Excellent documentation of AnteHandler v3 criteria

The introduction and list of criteria provide a clear and comprehensive overview of the AnteHandler for app version 3. The inclusion of links to relevant code is particularly helpful for developers.

On line 15, consider changing "a.k.a nonce" to "a.k.a. nonce" for correct abbreviation punctuation.

To ensure long-term maintainability, consider replacing hardcoded constant values with references to the actual constants in the code. This approach would help keep the documentation synchronized with any future changes to these values. For example:

- The tx's [memo](https://github.com/cosmos/cosmos-sdk/blob/22c28366466e64ebf0df1ce5bec8b1130523552c/proto/cosmos/tx/v1beta1/tx.proto#L110-L113) is <= the max memo characters where [`MaxMemoCharacters`](https://github.com/cosmos/cosmos-sdk/blob/a429238fc267da88a8548bfebe0ba7fb28b82a13/x/auth/README.md?plain=1#L230) is defined.

This way, if the constant value changes, only the link would need to be updated, reducing the risk of inconsistencies between the code and documentation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~15-~15: The abbreviation/initialism is missing a period after the last letter.
Context: ...e that the signature's sequence number (a.k.a nonce) matches the account sequence num...

(ABBREVIATION_PUNCTUATION)


18-19: Provide more context for additional criteria

The inclusion of criteria for MsgSubmitProposal and IBC packets is valuable. However, these points could benefit from additional context or explanation.

The criteria are clear and concise.

Consider expanding on these points to provide more context:

  1. For the MsgSubmitProposal criterion, explain why zero proposal messages are not allowed and what the implications are.
  2. For the IBC packet criterion, provide a brief explanation of why preventing double-processing is important and how it relates to the overall system integrity.

This additional information would help developers understand the rationale behind these criteria and their importance in the system.


21-25: Clear explanation of AnteHandler side effects

The side effects section provides valuable information about the additional behaviors of the AnteHandler.

The three listed side effects are clear and informative.

On line 21, "side-effects" should be "side effects" without a hyphen, according to standard English usage.

- In addition to the above criteria, the AnteHandler also has a number of side-effects:
+ In addition to the above criteria, the AnteHandler also has a number of side effects:

This minor correction will improve the document's adherence to standard English grammar.

🧰 Tools
🪛 LanguageTool

[misspelling] ~21-~21: Did you mean “side effects” (=adverse effect, unintended consequence)? Open compounds are not hyphenated.
Context: ...a, the AnteHandler also has a number of side-effects: - Tx fees are deducted from the tx's ...

(AFFECT_EFFECT)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 32fc690 and d5f5c3b.

📒 Files selected for processing (3)
  • specs/src/SUMMARY.md (1 hunks)
  • specs/src/ante_handler_v3.md (1 hunks)
  • specs/src/parameters.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
specs/src/ante_handler_v3.md

[uncategorized] ~15-~15: The abbreviation/initialism is missing a period after the last letter.
Context: ...e that the signature's sequence number (a.k.a nonce) matches the account sequence num...

(ABBREVIATION_PUNCTUATION)


[misspelling] ~21-~21: Did you mean “side effects” (=adverse effect, unintended consequence)? Open compounds are not hyphenated.
Context: ...a, the AnteHandler also has a number of side-effects: - Tx fees are deducted from the tx's ...

(AFFECT_EFFECT)

🔇 Additional comments (2)
specs/src/parameters.md (1)

7-7: LGTM: Addition of Parameters v3 link

The addition of the link to Parameters v3 is in line with the PR objectives and the linked issue #3762. This update expands the documentation to include the latest version of parameters.

specs/src/ante_handler_v3.md (1)

16-17: Clarify maximum blob share count criterion

The explanation of gas consumption for blobs is detailed and clear. However, the maximum blob share count criterion could benefit from additional clarification.

The blob gas consumption explanation is comprehensive and well-documented.

Could you provide more details on how the maximum blob share count is derived from the maximum valid square size? Specifically:

  1. What are GovMaxSquareSize and SquareSizeUpperBound?
  2. How is the maximum blob share count calculated from these values?
  3. Are there any relevant constants or formulas that should be included?

Adding this information would make the criterion more understandable and actionable for developers.

@@ -4,3 +4,4 @@ The parameters in the application depend on the app version:

- [Parameters v1](./parameters_v1.md)
- [Parameters v2](./parameters_v2.md)
- [Parameters v3](./parameters_v3.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Parameters v3 File Missing Non-Governance Modifiability

  • The blob.GasPerBlobByte and auth.TxSizeCostPerByte parameters in specs/src/parameters_v3.md are not marked as non-governance modifiable as required by issue Add a params v3 page to the specs #3762.
🔗 Analysis chain

Verify the existence of parameters_v3.md file

Ensure that the parameters_v3.md file exists and contains the necessary information, including the blob.GasPerBlobByte and auth.TxSizeCostPerByte parameters mentioned in issue #3762.

Let's verify the existence and content of the file:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and content of parameters_v3.md file

# Test 1: Check if the file exists
if fd -t f "parameters_v3.md" specs/src; then
    echo "parameters_v3.md file exists."
else
    echo "Error: parameters_v3.md file not found in specs/src directory."
    exit 1
fi

# Test 2: Check if the file contains the required parameters
if rg -q "blob\.GasPerBlobByte" specs/src/parameters_v3.md && 
   rg -q "auth\.TxSizeCostPerByte" specs/src/parameters_v3.md; then
    echo "Required parameters found in parameters_v3.md"
else
    echo "Warning: One or both required parameters not found in parameters_v3.md"
fi

# Test 3: Check if the parameters are marked as non-governance modifiable
if rg -q "non-governance modifiable" specs/src/parameters_v3.md; then
    echo "Parameters are marked as non-governance modifiable"
else
    echo "Warning: Parameters are not marked as non-governance modifiable"
fi

Length of output: 552

@celestia-bot celestia-bot requested a review from a team September 26, 2024 13:27
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

🧹 Outside diff range and nitpick comments (1)
specs/src/ante_handler.md (1)

14-14: LGTM! Consider adding a brief description of AnteHandler v3.

The addition of the link to AnteHandler v3 is appropriate and consistent with the existing structure. This change aligns well with the PR objectives to update the documentation.

To provide more context for users, consider adding a brief description of what's new in AnteHandler v3, such as the introduction of blob.GasPerBlobByte and auth.TxSizeCostPerByte parameters. This could be done inline or by adding a short note after the list. For example:

- [AnteHandler v3](./ante_handler_v3.md)

AnteHandler v3 introduces new non-governance modifiable parameters: `blob.GasPerBlobByte` and `auth.TxSizeCostPerByte`.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between d5f5c3b and 33b987c.

📒 Files selected for processing (2)
  • specs/src/SUMMARY.md (2 hunks)
  • specs/src/ante_handler.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • specs/src/SUMMARY.md

@cmwaters
Copy link
Contributor

Shouldn't we hold out on this until we know if there will be a tx size capping antehandler in v3?

@ninabarbakadze
Copy link
Member Author

Shouldn't we hold out on this until we know if there will be a tx size capping antehandler in v3?

We changed some gas scheduler variable related stuff which is used in ante handler so I updated that and NetworkMinGasPrice reference as well.

tx size capping antehandler pr already adds another rule so we can just merge this and then add the tx size capping section if we do end up pushing it out.

Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding this! IMO we can merge this as-is and update the specs if we modify any other things in v3

@rootulp rootulp enabled auto-merge (squash) September 30, 2024 15:50
@rootulp rootulp merged commit 36257e8 into main Sep 30, 2024
33 checks passed
@rootulp rootulp deleted the nina/docs branch September 30, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a params v3 page to the specs
4 participants