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: update specs for v2 #3661

Merged
merged 13 commits into from
Jul 15, 2024
Merged

docs: update specs for v2 #3661

merged 13 commits into from
Jul 15, 2024

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jul 3, 2024

Closes #3273 by adding pages that are specific to v2

because it is another list of pages that can be inconsistent with
SUMMARY.md and SUMMARY.md is the only thing that matters for creating
the specs book.
@rootulp rootulp self-assigned this Jul 3, 2024
@@ -1,19 +0,0 @@
# Celestia App Specifications
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Deleted this file b/c it's not necessary and a maintenance burden. It frequently becomes out of sync with SUMMARY.md which is the only thing that matters for generating the specs book

- 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 = 256`](<https://github.com/cosmos/cosmos-sdk/blob/a429238fc267da88a8548bfebe0ba7fb28b82a13/x/auth/README.md?plain=1#L230>).
- The tx's [gas_limit](https://github.com/cosmos/cosmos-sdk/blob/22c28366466e64ebf0df1ce5bec8b1130523552c/proto/cosmos/tx/v1beta1/tx.proto#L211-L213) is > the gas consumed based on the tx's size where [`TxSizeCostPerByte = 10`](https://github.com/cosmos/cosmos-sdk/blob/a429238fc267da88a8548bfebe0ba7fb28b82a13/x/auth/README.md?plain=1#L232).
- The tx's feepayer has enough funds to pay fees for the tx. The tx's feepayer is the feegranter (if specified) or the tx's first signer. Note the [feegrant](https://github.com/cosmos/cosmos-sdk/blob/v0.46.15/x/feegrant/README.md) module is enabled.
- The tx's gas price is >= the network minimum gas price where [`NetworkMinGasPrice = 0.000001` utia](https://github.com/celestiaorg/celestia-app/blob/8caa5807df8d15477554eba953bd056ae72d4503/pkg/appconsts/v2/app_consts.go#L9).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new for v2

specs/src/specs/ante_handler_v2.md Show resolved Hide resolved

The AnteHandler chains together several decorators to ensure the following criteria are met for app version 2:

- The tx does not contain any messages that are unsupported by the current app version. See `MsgVersioningGateKeeper`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new for v2

Comment on lines +37 to +38
| `v1.Version` | `uint64` | `1` | | First version of the application. Breaking changes (hard forks) must update this parameter. |
| `v2.Version` | `uint64` | `2` | | Second version of the application. Breaking changes (hard forks) must update this parameter. |
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The only change here is I got rid of VERSION_APP and added v1.Version and v2.Version

| ibc.Transfer.SendEnabled | true | Enable sending tokens via IBC. | True |
| icahost.HostEnabled | True | Enables or disables the Inter-Chain Accounts host module. | True |
| icahost.AllowMessages | [icaAllowMessages] | Defines a list of sdk message typeURLs allowed to be executed on a host chain. | True |
| minfee.NetworkMinGasPrice | 0.000001 utia | All transactions must have a gas price greater than or equal to this value. | True |
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new for v2

## `celestia-app` modules

- [blob](https://github.com/celestiaorg/celestia-app/blob/main/x/blob/README.md)
- [minfee](https://github.com/celestiaorg/celestia-app/blob/main/x/minfee/README.md)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new for v2

- [minfee](https://github.com/celestiaorg/celestia-app/blob/main/x/minfee/README.md)
- [mint](https://github.com/celestiaorg/celestia-app/blob/main/x/mint/README.md)
- [paramfilter](https://github.com/celestiaorg/celestia-app/blob/main/x/paramfilter/README.md)
- [signal](https://github.com/celestiaorg/celestia-app/blob/main/x/signal/README.md)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new for v2

Comment on lines +27 to +28
- [interchain accounts](https://github.com/cosmos/ibc/blob/2921c5cec7b18e4ef77677e16a6b693051ae3b35/spec/app/ics-027-interchain-accounts/README.md)
- [packetforwardmiddleware](https://github.com/cosmos/ibc-apps/blob/main/middleware/packet-forward-middleware/README.md)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new for v2

@@ -370,6 +369,32 @@ func (suite *GovParamsTestSuite) TestModifiableParams() {
assert.Equal(want, got)
},
},
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added tests to verify that the ICA params are indeed modifiable

@rootulp rootulp marked this pull request as ready for review July 3, 2024 19:17
@rootulp rootulp requested review from liamsi and a team as code owners July 3, 2024 19:17
Copy link
Contributor

coderabbitai bot commented Jul 3, 2024

Walkthrough

Walkthrough

The changes introduce versioning to the Celestia App Specifications and refine the AnteHandler implementation. By delineating specifications into v1 and v2, these updates ensure clear guidelines for different application versions, including various parameters, modules, and handlers used in each version. The code modifications enforce a minimum gas price for transactions in version 2 and update several documentation links to specific commits for accuracy.

Changes

Files/Paths Change Summary
app/ante/ante.go Introduced gas price condition for app versions >= 2, added a related comment.
specs/src/SUMMARY.md Added versions to various sections, included new sections in the documentation index.
specs/src/specs/ante_handler.md Refined AnteHandler description, added references to v1 and v2.
specs/src/specs/ante_handler_v1.md New file detailing AnteHandler v1.
specs/src/specs/ante_handler_v2.md New file detailing AnteHandler v2.
specs/src/specs/consensus.md Added v1.Version and v2.Version for application constants.
specs/src/specs/data_structures.md Updated app enum description.
specs/src/specs/index.md Added new sections for AnteHandler v1, v2, Data Square Layout, Resource Pricing, and Multisig.
specs/src/specs/namespace.md Updated URL reference in the Implementation section.
specs/src/specs/networking.md Updated proposal.header.version.app requirement to a more general supported version.
specs/src/specs/parameters.md New file explaining parameters dependent on app versions.
specs/src/specs/parameters_v1.md Updated documentation for parameters in application version 1.
specs/src/specs/parameters_v2.md New file detailing parameters for app version 2.
specs/src/specs/shares.md Updated link to the go-square/shares repository.
specs/src/specs/state_machine_modules.md Updated description to include app version variations, added links for module versions.
specs/src/specs/state_machine_modules_v1.md New file listing modules used in app version 1.
specs/src/specs/state_machine_modules_v2.md New file listing modules used in app version 2.
specs/src/specs/multisig.md Updated reference to auth.TxSigLimit parameter.
x/paramfilter/test/gov_params_test.go Reordered imports, added new imports, modified tests related to icahost parameters.

Assessment against linked issues

Objective Addressed Explanation
Version the specs (#3273)
Ensure gas price is >= network min gas price for app version >= 2
Update parameters documentation for app versions 1 and 2
Add detailed specs for AnteHandler v1 and AnteHandler v2
Modify constants to include v1.Version and v2.Version

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bdb1598 and 429e76e.

Files selected for processing (2)
  • specs/src/specs/multisig.md (1 hunks)
  • x/paramfilter/test/gov_params_test.go (5 hunks)
Files skipped from review due to trivial changes (1)
  • specs/src/specs/multisig.md
Files skipped from review as they are similar to previous changes (1)
  • x/paramfilter/test/gov_params_test.go

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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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: 1

Outside diff range and nitpick comments (8)
specs/src/specs/state_machine_modules.md (2)

2-2: Add missing article "the".

The article "the" is missing before "Celestia app".

- Celestia app is built using the cosmos-sdk, and follows standard cosmos-sdk module structure.
+ The Celestia app is built using the cosmos-sdk, and follows standard cosmos-sdk module structure.
Tools
LanguageTool

[uncategorized] ~2-~2: You might be missing the article “the” here.
Context: # State Machine Modules Celestia app is built using the cosmos-sdk, and ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


3-3: Add missing article "the".

The article "the" is missing before "modules".

- follows standard cosmos-sdk module structure. The modules used in the app vary based on app version:
+ follows the standard cosmos-sdk module structure. The modules used in the app vary based on app version:
Tools
LanguageTool

[uncategorized] ~3-~3: You might be missing the article “the” here.
Context: ...built using the cosmos-sdk, and follows standard cosmos-sdk module structure. The module...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

specs/src/specs/ante_handler.md (2)

3-3: Consider simplifying the phrase.

The phrase "in order to" can be simplified to "to".

- in order to reject decodable sdk.Txs that do not meet certain criteria.
+ to reject decodable sdk.Txs that do not meet certain criteria.
Tools
LanguageTool

[style] ~3-~3: Consider a shorter alternative to avoid wordiness.
Context: ...0.46.15/x/auth/spec/03_antehandlers.md) in order to reject decodable sdk.Txs that do not me...

(IN_ORDER_TO_PREMIUM)


5-5: Consider simplifying the phrase.

The phrase "prior to" can be simplified to "before".

- `CheckTx` prior to the transaction entering the mempool
+ `CheckTx` before the transaction enters the mempool
Tools
LanguageTool

[style] ~5-~5: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...he transaction lifecycle: 1. CheckTx prior to the transaction entering the mempool 1....

(EN_WORDINESS_PREMIUM_PRIOR_TO)

specs/src/SUMMARY.md (2)

13-13: Possible duplicated word.

It looks like "AnteHandler" is repeated.

- [AnteHandler](./specs/ante_handler.md)
-   - [AnteHandler v1](./specs/ante_handler_v1.md)
+ [AnteHandler](./specs/ante_handler.md)
  - [AnteHandler v1](./specs/ante_handler_v1.md)
Tools
LanguageTool

[duplication] ~13-~13: Possible typo: you repeated a word
Context: ...](./specs/block_validity_rules.md) - AnteHandler - AnteHandler v1 - [...

(ENGLISH_WORD_REPEAT_RULE)


25-25: Possible duplicated word.

It looks like "Parameters" is repeated.

- [Parameters](./specs/parameters.md)
-   - [Parameters v1](./specs/parameters_v1.md)
+ [Parameters](./specs/parameters.md)
  - [Parameters v1](./specs/parameters_v1.md)
Tools
LanguageTool

[duplication] ~25-~25: Possible typo: you repeated a word
Context: ..../specs/state_machine_modules_v2.md) - Parameters - Parameters v1 - [Para...

(ENGLISH_WORD_REPEAT_RULE)

specs/src/specs/state_machine_modules_v1.md (1)

22-22: Add missing punctuation.

A punctuation mark might be missing after "README.md".

- [feegrant](https://github.com/celestiaorg/cosmos-sdk/blob/v1.14.0-sdk-v0.46.11/x/feegrant/spec/README.md)
+ [feegrant](https://github.com/celestiaorg/cosmos-sdk/blob/v1.14.0-sdk-v0.46.11/x/feegrant/spec/README.md),
Tools
LanguageTool

[uncategorized] ~22-~22: A punctuation mark might be missing here.
Context: ...1/x/evidence/spec/README.md) - feegrant - [genutil](https://github.com/celestiaorg/...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

specs/src/specs/state_machine_modules_v2.md (1)

23-23: Add missing punctuation.

A punctuation mark might be missing after "README.md".

- [feegrant](https://github.com/celestiaorg/cosmos-sdk/blob/v1.14.0-sdk-v0.46.11/x/feegrant/spec/README.md)
+ [feegrant](https://github.com/celestiaorg/cosmos-sdk/blob/v1.14.0-sdk-v0.46.11/x/feegrant/spec/README.md),
Tools
LanguageTool

[uncategorized] ~23-~23: A punctuation mark might be missing here.
Context: ...1/x/evidence/spec/README.md) - feegrant - [genutil](https://github.com/celestiaorg/...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


## Parameters
Note that not all of these parameters are changeable via governance. This list
also includes parameter that require a hardfork to change due to being manually
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix grammatical issue.

Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).

- also includes parameter that require a hardfork to change due to being manually hardcoded in the application or they are blocked by the `x/paramfilter` module.
+ also includes parameters that require a hardfork to change due to being manually hardcoded in the application, or they are blocked by the `x/paramfilter` module.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
also includes parameter that require a hardfork to change due to being manually
also includes parameters that require a hardfork to change due to being manually hardcoded in the application, or they are blocked by the `x/paramfilter` module.

@rootulp rootulp added the WS: V2 ✌️ lemongrass hardfork related label Jul 8, 2024
evan-forbes
evan-forbes previously approved these changes Jul 8, 2024
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

very nice, thanks for remembering these

specs/src/specs/ante_handler_v2.md Show resolved Hide resolved
@celestia-bot celestia-bot requested review from a team and staheri14 and removed request for a team July 8, 2024 17:39
@rootulp rootulp enabled auto-merge (squash) July 8, 2024 17:39
@celestia-bot celestia-bot requested a review from a team July 10, 2024 13:02
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, codebase verification and nitpick comments (1)
specs/src/specs/state_machine_modules.md (1)

3-3: Missing article: the

Consider adding the article "the" before "cosmos-sdk" for grammatical correctness.

- Celestia app is built using the cosmos-sdk, and follows standard cosmos-sdk module structure.
+ Celestia app is built using the cosmos-sdk, and follows the standard cosmos-sdk module structure.
Tools
LanguageTool

[uncategorized] ~3-~3: You might be missing the article “the” here.
Context: ...built using the cosmos-sdk, and follows standard cosmos-sdk module structure. The module...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

@rootulp rootulp removed request for liamsi and a team July 13, 2024 10:21
@rootulp rootulp merged commit fda6934 into celestiaorg:main Jul 15, 2024
35 checks passed
@rootulp rootulp deleted the rp/specs-v2 branch July 15, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WS: V2 ✌️ lemongrass hardfork related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version the specs
3 participants