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

Fix - LoadedProgramType::Closed #31922

Merged
merged 3 commits into from
Jun 8, 2023

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Jun 1, 2023

Problem

Bank::replenish_program_cache() maps all error of Bank::load_program() to LoadedProgramType::FailedVerification and never to LoadedProgramType::Closed. Also, the feature gate of simplify_writable_program_account_check should not include LoadedProgramType::Closed only LoadedProgramType::FailedVerification.

Summary of Changes

  • Makes Bank::load_program() return correct tombstones.
  • Fixes feature gate of simplify_writable_program_account_check.

@Lichtso Lichtso force-pushed the fix/loaded_program_type_closed branch from 13c20b6 to 037468f Compare June 1, 2023 16:26
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #31922 (e4ec4a3) into master (989e613) will decrease coverage by 0.1%.
The diff coverage is 78.8%.

@@            Coverage Diff            @@
##           master   #31922     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         762      762             
  Lines      207721   207669     -52     
=========================================
- Hits       170137   170094     -43     
+ Misses      37584    37575      -9     

@Lichtso Lichtso requested a review from pgarg66 June 1, 2023 17:52
pgarg66
pgarg66 previously approved these changes Jun 1, 2023
@Lichtso Lichtso added the v1.16 PRs that should be backported to v1.16 label Jun 1, 2023
@Lichtso Lichtso force-pushed the fix/loaded_program_type_closed branch 2 times, most recently from bd60a0b to 764dd93 Compare June 6, 2023 23:26
@Lichtso Lichtso requested a review from pgarg66 June 7, 2023 19:27
@Lichtso Lichtso force-pushed the fix/loaded_program_type_closed branch from 764dd93 to e4ec4a3 Compare June 7, 2023 19:32
@Lichtso Lichtso merged commit 3f13cd3 into solana-labs:master Jun 8, 2023
@Lichtso Lichtso deleted the fix/loaded_program_type_closed branch June 8, 2023 13:40
mergify bot pushed a commit that referenced this pull request Jun 8, 2023
* Makes Bank::load_program() return correct tombstones.

* Removes early TX failure caused by closed and invalid programs.

* Adjusts the feature gate of simplify_writable_program_account_check.

(cherry picked from commit 3f13cd3)

# Conflicts:
#	runtime/src/accounts.rs
Lichtso added a commit that referenced this pull request Jun 8, 2023
* Makes Bank::load_program() return correct tombstones.

* Removes early TX failure caused by closed and invalid programs.

* Adjusts the feature gate of simplify_writable_program_account_check.

(cherry picked from commit 3f13cd3)
Lichtso added a commit that referenced this pull request Jun 8, 2023
Fix - LoadedProgramType::Closed (#31922)

* Makes Bank::load_program() return correct tombstones.

* Removes early TX failure caused by closed and invalid programs.

* Adjusts the feature gate of simplify_writable_program_account_check.

(cherry picked from commit 3f13cd3)

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.16 PRs that should be backported to v1.16
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants