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

Refactor - Simplify built-in program feature transition #31565

Merged

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented May 9, 2023

Problem

This PR is a preparation for unifying the logic which transitions built-in programs on epoch boundaries (in which their features are activated) and the bitemporal model of the LoadedPrograms cache (which utilizes an effective slot field per entry).

Summary of Changes

  • Removes builtins::get_builtins(), instead derives them from Bank::builtin_programs.
  • Removes BuiltinAction.
  • Turns BuiltinFeatureTransition from an enum into a struct.
  • Makes Bank::remove_builtin() place tombstones.

@Lichtso Lichtso requested a review from pgarg66 May 9, 2023 23:29
@Lichtso Lichtso changed the title Refactor - Built-in program feature transition Refactor - Simplify built-in program feature transition May 9, 2023
Lichtso added 2 commits May 10, 2023 10:08
Turns BuiltinFeatureTransition from an enum into a struct.
@Lichtso Lichtso force-pushed the refactor/builtin_program_feature_transition branch from 4dfe809 to bafb026 Compare May 10, 2023 08:40
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #31565 (bafb026) into master (8e9b064) will increase coverage by 0.0%.
The diff coverage is 59.0%.

@@           Coverage Diff           @@
##           master   #31565   +/-   ##
=======================================
  Coverage    81.3%    81.3%           
=======================================
  Files         734      734           
  Lines      205278   205237   -41     
=======================================
+ Hits       166926   166939   +13     
+ Misses      38352    38298   -54     

@Lichtso Lichtso merged commit 9e72668 into solana-labs:master May 10, 2023
@Lichtso Lichtso deleted the refactor/builtin_program_feature_transition branch May 10, 2023 14:53
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