-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deprecate executable metadata update simd
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
proposals/xxxx-deprecate-executable-meta-update-in-bpf-loader.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
simd: 'xxxx' | ||
title: Deprecate executable account metadata update during bpf program deployment | ||
authors: | ||
- Haoran Yi | ||
category: Standard | ||
type: Core | ||
status: Draft | ||
created: 2023-12-13 | ||
feature: https://github.com/solana-labs/solana/issues/33970 | ||
--- | ||
|
||
## Summary | ||
|
||
Add a new feature to deprecate executable account metadata update during bpf | ||
program deployment. | ||
|
||
## Motivation | ||
|
||
We want to deprecate the usage of *executable* metadata on account for program | ||
runtime. The new variant of Bpf loader (i.e. V2, V4 etc.) no longer requires | ||
*executable* metadata. However, during the program deployment, bpf loader still | ||
updates *executable* account metadata, which is not necessary. | ||
|
||
Therefore, as we are migrating from the old Bpf loader to the new Bpf loader, we | ||
are going to add a feature to deprecate executable account metadata update | ||
during bpf program deployment, so that we can activate the feature and deprecate | ||
*executable* metadata in program runtime for the new kind of Bpf loaders. | ||
|
||
|
||
## Alternatives Considered | ||
|
||
None | ||
|
||
## New Terminology | ||
|
||
None | ||
|
||
## Detailed Design | ||
|
||
When the feature - "deprecate executable account metadata update" is activated, | ||
the bpf loader will no longer mark *executable* metadata to true after | ||
program deployment. | ||
|
||
The PR for this work is at https://github.com/solana-labs/solana/pull/34194 | ||
|
||
## Impact | ||
|
||
1. People should no longer reply on *executable* metadata on the account. Instead, | ||
they can use an exported *fn is_executable(&account)* from solana sdk. | ||
|
||
|
||
## Security Considerations | ||
|
||
Because when the feature is activated, we should have already migrated to Bpf | ||
loader V2. Bpf loader V1 program deployment should have already been disabled | ||
(https://github.com/solana-foundation/solana-improvement-documents/pull/93). | ||
|
||
Account's owner and bpf loader metadata stored in account's data should | ||
correctly tell whether an account is executable. | ||
|
||
A small concern is that we may miss places in the code that still relies on | ||
account *executable*. However, with good testing, we should be able to cover all | ||
of them. And a fix for this should be not hard. | ||
|
||
## Backwards Compatibility | ||
|
||
Incompatible. |