Description
packages/stellar/src/soroban.dryrun.test.ts tests dry-run execution but does not have property tests verifying that fee estimation is deterministic across identical inputs and that estimated fees always exceed actual fees by the configured buffer margin.
Requirements and Context
- Property: identical contract call inputs always produce the same fee estimate
- Property: estimated fee ≥ actual fee × (1 + buffer margin)
- Test against fast-check generated
ScVal argument lists of varying complexity
- No live RPC calls — use mocked simulation responses with realistic resource values
Suggested Execution
Branch: test/soroban-dryrun-fee-estimation-accuracy-property
Implement Changes
- Add
soroban.dryrun.property.test.ts in packages/stellar/src/
- Use fast-check to generate varied argument lists and assert fee determinism
- Mock simulation response with generated resource values and assert buffer margin
- Test edge case: zero-resource invocation returns minimum base fee
Test and Commit
Run FC_NUM_RUNS=1000 pnpm test --filter=stellar -- soroban.dryrun.property and confirm determinism and buffer margin properties hold.
Example Commit Message
test(soroban): add property tests for dry-run fee estimation accuracy and determinism
Co-authored-by: <your-name>
Guidelines
- Branch off
main, keep PRs focused on one issue
- All new code must include unit or integration tests
- Ensure
pnpm lint and pnpm typecheck pass before review
- Link this issue in your PR description
- Request review from at least one maintainer before merging
Description
packages/stellar/src/soroban.dryrun.test.tstests dry-run execution but does not have property tests verifying that fee estimation is deterministic across identical inputs and that estimated fees always exceed actual fees by the configured buffer margin.Requirements and Context
ScValargument lists of varying complexitySuggested Execution
Branch:
test/soroban-dryrun-fee-estimation-accuracy-propertyImplement Changes
soroban.dryrun.property.test.tsinpackages/stellar/src/Test and Commit
Run
FC_NUM_RUNS=1000 pnpm test --filter=stellar -- soroban.dryrun.propertyand confirm determinism and buffer margin properties hold.Example Commit Message
Guidelines
main, keep PRs focused on one issuepnpm lintandpnpm typecheckpass before review