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

Programs deployed before the latest root available on all current forks #31530

Merged
merged 2 commits into from
May 8, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented May 8, 2023

Problem

The WorkingSlot only tracks ancestor till the latest root. If the program was deployed prior to the latest root, it fails the ancestor check in LoadedPrograms cache.

Summary of Changes

The LoadedPrograms gets notified of new roots via prune() API calls. This change tracks the latest root in the cache, and treats all programs deployed prior to the latest root as available on all current forks. Since, pruning removes all forks that are unreachable from the new root.

Also updated the relevant unit tests to account for pruning and roots.

Fixes #

@pgarg66 pgarg66 requested a review from Lichtso May 8, 2023 03:27
@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Merging #31530 (93daa97) into master (9c6e7e0) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #31530     +/-   ##
=========================================
- Coverage    81.4%    81.4%   -0.1%     
=========================================
  Files         731      731             
  Lines      205112   205115      +3     
=========================================
- Hits       166994   166976     -18     
- Misses      38118    38139     +21     

@pgarg66 pgarg66 requested a review from Lichtso May 8, 2023 13:36
@pgarg66 pgarg66 merged commit d98aaf0 into solana-labs:master May 8, 2023
@pgarg66 pgarg66 deleted the track-cache-root branch May 8, 2023 14:51
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.

2 participants