Skip to content

SIMD-0431: Loader V3: Minimum Extend Program Size#9859

Merged
buffalojoec merged 5 commits into
anza-xyz:masterfrom
buffalojoec:simd-0431
Apr 14, 2026
Merged

SIMD-0431: Loader V3: Minimum Extend Program Size#9859
buffalojoec merged 5 commits into
anza-xyz:masterfrom
buffalojoec:simd-0431

Conversation

@buffalojoec
Copy link
Copy Markdown

@buffalojoec buffalojoec commented Jan 8, 2026

Problem

SIMD-0431 adds a minimum size requirement to the Loader V3 program. The program must be updated to enforce this check once the feature is enabled.

Summary of Changes

Implements SIMD-0431 by adding a check for the extension size's minimuim requirement.

The additional_bytes requested must be at least 10 KiB (MINIMUM_EXTEND_PROGRAM_BYTES), unless the account is smaller than MAX_PERMITTED_DATA_LEN - MINIMUM_EXTEND_PROGRAM_BYTES, in which case additional_bytes must equal the headroom.

@mergify
Copy link
Copy Markdown

mergify Bot commented Jan 8, 2026

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@Lichtso Lichtso added this to SVM Jan 15, 2026
@buffalojoec buffalojoec changed the title SIMD-0431: Loader V3: Permissioned Extend Program SIMD-0431: Loader V3: Minimum Extend Program Size Apr 6, 2026
@buffalojoec buffalojoec removed the noCI Suppress CI on this Pull Request label Apr 7, 2026
@buffalojoec buffalojoec requested a review from joncinque April 7, 2026 06:29
@buffalojoec buffalojoec marked this pull request as ready for review April 7, 2026 06:29
@buffalojoec buffalojoec requested a review from a team as a code owner April 7, 2026 06:29
@yihau yihau added the CI Pull Request is ready to enter CI label Apr 7, 2026
@anza-team anza-team removed the CI Pull Request is ready to enter CI label Apr 7, 2026
Copy link
Copy Markdown

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

The program change and tests look great!

The CI failures look legit, since they're from CLI tests that extend programs. Most likely those tests are using numbers that are too small.

Comment thread programs/bpf-loader-tests/tests/extend_program_ix.rs
@buffalojoec
Copy link
Copy Markdown
Author

The program change and tests look great!

The CI failures look legit, since they're from CLI tests that extend programs. Most likely those tests are using numbers that are too small.

Yeah, whoops I forgot I'd also have to handle the CLI in this same change. Added one more commit for that!

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 20.45455% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.1%. Comparing base (4bdffa6) to head (abf53b8).
⚠️ Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #9859     +/-   ##
=========================================
- Coverage    83.1%    83.1%   -0.1%     
=========================================
  Files         861      861             
  Lines      322079   322122     +43     
=========================================
- Hits       267922   267865     -57     
- Misses      54157    54257    +100     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

joncinque
joncinque previously approved these changes Apr 8, 2026
Copy link
Copy Markdown

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great! Just the tiny nit on the error, but you can take it or leave it

Comment thread cli/src/program.rs Outdated
joncinque
joncinque previously approved these changes Apr 8, 2026
Copy link
Copy Markdown

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks good, just a merge conflict now

joncinque
joncinque previously approved these changes Apr 9, 2026
Copy link
Copy Markdown

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great to me!

@buffalojoec
Copy link
Copy Markdown
Author

Sorry @joncinque I had to rebase onto #11685. Also @Lichtso need SVM approval for merge.

@buffalojoec buffalojoec enabled auto-merge April 13, 2026 09:45
Comment thread programs/bpf_loader/src/lib.rs Outdated
@buffalojoec buffalojoec requested a review from Lichtso April 14, 2026 02:37
Copy link
Copy Markdown

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great to me!

@buffalojoec buffalojoec added this pull request to the merge queue Apr 14, 2026
Merged via the queue into anza-xyz:master with commit 1919291 Apr 14, 2026
49 checks passed
@buffalojoec buffalojoec deleted the simd-0431 branch April 14, 2026 13:16
@github-project-automation github-project-automation Bot moved this to Done in SVM Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants