You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since indexers do caching on their end, the gateway should detect recurring request hashes (potentially using requestCID in attestation) and reduce the budget on those queries once they meet some threshold.
Most queries will not meet this threshold. However, for the ones that do this will mitigate desires to cache query responses in the gateway. Rough pseudocode proposal:
pubstructBudgeter{// This must match the hashes of deterministic requests, including variables.// This can be cleared periodically, since nearly all entries will be short-lived.recurring_requests:RwLock<Set<Hash>>,
...
}implBudgeter{
...
pubasyncfnbudget(&self,hash:Hash) -> GRT{letmut budget = ...;ifself.recurring_requests.read().await.contains(&hash){
budget *= 0.1;}
budget
}pubfnadd_request(&mutself,hash:Hash){self.recurring_requests.try_lock.insert(hash);}}
open questions
How might this interact with auto-agora?
The text was updated successfully, but these errors were encountered:
Since indexers do caching on their end, the gateway should detect recurring request hashes (potentially using
requestCID
in attestation) and reduce the budget on those queries once they meet some threshold.Most queries will not meet this threshold. However, for the ones that do this will mitigate desires to cache query responses in the gateway. Rough pseudocode proposal:
open questions
The text was updated successfully, but these errors were encountered: