Skip to content

Implement Batch Result Submission for Tournaments #744

@famvilianity-eng

Description

@famvilianity-eng

Title: Add Batch Result Submission API for Tournament Support (v2.0 Prep)

Description: Future tournament support (v2.0) requires submitting multiple match results in one transaction. Implement the oracle API and contract logic to batch result submissions.

Requirements and Context:

  • Support submitting results for 10-100 matches in one transaction
  • Atomic execution (all or nothing)
  • Validate all results before commitment
  • Document batch submission limits
  • Security: Prevent duplicate submissions in batch

Suggested Execution: feature/batch-result-submission

Implement Changes:

  • Add submit_batch_results function to oracle contract
  • Implement batch validation logic (no duplicates, valid matches)
  • Create batch submission helper in oracle off-chain service
  • Add tests for batch edge cases

Test and Commit:

  • Unit tests for batch validation
  • Test batch size limits (100 max)
  • Test duplicate detection
  • Test partial failure recovery

Example Commit Message:

feat(oracle): add batch result submission for tournament support

- Implement submit_batch_results with atomic execution
- Add batch validation and duplicate detection
- Document batch size limits (max 100)
- Include comprehensive test coverage

Guidelines:

  • Design for extensibility (future: 1000+ batch sizes)
  • Document transaction size constraints
  • Add metrics for batch success rate

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions