fix(indexer): key hybrid route cache on resolved discount tier (#283) #751
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!751
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/283-solver-cache-key-tier"
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?
Follow-up on #283, your "key on the sender's discount tier" direction.
hybrid_cache_key(route_solver.rs) keyed ontraderonly;maybe_simulateforwards bothtraderandsenderto the router and the on-chain discount depends on the subject's tier. So two callers withtraderunset but different senders on different tiers collided on the cache key and could be served each other's (wrong-discount) quote.Resolve the discount subject (
traderif set, elsesender) and look up its tier from the already-syncedtraders.tier_id(no extra LCD), then fold the tier into the key. Same-tier callers still share the cache (your intent); different tiers can't collide.hybrid_cache_keystays pure/sync — the async tier lookup is in the caller. Testhybrid_cache_key_distinguishes_discount_tieradded.Scoped to the cache-key correctness; the deeper sender / is_trusted_router tracking stays in #279's cache phase as flagged. No closing keyword.
mentioned in issue #283
mentioned in commit
013b51a77bmentioned in issue #279
mentioned in merge request !761
mentioned in merge request !764
mentioned in issue #306
mentioned in issue #322
mentioned in issue #323
mentioned in issue #324
mentioned in merge request !797