Skip to content

feat: optimize job registry bid handling with indexed storage and com…#583

Merged
soomtochukwu merged 2 commits into
DXmakers:mainfrom
Benedict315:sc-reg-024-bid-storage
Jun 1, 2026
Merged

feat: optimize job registry bid handling with indexed storage and com…#583
soomtochukwu merged 2 commits into
DXmakers:mainfrom
Benedict315:sc-reg-024-bid-storage

Conversation

@Benedict315

Copy link
Copy Markdown
Contributor

Summary

Implements SC-REG-024 by optimizing Job Registry bid storage from a monolithic per-job bid vector into indexed bid records with bounded access.

Changes

  • Replaced Bids(job_id) vector storage with:
    • BidCount(job_id)
    • Bid(job_id, index)
    • BidIndex(job_id, freelancer)
  • Added compact CID validation naming for job metadata, proposals, and deliverables.
  • Updated accept_bid so only the job creator can assign a submitted bidder.
  • Transitioned accepted jobs to Assigned.
  • Added get_bid_at for bounded indexed bid reads.
  • Added specific BidIndexOutOfBounds error code for invalid bid indices.
  • Preserved get_bids compatibility by reconstructing the bid list from indexed rows.
  • Updated contract documentation and storage optimization notes.

Validation

  • Added tests for:
    • Indexed bid row reads
    • Out-of-bounds bid index rejection
    • Oversized CID rejection
    • Late bid submission after assignment
  • Ran git diff --check successfully.

Note: cargo test -p job_registry could not be run locally because cargo is not available in the current environment PATH.

closes #378

@Benedict315 Benedict315 requested a review from soomtochukwu as a code owner May 27, 2026 13:45
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

@jotel-dev is attempting to deploy a commit to the mAzI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented May 27, 2026

Copy link
Copy Markdown

@Benedict315 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Benedict315 Benedict315 force-pushed the sc-reg-024-bid-storage branch from 5e3b3bd to 5768e6f Compare May 27, 2026 14:09

@soomtochukwu soomtochukwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you could fix the merge conflict quick enough

@soomtochukwu soomtochukwu merged commit 1798136 into DXmakers:main Jun 1, 2026
6 of 8 checks passed
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.

[SC-REG-024] Job Registry and Proposal Scaling Validation - Step 24

2 participants