security: bound reverse queries and isolate exact-output capacity #1407
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!1407
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-1389-reverse-budget"
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?
Public router reverse quotes could perform hundreds of nested pair simulations per request, while one peer could occupy all exact-output slots. This change meters reverse work before each call and adds bounded client admission without weakening receive or signing protections.
Addresses #1389. Pair cw2 is 1.20.0; router cw2 is 1.3.0. Execute messages and storage layout are unchanged.
Completed issue criteria:
Validation: 888 contract workspace tests passed, with focused retests; router 12 tests twice; pair 96 plus focused retests; final-source exact-output unit 19, API integration 12 and admission 6 each passed twice; frontend 134 tests twice, plus 199 receive regressions and 268 tax regressions twice. Strict Clippy, formatting, frontend lint/types/production build, docs checks and secret scan pass. The Rust 2024 formatting mismatch discovered by the tax verifier was corrected and retested. Post-hook frontend formatting also passed all four affected failure cases.
Shared-host kernel disk I/O blocked normal Cargo bookkeeping. Equivalent final-source executables were preserved or freshly compiled to tmpfs, with source/binary hashes and compiler-argument provenance recorded.
make verify-issue-1389completed PASS=8 FAIL=0 SKIP=1; the #1376 and corrected #1381 verifiers pass with their explicit unavailable scopes.Unverified: LocalTerra gas/funded execution (height 838695 frozen since 06:49:55 UTC with a pending transaction), browser replay (Vite navigation setup timed out before app assertions), remaining unchanged broad indexer tax suites, and production deployment/migration. Failed setup attempts remain recorded; none is claimed as a passing test. No public LCD stress or real-wallet activity was performed. Production pair rollout remains separately tracked in #1386.
Reviewer/agent instructions:
make verify-issue-1389and the review checklist; inspect actual evidence and remaining scope.