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
Currently, we resort pools every block which is redundant since after the first block, the pools that are pushed to SQS are only the ones that are updated.
In O(n) where n is the total number of pools, place the k updated pools into the right position based on the pool rank
DoD
Pool sorting optimized where we avoid resoring all pools in O(nlogn). Instead, sort the k updated pools and place these into the right positions based on pool rating
Note that it might be possible that we will have to start persisting pool ratings since they currently aren't
Tested
The text was updated successfully, but these errors were encountered:
p0mvn
changed the title
sortAndStorePools: instead of resorting all pools every block, we should put the updated pools in the correct position
[SQS-Ingest] sortAndStorePools: instead of resorting all pools every block, we should put the updated pools in the correct position
Apr 17, 2024
Background
Currently, we resort pools every block which is redundant since after the first block, the pools that are pushed to SQS are only the ones that are updated.
Ref: https://github.com/osmosis-labs/sqs/pull/175/files#r1566536227
Instead, we should:
k
poolsO(n)
wheren
is the total number of pools, place thek
updated pools into the right position based on the pool rankDoD
The text was updated successfully, but these errors were encountered: