Skip to content
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

Feature Gate Update - Requires the owner accounts of programs to be built-ins. #31488

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented May 4, 2023

Problem

The feature disable_builtin_loader_ownership_chains is designed to strictly limit the length down to two. However, it does not check that the owner of the program is owned itself by the native_loader and has the executable flag set like the chain loader did before.

Summary of Changes

  • Adds the new restriction to the feature gate of disable_builtin_loader_ownership_chains.
  • The case in which the loader is not owned by the native_loader changes its error message from CallChainTooDeep to InvalidProgramForExecution.

Feature Gate Issue: #29956

(owned by the native_loader and have the executable flag set)
@Lichtso Lichtso requested a review from pgarg66 May 4, 2023 16:55
@Lichtso Lichtso changed the title Requires the owner accounts of programs to be built-ins. Feature Gate Update - Requires the owner accounts of programs to be built-ins. May 4, 2023
Lichtso added a commit to Lichtso/solana that referenced this pull request May 4, 2023
@codecov
Copy link

codecov bot commented May 4, 2023

Codecov Report

Merging #31488 (86fb2d7) into master (886aea2) will decrease coverage by 0.1%.
The diff coverage is 75.0%.

@@            Coverage Diff            @@
##           master   #31488     +/-   ##
=========================================
- Coverage    81.4%    81.4%   -0.1%     
=========================================
  Files         731      731             
  Lines      208718   208723      +5     
=========================================
- Hits       170017   169977     -40     
- Misses      38701    38746     +45     

@Lichtso Lichtso merged commit 67939c0 into solana-labs:master May 4, 2023
@Lichtso Lichtso deleted the feature_update/disable_builtin_loader_ownership_chains branch May 4, 2023 19:03
Lichtso added a commit that referenced this pull request May 5, 2023
* Adds feature disable_builtin_loader_ownership_chains.

* Removes test_load_accounts_max_call_depth().

* Factors account indices out of match.

* Turns "match" into "if let Some(...) = ...".

* Renames program_owner => owner_id.

* Adds the actual feature gate to load_executable_accounts().

* Backport of #31488.
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.

2 participants