Uv3: fix tick bitmap sync size error #256
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many pools with small tick ranges (large tick spacing) would cause contract code to exceed chain size limit.
Motivation
I was facing errors due to the deploy contract being too large when there are many pools with large tick spacing. It is not sufficient in this case to simply limit the output size, but we need to limit the input query count. I also found the initial logic a bit confusing so I decided to rename it a bit to hopefully clarify it.
Solution
Added a cap of
100
range queries per group which seems to be about the max size which won't exceed the deploy limit. I would like to add tests for this but it doesn't appear to me that an appropriate test apparatus is in place. I would be open to adding one in a separate PR, but I would need some guidance.PR Checklist