Skip to content

Fix/issues 1131 1132 1133 1134 - #1192

Open
lami111isah wants to merge 4 commits into
StellerCraft:mainfrom
lami111isah:fix/issues-1131-1132-1133-1134
Open

Fix/issues 1131 1132 1133 1134#1192
lami111isah wants to merge 4 commits into
StellerCraft:mainfrom
lami111isah:fix/issues-1131-1132-1133-1134

Conversation

@lami111isah

Copy link
Copy Markdown

Fix: Documentation, Tests, and Performance for Stellar Contracts

Summary

  • Document network-passphrase migration for contract address derivation functions
  • Add unit test coverage for Soroban event relay dead-letter growth under sustained ACK failures
  • Add unit test coverage for multi-party issuance session expiry at exact boundary conditions
  • Optimize Soroban budget metrics storage from O(n) array shift to O(1) circular buffer

Changes

Testing

  • 16 new tests added across multiple test files
  • All 64 tests passing (multi-party-issuance: 30/30, budget-monitor: 34/34)
  • No breaking changes to existing functionality

Closes #1131
Closes #1132
Closes #1133
Closes #1134

…ntract address derivation

- Add networkPassphrase parameter to function documentation
- Create breaking changes section with before/after examples
- Explain rationale for network passphrase requirement
- List available network passphrases for common networks
…letter growth

- Add test case for event acknowledged on fourth delivery attempt
  (should not enter dead-letter buffer)
- Add test case for staged events cleared on unsubscribe
  (should not be added to dead-letter buffer)
- Both tests verify proper lifecycle handling for ACK failures
…ion expiry at exact boundary

- Update addCoSignerSignature to accept optional _now parameter for testing
- Add test cases for signature acceptance one moment before expiry boundary
- Add test case for exact expiry boundary (now === expiresAt)
- Add test cases for rejection after expiry boundary
- Add test cases for expireTimedOutSessions behavior at boundaries
- Verify both functions agree on expiration status at exact instant
- Test boundary cases with one moment before, at, and after expiry
… budget metrics

Replace O(n) array.shift() with O(1) circular buffer implementation for
soroban budget metrics storage. Maintains fixed-size array of 1000 entries
with wrapping write index.

Changes:
- Use fixed-size array + write index instead of array.shift()
- Implement O(1) pushMetric operation
- Update getBudgetMetrics to reconstruct circular buffer in insertion order
- Update clearBudgetMetrics to reset circular buffer state
- Add comprehensive tests for ordering, wrapping, and edge cases
- Verify output format unchanged (newest last)
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@lami111isah 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