Skip to content

Comments

CAP 81 draft#1869

Merged
SirTyson merged 3 commits intostellar:masterfrom
SirTyson:simplified-eviction
Feb 24, 2026
Merged

CAP 81 draft#1869
SirTyson merged 3 commits intostellar:masterfrom
SirTyson:simplified-eviction

Conversation

@SirTyson
Copy link
Contributor

This CAP outlines a simplified eviction scan logic for Protocol 26. Basically, we just keep a set of live Soroban entries ordered by TTL and key. At the end of each ledger, we check if the front of our set is expired and evict up to maxEntriesToEvict of expired state. Should maintaining this set be too inefficient, we outline future non-protocol breaking optimizations.

Additionally, this separates eviction limits, one for temp entries and one for persistent entries. Temp and persistent entries are fundamentally quite different, so this give us better control over eviction behavior, with little added complexity (we can just maintain two separate sets for each type).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces CAP-0081, which proposes a simplified eviction mechanism for Soroban entries in Protocol 26. The CAP changes eviction order from bucket-file-position to TTL-order, enabling in-memory eviction scans and improving performance.

Changes:

  • Adds CAP-0081 document proposing TTL-ordered eviction with separate limits for temporary and persistent entries
  • Introduces new config setting CONFIG_SETTING_MAX_TEMP_ENTRIES_TO_EVICT and renames maxEntriesToArchive to maxPersistentEntriesToArchive
  • Updates README.md to include CAP-0081 in the draft proposals list

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
core/cap-0081.md New CAP document defining TTL-ordered eviction mechanism for Protocol 26
core/README.md Added CAP-0081 entry to the draft proposals table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SirTyson SirTyson enabled auto-merge (squash) February 24, 2026 02:11
@SirTyson SirTyson force-pushed the simplified-eviction branch from c263b71 to cfb250b Compare February 24, 2026 02:11
@SirTyson SirTyson merged commit 01c9134 into stellar:master Feb 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants