feat(wallet-toolbox): horizontally scale Storage with shared async sessions#283
Open
ty-everett wants to merge 9 commits into
Open
feat(wallet-toolbox): horizontally scale Storage with shared async sessions#283ty-everett wants to merge 9 commits into
ty-everett wants to merge 9 commits into
Conversation
This was referenced Jul 14, 2026
|
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.



Headline
Storage can now run behind a non-sticky load balancer with a shared, durable BRC-103 session store instead of process-local authentication state.
This draft deliberately consolidates and supersedes #279, #280, and #281 so maintainers have one review surface for the complete production follow-up.
Shared async sessions
KnexSessionManager, implementing the SDK's existingAsyncSessionManagercontractauth_sessionsKnex migration and indexed nonce, identity, and expiry lookup pathsStorageServerinject a shared session manager while retaining the in-memory default for compatibilitylastUpdateDate.now()values cannot downgrade a sessionThe focused test uses two independent Knex connections to one SQLite database, verifies lookup by nonce and identity across connections, exercises stale/equal-timestamp races, expiry, pruning, and safe removal. The StorageClient integration test performs a real authenticated RPC through
StorageServerusing the Knex manager.Correctness and production hardening
internalizeActionnotification driftlogRpcRequests: falseso saturated deployments can skip both the unconditional POST log and request-parameter serializationmonitor_events.created_atindex used for production proof-latency correlationmime-types,body-parser,dotenv) so built packages load under strict package-manager resolution; prepare auth middleware2.1.12.4.2so release checks stay in lockstepProduction evidence for the fan-out repair: txid
2cdf4bb89c765d5b9fadef1c2bc4aceb2258ac607d0471e9df5f833bb08e6250had transaction444915omitted while444912and444918completed.E2E and throughput methodology
The production harness now:
completedfor every tracked txThe pre-change production baseline (wallet-toolbox
2.4.1, one Storage Node process) remains the comparison point, not a claim for this un-deployed branch:Current bottleneck interpretation
Release behavior
Single-package publishes no longer wait five minutes or run global workspace synchronization. Cascade releases retain the existing propagation wait and synchronization path. This prevents a successful package publish from being reported failed after consumers are rewritten to unpublished sibling versions.
Because this PR now prepares both auth middleware
2.1.1and wallet-toolbox2.4.2, a cascade release is the clean path after merge; the single-package fix remains useful for future isolated releases.Validation
KnexSessionManagerexport load under strict pnpm resolutionrelease.yamlparses andgit diff --checkpassests-standard; full wallet-toolbox lint still reports only pre-existingWalletPermissionsManagertest warnings outside this diffDraft gates