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

Replace executor cache usage with LoadedPrograms cache #31462

Merged
merged 9 commits into from
May 9, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented May 3, 2023

Problem

Need updates to the code to replace executor cache with LoadedPrograms cache.

Summary of Changes

Updated bank, loader and associated files to replace executor cache with loaded programs cache.

Fixes #

@pgarg66 pgarg66 force-pushed the use-loaded-programs-cache branch 10 times, most recently from 1c14a1d to a637d9f Compare May 5, 2023 19:23
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Merging #31462 (3c7d2ed) into master (fb7ba97) will decrease coverage by 0.1%.
The diff coverage is 93.2%.

@@            Coverage Diff            @@
##           master   #31462     +/-   ##
=========================================
- Coverage    81.3%    81.3%   -0.1%     
=========================================
  Files         734      734             
  Lines      205241   205290     +49     
=========================================
+ Hits       166922   166934     +12     
- Misses      38319    38356     +37     

@pgarg66 pgarg66 marked this pull request as ready for review May 5, 2023 21:06
@pgarg66 pgarg66 requested review from Lichtso and dmakarov May 5, 2023 21:06
dmakarov
dmakarov previously approved these changes May 5, 2023
program-runtime/src/loaded_programs.rs Outdated Show resolved Hide resolved
program-runtime/src/loaded_programs.rs Outdated Show resolved Hide resolved
runtime/src/bank.rs Show resolved Hide resolved
programs/bpf_loader/src/lib.rs Show resolved Hide resolved
@pgarg66 pgarg66 force-pushed the use-loaded-programs-cache branch from 5c02c6d to 07b470b Compare May 8, 2023 16:37
@pgarg66 pgarg66 requested a review from Lichtso May 8, 2023 16:39
@pgarg66 pgarg66 force-pushed the use-loaded-programs-cache branch 2 times, most recently from ddfe184 to 33bbaf5 Compare May 8, 2023 18:21
@@ -58,7 +58,8 @@ impl MessageProcessor {
transaction_context: &mut TransactionContext,
rent: Rent,
log_collector: Option<Rc<RefCell<LogCollector>>>,
tx_executor_cache: Rc<RefCell<TransactionExecutorCache>>,
programs_loaded_for_tx_batch: Rc<RefCell<LoadedProgramsForTxBatch>>,
Copy link
Contributor

@Lichtso Lichtso May 8, 2023

Choose a reason for hiding this comment

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

These three might not even require Rc<RefCell<>>, but that can be refactored later.

Lichtso
Lichtso previously approved these changes May 8, 2023
@pgarg66 pgarg66 force-pushed the use-loaded-programs-cache branch from fa55d49 to 3c7d2ed Compare May 9, 2023 21:46
@pgarg66 pgarg66 requested a review from Lichtso May 9, 2023 21:58
@steveluscher
Copy link
Contributor

Hey @pgarg66! The bpf loader tests (and probably the implementation) in web3.js broke with this change. Want to help fix them? I'm here if you need help. solana-labs/solana-web3.js#1308

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.

4 participants