feat(program-escrow): tune MAX_BATCH_SIZE based on Soroban instruction budget#1
Open
levibliz wants to merge 12 commits into
Open
feat(program-escrow): tune MAX_BATCH_SIZE based on Soroban instruction budget#1levibliz wants to merge 12 commits into
levibliz wants to merge 12 commits into
Conversation
* Add per-program circuit breaker threshold tuning (Jagadeeshftw#1255) - Add circuit_breaker_threshold field to ProgramData (Option<u8>) - Add InvalidCircuitBreakerThreshold error (code 804) - Add set_program_circuit_breaker_threshold admin setter with validation (1-100) - Add CircuitBreakerThresholdSetEvent for audit trail - Update record_failure to accept threshold_override parameter - Add comprehensive test suite for threshold functionality - Update documentation with usage examples * Add re-entrancy guard analysis for issue Jagadeeshftw#205
…agadeeshftw#1332) - Add circuit_breaker_threshold field to ProgramData (Option<u8>) - Add InvalidCircuitBreakerThreshold error (code 804) - Add set_program_circuit_breaker_threshold admin setter with validation (1-100) - Add CircuitBreakerThresholdSetEvent for audit trail - Update record_failure to accept threshold_override parameter - Add comprehensive test suite for threshold functionality - Update documentation with usage examples
…st tests, emit publish event (Jagadeeshftw#1247, Jagadeeshftw#1250, Jagadeeshftw#1252, Jagadeeshftw#1266) (Jagadeeshftw#1331)
…n budget - Set MAX_BATCH_SIZE = 100 with derivation comment referencing Soroban's 100M per-transaction CPU instruction limit. - Add BatchError::BatchTooLarge (code 410) for typed pre-flight rejection. - Add pre-flight check in batch_payout_internal that fires before any token transfer. - Add test coverage for boundary values (exact limit, limit+1, 2x limit) and balance-invariant verification. - Add CI workflow for program-escrow unit + integration tests. - Fix multiple brace-matching bugs that left functions unclosed or nested inside other functions.
… tests (Jagadeeshftw#1341) Co-authored-by: Your Name <you@example.com>
* test: add HalfOpen transition coverage to circuit breaker test suite * program-escrow: add query_program_delegates API and delegate audit test * feat: add query_all_delegates permission audit function via view facade * program-escrow: add schema_version to PauseStateChangedV2 and set emission schema_version
…de (Jagadeeshftw#1338) * test: add HalfOpen transition coverage to circuit breaker test suite * program-escrow: add query_program_delegates API and delegate audit test * feat: add query_all_delegates permission audit function via view facade
…shftw#1337) - Replace string panics with panic_with_error! using ContractError::InvalidFeeRate - Add boundary-value tests for lock_fee_rate and payout_fee_rate in fee_enforcement module - Create docs/program-escrow/fee-management.md documenting fee configuration and cap Closes Jagadeeshftw#1280 Co-authored-by: daddygokings-art <daddygokings@gmail.com>
* implemented the publish_program * fixed errors * fixed test errors --------- Co-authored-by: Jagadeesh <jagadeesh26062002@gmail.com>
…agadeeshftw#1336) * test: add HalfOpen transition coverage to circuit breaker test suite * program-escrow: add query_program_delegates API and delegate audit test --------- Co-authored-by: Jagadeesh <jagadeesh26062002@gmail.com>
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.
Description
Tune
MAX_BATCH_SIZEincontracts/program-escrowbased on Soroban's per-transaction CPU instruction limit of 100M.Changes
MAX_BATCH_SIZE = 100with a detailed derivation comment inlib.rs.BatchError::BatchTooLarge(code 410) toerrors.rs.batch_payout_internalthat fires before any state mutation.test_batch_limits.rsandtest_batch_operations.rs.lib.rs,error_recovery.rs, anderrors.rs.Closes Jagadeeshftw#1264