-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathpr.txt
More file actions
14 lines (12 loc) · 2.77 KB
/
Copy pathpr.txt
File metadata and controls
14 lines (12 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
This PR addresses several open issues across the repository:
1. **CI Test Coverage (Closes #137):** Added `cargo-llvm-cov` to the CI workflow (`.github/workflows/ci.yml`). Code coverage reports will now be generated and uploaded as a build artifact on every run, ensuring test suite coverage across the contracts is visible.
2. **Escrow Duplicate Contributions (Closes #139):** Fixed the `contribute()` function in `contracts/escrow/src/lib.rs`. It now checks if the sponsor already holds a contribution entry and merges funds into the existing slot instead of appending a new one. This strictly ties `MAX_SPONSORS` to distinct sponsors, preventing a single address from maliciously or accidentally exhausting the cap.
3. **Milestones Duplicate Contributions (Closes #140):** Applied the same fix to the `contribute()` function in `contracts/milestones/src/lib.rs`. The `MAX_SPONSORS` cap is now correctly enforced based on distinct sponsors. Existing tests have been updated to assert this logic.
4. **Milestones Dust Distribution (Closes #141):** Replaced the O(n²) `while` loop in `refund_remaining_budget()` (`contracts/milestones/src/lib.rs`) with the O(n log n) `sort_remainders_desc` helper. This brings the proportional refund logic into consistency with how `compute_split()` handles dust in the same file.
5. **Formatting and Linting:** Removed unused dead-code and fixed inconsistent digit groupings in tests to ensure the strict CI linter (`-D warnings`) passes successfully.
6. **Merge-conflict syntax fixes:** Resolved stray merge markers in `contracts/escrow/src/lib.rs` and `contracts/milestones/src/lib.rs` introduced during the `max_sponsors` feature integration, which caused build failures on a clean clone.
7. **Panic avoidance — deposit count ceiling (Closes #45):** Replaced the unchecked `deposit_count += 1` in `contracts/maintenance-pool/src/lib.rs` with `checked_add`, returning the new `DepositCountOverflow` error instead of panicking. Regression test added.
8. **Atomic payout revert documented & tested (#47):** Added `MockPanicToken` test doubles and tests `test_release_all_or_nothing_revert_with_blocked_recipient` (escrow) and `test_release_issue_all_or_nothing_revert_with_blocked_recipient` (milestones). README security model updated with mitigation guidance for backends.
9. **Milestones invariant fuzz harness (#54):** Added `test_milestones_invariant_fuzzing` — 300 random operations, budget-conservation and IssueStatus-consistency invariants checked after every step.
10. **Real-network integration test design (#50):** Added `docs/real-network-integration-testing.md` with full Testnet/Mainnet harness: env vars, Friendbot provisioning, WASM deployment via `soroban-cli`, liveness sequence, and verification steps.
All **94 tests** pass locally and the workspace builds successfully.