Skip to content

Runtime: Core BPF Migration: Struct for loading and checking builtin program accounts#331

Merged
buffalojoec merged 3 commits intoanza-xyz:masterfrom
buffalojoec:core-bpf-builtins
Mar 22, 2024
Merged

Runtime: Core BPF Migration: Struct for loading and checking builtin program accounts#331
buffalojoec merged 3 commits intoanza-xyz:masterfrom
buffalojoec:core-bpf-builtins

Conversation

@buffalojoec
Copy link
Copy Markdown

@buffalojoec buffalojoec commented Mar 20, 2024

This is chunk 3/7 of the broken-up PR #79.

Problem

When the runtime desires to migrate a builtin program to Core BPF, there exists
no reliable method for loading a builtin's program account and performing
various checks to ensure the program account is configured as expected.

Being able to run these checks before fetching the builtin's program account
is extremely important for ensuring a smooth migration to Core BPF.

Summary of Changes

Within the builtins submodule, add a module specifically for core_bpf_migration,
and inside of it create a new structure for loading a builtin's program account and
running checks, based on the type of builtin.

@buffalojoec buffalojoec changed the title Core bpf builtins Runtime: Core BPF Migration: Struct for loading and checking builtin program accounts Mar 20, 2024
@buffalojoec buffalojoec force-pushed the core-bpf-builtins branch 2 times, most recently from 668750b to 2af637f Compare March 20, 2024 01:57
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 81.8%. Comparing base (8b66a67) to head (52972c7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master     #331    +/-   ##
========================================
  Coverage    81.8%    81.8%            
========================================
  Files         838      840     +2     
  Lines      227363   227487   +124     
========================================
+ Hits       186187   186289   +102     
- Misses      41176    41198    +22     

@buffalojoec buffalojoec marked this pull request as ready for review March 21, 2024 02:01
@buffalojoec
Copy link
Copy Markdown
Author

Note this can go in separate from #318.

Comment thread runtime/src/bank/builtins/core_bpf_migration/mod.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/target_builtin.rs Outdated
Copy link
Copy Markdown

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm assuming CI is happy

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.

3 participants