Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize Soroban live state cache on startup #4663

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SirTyson
Copy link
Contributor

@SirTyson SirTyson commented Mar 7, 2025

Description

Defines the cache required by #4556 and initializes it on startup.

This PR introduces the live Soroban state cache required by CAP-66 and populates it on startup. It does not yet actually use the cache, nor is the cache maintained after startup. The reason for this is that soroban parallel apply (the consumer of this cache) is still in development, and it looks like we're moving away from ltx state access in that work. I think it's best to hold off on implementing access and cache maintenance until the parallel apply work is in a more final state.

In the meantime, this PR will add about 50 mb of RAM usage and delay startup on master for no gain, but this should be fine since 23.0 is our next planned release.

Update:

It looks like we'll be sticking with the ltx interface, so this PR has been updated to load CONTRACT_DATA entries from the cache, as well as update the cache during ledger application. TTL access and updates has not been updated yet, pending the TTL reconciliation from parallel apply.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Sorry, something went wrong.

@SirTyson SirTyson marked this pull request as draft March 11, 2025 02:27
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.

None yet

1 participant