Skip to content

milestones has no view returning a single issue's allocated amount — callers must fetch the whole Milestone record including its unbounded allocations Map #802

Closed

Description

@chonilius

get_issue_status (contracts/milestones/src/lib.rs:1110-1119) returns Allocated/Released but not the amount. The amount lives only inside Milestone.allocations, so the only way to read "how much is allocated to issue 4821?" is get_milestone, which returns the sponsor, token, both budgets, timestamps, the closed flag, the contributor count and every allocation in the milestone.

Why it matters: this is the single most common read a bounty UI needs — the frontend's issue page shows one issue's reward. Today it costs a full milestone fetch whose size grows with the number of allocations (unbounded, tracked separately), so the cost of rendering one issue scales with how many other issues share its milestone. escrow has the equivalent cheap read (get_escrow is a fixed-size record) and maintenance-pool has get_deposit(pool_id, index).

Fix: add get_allocation(env, milestone_id, issue_id) -> Result<i128, Error> returning IssueNotAllocated when absent, next to get_issue_status. If allocations move to their own DataKey::Allocation(milestone_id, issue_id) entries, this becomes a single-entry read.

Activity

  1. added
    enhancement
    on Nov 11, 2026
  2. ranjeetprabhatedu-dotcom commented on Nov 12, 2026

    @ranjeetprabhatedu-dotcom

    Hello maintainers,

    I reviewed "milestones has no view returning a single issue's allocated amount — callers must fetch the whole Milestone record including its unbounded allocations Map" and would like to work on this.

    I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.

    I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.

    Thank you!

  3. added
    Stellar Wave
    on Nov 20, 2026
  4. oluwagbemigaphilip commented on Nov 20, 2026

    @oluwagbemigaphilip

    @oluwagbemigaphilip has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

    Hello Maintainer, I have reviewed this issue and I can deliver an excellent job . Please assign to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @oluwagbemigaphilip to this issue.

  5. drips-wave commented on Nov 20, 2026

    @drips-wave

    Congratulations, @oluwagbemigaphilip! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

    🧑‍💻 @oluwagbemigaphilip: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. grantfox-oss commented on Nov 21, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @oluwagbemigaphilip's PR #914 was approved and merged by @chonilius.

    🏆 @oluwagbemigaphilip: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (818 total points). Track your full progress on GrantFox.

    👏 Great work, @oluwagbemigaphilip! Keep contributing to MergeFi.

  7. added a commit that references this issue on Nov 21, 2026
  8. drips-wave commented on Nov 21, 2026

    @drips-wave

    This issue has been completed by @oluwagbemigaphilip as part of the Stellar Wave Program's 11th Wave 🥳

    😎 @oluwagbemigaphilip: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar Waveenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions