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

Adjustments of loader-v4 #2630

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Aug 16, 2024

Problem

While writing the SIMD for loader-v4 I noticed some minor issues with our implementation.

Summary of Changes

  • Removes the empty program account check (InvalidAccountData), which is redundant because of the subsequent minimum size check.
  • Adjusts checks of program.state.status to conform to error messages.
  • Adds check to prevent authority transfer to itself.
  • Adjusts most execution errors to UnsupportedProgramId.
  • Removes the redundant owner check in execution (InvalidAccountOwner).
  • Adds a tombstone in the program cache upon retraction.

Copy link

mergify bot commented Aug 16, 2024

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.

- Adjusts checks of program.state.status to conform to error messages.
- Adds check to prevent authority transfer to itself.
- Adjusts most execution errors to UnsupportedProgramId.
- Removes the redundant owner check in execution.
- Adds a tombstone in the program cache upon retraction.
@Lichtso Lichtso force-pushed the refactor/loader-v4 branch from 624da53 to b72ff86 Compare August 19, 2024 08:48
@Lichtso Lichtso requested a review from pgarg66 August 19, 2024 14:27
@Lichtso Lichtso merged commit acaf5b7 into anza-xyz:master Aug 20, 2024
40 checks passed
@Lichtso Lichtso deleted the refactor/loader-v4 branch August 20, 2024 18:26
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
- Removes the empty program account check (InvalidAccountData).
- Adjusts checks of program.state.status to conform to error messages.
- Adds check to prevent authority transfer to itself.
- Adjusts most execution errors to UnsupportedProgramId.
- Removes the redundant owner check in execution.
- Adds a tombstone in the program cache upon retraction.
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