-
Notifications
You must be signed in to change notification settings - Fork 11
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
[WIP]fix: mint first then distribute #254
Conversation
WalkthroughThe changes in this pull request primarily affect the Changes
Sequence Diagram(s)sequenceDiagram
participant App as Exocore App
participant EpochsKeeper as Epochs Keeper
participant DistrKeeper as Distribution Keeper
participant ExomintKeeper as Exomint Keeper
App->>EpochsKeeper: SetHooks()
EpochsKeeper->>ExomintKeeper: EpochsHooks()
ExomintKeeper-->>EpochsKeeper: Hooks Set
EpochsKeeper->>DistrKeeper: EpochsHooks()
DistrKeeper-->>EpochsKeeper: Hooks Retained
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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
CodeRabbit Configuration File (
|
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 (1)
app/app.go (1)
789-793
: LGTM! Hook order ensures correct minting and distribution sequence.The order of epoch hooks is correct and aligns with the PR objective:
- ExomintKeeper mints first
- DistrKeeper distributes the minted rewards
- Remaining hooks follow in a logical sequence for USD value calculation
Consider documenting the rationale for this order in a more detailed comment, especially since there's a note about potential changes once distribution is fully implemented.
The exomint is not removed, but just reordered. @coderabbitai |
Tip For best results, initiate chat on the files or code changes. @leonz789: Thank you for the clarification. I understand now that the ✏️ Learnings added
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs. |
Description
At the epoch end(next begin block), exomint will mint the reward for the past epoch and transfer from mintAccount to distributionAccount. So the distribution could only distribute that coins after distributionAccount received those coins.
Closes #XXX
Summary by CodeRabbit
New Features
Bug Fixes
Refactor