Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Refactor - Loader v4 deployment status #33024

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Aug 28, 2023

Problem

The current encoding of the program state leaves gaps of uninitialized / undefined memory.
See #32989, #32990 and #32991.

Summary of Changes

  • Replaces is_deployed with status: Retracted, Deployed, Finalized
  • Removes the Option<> from authority_address, None is now expressed as status Finalized
  • Places the status at the end and gives it repr(u64) so that there is no padding
  • Adds test for the layout of the program state
  • Forbids finalizing retracted programs

@Lichtso Lichtso requested a review from pgarg66 August 28, 2023 11:31
@dmakarov dmakarov self-requested a review August 28, 2023 11:40
Copy link
Contributor

@ripatel-fd ripatel-fd left a comment

Choose a reason for hiding this comment

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

The state layout changes look great.

@Lichtso Lichtso force-pushed the refactor/loader_v4_status branch 2 times, most recently from 097885a to f35eb55 Compare August 28, 2023 15:43
Replaces them with "status: LoaderV4Status" and "authority_address: Pubkey".
@Lichtso Lichtso force-pushed the refactor/loader_v4_status branch from f35eb55 to 50b73ec Compare August 28, 2023 15:51
@Lichtso Lichtso merged commit 1238e53 into solana-labs:master Aug 28, 2023
@Lichtso Lichtso deleted the refactor/loader_v4_status branch August 28, 2023 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants