Skip to content

feat(payment): add batch payment proof verification#256

Open
johnsaviour56-ship-it wants to merge 4 commits into
Stellar-split:mainfrom
johnsaviour56-ship-it:batch-payment-proof-verification
Open

feat(payment): add batch payment proof verification#256
johnsaviour56-ship-it wants to merge 4 commits into
Stellar-split:mainfrom
johnsaviour56-ship-it:batch-payment-proof-verification

Conversation

@johnsaviour56-ship-it

Copy link
Copy Markdown

Summary

This PR introduces batch payment proof verification, enabling multiple payment proofs to be verified in a single contract call while preserving independent verification results for each proof.

Changes

  • Added verify_payment_proofs_batch() to process multiple payment proofs in one request.
  • Reused the existing single-proof verification logic for each proof in the batch.
  • Preserved input ordering by returning results in the same order as the submitted proofs.
  • Enforced a maximum batch size of 20 proofs per call to prevent excessive resource consumption.
  • Ensured invalid or stale proofs do not interrupt verification of other proofs in the batch.
  • Added comprehensive tests covering mixed verification scenarios and batch size validation.

Testing

Added coverage for:

  • Successful verification of multiple valid proofs
  • Mixed batches containing valid and stale/invalid proofs
  • Preservation of result ordering
  • Batch size limit enforcement
  • Regression testing for existing payment proof verification

Acceptance Criteria

  • Returns a result vector matching the input order and length
  • Rejects batches containing more than 20 proofs
  • Invalid or stale proofs do not prevent verification of other entries
  • Added tests for mixed valid/invalid batches
  • All existing tests pass
  • cargo clippy passes with zero warnings

Result

Payment proof verification is now more efficient for off-chain reconciliation workflows by supporting batch processing while maintaining deterministic ordering, isolated per-proof results, and bounded resource usage.

Closes #227

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@johnsaviour56-ship-it 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

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.

Build invoice payment proof batch verification

1 participant