Repository navigation
Conversation
snuff12
force-pushed
the
fix/history-capacity-retention
branch
from
October 22, 2026 17:12
645ba3d to
a8d8805
Compare
This branch has not been deployed
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.
with_transaction_history(N)currently usesIndexMap's backing allocation as its retention limit. Allocation growth and resizing can retain more or fewer transactions than requested, including after a snapshot round-trip.Store the configured capacity separately and use it for enablement, eviction, and snapshot serialization. Preserve the existing truncation order when reducing the limit and keep the snapshot schema unchanged.
Add six public-API regressions for exact limits (1, 2, 4, 32, 33), partial-history resizing, disable/re-enable, failed transactions, duplicate rejection, and empty/populated snapshot restoration. All six fail on the base and pass with this fix.
Fixes #439.
Validation on local macOS:
cargo test --workspace --exclude litesvm-node --features precompiles --locked: 154 passed.cargo check -p litesvm-node --locked: passed.cargo clippy -p litesvm -p litesvm-persistence --all-targets --features precompiles --locked -- -D warnings: passed.cargo +nightly fmt --all -- --check: passed.git diff --check: passed.JavaScript runtime tests were not run. The workspace test run reused existing SBF test fixtures compiled from unchanged test-program sources.