Use SQLITE_MAX_VARIABLE_NUMBER for chunking limit#20843
Open
Conversation
Coverage Report for CI Build 25115513192Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.09%) to 91.206%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions107 previously-covered lines in 29 files lost coverage.
Coverage Stats💛 - Coveralls |
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.
Wallet code was using the old 900 limit for chunking with trusted node - this change uses the SQLITE_MAX_VARIABLE_NUMBER var which sets the limit much highter in newer sqlite versions
Note, the untrusted limit remains unchanged
Note
Low Risk
Low risk: only adjusts the trusted sync batch size constant used for SQLite queries, with untrusted behavior unchanged; main concern is potential performance/memory impact from larger batches on some environments.
Overview
Updates wallet coin-state ingestion to size trusted-mode DB batches using
SQLITE_MAX_VARIABLE_NUMBER(instead of a hardcoded900) to match the SQLite host parameter limit on newer versions.Untrusted-mode batching remains at
10, preserving existing validation/throughput behavior for untrusted peers.Reviewed by Cursor Bugbot for commit d5d996a. Bugbot is set up for automated code reviews on this repo. Configure here.