Repository navigation
#743 InMemorySigningHistoryStore has no size limit — grows unbounded with wallet activity - #825
Merged
k-deejah merged 1 commit intoOct 18, 2026
Conversation
…nded growth (Sorokit#743) Add configurable capacity limit to InMemorySigningHistoryStore with a default of 1000 entries. Oldest records are dropped on overflow (FIFO order), ensuring query() returns at most the capped count. The cap is tunable via constructor options without breaking existing interfaces.
|
@jotel-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Fixes #743
Caps
InMemorySigningHistoryStoreto a configurable maximum size so that long-running browser sessions and service signing loops do not grow unbounded in memory.Default Cap and Tunability
1000entries (defined by constantDEFAULT_SIGNING_HISTORY_MAX_ENTRIES = 1000).new InMemorySigningHistoryStore(500)new InMemorySigningHistoryStore({ maxEntries: 500 })new InMemorySigningHistoryStore()(defaults to 1000)Key Changes
src/wallet/signingHistory.ts, added capacity capping toInMemorySigningHistoryStore. When recording new signing records exceeds capacity, the oldest records are dropped in FIFO order viasplice.query()naturally returns at most the capped count of records.getMaxEntries()andsizegetter to inspect store capacity and count.DEFAULT_SIGNING_HISTORY_MAX_ENTRIESandInMemorySigningHistoryStoreOptionsinsrc/wallet/signingHistory.ts,src/wallet/index.ts, andsrc/index.ts.SigningRecord,SigningHistoryFilter, orSigningHistoryStore.src/tests/wallet.test.tsverifying capacity enforcement, FIFO eviction on overflow, and query limits.Acceptance Criteria Covered