test(pair): count parked dust in proptest escrow invariant (#264) #733
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!733
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/fix-264-proptest-escrow-parked-dust"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
make test-contractsis red on main (d6701c4): the pair-lib proptestsprop_match_bids_maker_cap/prop_match_asks_maker_capfail, so the whole integration suite never runs.Root cause is in the #264 wave, and it's test-only — not an escrow leak. The helper
assert_escrow_matches_lists(orderbook.rs) still asserts on-bookremaining==PENDING_ESCROW, but #264 now parks sub-10 dust off-book intoEXPIRED_LIMIT_CLAIMSwhile escrow keeps backing it until claim (L1). So escrow = on-book + parked dust. The helper under-counted and tripped on any random budget that left <10 dust (counterexample deltas were all 1/3/6/9).Conservation itself is correct — the dedicated #264 tests pass and prove it (
match_bid_dust_remainder_one_flushes_to_expired_claim: escrow drops bycostonly, dust stays pending == claimable). This patch makes the helper add the parked-dust total per side:After the fix:
make test-contracts= 402 passed, 0 failed. Test-only change,orderbook.rsproptest helper only (+19/-2), no contract logic touched.Found while verifying #262. Needs a quick look — this is gating verification of the whole contract wave (#262/#264/#265/#266/#263).
/cc @PlasticDigits
mentioned in issue #264
mentioned in issue #265
mentioned in issue #266
mentioned in issue #263
mentioned in issue #267
mentioned in issue #269
mentioned in commit
52a865bfb7