Verify #363: LCD-heavy route rate limits in production #882
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!882
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "verify/issue-363-lcd-heavy-rate-limits"
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?
Summary
Verification pass for GitLab #363. Production LCD-heavy rate limiting was already enforced in
indexer/src/config.rs(RUN_MODE=prodclampsRATE_LIMIT_LCD_HEAVY_RPS=0→ 10). This MR closes documentation and test gaps found during verify:docs/operator-secrets.md,docs/integrators.md,docs/route-solver.mdRATE_LIMIT_LCD_HEAVY_RPS=10inscripts/deploy-dex-local.shandindexer/.env.exampleprod_lcd_heavy_rate_limit_enforced_when_config_clamped(#363 prod governor path)skills/AGENTS_INDEXER_API_LCD_SECURITY.mdAcceptance checklist
config.rsclamps0→10inRunMode::Prod;cargo test --lib prod_forces_nonzero_rate_limits_when_zerodocs/operator-secrets.md,docs/integrators.md,skills/AGENTS_INDEXER_API_LCD_SECURITY.md,indexer-invariants.md,indexer/.env.examplecd indexer && cargo test --test security -j 1 -- --test-threads=1— 24/24 including new prod-clamped testSIM_QUOTE_DEBOUNCE_MS=350(~2.8 req/s peak) << 10 RPS LCD-heavy default; QA template setsRATE_LIMIT_LCD_HEAVY_RPS=10with globalRATE_LIMIT_RPS=0for UI burstsmake test-indexer-integrationgreenlcd_heavy_route_rate_limit_returns_429+cg_cmc_orderbook_lcd_heavy_rate_limit_returns_429exercise the samelcd_heavy_routergovernordeploy-dex-local.shwritesRATE_LIMIT_LCD_HEAVY_RPS=10Test plan
changed the description
changed the description
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Reviewed by Cursor Bugbot for commit
3a757c7714. Configure here.Prod clamp test skips clamp
Low Severity
prod_lcd_heavy_rate_limit_enforced_when_config_clampedis described as verifying prod’sRATE_LIMIT_LCD_HEAVY_RPS=0→ 10 clamp, but the test setsrate_limit_lcd_heavy_rpsto 10 on a hand-builtConfigand never runsConfig::from_envclamping. A prod boot with LCD-heavy limit left at 0 would disable the LCD-heavy governor while this test could still pass.Reviewed by Cursor Bugbot for commit
3a757c7714. Configure here.Security review
Commit reviewed:
3a757c7714a6703b0aafbeb5654f9ea31b066d28Scope: Verification pass for #363 — documentation (
docs/operator-secrets.md,docs/integrators.md,docs/route-solver.md,skills/AGENTS_INDEXER_API_LCD_SECURITY.md), QA env templates (indexer/.env.example,scripts/deploy-dex-local.sh), and integration testprod_lcd_heavy_rate_limit_enforced_when_config_clampedinindexer/tests/security.rs. No runtime indexer logic changes in this diff.Method: Full MR diff review; traced rate-limit controls in unchanged
indexer/src/config.rs(prod clampsRATE_LIMIT_RPS=0→ 60,RATE_LIMIT_LCD_HEAVY_RPS=0→ 10) andindexer/src/api/mod.rs(lcd_heavy_router+PeerIpKeyExtractor, no XFF spoofing). Prior MR security threads: none.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Notes (informational, below reporting threshold):
RunMode::Prodand global limit off; prod env clamp (0→10) is already covered byprod_forces_nonzero_rate_limits_when_zeroinconfig.rs.deploy-dex-local.shwritesRATE_LIMIT_LCD_HEAVY_RPS=10alongsideRATE_LIMIT_RPS=0withAPI_BIND=127.0.0.1— localhost QA only; aligns with default behavior and keeps LCD-heavy governor active when global layer is disabled for UI bursts.Inline threads: none (no medium+ findings to anchor).
added 1 commit
9de66003- fix(indexer): prod LCD-heavy clamp integration test uses zero RPSCompare with previous version
changed the description
resolved all threads
added 32 commits
maind72c80f2- Merge branch 'main' into verify/issue-363-lcd-heavy-rate-limitsCompare with previous version
Resolved merge conflicts with
main(merge commitd72c80f).Files:
docs/operator-secrets.md,docs/integrators.md,indexer/.env.example,scripts/deploy-dex-local.shResolution: Kept main's rate-limit profile table and #362 observability additions; merged in #363 verification details (prod clamp wording, QA template comments, integrator 429 shape). No runtime logic changes.
Sanity:
cargo test --lib prod_forces_nonzero_rate_limits_when_zeropassed locally.changed the description
Security review
Commit reviewed:
d72c80f2c8d5421eebea5d094671ebf0e9c58a8aScope: Verification pass for #363 — documentation (
docs/operator-secrets.md,docs/integrators.md,docs/route-solver.md,skills/AGENTS_INDEXER_API_LCD_SECURITY.md), QA env templates (indexer/.env.example,scripts/deploy-dex-local.sh), and integration testsprod_lcd_heavy_rate_limit_enforced_when_env_zero+prod_lcd_heavy_rate_limit_enforced_when_config_clampedinindexer/tests/security.rs. No runtime indexer logic changes in this diff.Method: Full MR diff review (including merge-conflict resolution at
d72c80f); traced rate-limit controls in unchangedindexer/src/config.rs(prod clampsRATE_LIMIT_RPS=0→ 60,RATE_LIMIT_LCD_HEAVY_RPS=0→ 10) andindexer/src/api/mod.rs(lcd_heavy_router+PeerIpKeyExtractor, no trusted XFF). Re-read prior MR security thread on3a757c7— still applies after merge.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Notes (informational, below reporting threshold):
0→10) is enforced atConfig::from_envload; covered byprod_forces_nonzero_rate_limits_when_zero(config.rs) andprod_lcd_heavy_rate_limit_enforced_when_env_zero(security.rs). The additionalprod_lcd_heavy_rate_limit_enforced_when_config_clampedtest manually mirrors the clamp for hand-built test configs — test-coverage nuance only, not a production bypass.deploy-dex-local.shkeepsRATE_LIMIT_LCD_HEAVY_RPS=10withRATE_LIMIT_RPS=0andAPI_BIND=127.0.0.1— localhost QA template only; aligns with documented local profile.tower_governorbehavior; no new attack surface.Inline threads: none (no medium+ findings to anchor).
mentioned in commit
2f9c79676a