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

LoadedPrograms cache implementation and tests #30139

Merged
merged 10 commits into from
Feb 8, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Feb 6, 2023

Problem

Need facility to cache programs across active forks based on their deployment/updates.

Summary of Changes

This PR adds a new cache LoadedPrograms. The cache maintains multiple versions of loaded programs based on the active forks, and program's deployment/update slot. When the root slot is updated, the unreachable forks can be pruned from the cache.

This PR adds the framework for cache, and associated unit tests. More changes are needed in bank, accounts and surrounding code to integrate it in the flow.

Fixes #

@pgarg66 pgarg66 changed the title Program cache LoadedPrograms cache implementation and tests Feb 6, 2023
@pgarg66 pgarg66 requested a review from Lichtso February 6, 2023 00:21
@pgarg66 pgarg66 force-pushed the program-cache branch 3 times, most recently from 54e6960 to 7e7b629 Compare February 6, 2023 16:11
@pgarg66 pgarg66 marked this pull request as ready for review February 6, 2023 16:11
@Lichtso Lichtso mentioned this pull request Feb 7, 2023
@pgarg66 pgarg66 force-pushed the program-cache branch 2 times, most recently from 7957d00 to 0908b00 Compare February 7, 2023 22:50
runtime/src/bank.rs Show resolved Hide resolved
program-runtime/src/loaded_programs.rs Outdated Show resolved Hide resolved
program-runtime/src/loaded_programs.rs Outdated Show resolved Hide resolved
program-runtime/src/loaded_programs.rs Outdated Show resolved Hide resolved
@pgarg66 pgarg66 merged commit 375f9ae into solana-labs:master Feb 8, 2023
@pgarg66 pgarg66 deleted the program-cache branch February 8, 2023 21:24
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants