-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 mint docs #22108
docs: Update mint docs #22108
Conversation
Warning Rate limit exceeded@lucaslopezf has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 29 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe documentation for the Changes
Possibly related PRs
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to refactor much more in the concepts to make the mint function "primary" and put the InflationCalculationFn
second and mark it as legacy
Some diagrams need to be changed as well.
There was a problem hiding this 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 (4)
x/mint/README.md (4)
Line range hint
95-125
: State section accurately updated with new MaxSupply parameter.The State section has been correctly updated to include the new MaxSupply parameter in the Params structure. The explanation that a value of '0' indicates an unlimited supply is helpful.
Consider adding a brief explanation of how the MaxSupply parameter affects the minting process, if applicable. This would provide more context on its importance and usage.
Line range hint
127-165
: Excellent addition of the Epoch minting section.The new Epoch minting section provides a clear and comprehensive explanation of the updated minting logic. The introduction of the MintFn function and its flexibility is well-documented. The warning about BeginBlock behavior is crucial for developers.
Consider adding a brief example of how to implement a custom MintFn. This would help developers better understand how to leverage this new flexibility in their applications.
Line range hint
167-252
: Block based minting section provides clear continuity with previous versions.This section effectively explains how block-based minting is still supported, maintaining compatibility with previous versions. The descriptions of the inflation rate calculation and related functions are accurate and helpful.
Consider adding a brief note on when developers might choose block-based minting over epoch-based minting. This would help readers understand the trade-offs between the two approaches.
Line range hint
280-480
: Client section comprehensively updated with new commands and endpoints.The Client section has been thoroughly updated to include new CLI commands, gRPC endpoints, and REST endpoints. The addition of the update-params-proposal command and the inclusion of the MaxSupply parameter in the responses are particularly noteworthy.
Consider adding a brief note on the permissions required to use the update-params-proposal command. This would help users understand who can initiate parameter changes and under what circumstances.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
📒 Files selected for processing (1)
- x/mint/README.md (4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
x/mint/README.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🔇 Additional comments (3)
x/mint/README.md (3)
Line range hint
1-93
: Excellent updates to the Concepts section!The additions to the Concepts section, particularly the new "Provisions" subsection, significantly enhance the documentation. The clear explanation of how provisions are calculated and distributed, along with the practical example, greatly improves understanding of the minting process.
Line range hint
254-266
: Parameters section accurately updated with MaxSupply.The Parameters section has been correctly updated to include the new MaxSupply parameter. The note clarifying that a value of '0' indicates unlimited supply is helpful for users.
Line range hint
268-278
: Events section remains accurate and complete.The Events section correctly describes the events emitted by the minting module. No changes were necessary in this section, and it remains consistent with the module's functionality.
There was a problem hiding this 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)
x/mint/README.md (6)
53-67
: Great addition of the Inflation section!The new section on Inflation provides clear and valuable information about this key concept in the x/mint module. It effectively explains the dynamic nature of inflation, its boundaries, and how it's calculated.
To further enhance this section, consider adding a brief explanation of how the
BondedRatio
andGoalBonded
values in the inflation formula affect the inflation rate. This would help readers understand the relationship between bonding and inflation more clearly.
Line range hint
77-97
: Improved clarity in the Usage per Block sectionThe renaming of this section to "Usage per Block (default function)" and the updated content provide a clearer explanation of how provisions are calculated and used in each block. The included example is particularly helpful for understanding the concept.
To make this section even more valuable, consider adding a brief note about how this default behavior might differ when using a custom
MintFn
. This would help readers understand the flexibility of the new minting mechanism.
Line range hint
135-159
: Excellent addition of the Minting Methods sectionThe new Minting Methods section provides a comprehensive overview of the updated minting mechanism, including both epoch-based and block-based minting. The introduction of the
MintFn
function and its signature is particularly valuable for developers.To enhance this section further:
- Consider adding a brief example of how to implement a custom
MintFn
for epoch-based minting. This would help developers understand how to leverage this flexibility in practice.- In the warning about BeginBlock, it might be helpful to provide a code snippet showing how to properly handle the epoch ID check to ensure early return when necessary.
162-198
: Comprehensive update to the Default configuration sectionThe updated Default configuration section, particularly the detailed flowchart, provides an excellent visual representation of the
DefaultMintFn
process. The inclusion of the MaxSupply parameter and its impact on minting is well-explained and aligns with the module updates.To further improve this section:
- Consider adding a brief textual explanation of the key decision points in the flowchart, especially regarding the MaxSupply checks. This would complement the visual representation and ensure clarity for all readers.
- It might be helpful to provide a code snippet or pseudocode example of how the MaxSupply adjustment is implemented in the actual code.
Line range hint
200-250
: Well-updated Calculations sectionThe revised Calculations section provides a clear and detailed explanation of the inflation rate calculation, NextAnnualProvisions, and BlockProvision. The inclusion of code snippets is particularly helpful for understanding the implementation details.
To enhance this section further:
- Consider adding a brief example of how one might implement a custom
InflationCalculationFn
. This would help developers understand how to leverage this flexibility in practice.- In the NextInflationRate function, it might be helpful to add comments explaining the purpose of each step in the calculation, especially for the inflation rate change and capping logic.
Line range hint
371-524
: Comprehensive update to CLI, gRPC, and REST sectionsThe CLI, gRPC, and REST sections have been thoroughly updated to reflect the changes in the mint module. The inclusion of new commands and endpoints, along with clear examples, provides valuable guidance for users interacting with the module through various interfaces.
To further enhance these sections:
- Consider adding a brief explanation or example of how to use the new MaxSupply parameter in queries or transactions, if applicable.
- For the
update-params-proposal
command, it might be helpful to provide a more comprehensive example that includes multiple parameters, showcasing how to update several parameters at once.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
📒 Files selected for processing (1)
- x/mint/README.md (11 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
x/mint/README.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🪛 LanguageTool
x/mint/README.md
[uncategorized] ~51-~51: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ... is responsible for minting new tokens, implementations details can be found [here](#default-co...(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
🔇 Additional comments (1)
x/mint/README.md (1)
Line range hint
260-270
: Clear update to the Parameters sectionThe updated Parameters section effectively incorporates the new MaxSupply parameter, providing a comprehensive overview of all minting module parameters. The table format is clear and easy to understand, with appropriate examples for each parameter.
The note about '0' indicating unlimited supply for the MaxSupply parameter is a crucial piece of information that helps prevent potential misunderstandings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
(cherry picked from commit 8e34382) # Conflicts: # x/mint/README.md
Description
ref: #21429
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
MintFn
function for user-defined minting logic, replacing the deprecatedInflationCalculationFn
.Params
section to include a newMaxSupply
parameter for controlling token minting limits.