Repository navigation
Conversation
chunkDepositWithRebalanceEndpoint compared the loop index with chunkBinRange.length - 1, i.e. the parameter count of the chunkBinRange function (3) minus one, instead of the number of chunks. With 2, 4 or more chunks the last chunk did not get NoShrinkLeft. Fixes MeteoraAg#311 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #311.
In
chunkDepositWithRebalanceEndpoint, the parallel shrink mode of each chunk compared the loop index withchunkBinRange.length - 1.chunkBinRangeis the helper function, so.lengthis its parameter count (3), not the number of chunks inchunkedBinRange. The last chunk only gotNoShrinkLeftwhen there were exactly 3 chunks.Shrink modes per chunk count, before and after (
chunkBinRangedeclared with the same 3 parameters):With 4+ chunks, chunk 3 used
NoShrinkLeftand could trim the still-empty right side that chunks 4 and 5 are meant to fill (the issue shows this withsimulateTransaction).Change: one identifier (
chunkBinRange→chunkedBinRange) plus a CHANGELOG entry under Unreleased / Fixed. I did not add a test: the branch sits inside the async endpoint builder, and covering it would need either a pool fixture or pulling the selection out into a helper. Happy to do the latter if you prefer.Disclosure: I used an AI assistant (Claude) to help prepare this change. I checked the line, the parameter count of
chunkBinRange, and the table above myself.🤖 Generated with Claude Code