feat(wallet): accelerate storage synchronization - #486
Draft
BraydenLangley wants to merge 1 commit into
Draft
Conversation
BraydenLangley
force-pushed
the
agent/wallet-sync-throughput
branch
5 times, most recently
from
August 17, 2026 21:51
82c5e6f to
568e029
Compare
BraydenLangley
force-pushed
the
agent/wallet-sync-throughput
branch
from
August 17, 2026 21:57
568e029 to
3d420ab
Compare
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.



Program and scope
getSyncChunkreads (15.16s/page average) while IndexedDB writes took about 0.1s/page. The source page builder was performing up to 25 sequential database reads to fill one 250-record entity page, and common user-scoped transaction proof lookups lacked composite indexes.Impact
Affected packages/services and intended patch versions (publication occurs only
through the release workflow after approval):
@bsv/wallet-toolbox2.11.0 (minor: additiveincludeTotals/SyncChunkTotalsAPI and runtime optimization)@bsv/wallet-toolbox-client2.11.0 (minor: carries the additive API)@bsv/wallet-toolbox-mobile2.11.0 (minor: carries the additive API)Implementation
10, 80, 160) instead of 25.(userId, provenTxId)and(userId, txid)transaction indexes. SQLiteEXPLAINtests prove both plans use the new indexes; a synthetic 5,000-row offset query improved from about 0.15s to 0.01s locally.bsv-blockchain/bsv-desktop: it uses the same WalletStorageManager replication path with localStorageKnexbehind Electron IPC. Its SQLite/WAL destination architecture is useful for persistence but does not remove this shared source-page bottleneck; its performance suite benchmarks ordinary storage operations rather than remote-to-local replication.Verification
pnpm health:checkpassed all policy tests; package docs and version governance checks passed.compatibility, public API, artifacts, dependencies, docs, and operations
scope-based skip is expected and validated by the merge gate
Security and dependencies
audit results were reviewed
(including accepted or false-positive issue states) and zero unreviewed hotspots;
Sonar's aggregate
Quality Gate passedverdict alone is not merge evidenceand removal condition
Dependency evidence
includeTotals; older providers return no totals; both paths remain supported. Metanet Client production build/tests passed while linked to this candidate.pnpm audit:securityexited 0 with existing governed findings; exact-head hosted CodeQL remains pending.Release and operations
controlling program
Rollout must be staged: merge/release packages only after review, rebuild storage service images against the release, let the Knex migration add the indexes, then validate the Metanet isolated benchmark before enabling/advertising production local backup. Rolling clients back is safe because totals are optional; rolling the service back forfeits the speed/totals improvement but preserves the legacy protocol.
Completion evidence
passing checks, resolved alerts, measurements, or an approved exception
guidance are current or concretely not applicable
being handed to another contributor as “complete”
restriction is assumed