Skip to content

test: add boundary and deactivation tests (#71, #73, #74) and benchma… - #172

Open
Almikefred wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Almikefred:test/boundary-and-deactivation-tests
Open

test: add boundary and deactivation tests (#71, #73, #74) and benchma…#172
Almikefred wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Almikefred:test/boundary-and-deactivation-tests

Conversation

@Almikefred

Copy link
Copy Markdown

Summary

Add comprehensive boundary condition and deactivation tests covering solver bonding, slashing, and deregistration flows. Includes resource-usage
benchmark harness documenting CPU and ledger I/O costs per entrypoint.

Changes

#71 — Add register_solver exact-boundary top-up test

  • Test new solver registering with exactly MIN_BOND (not above)
  • Test existing solver topping up to land exactly at MIN_BOND total
  • Validates that sum >= MIN_BOND is sufficient (not strict >)

#73 — Add deregister_solver multi-deposit test

  • Register solver, top up with additional deposits multiple times
  • Deregister and verify exact accumulated bond returned
  • Ensures deregister refunds record.bond_amount precisely

#74 — Add solver deactivation boundary tests

  • Test slash that drops bond below MIN_BOND → is_active becomes false
  • Test slash that keeps bond >= MIN_BOND → is_active remains true
  • Validates is_solver_eligible reflects deactivation state

#72 — Add resource-usage benchmarking harness

  • Benchmark module documenting expected CPU instructions and ledger I/O per entrypoint
  • Comprehensive guide for each public function: reads, writes, and cost drivers
  • Execution test validates all entrypoints under representative loads
  • Reference for solvers/integrators estimating transaction fees

Notes

  • All tests pass; code-only delivery
  • Commits cover all 4 issues; no dependencies between them
  • Benchmark harness is self-documenting; run with cargo test benchmark_entrypoint_executions -- --nocapture

Closes #71, Closes #73, Closes #74, Closes #72

…stellar-vortex-protocol#73, stellar-vortex-protocol#74) and benchmark harness (stellar-vortex-protocol#72)

- stellar-vortex-protocol#71: Add register_solver exact-boundary tests (new solver at MIN_BOND, topup to exact MIN_BOND)
- stellar-vortex-protocol#73: Add deregister_solver multi-deposit test (verify exact bond return after multiple top-ups)
- stellar-vortex-protocol#74: Add slash deactivation tests (bond drops below MIN_BOND deactivates; stays above keeps active)
- stellar-vortex-protocol#72: Add resource-usage benchmark harness documenting CPU and ledger I/O costs per entrypoint

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

1 participant