Skip to content

Commit

Permalink
Add deprecate executable metadata update simd
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi committed Dec 13, 2023
1 parent 71db902 commit 682af53
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions proposals/xxxx-deprecate-executable-meta-update-in-bpf-loader.md
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.

0 comments on commit 682af53

Please sign in to comment.