Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only send Caching requests every X blocks #416

Merged
merged 3 commits into from
Nov 9, 2023

Conversation

mikeki
Copy link
Contributor

@mikeki mikeki commented Nov 9, 2023

This change will change the behavior of how often we sample buckets in RoutesDB.

We currently have a RoutesDB that stores routes seen for the past 24 hours for every specific pair. This database is not really growing much, since most routes will tend to stay liquid within the same liquidity pools that are currently being traded.

We care about updating the database whenever theres a major change in liquidity, but that doesn't happen often, so we are setting some threshold for how often we sample each bucket of a given pair. (A bucket is a range of from amount to amount * phi), we are changing from sampling on every block to sampling less often to reduce the amount of sync request we send to the routing api.

We will likely have to play with the numbers based on the chain velocity (how often a block is generated).

@mikeki mikeki closed this Nov 9, 2023
@mikeki mikeki reopened this Nov 9, 2023
@mikeki mikeki merged commit b5a3f10 into main Nov 9, 2023
@mikeki mikeki deleted the mikeki/reduce_number_of_unnecessary_caching_requests branch November 9, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants