Skip to content

[BOUNTY] Expand Contract Integration Test Coverage#183

Open
sayanget wants to merge 2 commits intoANAVHEOBA:mainfrom
sayanget:atlas/bounty-testing
Open

[BOUNTY] Expand Contract Integration Test Coverage#183
sayanget wants to merge 2 commits intoANAVHEOBA:mainfrom
sayanget:atlas/bounty-testing

Conversation

@sayanget
Copy link
Copy Markdown

Overview

This PR significantly expands the integration and stress test coverage for the PrivacyLayer Soroban contract, fulfilling the requirements of the [Expand Contract Integration Test Coverage] bounty.

New Test Coverage

  • Denomination Logic: Added tests to verify correct stroop/microunit amounts for all supported XLM and USDC denominations.
  • Stress Testing: Implemented sequential deposit stress tests (up to 50 deposits) to verify the incremental Merkle tree logic and filled subtree updates under heavy state changes.
  • Edge Cases:
    • Verified that uninitialized contracts correctly reject deposits.
    • Verified that zero-commitments are always rejected.
    • Verified that insufficient funds lead to expected contract errors.
    • Added tests for root history circular buffer overflow and eviction.
  • Admin Operations: Expanded tests for unauthorized admin access and successful verification key updates.

Performance & Reliability

  • All tests are designed to run within the Soroban test environment with mock_all_auths and budget().reset_unlimited() to ensure cryptographic consistency with Poseidon2 hashes.
  • Successfully passed all 41 unit tests (including 5 new comprehensive stress tests).

@sayanget
Copy link
Copy Markdown
Author

Claim Information

  • Bounty Task: [BOUNTY] Expand Contract Integration Test Coverage
  • Estimated ROI: 00+ USDC
  • Payment Address (RTC): RTC89b248bde16082e0b7b9cb1b0ab29aa361a962c0

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.

1 participant