-
Notifications
You must be signed in to change notification settings - Fork 255
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: Core BPF Migration: Struct for loading and checking source BPF program accounts #332
Runtime: Core BPF Migration: Struct for loading and checking source BPF program accounts #332
Conversation
6c917ad
to
70c605b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #332 +/- ##
=========================================
- Coverage 81.9% 81.8% -0.1%
=========================================
Files 840 841 +1
Lines 228098 228245 +147
=========================================
+ Hits 186818 186929 +111
- Misses 41280 41316 +36 |
70c605b
to
f82d301
Compare
Note this can go in separate from #318. |
f82d301
to
baea4fe
Compare
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.
Despite the number of comments, this seems pretty close. Nothing major 😅
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs
Outdated
Show resolved
Hide resolved
a830220
to
419262b
Compare
28e5e42
to
6aea930
Compare
This is chunk 4/7 of the broken-up PR #79.
Problem
When the runtime desires to migrate a builtin program to Core BPF, it will do
so by replacing the builtin program's program account with that of a BPF
upgradeable program's program account, which will contain a pointer to its
corresponding program-data account.
Currently, there exists no reliable method in the bank or runtime more broadly
for loading a BPF upgradeable program's accounts and performing various
checks to ensure both program and program-data account are configured as
expected.
Being able to run these checks before fetching the program's accounts is
extremely important for ensuring a smooth migration to Core BPF.
Summary of Changes
Within the
builtins
submodule, add a module specifically forcore_bpf_migration
,and inside of it create a new structure for loading a source BPF upgradeable program's
program and program-data account and running checks.