Skip to content

Runtime: Core BPF Migration: Struct for loading and checking source BPF program accounts#332

Merged
buffalojoec merged 5 commits intoanza-xyz:masterfrom
buffalojoec:core-bpf-upgradeables
Mar 26, 2024
Merged

Runtime: Core BPF Migration: Struct for loading and checking source BPF program accounts#332
buffalojoec merged 5 commits intoanza-xyz:masterfrom
buffalojoec:core-bpf-upgradeables

Conversation

@buffalojoec
Copy link
Copy Markdown

@buffalojoec buffalojoec commented Mar 20, 2024

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 for core_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.

@buffalojoec buffalojoec force-pushed the core-bpf-upgradeables branch from 6c917ad to 70c605b Compare March 20, 2024 01:53
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 20, 2024

Codecov Report

❌ Patch coverage is 89.94083% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.8%. Comparing base (c867522) to head (6aea930).
⚠️ Report is 7002 commits behind head on master.

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     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@buffalojoec buffalojoec force-pushed the core-bpf-upgradeables branch from 70c605b to f82d301 Compare March 21, 2024 02:04
@buffalojoec buffalojoec marked this pull request as ready for review March 21, 2024 02:04
@buffalojoec
Copy link
Copy Markdown
Author

Note this can go in separate from #318.

@buffalojoec buffalojoec force-pushed the core-bpf-upgradeables branch from f82d301 to baea4fe Compare March 22, 2024 16:53
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.

Despite the number of comments, this seems pretty close. Nothing major 😅

Comment thread runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/mod.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/error.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs Outdated
Comment thread runtime/src/bank/builtins/core_bpf_migration/source_bpf_upgradeable.rs Outdated
@buffalojoec buffalojoec force-pushed the core-bpf-upgradeables branch 4 times, most recently from a830220 to 419262b Compare March 23, 2024 12:59
@buffalojoec buffalojoec force-pushed the core-bpf-upgradeables branch from 28e5e42 to 6aea930 Compare March 26, 2024 03:10
@buffalojoec buffalojoec merged commit 3627038 into anza-xyz:master Mar 26, 2024
OliverNChalk pushed a commit to OliverNChalk/agave that referenced this pull request Nov 11, 2025
Refactored to specify the vote protocol type explicitly.  QUIC will
require a more comprehensive rework and this code is UDP specific.

Refactored-by: Illia Bobyr <illia.bobyr@anza.xyz>
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