Feature/benchmark tests performance#53
Merged
parkerwinner merged 3 commits intoFeb 26, 2026
Merged
Conversation
- Fixed baseline compilation errors in `remittance_hub.rs` and `payment_escrow.rs`:
- Implemented `enforce_rate_limit` in `RemittanceHubContract` and `PaymentEscrowContract`.
- Implemented `notify_external` placeholder in `PaymentEscrowContract`.
- Added missing imports for `rate_limit::FunctionType` and `DataKey`.
- Enhanced `contracts/Cargo.toml`:
- Added `criterion` dev-dependency.
- Defined `remittance_bench` harness.
- Cleaned up duplicate entries.
- Updated `contracts/src/lib.rs`:
- Made `aml`, `kyc`, and `oracle` modules public for benchmarking.
- Implemented `contracts/benches/remittance_bench.rs`:
- Detailed benchmark suite for `send_remittance`, `batch_create_escrows`, `batch_deposit`, and `batch_release`.
- Per-iteration environment refreshing for stateful operations.
- Verified performance scaling for batch operations.
This commit includes all implementation and verification steps for performance benchmarking.
- Consolidated duplicate imports in remittance_hub.rs. - Removed duplicate function definitions (enforce_rate_limit, notify_external) in payment_escrow.rs. - Ensured modules remain public in lib.rs for benchmark compatibility. - Verified build and runtime stability with cargo check and cargo test.
Contributor
Author
|
@parkerwinner please review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performance Benchmarking: Added Criterion benchmarks for send_remittance and all batch operations (create, deposit, release) with full state isolation per iteration.
Merge Conflict Resolution: Reconciled remittance_hub.rs and payment_escrow.rs to ensure the new analytics tracking works seamlessly with rate-limiting.
Contract Fixes: Resolved baseline compilation errors, missing standard implementation methods (enforce_rate_limit), and consolidated duplicate imports.
Verification: Confirmed codebase stability with cargo check and a successful run of the full test suite.
closes #38