Feat/match queue - #1161
Merged
chinweobtagaz merged 12 commits intoAug 28, 2026
Merged
Conversation
|
@codesailor4 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
1. Updated Data Models (
models.rs)MatchTypetoQueueTypewith three distinct queue types:CasualUnrated: For casual games that never modify ratingsRatedFree: For rated games without stakingRatedStaked { token: String, amount: u64 }: For crypto-staked rated gamesPrivate: Kept for private matchesStakeInfostruct to track token, amount, and escrow signature for staked matchesqueue_typeinstead ofmatch_typeand addedstake_infofieldcloses #1015
2. New API Endpoints (
routes.rs)/joinendpoint and replaced with three specific endpoints:POST /matchmaking/join-casual: For casual unrated matchesPOST /matchmaking/join-rated-free: For free rated matchesPOST /matchmaking/join-rated-staked: For staked rated matches (requires token, amount, and escrow signature)MatchRequestwith the correct queue type and validates required fields3. Matchmaking Service Improvements (
service.rs)verify_escrow_signaturemethod that would call Soroban RPC in production to validate on-chain depositsfind_casual_unrated_match: Only matches players from the casual queuefind_rated_free_match: Only matches players from the rated free queuefind_rated_staked_match: Only matches players from the exact same token/amount tier and verifies both have valid escrow signaturescloses #1039
4. Key Requirements Met
closes #1016
5. Next Steps for Production
verify_escrow_signatureto validate on-chain depositsThe implementation successfully separates the previously shared queue parameters into distinct, isolated queues that meet all the requirements, preventing accidental stake deductions or rating modifications for casual players.
closes #1017