-
Notifications
You must be signed in to change notification settings - Fork 211
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
Runtime: Expose builtin program IDs to crate #318
Conversation
A case can be made for making this method completely public, as suggested in #316. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment about the metric name. Otherwise this lgtm.
However, it would be good to confirm with @Lichtso that we aren't missing some rationale for removing a similar bank method in solana-labs#31654 (aside from the convenience of using the static list directly).
b451c9f
to
34308e2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #318 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 838 838
Lines 226927 226934 +7
=========================================
- Hits 185901 185899 -2
- Misses 41026 41035 +9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wfm, but please check in with @Lichtso /the runtime team before merge.
This is chunk 2/7 of the broken-up PR #79.
Problem
As we prepare to migrate builtin programs to Core BPF, it's important to decouple
components such as snapshot minimization from the static
BUILTINS
list.By adding a crate-only method to
Bank
that will allow a caller to immutablyborrow the bank's list of builtin program IDs, other runtime components can
get the bank's current list of supported builtins.
Summary of Changes
Two commits:
builtin_programs
field tobuiltin_program_ids
since the term "builtin" is heavily overloaded as it is, and this field is only the IDs, not theBuiltinPrototype
elements, as seen elsewhere inbank.rs
.get_builtin_program_ids(&self) -> &HashSet<Pubkey>
on the bank and use it in the snapshot minimizer.